Skip to content

untag_resource async

untag_resource(
    resource_arn: AmazonResourceName,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = None,
) -> UntagResourceResponse

Removes a tag or set of tags from a resource.

Parameters:

  • resource_arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the resource to remove tags from.

  • tag_keys (TagKeyList) –

    The tag or set of tags to remove from the resource.

Raises:

Source code in docs_src/capo_redshift_serverless/_services/async_redshift_serverless.py
async def untag_resource(
    self,
    resource_arn: "capo_redshift_serverless.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_redshift_serverless.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncRedshiftServerlessClientConfig] = None,
) -> "capo_redshift_serverless.types.untag_resource_response.UntagResourceResponse":
    """<p>Removes a tag or set of tags from a resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource to remove tags from.</p>
        tag_keys: <p>The tag or set of tags to remove from the resource.</p>

    Raises:
        capo_redshift_serverless.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_redshift_serverless.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource could not be found.</p>
        capo_redshift_serverless.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_redshift_serverless.errors.validation_exception.ValidationException: <p>The input failed to satisfy the constraints specified by an Amazon Web Services service.</p>
        capo_redshift_serverless.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_redshift_serverless.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_redshift_serverless.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_redshift_serverless._operations.redshift_serverless.untag_resource

        (
            output,
            http_response,
        ) = await capo_redshift_serverless._operations.redshift_serverless.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_redshift_serverless.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