Skip to content

untag_resource async

untag_resource(
    resource_arn: ResourceArn,
    resource_tag_keys: ResourceTagKeyList,
    *,
    config_overrides: Optional[AsyncBillingClientConfig] = None,
) -> UntagResourceResponse

Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the resource.

  • resource_tag_keys (ResourceTagKeyList) –

    A list of tag key value pairs that are associated with the resource.

Raises:

Examples:

Invoke UntagResource

>>> await client.untag_resource(resource_arn='arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899', resource_tag_keys=['ExampleTagKey'])
Source code in docs_src/capo_billing/_services/async_billing.py
async def untag_resource(
    self,
    resource_arn: "capo_billing.types.resource_arn.ResourceArn",
    resource_tag_keys: "capo_billing.types.resource_tag_key_list.ResourceTagKeyList",
    *,
    config_overrides: Optional[AsyncBillingClientConfig] = None,
) -> "capo_billing.types.untag_resource_response.UntagResourceResponse":
    """<p> Removes one or more tags from a resource. Specify only tag keys in your request. Don't specify the value. </p>

    Args:
        resource_arn: <p> The Amazon Resource Name (ARN) of the resource. </p>
        resource_tag_keys: <p> A list of tag key value pairs that are associated with the resource. </p>

    Raises:
        capo_billing.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient access to perform this action.</p>
        capo_billing.errors.internal_server_exception.InternalServerException: <p>The request processing failed because of an unknown error, exception, or failure. </p>
        capo_billing.errors.resource_not_found_exception.ResourceNotFoundException: <p> The specified ARN in the request doesn't exist. </p>
        capo_billing.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling. </p>
        capo_billing.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an Amazon Web Services service. </p>
        capo_billing.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        Invoke UntagResource

        >>> await client.untag_resource(resource_arn='arn:aws:billing::123456789101:billingview/custom-46f47cb2-a11d-43f3-983d-470b5708a899', resource_tag_keys=['ExampleTagKey'])
    """

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

        (
            output,
            http_response,
        ) = await capo_billing._operations.aws_billing.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_billing.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn,
        "resource_tag_keys": resource_tag_keys,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output