admin_delete_user_attributes
async
¶
admin_delete_user_attributes(
user_pool_id: UserPoolIdType,
username: UsernameType,
user_attribute_names: AttributeNameListType,
*,
config_overrides: Optional[AsyncCognitoIdentityProviderClientConfig] = None,
) -> AdminDeleteUserAttributesResponse
Deletes attribute values from a user. This operation doesn't affect tokens for existing user sessions. The next ID token that the user receives will no longer have the deleted attributes.
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
Parameters:
-
user_pool_id(UserPoolIdType) –The ID of the user pool where you want to delete user attributes.
-
username(UsernameType) –The name of the user that you want to query or modify. The value of this parameter is typically your user's username, but it can be any of their alias attributes. If
usernameisn't an alias attribute in your user pool, this value must be thesubof a local user or the username of a user from a third-party IdP. -
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.
Raises:
-
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.
-
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.
-
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/async_cognito_identity_provider.py
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 | |