Table of Contents
CognitoIdentityProvider.Client¶A low-level client representing Amazon Cognito Identity Provider:
client = session.create_client('cognito-idp')
These are the available methods:
add_custom_attributes()admin_add_user_to_group()admin_confirm_sign_up()admin_create_user()admin_delete_user()admin_delete_user_attributes()admin_disable_provider_for_user()admin_disable_user()admin_enable_user()admin_forget_device()admin_get_device()admin_get_user()admin_initiate_auth()admin_link_provider_for_user()admin_list_devices()admin_list_groups_for_user()admin_remove_user_from_group()admin_reset_user_password()admin_respond_to_auth_challenge()admin_set_user_settings()admin_update_device_status()admin_update_user_attributes()admin_user_global_sign_out()can_paginate()change_password()confirm_device()confirm_forgot_password()confirm_sign_up()create_group()create_identity_provider()create_resource_server()create_user_import_job()create_user_pool()create_user_pool_client()create_user_pool_domain()delete_group()delete_identity_provider()delete_resource_server()delete_user()delete_user_attributes()delete_user_pool()delete_user_pool_client()delete_user_pool_domain()describe_identity_provider()describe_resource_server()describe_user_import_job()describe_user_pool()describe_user_pool_client()describe_user_pool_domain()forget_device()forgot_password()generate_presigned_url()get_csv_header()get_device()get_group()get_identity_provider_by_identifier()get_paginator()get_ui_customization()get_user()get_user_attribute_verification_code()get_waiter()global_sign_out()initiate_auth()list_devices()list_groups()list_identity_providers()list_resource_servers()list_user_import_jobs()list_user_pool_clients()list_user_pools()list_users()list_users_in_group()resend_confirmation_code()respond_to_auth_challenge()set_ui_customization()set_user_settings()sign_up()start_user_import_job()stop_user_import_job()update_device_status()update_group()update_identity_provider()update_resource_server()update_user_attributes()update_user_pool()update_user_pool_client()verify_user_attribute()add_custom_attributes(**kwargs)¶Adds additional user attributes to the user pool schema.
See also: AWS API Documentation
Request Syntax
response = client.add_custom_attributes(
UserPoolId='string',
CustomAttributes=[
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_add_user_to_group(**kwargs)¶Adds the specified user to the specified group.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_add_user_to_group(
UserPoolId='string',
Username='string',
GroupName='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
admin_confirm_sign_up(**kwargs)¶Confirms user registration as an admin without using a confirmation code. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_confirm_sign_up(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_create_user(**kwargs)¶Creates a new user in the specified user pool and sends a welcome message via email or phone (SMS). This message is based on a template that you configured in your call to CreateUserPool or UpdateUserPool . This template includes your custom sign-up instructions and placeholders for user name and temporary password.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_create_user(
UserPoolId='string',
Username='string',
UserAttributes=[
{
'Name': 'string',
'Value': 'string'
},
],
ValidationData=[
{
'Name': 'string',
'Value': 'string'
},
],
TemporaryPassword='string',
ForceAliasCreation=True|False,
MessageAction='RESEND'|'SUPPRESS',
DesiredDeliveryMediums=[
'SMS'|'EMAIL',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'User': {
'Username': 'string',
'Attributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'UserCreateDate': datetime(2015, 1, 1),
'UserLastModifiedDate': datetime(2015, 1, 1),
'Enabled': True|False,
'UserStatus': 'UNCONFIRMED'|'CONFIRMED'|'ARCHIVED'|'COMPROMISED'|'UNKNOWN'|'RESET_REQUIRED'|'FORCE_CHANGE_PASSWORD',
'MFAOptions': [
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
}
}
Response Structure
|
admin_delete_user(**kwargs)¶Deletes a user as an administrator. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_delete_user(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
admin_delete_user_attributes(**kwargs)¶Deletes the user attributes in a user pool as an administrator. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_delete_user_attributes(
UserPoolId='string',
Username='string',
UserAttributeNames=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_disable_provider_for_user(**kwargs)¶Disables the user from signing in with the specified external (SAML or social) identity provider. If the user to disable is a Cognito User Pools native username + password user, they are not permitted to use their password to sign-in. If the user to disable is a linked external IdP user, any link between that user and an existing user is removed. The next time the external user (no longer attached to the previously linked DestinationUser ) signs in, they must create a new user account. See AdminLinkProviderForUser .
This action is enabled only for admin access and requires developer credentials.
The ProviderName must match the value specified when creating an IdP for the pool.
To disable a native username + password user, the ProviderName value must be Cognito and the ProviderAttributeName must be Cognito_Subject , with the ProviderAttributeValue being the name that is used in the user pool for the user.
The ProviderAttributeName must always be Cognito_Subject for social identity providers. The ProviderAttributeValue must always be the exact subject that was used when the user was originally linked as a source user.
For de-linking a SAML identity, there are two scenarios. If the linked identity has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue must be the same values that were used for the SourceUser when the identities were originally linked in the AdminLinkProviderForUser call. (If the linking was done with ProviderAttributeName set to Cognito_Subject , the same applies here). However, if the user has already signed in, the ProviderAttributeName must be Cognito_Subject and ProviderAttributeValue must be the subject of the SAML assertion.
See also: AWS API Documentation
Request Syntax
response = client.admin_disable_provider_for_user(
UserPoolId='string',
User={
'ProviderName': 'string',
'ProviderAttributeName': 'string',
'ProviderAttributeValue': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_disable_user(**kwargs)¶Disables the specified user as an administrator. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_disable_user(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_enable_user(**kwargs)¶Enables the specified user as an administrator. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_enable_user(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_forget_device(**kwargs)¶Forgets the device, as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_forget_device(
UserPoolId='string',
Username='string',
DeviceKey='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
admin_get_device(**kwargs)¶Gets the device, as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_get_device(
DeviceKey='string',
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Device': {
'DeviceKey': 'string',
'DeviceAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'DeviceCreateDate': datetime(2015, 1, 1),
'DeviceLastModifiedDate': datetime(2015, 1, 1),
'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
}
}
Response Structure
|
admin_get_user(**kwargs)¶Gets the specified user by user name in a user pool as an administrator. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_get_user(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Username': 'string',
'UserAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'UserCreateDate': datetime(2015, 1, 1),
'UserLastModifiedDate': datetime(2015, 1, 1),
'Enabled': True|False,
'UserStatus': 'UNCONFIRMED'|'CONFIRMED'|'ARCHIVED'|'COMPROMISED'|'UNKNOWN'|'RESET_REQUIRED'|'FORCE_CHANGE_PASSWORD',
'MFAOptions': [
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
}
Response Structure
|
admin_initiate_auth(**kwargs)¶Initiates the authentication flow, as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_initiate_auth(
UserPoolId='string',
ClientId='string',
AuthFlow='USER_SRP_AUTH'|'REFRESH_TOKEN_AUTH'|'REFRESH_TOKEN'|'CUSTOM_AUTH'|'ADMIN_NO_SRP_AUTH',
AuthParameters={
'string': 'string'
},
ClientMetadata={
'string': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH'|'NEW_PASSWORD_REQUIRED',
'Session': 'string',
'ChallengeParameters': {
'string': 'string'
},
'AuthenticationResult': {
'AccessToken': 'string',
'ExpiresIn': 123,
'TokenType': 'string',
'RefreshToken': 'string',
'IdToken': 'string',
'NewDeviceMetadata': {
'DeviceKey': 'string',
'DeviceGroupKey': 'string'
}
}
}
Response Structure
|
admin_link_provider_for_user(**kwargs)¶Links an existing user account in a user pool (DestinationUser ) to an identity from an external identity provider (SourceUser ) based on a specified attribute name and value from the external identity provider. This allows you to create a link from the existing user account to an external federated user identity that has not yet been used to sign in, so that the federated user identity can be used to sign in as the existing user account.
For example, if there is an existing user with a username and password, this API links that user to a federated user identity, so that when the federated user identity is used, the user signs in as the existing user account.
Warning
Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external identity providers and provider attributes that have been trusted by the application owner.
See also AdminDisableProviderForUser .
This action is enabled only for admin access and requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_link_provider_for_user(
UserPoolId='string',
DestinationUser={
'ProviderName': 'string',
'ProviderAttributeName': 'string',
'ProviderAttributeValue': 'string'
},
SourceUser={
'ProviderName': 'string',
'ProviderAttributeName': 'string',
'ProviderAttributeValue': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_list_devices(**kwargs)¶Lists devices, as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_list_devices(
UserPoolId='string',
Username='string',
Limit=123,
PaginationToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Devices': [
{
'DeviceKey': 'string',
'DeviceAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'DeviceCreateDate': datetime(2015, 1, 1),
'DeviceLastModifiedDate': datetime(2015, 1, 1),
'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
},
],
'PaginationToken': 'string'
}
Response Structure
|
admin_list_groups_for_user(**kwargs)¶Lists the groups that the user belongs to.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_list_groups_for_user(
Username='string',
UserPoolId='string',
Limit=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Groups': [
{
'GroupName': 'string',
'UserPoolId': 'string',
'Description': 'string',
'RoleArn': 'string',
'Precedence': 123,
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
admin_remove_user_from_group(**kwargs)¶Removes the specified user from the specified group.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_remove_user_from_group(
UserPoolId='string',
Username='string',
GroupName='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
admin_reset_user_password(**kwargs)¶Resets the specified user’s password in a user pool as an administrator. Works on any user.
When a developer calls this API, the current password is invalidated, so it must be changed. If a user tries to sign in after the API is called, the app will get a PasswordResetRequiredException exception back and should direct the user down the flow to reset the password, which is the same as the forgot password flow. In addition, if the user pool has phone verification selected and a verified phone number exists for the user, or if email verification is selected and a verified email exists for the user, calling this API will also result in sending a message to the end user with the code to change their password.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_reset_user_password(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_respond_to_auth_challenge(**kwargs)¶Responds to an authentication challenge, as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_respond_to_auth_challenge(
UserPoolId='string',
ClientId='string',
ChallengeName='SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH'|'NEW_PASSWORD_REQUIRED',
ChallengeResponses={
'string': 'string'
},
Session='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH'|'NEW_PASSWORD_REQUIRED',
'Session': 'string',
'ChallengeParameters': {
'string': 'string'
},
'AuthenticationResult': {
'AccessToken': 'string',
'ExpiresIn': 123,
'TokenType': 'string',
'RefreshToken': 'string',
'IdToken': 'string',
'NewDeviceMetadata': {
'DeviceKey': 'string',
'DeviceGroupKey': 'string'
}
}
}
Response Structure
|
admin_set_user_settings(**kwargs)¶Sets all the user settings for a specified user name. Works on any user.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_set_user_settings(
UserPoolId='string',
Username='string',
MFAOptions=[
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_update_device_status(**kwargs)¶Updates the device status as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_update_device_status(
UserPoolId='string',
Username='string',
DeviceKey='string',
DeviceRememberedStatus='remembered'|'not_remembered'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_update_user_attributes(**kwargs)¶Updates the specified user’s attributes, including developer attributes, as an administrator. Works on any user.
For custom attributes, you must prepend the custom: prefix to the attribute name.
In addition to updating user attributes, this API can also be used to mark phone and email as verified.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_update_user_attributes(
UserPoolId='string',
Username='string',
UserAttributes=[
{
'Name': 'string',
'Value': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
admin_user_global_sign_out(**kwargs)¶Signs out users from all devices, as an administrator.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.admin_user_global_sign_out(
UserPoolId='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
change_password(**kwargs)¶Changes the password for a specified user in a user pool.
See also: AWS API Documentation
Request Syntax
response = client.change_password(
PreviousPassword='string',
ProposedPassword='string',
AccessToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
confirm_device(**kwargs)¶Confirms tracking of the device. This API call is the call that begins device tracking.
See also: AWS API Documentation
Request Syntax
response = client.confirm_device(
AccessToken='string',
DeviceKey='string',
DeviceSecretVerifierConfig={
'PasswordVerifier': 'string',
'Salt': 'string'
},
DeviceName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserConfirmationNecessary': True|False
}
Response Structure
|
confirm_forgot_password(**kwargs)¶Allows a user to enter a confirmation code to reset a forgotten password.
See also: AWS API Documentation
Request Syntax
response = client.confirm_forgot_password(
ClientId='string',
SecretHash='string',
Username='string',
ConfirmationCode='string',
Password='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
confirm_sign_up(**kwargs)¶Confirms registration of a user and handles the existing alias from a previous user.
See also: AWS API Documentation
Request Syntax
response = client.confirm_sign_up(
ClientId='string',
SecretHash='string',
Username='string',
ConfirmationCode='string',
ForceAliasCreation=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
create_group(**kwargs)¶Creates a new group in the specified user pool.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.create_group(
GroupName='string',
UserPoolId='string',
Description='string',
RoleArn='string',
Precedence=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Group': {
'GroupName': 'string',
'UserPoolId': 'string',
'Description': 'string',
'RoleArn': 'string',
'Precedence': 123,
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
create_identity_provider(**kwargs)¶Creates an identity provider for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.create_identity_provider(
UserPoolId='string',
ProviderName='string',
ProviderType='SAML'|'Facebook'|'Google'|'LoginWithAmazon',
ProviderDetails={
'string': 'string'
},
AttributeMapping={
'string': 'string'
},
IdpIdentifiers=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'IdentityProvider': {
'UserPoolId': 'string',
'ProviderName': 'string',
'ProviderType': 'SAML'|'Facebook'|'Google'|'LoginWithAmazon',
'ProviderDetails': {
'string': 'string'
},
'AttributeMapping': {
'string': 'string'
},
'IdpIdentifiers': [
'string',
],
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
create_resource_server(**kwargs)¶Creates a new OAuth2.0 resource server and defines custom scopes in it.
See also: AWS API Documentation
Request Syntax
response = client.create_resource_server(
UserPoolId='string',
Identifier='string',
Name='string',
Scopes=[
{
'ScopeName': 'string',
'ScopeDescription': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ResourceServer': {
'UserPoolId': 'string',
'Identifier': 'string',
'Name': 'string',
'Scopes': [
{
'ScopeName': 'string',
'ScopeDescription': 'string'
},
]
}
}
Response Structure
|
create_user_import_job(**kwargs)¶Creates the user import job.
See also: AWS API Documentation
Request Syntax
response = client.create_user_import_job(
JobName='string',
UserPoolId='string',
CloudWatchLogsRoleArn='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserImportJob': {
'JobName': 'string',
'JobId': 'string',
'UserPoolId': 'string',
'PreSignedUrl': 'string',
'CreationDate': datetime(2015, 1, 1),
'StartDate': datetime(2015, 1, 1),
'CompletionDate': datetime(2015, 1, 1),
'Status': 'Created'|'Pending'|'InProgress'|'Stopping'|'Expired'|'Stopped'|'Failed'|'Succeeded',
'CloudWatchLogsRoleArn': 'string',
'ImportedUsers': 123,
'SkippedUsers': 123,
'FailedUsers': 123,
'CompletionMessage': 'string'
}
}
Response Structure
|
create_user_pool(**kwargs)¶Creates a new Amazon Cognito user pool and sets the password policy for the pool.
See also: AWS API Documentation
Request Syntax
response = client.create_user_pool(
PoolName='string',
Policies={
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
LambdaConfig={
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
AutoVerifiedAttributes=[
'phone_number'|'email',
],
AliasAttributes=[
'phone_number'|'email'|'preferred_username',
],
UsernameAttributes=[
'phone_number'|'email',
],
SmsVerificationMessage='string',
EmailVerificationMessage='string',
EmailVerificationSubject='string',
VerificationMessageTemplate={
'SmsMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string',
'EmailMessageByLink': 'string',
'EmailSubjectByLink': 'string',
'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
},
SmsAuthenticationMessage='string',
MfaConfiguration='OFF'|'ON'|'OPTIONAL',
DeviceConfiguration={
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
EmailConfiguration={
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
SmsConfiguration={
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
UserPoolTags={
'string': 'string'
},
AdminCreateUserConfig={
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
},
Schema=[
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserPool': {
'Id': 'string',
'Name': 'string',
'Policies': {
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
'LambdaConfig': {
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
'Status': 'Enabled'|'Disabled',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'SchemaAttributes': [
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
],
'AutoVerifiedAttributes': [
'phone_number'|'email',
],
'AliasAttributes': [
'phone_number'|'email'|'preferred_username',
],
'UsernameAttributes': [
'phone_number'|'email',
],
'SmsVerificationMessage': 'string',
'EmailVerificationMessage': 'string',
'EmailVerificationSubject': 'string',
'VerificationMessageTemplate': {
'SmsMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string',
'EmailMessageByLink': 'string',
'EmailSubjectByLink': 'string',
'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
},
'SmsAuthenticationMessage': 'string',
'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
'DeviceConfiguration': {
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
'EstimatedNumberOfUsers': 123,
'EmailConfiguration': {
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
'SmsConfiguration': {
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
'UserPoolTags': {
'string': 'string'
},
'SmsConfigurationFailure': 'string',
'EmailConfigurationFailure': 'string',
'AdminCreateUserConfig': {
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
}
}
Response Structure
|
create_user_pool_client(**kwargs)¶Creates the user pool client.
See also: AWS API Documentation
Request Syntax
response = client.create_user_pool_client(
UserPoolId='string',
ClientName='string',
GenerateSecret=True|False,
RefreshTokenValidity=123,
ReadAttributes=[
'string',
],
WriteAttributes=[
'string',
],
ExplicitAuthFlows=[
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
SupportedIdentityProviders=[
'string',
],
CallbackURLs=[
'string',
],
LogoutURLs=[
'string',
],
DefaultRedirectURI='string',
AllowedOAuthFlows=[
'code'|'implicit'|'client_credentials',
],
AllowedOAuthScopes=[
'string',
],
AllowedOAuthFlowsUserPoolClient=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
Response Structure
|
create_user_pool_domain(**kwargs)¶Creates a new domain for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.create_user_pool_domain(
Domain='string',
UserPoolId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_group(**kwargs)¶Deletes a group. Currently only groups with no members can be deleted.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.delete_group(
GroupName='string',
UserPoolId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_identity_provider(**kwargs)¶Deletes an identity provider for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.delete_identity_provider(
UserPoolId='string',
ProviderName='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_resource_server(**kwargs)¶Deletes a resource server.
See also: AWS API Documentation
Request Syntax
response = client.delete_resource_server(
UserPoolId='string',
Identifier='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_user(**kwargs)¶Allows a user to delete himself or herself.
See also: AWS API Documentation
Request Syntax
response = client.delete_user(
AccessToken='string'
)
| Parameters: | AccessToken (string) – [REQUIRED] The access token from a request to delete a user. |
|---|---|
| Returns: | None |
delete_user_attributes(**kwargs)¶Deletes the attributes for a user.
See also: AWS API Documentation
Request Syntax
response = client.delete_user_attributes(
UserAttributeNames=[
'string',
],
AccessToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
delete_user_pool(**kwargs)¶Deletes the specified Amazon Cognito user pool.
See also: AWS API Documentation
Request Syntax
response = client.delete_user_pool(
UserPoolId='string'
)
| Parameters: | UserPoolId (string) – [REQUIRED] The user pool ID for the user pool you want to delete. |
|---|---|
| Returns: | None |
delete_user_pool_client(**kwargs)¶Allows the developer to delete the user pool client.
See also: AWS API Documentation
Request Syntax
response = client.delete_user_pool_client(
UserPoolId='string',
ClientId='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
delete_user_pool_domain(**kwargs)¶Deletes a domain for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.delete_user_pool_domain(
Domain='string',
UserPoolId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
describe_identity_provider(**kwargs)¶Gets information about a specific identity provider.
See also: AWS API Documentation
Request Syntax
response = client.describe_identity_provider(
UserPoolId='string',
ProviderName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'IdentityProvider': {
'UserPoolId': 'string',
'ProviderName': 'string',
'ProviderType': 'SAML'|'Facebook'|'Google'|'LoginWithAmazon',
'ProviderDetails': {
'string': 'string'
},
'AttributeMapping': {
'string': 'string'
},
'IdpIdentifiers': [
'string',
],
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
describe_resource_server(**kwargs)¶Describes a resource server.
See also: AWS API Documentation
Request Syntax
response = client.describe_resource_server(
UserPoolId='string',
Identifier='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ResourceServer': {
'UserPoolId': 'string',
'Identifier': 'string',
'Name': 'string',
'Scopes': [
{
'ScopeName': 'string',
'ScopeDescription': 'string'
},
]
}
}
Response Structure
|
describe_user_import_job(**kwargs)¶Describes the user import job.
See also: AWS API Documentation
Request Syntax
response = client.describe_user_import_job(
UserPoolId='string',
JobId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserImportJob': {
'JobName': 'string',
'JobId': 'string',
'UserPoolId': 'string',
'PreSignedUrl': 'string',
'CreationDate': datetime(2015, 1, 1),
'StartDate': datetime(2015, 1, 1),
'CompletionDate': datetime(2015, 1, 1),
'Status': 'Created'|'Pending'|'InProgress'|'Stopping'|'Expired'|'Stopped'|'Failed'|'Succeeded',
'CloudWatchLogsRoleArn': 'string',
'ImportedUsers': 123,
'SkippedUsers': 123,
'FailedUsers': 123,
'CompletionMessage': 'string'
}
}
Response Structure
|
describe_user_pool(**kwargs)¶Returns the configuration information and metadata of the specified user pool.
See also: AWS API Documentation
Request Syntax
response = client.describe_user_pool(
UserPoolId='string'
)
| Parameters: | UserPoolId (string) – [REQUIRED] The user pool ID for the user pool you want to describe. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'UserPool': {
'Id': 'string',
'Name': 'string',
'Policies': {
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
'LambdaConfig': {
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
'Status': 'Enabled'|'Disabled',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'SchemaAttributes': [
{
'Name': 'string',
'AttributeDataType': 'String'|'Number'|'DateTime'|'Boolean',
'DeveloperOnlyAttribute': True|False,
'Mutable': True|False,
'Required': True|False,
'NumberAttributeConstraints': {
'MinValue': 'string',
'MaxValue': 'string'
},
'StringAttributeConstraints': {
'MinLength': 'string',
'MaxLength': 'string'
}
},
],
'AutoVerifiedAttributes': [
'phone_number'|'email',
],
'AliasAttributes': [
'phone_number'|'email'|'preferred_username',
],
'UsernameAttributes': [
'phone_number'|'email',
],
'SmsVerificationMessage': 'string',
'EmailVerificationMessage': 'string',
'EmailVerificationSubject': 'string',
'VerificationMessageTemplate': {
'SmsMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string',
'EmailMessageByLink': 'string',
'EmailSubjectByLink': 'string',
'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
},
'SmsAuthenticationMessage': 'string',
'MfaConfiguration': 'OFF'|'ON'|'OPTIONAL',
'DeviceConfiguration': {
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
'EstimatedNumberOfUsers': 123,
'EmailConfiguration': {
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
'SmsConfiguration': {
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
'UserPoolTags': {
'string': 'string'
},
'SmsConfigurationFailure': 'string',
'EmailConfigurationFailure': 'string',
'AdminCreateUserConfig': {
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
}
}
Response Structure
|
describe_user_pool_client(**kwargs)¶Client method for returning the configuration information and metadata of the specified user pool client.
See also: AWS API Documentation
Request Syntax
response = client.describe_user_pool_client(
UserPoolId='string',
ClientId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
Response Structure
|
describe_user_pool_domain(**kwargs)¶Gets information about a domain.
See also: AWS API Documentation
Request Syntax
response = client.describe_user_pool_domain(
Domain='string'
)
| Parameters: | Domain (string) – [REQUIRED] The domain string. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'DomainDescription': {
'UserPoolId': 'string',
'AWSAccountId': 'string',
'Domain': 'string',
'S3Bucket': 'string',
'CloudFrontDistribution': 'string',
'Version': 'string',
'Status': 'CREATING'|'DELETING'|'UPDATING'|'ACTIVE'|'FAILED'
}
}
Response Structure
|
forget_device(**kwargs)¶Forgets the specified device.
See also: AWS API Documentation
Request Syntax
response = client.forget_device(
AccessToken='string',
DeviceKey='string'
)
| Parameters: |
|
|---|---|
| Returns: | None |
forgot_password(**kwargs)¶Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user’s password. For the Username parameter, you can use the username or user alias. If a verified phone number exists for the user, the confirmation code is sent to the phone number. Otherwise, if a verified email exists, the confirmation code is sent to the email. If neither a verified phone number nor a verified email exists, InvalidParameterException is thrown. To use the confirmation code for resetting the password, call ConfirmForgotPassword .
See also: AWS API Documentation
Request Syntax
response = client.forgot_password(
ClientId='string',
SecretHash='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CodeDeliveryDetails': {
'Destination': 'string',
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
}
}
Response Structure
|
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_csv_header(**kwargs)¶Gets the header information for the .csv file to be used as input for the user import job.
See also: AWS API Documentation
Request Syntax
response = client.get_csv_header(
UserPoolId='string'
)
| Parameters: | UserPoolId (string) – [REQUIRED] The user pool ID for the user pool that the users are to be imported into. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'UserPoolId': 'string',
'CSVHeader': [
'string',
]
}
Response Structure
|
get_device(**kwargs)¶Gets the device.
See also: AWS API Documentation
Request Syntax
response = client.get_device(
DeviceKey='string',
AccessToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Device': {
'DeviceKey': 'string',
'DeviceAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'DeviceCreateDate': datetime(2015, 1, 1),
'DeviceLastModifiedDate': datetime(2015, 1, 1),
'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
}
}
Response Structure
|
get_group(**kwargs)¶Gets a group.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.get_group(
GroupName='string',
UserPoolId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Group': {
'GroupName': 'string',
'UserPoolId': 'string',
'Description': 'string',
'RoleArn': 'string',
'Precedence': 123,
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
get_identity_provider_by_identifier(**kwargs)¶Gets the specified identity provider.
See also: AWS API Documentation
Request Syntax
response = client.get_identity_provider_by_identifier(
UserPoolId='string',
IdpIdentifier='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'IdentityProvider': {
'UserPoolId': 'string',
'ProviderName': 'string',
'ProviderType': 'SAML'|'Facebook'|'Google'|'LoginWithAmazon',
'ProviderDetails': {
'string': 'string'
},
'AttributeMapping': {
'string': 'string'
},
'IdpIdentifiers': [
'string',
],
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_ui_customization(**kwargs)¶Gets the UI Customization information for a particular app client’s app UI, if there is something set. If nothing is set for the particular client, but there is an existing pool level customization (app clientId will be ALL ), then that is returned. If nothing is present, then an empty shape is returned.
See also: AWS API Documentation
Request Syntax
response = client.get_ui_customization(
UserPoolId='string',
ClientId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UICustomization': {
'UserPoolId': 'string',
'ClientId': 'string',
'ImageUrl': 'string',
'CSS': 'string',
'CSSVersion': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
get_user(**kwargs)¶Gets the user attributes and metadata for a user.
See also: AWS API Documentation
Request Syntax
response = client.get_user(
AccessToken='string'
)
| Parameters: | AccessToken (string) – [REQUIRED] The access token returned by the server response to get information about the user. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{
'Username': 'string',
'UserAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'MFAOptions': [
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
}
Response Structure
|
get_user_attribute_verification_code(**kwargs)¶Gets the user attribute verification code for the specified attribute name.
See also: AWS API Documentation
Request Syntax
response = client.get_user_attribute_verification_code(
AccessToken='string',
AttributeName='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CodeDeliveryDetails': {
'Destination': 'string',
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
}
}
Response Structure
|
get_waiter(waiter_name)¶global_sign_out(**kwargs)¶Signs out users from all devices.
See also: AWS API Documentation
Request Syntax
response = client.global_sign_out(
AccessToken='string'
)
| Parameters: | AccessToken (string) – [REQUIRED] The access token. |
|---|---|
| Return type: | dict |
| Returns: | Response Syntax{}
Response Structure
|
initiate_auth(**kwargs)¶Initiates the authentication flow.
See also: AWS API Documentation
Request Syntax
response = client.initiate_auth(
AuthFlow='USER_SRP_AUTH'|'REFRESH_TOKEN_AUTH'|'REFRESH_TOKEN'|'CUSTOM_AUTH'|'ADMIN_NO_SRP_AUTH',
AuthParameters={
'string': 'string'
},
ClientMetadata={
'string': 'string'
},
ClientId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH'|'NEW_PASSWORD_REQUIRED',
'Session': 'string',
'ChallengeParameters': {
'string': 'string'
},
'AuthenticationResult': {
'AccessToken': 'string',
'ExpiresIn': 123,
'TokenType': 'string',
'RefreshToken': 'string',
'IdToken': 'string',
'NewDeviceMetadata': {
'DeviceKey': 'string',
'DeviceGroupKey': 'string'
}
}
}
Response Structure
|
list_devices(**kwargs)¶Lists the devices.
See also: AWS API Documentation
Request Syntax
response = client.list_devices(
AccessToken='string',
Limit=123,
PaginationToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Devices': [
{
'DeviceKey': 'string',
'DeviceAttributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'DeviceCreateDate': datetime(2015, 1, 1),
'DeviceLastModifiedDate': datetime(2015, 1, 1),
'DeviceLastAuthenticatedDate': datetime(2015, 1, 1)
},
],
'PaginationToken': 'string'
}
Response Structure
|
list_groups(**kwargs)¶Lists the groups associated with a user pool.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.list_groups(
UserPoolId='string',
Limit=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Groups': [
{
'GroupName': 'string',
'UserPoolId': 'string',
'Description': 'string',
'RoleArn': 'string',
'Precedence': 123,
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
list_identity_providers(**kwargs)¶Lists information about all identity providers for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.list_identity_providers(
UserPoolId='string',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Providers': [
{
'ProviderName': 'string',
'ProviderType': 'SAML'|'Facebook'|'Google'|'LoginWithAmazon',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
list_resource_servers(**kwargs)¶Lists the resource servers for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.list_resource_servers(
UserPoolId='string',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ResourceServers': [
{
'UserPoolId': 'string',
'Identifier': 'string',
'Name': 'string',
'Scopes': [
{
'ScopeName': 'string',
'ScopeDescription': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
list_user_import_jobs(**kwargs)¶Lists the user import jobs.
See also: AWS API Documentation
Request Syntax
response = client.list_user_import_jobs(
UserPoolId='string',
MaxResults=123,
PaginationToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserImportJobs': [
{
'JobName': 'string',
'JobId': 'string',
'UserPoolId': 'string',
'PreSignedUrl': 'string',
'CreationDate': datetime(2015, 1, 1),
'StartDate': datetime(2015, 1, 1),
'CompletionDate': datetime(2015, 1, 1),
'Status': 'Created'|'Pending'|'InProgress'|'Stopping'|'Expired'|'Stopped'|'Failed'|'Succeeded',
'CloudWatchLogsRoleArn': 'string',
'ImportedUsers': 123,
'SkippedUsers': 123,
'FailedUsers': 123,
'CompletionMessage': 'string'
},
],
'PaginationToken': 'string'
}
Response Structure
|
list_user_pool_clients(**kwargs)¶Lists the clients that have been created for the specified user pool.
See also: AWS API Documentation
Request Syntax
response = client.list_user_pool_clients(
UserPoolId='string',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserPoolClients': [
{
'ClientId': 'string',
'UserPoolId': 'string',
'ClientName': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
list_user_pools(**kwargs)¶Lists the user pools associated with an AWS account.
See also: AWS API Documentation
Request Syntax
response = client.list_user_pools(
NextToken='string',
MaxResults=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserPools': [
{
'Id': 'string',
'Name': 'string',
'LambdaConfig': {
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
'Status': 'Enabled'|'Disabled',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
list_users(**kwargs)¶Lists the users in the Amazon Cognito user pool.
See also: AWS API Documentation
Request Syntax
response = client.list_users(
UserPoolId='string',
AttributesToGet=[
'string',
],
Limit=123,
PaginationToken='string',
Filter='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Users': [
{
'Username': 'string',
'Attributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'UserCreateDate': datetime(2015, 1, 1),
'UserLastModifiedDate': datetime(2015, 1, 1),
'Enabled': True|False,
'UserStatus': 'UNCONFIRMED'|'CONFIRMED'|'ARCHIVED'|'COMPROMISED'|'UNKNOWN'|'RESET_REQUIRED'|'FORCE_CHANGE_PASSWORD',
'MFAOptions': [
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
},
],
'PaginationToken': 'string'
}
Response Structure
|
list_users_in_group(**kwargs)¶Lists the users in the specified group.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.list_users_in_group(
UserPoolId='string',
GroupName='string',
Limit=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Users': [
{
'Username': 'string',
'Attributes': [
{
'Name': 'string',
'Value': 'string'
},
],
'UserCreateDate': datetime(2015, 1, 1),
'UserLastModifiedDate': datetime(2015, 1, 1),
'Enabled': True|False,
'UserStatus': 'UNCONFIRMED'|'CONFIRMED'|'ARCHIVED'|'COMPROMISED'|'UNKNOWN'|'RESET_REQUIRED'|'FORCE_CHANGE_PASSWORD',
'MFAOptions': [
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
},
],
'NextToken': 'string'
}
Response Structure
|
resend_confirmation_code(**kwargs)¶Resends the confirmation (for confirmation of registration) to a specific user in the user pool.
See also: AWS API Documentation
Request Syntax
response = client.resend_confirmation_code(
ClientId='string',
SecretHash='string',
Username='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CodeDeliveryDetails': {
'Destination': 'string',
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
}
}
Response Structure
|
respond_to_auth_challenge(**kwargs)¶Responds to the authentication challenge.
See also: AWS API Documentation
Request Syntax
response = client.respond_to_auth_challenge(
ClientId='string',
ChallengeName='SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH'|'NEW_PASSWORD_REQUIRED',
Session='string',
ChallengeResponses={
'string': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH'|'NEW_PASSWORD_REQUIRED',
'Session': 'string',
'ChallengeParameters': {
'string': 'string'
},
'AuthenticationResult': {
'AccessToken': 'string',
'ExpiresIn': 123,
'TokenType': 'string',
'RefreshToken': 'string',
'IdToken': 'string',
'NewDeviceMetadata': {
'DeviceKey': 'string',
'DeviceGroupKey': 'string'
}
}
}
Response Structure
|
set_ui_customization(**kwargs)¶Sets the UI customization information for a user pool’s built-in app UI.
You can specify app UI customization settings for a single client (with a specific clientId ) or for all clients (by setting the clientId to ALL ). If you specify ALL , the default configuration will be used for every client that has no UI customization set previously. If you specify UI customization settings for a particular client, it will no longer fall back to the ALL configuration.
Note
To use this API, your user pool must have a domain associated with it. Otherwise, there is no place to host the app’s pages, and the service will throw an error.
See also: AWS API Documentation
Request Syntax
response = client.set_ui_customization(
UserPoolId='string',
ClientId='string',
CSS='string',
ImageFile=b'bytes'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UICustomization': {
'UserPoolId': 'string',
'ClientId': 'string',
'ImageUrl': 'string',
'CSS': 'string',
'CSSVersion': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
set_user_settings(**kwargs)¶Sets the user settings like multi-factor authentication (MFA). If MFA is to be removed for a particular attribute pass the attribute with code delivery as null. If null list is passed, all MFA options are removed.
See also: AWS API Documentation
Request Syntax
response = client.set_user_settings(
AccessToken='string',
MFAOptions=[
{
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
sign_up(**kwargs)¶Registers the user in the specified user pool and creates a user name, password, and user attributes.
See also: AWS API Documentation
Request Syntax
response = client.sign_up(
ClientId='string',
SecretHash='string',
Username='string',
Password='string',
UserAttributes=[
{
'Name': 'string',
'Value': 'string'
},
],
ValidationData=[
{
'Name': 'string',
'Value': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserConfirmed': True|False,
'CodeDeliveryDetails': {
'Destination': 'string',
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
'UserSub': 'string'
}
Response Structure
|
start_user_import_job(**kwargs)¶Starts the user import.
See also: AWS API Documentation
Request Syntax
response = client.start_user_import_job(
UserPoolId='string',
JobId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserImportJob': {
'JobName': 'string',
'JobId': 'string',
'UserPoolId': 'string',
'PreSignedUrl': 'string',
'CreationDate': datetime(2015, 1, 1),
'StartDate': datetime(2015, 1, 1),
'CompletionDate': datetime(2015, 1, 1),
'Status': 'Created'|'Pending'|'InProgress'|'Stopping'|'Expired'|'Stopped'|'Failed'|'Succeeded',
'CloudWatchLogsRoleArn': 'string',
'ImportedUsers': 123,
'SkippedUsers': 123,
'FailedUsers': 123,
'CompletionMessage': 'string'
}
}
Response Structure
|
stop_user_import_job(**kwargs)¶Stops the user import job.
See also: AWS API Documentation
Request Syntax
response = client.stop_user_import_job(
UserPoolId='string',
JobId='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserImportJob': {
'JobName': 'string',
'JobId': 'string',
'UserPoolId': 'string',
'PreSignedUrl': 'string',
'CreationDate': datetime(2015, 1, 1),
'StartDate': datetime(2015, 1, 1),
'CompletionDate': datetime(2015, 1, 1),
'Status': 'Created'|'Pending'|'InProgress'|'Stopping'|'Expired'|'Stopped'|'Failed'|'Succeeded',
'CloudWatchLogsRoleArn': 'string',
'ImportedUsers': 123,
'SkippedUsers': 123,
'FailedUsers': 123,
'CompletionMessage': 'string'
}
}
Response Structure
|
update_device_status(**kwargs)¶Updates the device status.
See also: AWS API Documentation
Request Syntax
response = client.update_device_status(
AccessToken='string',
DeviceKey='string',
DeviceRememberedStatus='remembered'|'not_remembered'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
update_group(**kwargs)¶Updates the specified group with the specified attributes.
Requires developer credentials.
See also: AWS API Documentation
Request Syntax
response = client.update_group(
GroupName='string',
UserPoolId='string',
Description='string',
RoleArn='string',
Precedence=123
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'Group': {
'GroupName': 'string',
'UserPoolId': 'string',
'Description': 'string',
'RoleArn': 'string',
'Precedence': 123,
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
update_identity_provider(**kwargs)¶Updates identity provider information for a user pool.
See also: AWS API Documentation
Request Syntax
response = client.update_identity_provider(
UserPoolId='string',
ProviderName='string',
ProviderDetails={
'string': 'string'
},
AttributeMapping={
'string': 'string'
},
IdpIdentifiers=[
'string',
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'IdentityProvider': {
'UserPoolId': 'string',
'ProviderName': 'string',
'ProviderType': 'SAML'|'Facebook'|'Google'|'LoginWithAmazon',
'ProviderDetails': {
'string': 'string'
},
'AttributeMapping': {
'string': 'string'
},
'IdpIdentifiers': [
'string',
],
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1)
}
}
Response Structure
|
update_resource_server(**kwargs)¶Updates the name and scopes of resource server. All other fields are read-only.
See also: AWS API Documentation
Request Syntax
response = client.update_resource_server(
UserPoolId='string',
Identifier='string',
Name='string',
Scopes=[
{
'ScopeName': 'string',
'ScopeDescription': 'string'
},
]
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ResourceServer': {
'UserPoolId': 'string',
'Identifier': 'string',
'Name': 'string',
'Scopes': [
{
'ScopeName': 'string',
'ScopeDescription': 'string'
},
]
}
}
Response Structure
|
update_user_attributes(**kwargs)¶Allows a user to update a specific attribute (one at a time).
See also: AWS API Documentation
Request Syntax
response = client.update_user_attributes(
UserAttributes=[
{
'Name': 'string',
'Value': 'string'
},
],
AccessToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'CodeDeliveryDetailsList': [
{
'Destination': 'string',
'DeliveryMedium': 'SMS'|'EMAIL',
'AttributeName': 'string'
},
]
}
Response Structure
|
update_user_pool(**kwargs)¶Updates the specified user pool with the specified attributes.
See also: AWS API Documentation
Request Syntax
response = client.update_user_pool(
UserPoolId='string',
Policies={
'PasswordPolicy': {
'MinimumLength': 123,
'RequireUppercase': True|False,
'RequireLowercase': True|False,
'RequireNumbers': True|False,
'RequireSymbols': True|False
}
},
LambdaConfig={
'PreSignUp': 'string',
'CustomMessage': 'string',
'PostConfirmation': 'string',
'PreAuthentication': 'string',
'PostAuthentication': 'string',
'DefineAuthChallenge': 'string',
'CreateAuthChallenge': 'string',
'VerifyAuthChallengeResponse': 'string'
},
AutoVerifiedAttributes=[
'phone_number'|'email',
],
SmsVerificationMessage='string',
EmailVerificationMessage='string',
EmailVerificationSubject='string',
VerificationMessageTemplate={
'SmsMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string',
'EmailMessageByLink': 'string',
'EmailSubjectByLink': 'string',
'DefaultEmailOption': 'CONFIRM_WITH_LINK'|'CONFIRM_WITH_CODE'
},
SmsAuthenticationMessage='string',
MfaConfiguration='OFF'|'ON'|'OPTIONAL',
DeviceConfiguration={
'ChallengeRequiredOnNewDevice': True|False,
'DeviceOnlyRememberedOnUserPrompt': True|False
},
EmailConfiguration={
'SourceArn': 'string',
'ReplyToEmailAddress': 'string'
},
SmsConfiguration={
'SnsCallerArn': 'string',
'ExternalId': 'string'
},
UserPoolTags={
'string': 'string'
},
AdminCreateUserConfig={
'AllowAdminCreateUserOnly': True|False,
'UnusedAccountValidityDays': 123,
'InviteMessageTemplate': {
'SMSMessage': 'string',
'EmailMessage': 'string',
'EmailSubject': 'string'
}
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
update_user_pool_client(**kwargs)¶Allows the developer to update the specified user pool client and password policy.
See also: AWS API Documentation
Request Syntax
response = client.update_user_pool_client(
UserPoolId='string',
ClientId='string',
ClientName='string',
RefreshTokenValidity=123,
ReadAttributes=[
'string',
],
WriteAttributes=[
'string',
],
ExplicitAuthFlows=[
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
SupportedIdentityProviders=[
'string',
],
CallbackURLs=[
'string',
],
LogoutURLs=[
'string',
],
DefaultRedirectURI='string',
AllowedOAuthFlows=[
'code'|'implicit'|'client_credentials',
],
AllowedOAuthScopes=[
'string',
],
AllowedOAuthFlowsUserPoolClient=True|False
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'UserPoolClient': {
'UserPoolId': 'string',
'ClientName': 'string',
'ClientId': 'string',
'ClientSecret': 'string',
'LastModifiedDate': datetime(2015, 1, 1),
'CreationDate': datetime(2015, 1, 1),
'RefreshTokenValidity': 123,
'ReadAttributes': [
'string',
],
'WriteAttributes': [
'string',
],
'ExplicitAuthFlows': [
'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY',
],
'SupportedIdentityProviders': [
'string',
],
'CallbackURLs': [
'string',
],
'LogoutURLs': [
'string',
],
'DefaultRedirectURI': 'string',
'AllowedOAuthFlows': [
'code'|'implicit'|'client_credentials',
],
'AllowedOAuthScopes': [
'string',
],
'AllowedOAuthFlowsUserPoolClient': True|False
}
}
Response Structure
|
verify_user_attribute(**kwargs)¶Verifies the specified user attributes in the user pool.
See also: AWS API Documentation
Request Syntax
response = client.verify_user_attribute(
AccessToken='string',
AttributeName='string',
Code='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
The available paginators are: