Skip to content

untag_resource async

untag_resource(
    resource_arn: ARNString,
    tag_keys: IdentityPoolTagsListType,
    *,
    config_overrides: Optional[AsyncCognitoIdentityClientConfig] = None,
) -> UntagResourceResponse

Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account

Parameters:

  • resource_arn (ARNString) –

    The Amazon Resource Name (ARN) of the identity pool.

  • tag_keys (IdentityPoolTagsListType) –

    The keys of the tags to remove from the user pool.

Raises:

Source code in docs_src/capo_cognito_identity/_services/async_cognito_identity.py
async def untag_resource(
    self,
    resource_arn: "capo_cognito_identity.types.arn_string.ARNString",
    tag_keys: "capo_cognito_identity.types.identity_pool_tags_list_type.IdentityPoolTagsListType",
    *,
    config_overrides: Optional[AsyncCognitoIdentityClientConfig] = None,
) -> "capo_cognito_identity.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes the specified tags from the specified Amazon Cognito identity pool. You can use this action up to 5 times per second, per account</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the identity pool.</p>
        tag_keys: <p>The keys of the tags to remove from the user pool.</p>

    Raises:
        capo_cognito_identity.errors.internal_error_exception.InternalErrorException: <p>Thrown when the service encounters an error during processing the request.</p>
        capo_cognito_identity.errors.invalid_parameter_exception.InvalidParameterException: <p>Thrown for missing or bad input parameter(s).</p>
        capo_cognito_identity.errors.not_authorized_exception.NotAuthorizedException: <p>Thrown when a user is not authorized to access the requested resource.</p>
        capo_cognito_identity.errors.resource_not_found_exception.ResourceNotFoundException: <p>Thrown when the requested resource (for example, a dataset or record) does not exist.</p>
        capo_cognito_identity.errors.too_many_requests_exception.TooManyRequestsException: <p>Thrown when a request is throttled.</p>
        capo_cognito_identity.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_cognito_identity.types.untag_resource_input.UntagResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_cognito_identity.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_cognito_identity._operations.aws_cognito_identity_service.untag_resource

        (
            output,
            http_response,
        ) = await capo_cognito_identity._operations.aws_cognito_identity_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.types.untag_resource_input.UntagResourceInput = {
        "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