delete_user_attributes
¶
delete_user_attributes(
user_attribute_names: AttributeNameListType,
access_token: TokenModelType,
*,
config_overrides: Optional[CognitoIdentityProviderClientConfig] = None,
) -> DeleteUserAttributesResponse
Deletes attributes from the currently signed-in user. For example, your application can submit a request to this operation when a user wants to remove their birthdate attribute value.
Authorize this action with a signed-in user's access token. It must include the scope aws.cognito.signin.user.admin.
Amazon Cognito doesn't evaluate Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you can't use IAM credentials to authorize requests, and you can't grant IAM permissions in policies. For more information about authorization models in Amazon Cognito, see Using the Amazon Cognito user pools API and user pool endpoints.
Parameters:
-
user_attribute_names(AttributeNameListType) –An array of strings representing the user attribute names you want to delete.
For custom attributes, you must prepend the
custom:prefix to the attribute name, for examplecustom:department. -
access_token(TokenModelType) –A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
aws.cognito.signin.user.admin.
Raises:
-
ForbiddenException–This exception is thrown when WAF doesn't allow your request based on a web ACL that's associated with your user pool.
-
InternalErrorException–This exception is thrown when Amazon Cognito encounters an internal error.
-
InvalidParameterException–This exception is thrown when the Amazon Cognito service encounters an invalid parameter.
-
NotAuthorizedException–This exception is thrown when a user isn't authorized.
-
OperationNotEnabledException–This exception is thrown when an operation is not available in the current region or for the current user pool configuration. This can occur when attempting to perform operations that are not supported in secondary replica regions.
-
PasswordResetRequiredException–This exception is thrown when a password reset is required.
-
ResourceNotFoundException–This exception is thrown when the Amazon Cognito service can't find the requested resource.
-
TooManyRequestsException–This exception is thrown when the user has made too many requests for a given operation.
-
UserNotConfirmedException–This exception is thrown when a user isn't confirmed successfully.
-
UserNotFoundException–This exception is thrown when a user isn't found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_cognito_identity_provider/_services/cognito_identity_provider.py
4804 4805 4806 4807 4808 4809 4810 4811 4812 4813 4814 4815 4816 4817 4818 4819 4820 4821 4822 4823 4824 4825 4826 4827 4828 4829 4830 4831 4832 4833 4834 4835 4836 4837 4838 4839 4840 4841 4842 4843 4844 4845 4846 4847 4848 4849 4850 4851 4852 4853 4854 4855 4856 4857 4858 4859 4860 4861 4862 4863 4864 4865 4866 4867 4868 4869 | |