Given tag IDs that you previously assigned to a user pool, removes them.
Parameters:
-
resource_arn
(ArnType)
–
The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.
-
tag_keys
(UserPoolTagsListType)
–
An array of tag keys that you want to remove from the user pool.
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.
-
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
| async def untag_resource(
self,
resource_arn: "capo_cognito_identity_provider.types.arn_type.ArnType",
tag_keys: "capo_cognito_identity_provider.types.user_pool_tags_list_type.UserPoolTagsListType",
*,
config_overrides: Optional[AsyncCognitoIdentityProviderClientConfig] = None,
) -> "capo_cognito_identity_provider.types.untag_resource_response.UntagResourceResponse":
"""<p>Given tag IDs that you previously assigned to a user pool, removes them.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.</p>
tag_keys: <p>An array of tag keys that you want to remove from the user pool.</p>
Raises:
capo_cognito_identity_provider.errors.internal_error_exception.InternalErrorException: <p>This exception is thrown when Amazon Cognito encounters an internal error.</p>
capo_cognito_identity_provider.errors.invalid_parameter_exception.InvalidParameterException: <p>This exception is thrown when the Amazon Cognito service encounters an invalid parameter.</p>
capo_cognito_identity_provider.errors.not_authorized_exception.NotAuthorizedException: <p>This exception is thrown when a user isn't authorized.</p>
capo_cognito_identity_provider.errors.operation_not_enabled_exception.OperationNotEnabledException: <p>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.</p>
capo_cognito_identity_provider.errors.resource_not_found_exception.ResourceNotFoundException: <p>This exception is thrown when the Amazon Cognito service can't find the requested resource.</p>
capo_cognito_identity_provider.errors.too_many_requests_exception.TooManyRequestsException: <p>This exception is thrown when the user has made too many requests for a given operation.</p>
capo_cognito_identity_provider.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_cognito_identity_provider.types.untag_resource_request.UntagResourceRequest]",
) -> AsyncOperationResponse[
"capo_cognito_identity_provider.types.untag_resource_response.UntagResourceResponse"
]:
import capo_cognito_identity_provider._operations.aws_cognito_identity_provider_service.untag_resource
(
output,
http_response,
) = await capo_cognito_identity_provider._operations.aws_cognito_identity_provider_service.untag_resource.async_untag_resource(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_cognito_identity_provider.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|