CognitoIdentityProvider / Client / list_user_pool_client_secrets
list_user_pool_client_secrets¶
- CognitoIdentityProvider.Client.list_user_pool_client_secrets(**kwargs)¶
Lists all client secrets associated with a user pool app client. Returns metadata about the secrets. The response does not include pagination tokens as there are only 2 secrets at any given time and we return both with every ListUserPoolClientSecrets call. For security reasons, the response never reveals the actual secret value in ClientSecretValue.
See also: AWS API Documentation
Request Syntax
response = client.list_user_pool_client_secrets( UserPoolId='string', ClientId='string', NextToken='string' )
- Parameters:
UserPoolId (string) –
[REQUIRED]
The ID of the user pool that contains the app client.
ClientId (string) –
[REQUIRED]
The ID of the app client whose secrets you want to list.
NextToken (string) – This API operation returns a limited number of results. The pagination token is an identifier that you can present in an additional API request with the same parameters. When you include the pagination token, Amazon Cognito returns the next set of items after the current list. Subsequent requests return a new pagination token. By use of this token, you can paginate through the full list of items.
- Return type:
dict
- Returns:
Response Syntax
{ 'ClientSecrets': [ { 'ClientSecretId': 'string', 'ClientSecretValue': 'string', 'ClientSecretCreateDate': datetime(2015, 1, 1) }, ], 'NextToken': 'string' }
Response Structure
(dict) –
The response containing the list of client secret metadata. This response does not include a NextToken field as all secrets are returned in a single response.
ClientSecrets (list) –
A list of client secret descriptors containing the identifier and creation date for each secret. For security reasons, the response never reveals the actual secret value in ClientSecretValue.
(dict) –
Contains information about a client secret, including its unique identifier, value, and creation timestamp.
ClientSecretId (string) –
The unique identifier for the client secret. This identifier follows the format <client-id>–<epoch-create-time>.
ClientSecretValue (string) –
The actual secret value. This is only returned when creating a new secret and only if Amazon Cognito generated the secret. For custom secrets that you provide, this field is not included in the response.
ClientSecretCreateDate (datetime) –
The date and time when the client secret was created.
NextToken (string) –
The identifier that Amazon Cognito returned with the previous request to this operation. When you include a pagination token in your request, Amazon Cognito returns the next set of items in the list. By use of this token, you can paginate through the full list of items.
Exceptions
CognitoIdentityProvider.Client.exceptions.InvalidParameterExceptionCognitoIdentityProvider.Client.exceptions.InternalServerExceptionCognitoIdentityProvider.Client.exceptions.TooManyRequestsExceptionCognitoIdentityProvider.Client.exceptions.LimitExceededExceptionCognitoIdentityProvider.Client.exceptions.ResourceNotFoundException