CognitoIdentityProvider / Client / add_user_pool_client_secret
add_user_pool_client_secret¶
- CognitoIdentityProvider.Client.add_user_pool_client_secret(**kwargs)¶
Creates a new client secret for an existing confidential user pool app client. Supports up to 2 active secrets per app client for zero-downtime credential rotation workflows.
See also: AWS API Documentation
Request Syntax
response = client.add_user_pool_client_secret( UserPoolId='string', ClientId='string', ClientSecret='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 for which you want to create a new secret.
ClientSecret (string) – The client secret value you want to use. If you don’t provide this parameter, Amazon Cognito generates a secure secret for you.
- Return type:
dict
- Returns:
Response Syntax
{ 'ClientSecretDescriptor': { 'ClientSecretId': 'string', 'ClientSecretValue': 'string', 'ClientSecretCreateDate': datetime(2015, 1, 1) } }
Response Structure
(dict) –
The response from creating a new client secret.
ClientSecretDescriptor (dict) –
The details of the newly created client secret, including its unique identifier and creation timestamp. The ClientSecretValue is only returned when Amazon Cognito generates the secret. For custom secrets that you provide, the ClientSecretValue is not included in the response.
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.
Exceptions
CognitoIdentityProvider.Client.exceptions.InvalidParameterExceptionCognitoIdentityProvider.Client.exceptions.InternalServerExceptionCognitoIdentityProvider.Client.exceptions.TooManyRequestsExceptionCognitoIdentityProvider.Client.exceptions.LimitExceededExceptionCognitoIdentityProvider.Client.exceptions.AccessDeniedExceptionCognitoIdentityProvider.Client.exceptions.ResourceNotFoundException