Skip to content

CognitoIdentityProviderClient

Index > CognitoIdentityProvider > CognitoIdentityProviderClient

Auto-generated documentation for CognitoIdentityProvider type annotations stubs module mypy-boto3-cognito-idp.

CognitoIdentityProviderClient

Type annotations and code completion for boto3.client("cognito-idp"). boto3 documentation

Usage example
from boto3.session import Session
from mypy_boto3_cognito_idp.client import CognitoIdentityProviderClient

def get_cognito-idp_client() -> CognitoIdentityProviderClient:
    return Session().client("cognito-idp")

Exceptions

boto3 client exceptions are generated in runtime. This class provides code completion for boto3.client("cognito-idp").exceptions structure.

Usage example
client = boto3.client("cognito-idp")

try:
    do_something(client)
except (
    client.AliasExistsException,
    client.ClientError,
    client.CodeDeliveryFailureException,
    client.CodeMismatchException,
    client.ConcurrentModificationException,
    client.DuplicateProviderException,
    client.EnableSoftwareTokenMFAException,
    client.ExpiredCodeException,
    client.ForbiddenException,
    client.GroupExistsException,
    client.InternalErrorException,
    client.InvalidEmailRoleAccessPolicyException,
    client.InvalidLambdaResponseException,
    client.InvalidOAuthFlowException,
    client.InvalidParameterException,
    client.InvalidPasswordException,
    client.InvalidSmsRoleAccessPolicyException,
    client.InvalidSmsRoleTrustRelationshipException,
    client.InvalidUserPoolConfigurationException,
    client.LimitExceededException,
    client.MFAMethodNotFoundException,
    client.NotAuthorizedException,
    client.PasswordResetRequiredException,
    client.PreconditionNotMetException,
    client.ResourceNotFoundException,
    client.ScopeDoesNotExistException,
    client.SoftwareTokenMFANotFoundException,
    client.TooManyFailedAttemptsException,
    client.TooManyRequestsException,
    client.UnauthorizedException,
    client.UnexpectedLambdaException,
    client.UnsupportedIdentityProviderException,
    client.UnsupportedOperationException,
    client.UnsupportedTokenTypeException,
    client.UnsupportedUserStateException,
    client.UserImportInProgressException,
    client.UserLambdaValidationException,
    client.UserNotConfirmedException,
    client.UserNotFoundException,
    client.UserPoolAddOnNotEnabledException,
    client.UserPoolTaggingException,
    client.UsernameExistsException,
) as e:
    print(e)
Type checking example
from mypy_boto3_cognito_idp.client import Exceptions

def handle_error(exc: Exceptions.AliasExistsException) -> None:
    ...

Methods

add_custom_attributes

Adds additional user attributes to the user pool schema.

Type annotations and code completion for boto3.client("cognito-idp").add_custom_attributes method. boto3 documentation

Method definition
def add_custom_attributes(
    self,
    *,
    UserPoolId: str,
    CustomAttributes: Sequence[SchemaAttributeTypeTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See SchemaAttributeTypeTypeDef
Usage example with kwargs
kwargs: AddCustomAttributesRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "CustomAttributes": ...,
}

parent.add_custom_attributes(**kwargs)
  1. See AddCustomAttributesRequestRequestTypeDef

admin_add_user_to_group

Adds the specified user to the specified group.

Type annotations and code completion for boto3.client("cognito-idp").admin_add_user_to_group method. boto3 documentation

Method definition
def admin_add_user_to_group(
    self,
    *,
    UserPoolId: str,
    Username: str,
    GroupName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: AdminAddUserToGroupRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "GroupName": ...,
}

parent.admin_add_user_to_group(**kwargs)
  1. See AdminAddUserToGroupRequestRequestTypeDef

admin_confirm_sign_up

Confirms user registration as an admin without using a confirmation code.

Type annotations and code completion for boto3.client("cognito-idp").admin_confirm_sign_up method. boto3 documentation

Method definition
def admin_confirm_sign_up(
    self,
    *,
    UserPoolId: str,
    Username: str,
    ClientMetadata: Mapping[str, str] = ...,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminConfirmSignUpRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_confirm_sign_up(**kwargs)
  1. See AdminConfirmSignUpRequestRequestTypeDef

admin_create_user

Creates a new user in the specified user pool.

Type annotations and code completion for boto3.client("cognito-idp").admin_create_user method. boto3 documentation

Method definition
def admin_create_user(
    self,
    *,
    UserPoolId: str,
    Username: str,
    UserAttributes: Sequence[AttributeTypeTypeDef] = ...,  # (1)
    ValidationData: Sequence[AttributeTypeTypeDef] = ...,  # (1)
    TemporaryPassword: str = ...,
    ForceAliasCreation: bool = ...,
    MessageAction: MessageActionTypeType = ...,  # (3)
    DesiredDeliveryMediums: Sequence[DeliveryMediumTypeType] = ...,  # (4)
    ClientMetadata: Mapping[str, str] = ...,
) -> AdminCreateUserResponseTypeDef:  # (5)
    ...
  1. See AttributeTypeTypeDef
  2. See AttributeTypeTypeDef
  3. See MessageActionTypeType
  4. See DeliveryMediumTypeType
  5. See AdminCreateUserResponseTypeDef
Usage example with kwargs
kwargs: AdminCreateUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_create_user(**kwargs)
  1. See AdminCreateUserRequestRequestTypeDef

admin_delete_user

Deletes a user as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_delete_user method. boto3 documentation

Method definition
def admin_delete_user(
    self,
    *,
    UserPoolId: str,
    Username: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: AdminDeleteUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_delete_user(**kwargs)
  1. See AdminDeleteUserRequestRequestTypeDef

admin_delete_user_attributes

Deletes the user attributes in a user pool as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_delete_user_attributes method. boto3 documentation

Method definition
def admin_delete_user_attributes(
    self,
    *,
    UserPoolId: str,
    Username: str,
    UserAttributeNames: Sequence[str],
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminDeleteUserAttributesRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "UserAttributeNames": ...,
}

parent.admin_delete_user_attributes(**kwargs)
  1. See AdminDeleteUserAttributesRequestRequestTypeDef

admin_disable_provider_for_user

Prevents the user from signing in with the specified external (SAML or social) identity provider (IdP).

Type annotations and code completion for boto3.client("cognito-idp").admin_disable_provider_for_user method. boto3 documentation

Method definition
def admin_disable_provider_for_user(
    self,
    *,
    UserPoolId: str,
    User: ProviderUserIdentifierTypeTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See ProviderUserIdentifierTypeTypeDef
Usage example with kwargs
kwargs: AdminDisableProviderForUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "User": ...,
}

parent.admin_disable_provider_for_user(**kwargs)
  1. See AdminDisableProviderForUserRequestRequestTypeDef

admin_disable_user

Disables the specified user.

Type annotations and code completion for boto3.client("cognito-idp").admin_disable_user method. boto3 documentation

Method definition
def admin_disable_user(
    self,
    *,
    UserPoolId: str,
    Username: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminDisableUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_disable_user(**kwargs)
  1. See AdminDisableUserRequestRequestTypeDef

admin_enable_user

Enables the specified user as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_enable_user method. boto3 documentation

Method definition
def admin_enable_user(
    self,
    *,
    UserPoolId: str,
    Username: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminEnableUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_enable_user(**kwargs)
  1. See AdminEnableUserRequestRequestTypeDef

admin_forget_device

Forgets the device, as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_forget_device method. boto3 documentation

Method definition
def admin_forget_device(
    self,
    *,
    UserPoolId: str,
    Username: str,
    DeviceKey: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: AdminForgetDeviceRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "DeviceKey": ...,
}

parent.admin_forget_device(**kwargs)
  1. See AdminForgetDeviceRequestRequestTypeDef

admin_get_device

Gets the device, as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_get_device method. boto3 documentation

Method definition
def admin_get_device(
    self,
    *,
    DeviceKey: str,
    UserPoolId: str,
    Username: str,
) -> AdminGetDeviceResponseTypeDef:  # (1)
    ...
  1. See AdminGetDeviceResponseTypeDef
Usage example with kwargs
kwargs: AdminGetDeviceRequestRequestTypeDef = {  # (1)
    "DeviceKey": ...,
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_get_device(**kwargs)
  1. See AdminGetDeviceRequestRequestTypeDef

admin_get_user

Gets the specified user by user name in a user pool as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_get_user method. boto3 documentation

Method definition
def admin_get_user(
    self,
    *,
    UserPoolId: str,
    Username: str,
) -> AdminGetUserResponseTypeDef:  # (1)
    ...
  1. See AdminGetUserResponseTypeDef
Usage example with kwargs
kwargs: AdminGetUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_get_user(**kwargs)
  1. See AdminGetUserRequestRequestTypeDef

admin_initiate_auth

Initiates the authentication flow, as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_initiate_auth method. boto3 documentation

Method definition
def admin_initiate_auth(
    self,
    *,
    UserPoolId: str,
    ClientId: str,
    AuthFlow: AuthFlowTypeType,  # (1)
    AuthParameters: Mapping[str, str] = ...,
    ClientMetadata: Mapping[str, str] = ...,
    AnalyticsMetadata: AnalyticsMetadataTypeTypeDef = ...,  # (2)
    ContextData: ContextDataTypeTypeDef = ...,  # (3)
) -> AdminInitiateAuthResponseTypeDef:  # (4)
    ...
  1. See AuthFlowTypeType
  2. See AnalyticsMetadataTypeTypeDef
  3. See ContextDataTypeTypeDef
  4. See AdminInitiateAuthResponseTypeDef
Usage example with kwargs
kwargs: AdminInitiateAuthRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "ClientId": ...,
    "AuthFlow": ...,
}

parent.admin_initiate_auth(**kwargs)
  1. See AdminInitiateAuthRequestRequestTypeDef

Links an existing user account in a user pool (DestinationUser ) to an identity from an external IdP (SourceUser ) based on a specified attribute name and value from the external IdP.

Type annotations and code completion for boto3.client("cognito-idp").admin_link_provider_for_user method. boto3 documentation

Method definition
def admin_link_provider_for_user(
    self,
    *,
    UserPoolId: str,
    DestinationUser: ProviderUserIdentifierTypeTypeDef,  # (1)
    SourceUser: ProviderUserIdentifierTypeTypeDef,  # (1)
) -> Dict[str, Any]:
    ...
  1. See ProviderUserIdentifierTypeTypeDef
  2. See ProviderUserIdentifierTypeTypeDef
Usage example with kwargs
kwargs: AdminLinkProviderForUserRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "DestinationUser": ...,
    "SourceUser": ...,
}

parent.admin_link_provider_for_user(**kwargs)
  1. See AdminLinkProviderForUserRequestRequestTypeDef

admin_list_devices

Lists devices, as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_list_devices method. boto3 documentation

Method definition
def admin_list_devices(
    self,
    *,
    UserPoolId: str,
    Username: str,
    Limit: int = ...,
    PaginationToken: str = ...,
) -> AdminListDevicesResponseTypeDef:  # (1)
    ...
  1. See AdminListDevicesResponseTypeDef
Usage example with kwargs
kwargs: AdminListDevicesRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_list_devices(**kwargs)
  1. See AdminListDevicesRequestRequestTypeDef

admin_list_groups_for_user

Lists the groups that the user belongs to.

Type annotations and code completion for boto3.client("cognito-idp").admin_list_groups_for_user method. boto3 documentation

Method definition
def admin_list_groups_for_user(
    self,
    *,
    Username: str,
    UserPoolId: str,
    Limit: int = ...,
    NextToken: str = ...,
) -> AdminListGroupsForUserResponseTypeDef:  # (1)
    ...
  1. See AdminListGroupsForUserResponseTypeDef
Usage example with kwargs
kwargs: AdminListGroupsForUserRequestRequestTypeDef = {  # (1)
    "Username": ...,
    "UserPoolId": ...,
}

parent.admin_list_groups_for_user(**kwargs)
  1. See AdminListGroupsForUserRequestRequestTypeDef

admin_list_user_auth_events

A history of user activity and any risks detected as part of Amazon Cognito advanced security.

Type annotations and code completion for boto3.client("cognito-idp").admin_list_user_auth_events method. boto3 documentation

Method definition
def admin_list_user_auth_events(
    self,
    *,
    UserPoolId: str,
    Username: str,
    MaxResults: int = ...,
    NextToken: str = ...,
) -> AdminListUserAuthEventsResponseTypeDef:  # (1)
    ...
  1. See AdminListUserAuthEventsResponseTypeDef
Usage example with kwargs
kwargs: AdminListUserAuthEventsRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_list_user_auth_events(**kwargs)
  1. See AdminListUserAuthEventsRequestRequestTypeDef

admin_remove_user_from_group

Removes the specified user from the specified group.

Type annotations and code completion for boto3.client("cognito-idp").admin_remove_user_from_group method. boto3 documentation

Method definition
def admin_remove_user_from_group(
    self,
    *,
    UserPoolId: str,
    Username: str,
    GroupName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: AdminRemoveUserFromGroupRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "GroupName": ...,
}

parent.admin_remove_user_from_group(**kwargs)
  1. See AdminRemoveUserFromGroupRequestRequestTypeDef

admin_reset_user_password

Resets the specified user's password in a user pool as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_reset_user_password method. boto3 documentation

Method definition
def admin_reset_user_password(
    self,
    *,
    UserPoolId: str,
    Username: str,
    ClientMetadata: Mapping[str, str] = ...,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminResetUserPasswordRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_reset_user_password(**kwargs)
  1. See AdminResetUserPasswordRequestRequestTypeDef

admin_respond_to_auth_challenge

Responds to an authentication challenge, as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_respond_to_auth_challenge method. boto3 documentation

Method definition
def admin_respond_to_auth_challenge(
    self,
    *,
    UserPoolId: str,
    ClientId: str,
    ChallengeName: ChallengeNameTypeType,  # (1)
    ChallengeResponses: Mapping[str, str] = ...,
    Session: str = ...,
    AnalyticsMetadata: AnalyticsMetadataTypeTypeDef = ...,  # (2)
    ContextData: ContextDataTypeTypeDef = ...,  # (3)
    ClientMetadata: Mapping[str, str] = ...,
) -> AdminRespondToAuthChallengeResponseTypeDef:  # (4)
    ...
  1. See ChallengeNameTypeType
  2. See AnalyticsMetadataTypeTypeDef
  3. See ContextDataTypeTypeDef
  4. See AdminRespondToAuthChallengeResponseTypeDef
Usage example with kwargs
kwargs: AdminRespondToAuthChallengeRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "ClientId": ...,
    "ChallengeName": ...,
}

parent.admin_respond_to_auth_challenge(**kwargs)
  1. See AdminRespondToAuthChallengeRequestRequestTypeDef

admin_set_user_mfa_preference

The user's multi-factor authentication (MFA) preference, including which MFA options are activated, and if any are preferred.

Type annotations and code completion for boto3.client("cognito-idp").admin_set_user_mfa_preference method. boto3 documentation

Method definition
def admin_set_user_mfa_preference(
    self,
    *,
    Username: str,
    UserPoolId: str,
    SMSMfaSettings: SMSMfaSettingsTypeTypeDef = ...,  # (1)
    SoftwareTokenMfaSettings: SoftwareTokenMfaSettingsTypeTypeDef = ...,  # (2)
) -> Dict[str, Any]:
    ...
  1. See SMSMfaSettingsTypeTypeDef
  2. See SoftwareTokenMfaSettingsTypeTypeDef
Usage example with kwargs
kwargs: AdminSetUserMFAPreferenceRequestRequestTypeDef = {  # (1)
    "Username": ...,
    "UserPoolId": ...,
}

parent.admin_set_user_mfa_preference(**kwargs)
  1. See AdminSetUserMFAPreferenceRequestRequestTypeDef

admin_set_user_password

Sets the specified user's password in a user pool as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_set_user_password method. boto3 documentation

Method definition
def admin_set_user_password(
    self,
    *,
    UserPoolId: str,
    Username: str,
    Password: str,
    Permanent: bool = ...,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminSetUserPasswordRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "Password": ...,
}

parent.admin_set_user_password(**kwargs)
  1. See AdminSetUserPasswordRequestRequestTypeDef

admin_set_user_settings

This action is no longer supported. You can use it to configure only SMS MFA.

Type annotations and code completion for boto3.client("cognito-idp").admin_set_user_settings method. boto3 documentation

Method definition
def admin_set_user_settings(
    self,
    *,
    UserPoolId: str,
    Username: str,
    MFAOptions: Sequence[MFAOptionTypeTypeDef],  # (1)
) -> Dict[str, Any]:
    ...
  1. See MFAOptionTypeTypeDef
Usage example with kwargs
kwargs: AdminSetUserSettingsRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "MFAOptions": ...,
}

parent.admin_set_user_settings(**kwargs)
  1. See AdminSetUserSettingsRequestRequestTypeDef

admin_update_auth_event_feedback

Provides feedback for an authentication event indicating if it was from a valid user.

Type annotations and code completion for boto3.client("cognito-idp").admin_update_auth_event_feedback method. boto3 documentation

Method definition
def admin_update_auth_event_feedback(
    self,
    *,
    UserPoolId: str,
    Username: str,
    EventId: str,
    FeedbackValue: FeedbackValueTypeType,  # (1)
) -> Dict[str, Any]:
    ...
  1. See FeedbackValueTypeType
Usage example with kwargs
kwargs: AdminUpdateAuthEventFeedbackRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "EventId": ...,
    "FeedbackValue": ...,
}

parent.admin_update_auth_event_feedback(**kwargs)
  1. See AdminUpdateAuthEventFeedbackRequestRequestTypeDef

admin_update_device_status

Updates the device status as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_update_device_status method. boto3 documentation

Method definition
def admin_update_device_status(
    self,
    *,
    UserPoolId: str,
    Username: str,
    DeviceKey: str,
    DeviceRememberedStatus: DeviceRememberedStatusTypeType = ...,  # (1)
) -> Dict[str, Any]:
    ...
  1. See DeviceRememberedStatusTypeType
Usage example with kwargs
kwargs: AdminUpdateDeviceStatusRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "DeviceKey": ...,
}

parent.admin_update_device_status(**kwargs)
  1. See AdminUpdateDeviceStatusRequestRequestTypeDef

admin_update_user_attributes

Updates the specified user's attributes, including developer attributes, as an administrator.

Type annotations and code completion for boto3.client("cognito-idp").admin_update_user_attributes method. boto3 documentation

Method definition
def admin_update_user_attributes(
    self,
    *,
    UserPoolId: str,
    Username: str,
    UserAttributes: Sequence[AttributeTypeTypeDef],  # (1)
    ClientMetadata: Mapping[str, str] = ...,
) -> Dict[str, Any]:
    ...
  1. See AttributeTypeTypeDef
Usage example with kwargs
kwargs: AdminUpdateUserAttributesRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
    "UserAttributes": ...,
}

parent.admin_update_user_attributes(**kwargs)
  1. See AdminUpdateUserAttributesRequestRequestTypeDef

admin_user_global_sign_out

Signs out a user from all devices.

Type annotations and code completion for boto3.client("cognito-idp").admin_user_global_sign_out method. boto3 documentation

Method definition
def admin_user_global_sign_out(
    self,
    *,
    UserPoolId: str,
    Username: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: AdminUserGlobalSignOutRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Username": ...,
}

parent.admin_user_global_sign_out(**kwargs)
  1. See AdminUserGlobalSignOutRequestRequestTypeDef

associate_software_token

Begins setup of time-based one-time password (TOTP) multi-factor authentication (MFA) for a user, with a unique private key that Amazon Cognito generates and returns in the API response.

Type annotations and code completion for boto3.client("cognito-idp").associate_software_token method. boto3 documentation

Method definition
def associate_software_token(
    self,
    *,
    AccessToken: str = ...,
    Session: str = ...,
) -> AssociateSoftwareTokenResponseTypeDef:  # (1)
    ...
  1. See AssociateSoftwareTokenResponseTypeDef
Usage example with kwargs
kwargs: AssociateSoftwareTokenRequestRequestTypeDef = {  # (1)
    "AccessToken": ...,
}

parent.associate_software_token(**kwargs)
  1. See AssociateSoftwareTokenRequestRequestTypeDef

can_paginate

Check if an operation can be paginated.

Type annotations and code completion for boto3.client("cognito-idp").can_paginate method. boto3 documentation

Method definition
def can_paginate(
    self,
    operation_name: str,
) -> bool:
    ...

change_password

Changes the password for a specified user in a user pool.

Type annotations and code completion for boto3.client("cognito-idp").change_password method. boto3 documentation

Method definition
def change_password(
    self,
    *,
    PreviousPassword: str,
    ProposedPassword: str,
    AccessToken: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: ChangePasswordRequestRequestTypeDef = {  # (1)
    "PreviousPassword": ...,
    "ProposedPassword": ...,
    "AccessToken": ...,
}

parent.change_password(**kwargs)
  1. See ChangePasswordRequestRequestTypeDef

close

Closes underlying endpoint connections.

Type annotations and code completion for boto3.client("cognito-idp").close method. boto3 documentation

Method definition
def close(
    self,
) -> None:
    ...

confirm_device

Confirms tracking of the device.

Type annotations and code completion for boto3.client("cognito-idp").confirm_device method. boto3 documentation

Method definition
def confirm_device(
    self,
    *,
    AccessToken: str,
    DeviceKey: str,
    DeviceSecretVerifierConfig: DeviceSecretVerifierConfigTypeTypeDef = ...,  # (1)
    DeviceName: str = ...,
) -> ConfirmDeviceResponseTypeDef:  # (2)
    ...
  1. See DeviceSecretVerifierConfigTypeTypeDef
  2. See ConfirmDeviceResponseTypeDef
Usage example with kwargs
kwargs: ConfirmDeviceRequestRequestTypeDef = {  # (1)
    "AccessToken": ...,
    "DeviceKey": ...,
}

parent.confirm_device(**kwargs)
  1. See ConfirmDeviceRequestRequestTypeDef

confirm_forgot_password

Allows a user to enter a confirmation code to reset a forgotten password.

Type annotations and code completion for boto3.client("cognito-idp").confirm_forgot_password method. boto3 documentation

Method definition
def confirm_forgot_password(
    self,
    *,
    ClientId: str,
    Username: str,
    ConfirmationCode: str,
    Password: str,
    SecretHash: str = ...,
    AnalyticsMetadata: AnalyticsMetadataTypeTypeDef = ...,  # (1)
    UserContextData: UserContextDataTypeTypeDef = ...,  # (2)
    ClientMetadata: Mapping[str, str] = ...,
) -> Dict[str, Any]:
    ...
  1. See AnalyticsMetadataTypeTypeDef
  2. See UserContextDataTypeTypeDef
Usage example with kwargs
kwargs: ConfirmForgotPasswordRequestRequestTypeDef = {  # (1)
    "ClientId": ...,
    "Username": ...,
    "ConfirmationCode": ...,
    "Password": ...,
}

parent.confirm_forgot_password(**kwargs)
  1. See ConfirmForgotPasswordRequestRequestTypeDef

confirm_sign_up

Confirms registration of a new user.

Type annotations and code completion for boto3.client("cognito-idp").confirm_sign_up method. boto3 documentation

Method definition
def confirm_sign_up(
    self,
    *,
    ClientId: str,
    Username: str,
    ConfirmationCode: str,
    SecretHash: str = ...,
    ForceAliasCreation: bool = ...,
    AnalyticsMetadata: AnalyticsMetadataTypeTypeDef = ...,  # (1)
    UserContextData: UserContextDataTypeTypeDef = ...,  # (2)
    ClientMetadata: Mapping[str, str] = ...,
) -> Dict[str, Any]:
    ...
  1. See AnalyticsMetadataTypeTypeDef
  2. See UserContextDataTypeTypeDef
Usage example with kwargs
kwargs: ConfirmSignUpRequestRequestTypeDef = {  # (1)
    "ClientId": ...,
    "Username": ...,
    "ConfirmationCode": ...,
}

parent.confirm_sign_up(**kwargs)
  1. See ConfirmSignUpRequestRequestTypeDef

create_group

Creates a new group in the specified user pool.

Type annotations and code completion for boto3.client("cognito-idp").create_group method. boto3 documentation

Method definition
def create_group(
    self,
    *,
    GroupName: str,
    UserPoolId: str,
    Description: str = ...,
    RoleArn: str = ...,
    Precedence: int = ...,
) -> CreateGroupResponseTypeDef:  # (1)
    ...
  1. See CreateGroupResponseTypeDef
Usage example with kwargs
kwargs: CreateGroupRequestRequestTypeDef = {  # (1)
    "GroupName": ...,
    "UserPoolId": ...,
}

parent.create_group(**kwargs)
  1. See CreateGroupRequestRequestTypeDef

create_identity_provider

Creates an IdP for a user pool.

Type annotations and code completion for boto3.client("cognito-idp").create_identity_provider method. boto3 documentation

Method definition
def create_identity_provider(
    self,
    *,
    UserPoolId: str,
    ProviderName: str,
    ProviderType: IdentityProviderTypeTypeType,  # (1)
    ProviderDetails: Mapping[str, str],
    AttributeMapping: Mapping[str, str] = ...,
    IdpIdentifiers: Sequence[str] = ...,
) -> CreateIdentityProviderResponseTypeDef:  # (2)
    ...
  1. See IdentityProviderTypeTypeType
  2. See CreateIdentityProviderResponseTypeDef
Usage example with kwargs
kwargs: CreateIdentityProviderRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "ProviderName": ...,
    "ProviderType": ...,
    "ProviderDetails": ...,
}

parent.create_identity_provider(**kwargs)
  1. See CreateIdentityProviderRequestRequestTypeDef

create_resource_server

Creates a new OAuth2.0 resource server and defines custom scopes within it.

Type annotations and code completion for boto3.client("cognito-idp").create_resource_server method. boto3 documentation

Method definition
def create_resource_server(
    self,
    *,
    UserPoolId: str,
    Identifier: str,
    Name: str,
    Scopes: Sequence[ResourceServerScopeTypeTypeDef] = ...,  # (1)
) -> CreateResourceServerResponseTypeDef:  # (2)
    ...
  1. See ResourceServerScopeTypeTypeDef
  2. See CreateResourceServerResponseTypeDef
Usage example with kwargs
kwargs: CreateResourceServerRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Identifier": ...,
    "Name": ...,
}

parent.create_resource_server(**kwargs)
  1. See CreateResourceServerRequestRequestTypeDef

create_user_import_job

Creates the user import job.

Type annotations and code completion for boto3.client("cognito-idp").create_user_import_job method. boto3 documentation

Method definition
def create_user_import_job(
    self,
    *,
    JobName: str,
    UserPoolId: str,
    CloudWatchLogsRoleArn: str,
) -> CreateUserImportJobResponseTypeDef:  # (1)
    ...
  1. See CreateUserImportJobResponseTypeDef
Usage example with kwargs
kwargs: CreateUserImportJobRequestRequestTypeDef = {  # (1)
    "JobName": ...,
    "UserPoolId": ...,
    "CloudWatchLogsRoleArn": ...,
}

parent.create_user_import_job(**kwargs)
  1. See CreateUserImportJobRequestRequestTypeDef

create_user_pool

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

Type annotations and code completion for boto3.client("cognito-idp").create_user_pool method. boto3 documentation

Method definition
def create_user_pool(
    self,
    *,
    PoolName: str,
    Policies: UserPoolPolicyTypeTypeDef = ...,  # (1)
    LambdaConfig: LambdaConfigTypeTypeDef = ...,  # (2)
    AutoVerifiedAttributes: Sequence[VerifiedAttributeTypeType] = ...,  # (3)
    AliasAttributes: Sequence[AliasAttributeTypeType] = ...,  # (4)
    UsernameAttributes: Sequence[UsernameAttributeTypeType] = ...,  # (5)
    SmsVerificationMessage: str = ...,
    EmailVerificationMessage: str = ...,
    EmailVerificationSubject: str = ...,
    VerificationMessageTemplate: VerificationMessageTemplateTypeTypeDef = ...,  # (6)
    SmsAuthenticationMessage: str = ...,
    MfaConfiguration: UserPoolMfaTypeType = ...,  # (7)
    UserAttributeUpdateSettings: UserAttributeUpdateSettingsTypeTypeDef = ...,  # (8)
    DeviceConfiguration: DeviceConfigurationTypeTypeDef = ...,  # (9)
    EmailConfiguration: EmailConfigurationTypeTypeDef = ...,  # (10)
    SmsConfiguration: SmsConfigurationTypeTypeDef = ...,  # (11)
    UserPoolTags: Mapping[str, str] = ...,
    AdminCreateUserConfig: AdminCreateUserConfigTypeTypeDef = ...,  # (12)
    Schema: Sequence[SchemaAttributeTypeTypeDef] = ...,  # (13)
    UserPoolAddOns: UserPoolAddOnsTypeTypeDef = ...,  # (14)
    UsernameConfiguration: UsernameConfigurationTypeTypeDef = ...,  # (15)
    AccountRecoverySetting: AccountRecoverySettingTypeTypeDef = ...,  # (16)
) -> CreateUserPoolResponseTypeDef:  # (17)
    ...
  1. See UserPoolPolicyTypeTypeDef
  2. See LambdaConfigTypeTypeDef
  3. See VerifiedAttributeTypeType
  4. See AliasAttributeTypeType
  5. See UsernameAttributeTypeType
  6. See VerificationMessageTemplateTypeTypeDef
  7. See UserPoolMfaTypeType
  8. See UserAttributeUpdateSettingsTypeTypeDef
  9. See DeviceConfigurationTypeTypeDef
  10. See EmailConfigurationTypeTypeDef
  11. See SmsConfigurationTypeTypeDef
  12. See AdminCreateUserConfigTypeTypeDef
  13. See SchemaAttributeTypeTypeDef
  14. See UserPoolAddOnsTypeTypeDef
  15. See UsernameConfigurationTypeTypeDef
  16. See AccountRecoverySettingTypeTypeDef
  17. See CreateUserPoolResponseTypeDef
Usage example with kwargs
kwargs: CreateUserPoolRequestRequestTypeDef = {  # (1)
    "PoolName": ...,
}

parent.create_user_pool(**kwargs)
  1. See CreateUserPoolRequestRequestTypeDef

create_user_pool_client

Creates the user pool client.

Type annotations and code completion for boto3.client("cognito-idp").create_user_pool_client method. boto3 documentation

Method definition
def create_user_pool_client(
    self,
    *,
    UserPoolId: str,
    ClientName: str,
    GenerateSecret: bool = ...,
    RefreshTokenValidity: int = ...,
    AccessTokenValidity: int = ...,
    IdTokenValidity: int = ...,
    TokenValidityUnits: TokenValidityUnitsTypeTypeDef = ...,  # (1)
    ReadAttributes: Sequence[str] = ...,
    WriteAttributes: Sequence[str] = ...,
    ExplicitAuthFlows: Sequence[ExplicitAuthFlowsTypeType] = ...,  # (2)
    SupportedIdentityProviders: Sequence[str] = ...,
    CallbackURLs: Sequence[str] = ...,
    LogoutURLs: Sequence[str] = ...,
    DefaultRedirectURI: str = ...,
    AllowedOAuthFlows: Sequence[OAuthFlowTypeType] = ...,  # (3)
    AllowedOAuthScopes: Sequence[str] = ...,
    AllowedOAuthFlowsUserPoolClient: bool = ...,
    AnalyticsConfiguration: AnalyticsConfigurationTypeTypeDef = ...,  # (4)
    PreventUserExistenceErrors: PreventUserExistenceErrorTypesType = ...,  # (5)
    EnableTokenRevocation: bool = ...,
    EnablePropagateAdditionalUserContextData: bool = ...,
    AuthSessionValidity: int = ...,
) -> CreateUserPoolClientResponseTypeDef:  # (6)
    ...
  1. See TokenValidityUnitsTypeTypeDef
  2. See ExplicitAuthFlowsTypeType
  3. See OAuthFlowTypeType
  4. See AnalyticsConfigurationTypeTypeDef
  5. See PreventUserExistenceErrorTypesType
  6. See CreateUserPoolClientResponseTypeDef
Usage example with kwargs
kwargs: CreateUserPoolClientRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "ClientName": ...,
}

parent.create_user_pool_client(**kwargs)
  1. See CreateUserPoolClientRequestRequestTypeDef

create_user_pool_domain

Creates a new domain for a user pool.

Type annotations and code completion for boto3.client("cognito-idp").create_user_pool_domain method. boto3 documentation

Method definition
def create_user_pool_domain(
    self,
    *,
    Domain: str,
    UserPoolId: str,
    CustomDomainConfig: CustomDomainConfigTypeTypeDef = ...,  # (1)
) -> CreateUserPoolDomainResponseTypeDef:  # (2)
    ...
  1. See CustomDomainConfigTypeTypeDef
  2. See CreateUserPoolDomainResponseTypeDef
Usage example with kwargs
kwargs: CreateUserPoolDomainRequestRequestTypeDef = {  # (1)
    "Domain": ...,
    "UserPoolId": ...,
}

parent.create_user_pool_domain(**kwargs)
  1. See CreateUserPoolDomainRequestRequestTypeDef

delete_group

Deletes a group.

Type annotations and code completion for boto3.client("cognito-idp").delete_group method. boto3 documentation

Method definition
def delete_group(
    self,
    *,
    GroupName: str,
    UserPoolId: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteGroupRequestRequestTypeDef = {  # (1)
    "GroupName": ...,
    "UserPoolId": ...,
}

parent.delete_group(**kwargs)
  1. See DeleteGroupRequestRequestTypeDef

delete_identity_provider

Deletes an IdP for a user pool.

Type annotations and code completion for boto3.client("cognito-idp").delete_identity_provider method. boto3 documentation

Method definition
def delete_identity_provider(
    self,
    *,
    UserPoolId: str,
    ProviderName: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteIdentityProviderRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "ProviderName": ...,
}

parent.delete_identity_provider(**kwargs)
  1. See DeleteIdentityProviderRequestRequestTypeDef

delete_resource_server

Deletes a resource server.

Type annotations and code completion for boto3.client("cognito-idp").delete_resource_server method. boto3 documentation

Method definition
def delete_resource_server(
    self,
    *,
    UserPoolId: str,
    Identifier: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteResourceServerRequestRequestTypeDef = {  # (1)
    "UserPoolId": ...,
    "Identifier": ...,
}

parent.delete_resource_server(**kwargs)
  1. See DeleteResourceServerRequestRequestTypeDef

delete_user

Allows a user to delete himself or herself.

Type annotations and code completion for boto3.client("cognito-idp").delete_user method. boto3 documentation

Method definition
def delete_user(
    self,
    *,
    AccessToken: str,
) -> EmptyResponseMetadataTypeDef:  # (1)
    ...
  1. See EmptyResponseMetadataTypeDef
Usage example with kwargs
kwargs: DeleteUserRequestRequestTypeDef = {  # (1)
    "AccessToken": ...,
}

parent.delete_user(**kwargs)
  1. See DeleteUserRequestRequestTypeDef

delete_user_attributes

Deletes the attributes for a user.

Type annotations and code completion for boto3.client("cognito-idp").delete_user_attributes method. boto3 documentation

Method definition
def delete_user_attributes(
    self,
    *,
    UserAttributeNames: Sequence[str],
    AccessToken: str,
) -> Dict[str, Any]:
    ...
Usage example with kwargs
kwargs: DeleteUserAttributesRequestRequestTypeDef = {  # (1)
    "UserAttributeNames": ...,
    "AccessToken": ...,
}

parent.delete_user_attributes(**kwargs)
  1. See DeleteUserAttributesRequestRequestTypeDef

delete_user_pool

Deletes the specified Amazon Cognito user pool.

Type annotations and code completion for boto3.client("cognito-idp").delete_user_pool method.