Skip to content

untag_resource

untag_resource(
    resource_arn: ResourceArn,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> UntagResourceResponse

Remove tags from a Global Accelerator resource. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from an accelerator that was already removed.

For more information, see Tagging in Global Accelerator in the Global Accelerator Developer Guide.

Parameters:

  • resource_arn (ResourceArn) –

    The Amazon Resource Name (ARN) of the Global Accelerator resource to remove tags from. An ARN uniquely identifies a resource.

  • tag_keys (TagKeys) –

    The tag key pairs that you want to remove from the specified resources.

Raises:

Source code in docs_src/capo_global_accelerator/_services/global_accelerator.py
def untag_resource(
    self,
    resource_arn: "capo_global_accelerator.types.resource_arn.ResourceArn",
    tag_keys: "capo_global_accelerator.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[GlobalAcceleratorClientConfig] = None,
) -> "capo_global_accelerator.types.untag_resource_response.UntagResourceResponse":
    """<p>Remove tags from a Global Accelerator resource. When you specify a tag key, the action removes both that key and its associated value. The operation succeeds even if you attempt to remove tags from an accelerator that was already removed.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/global-accelerator/latest/dg/tagging-in-global-accelerator.html">Tagging in Global Accelerator</a> in the <i>Global Accelerator Developer Guide</i>.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the Global Accelerator resource to remove tags from. An ARN uniquely identifies a resource.</p>
        tag_keys: <p>The tag key pairs that you want to remove from the specified resources.</p>

    Raises:
        capo_global_accelerator.errors.accelerator_not_found_exception.AcceleratorNotFoundException: <p>The accelerator that you specified doesn't exist.</p>
        capo_global_accelerator.errors.internal_service_error_exception.InternalServiceErrorException: <p>There was an internal error for Global Accelerator.</p>
        capo_global_accelerator.errors.invalid_argument_exception.InvalidArgumentException: <p>An argument that you specified is invalid.</p>
        capo_global_accelerator.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_global_accelerator.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[
        "capo_global_accelerator.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_global_accelerator._operations.global_accelerator_v20180706.untag_resource

        output, http_response = (
            capo_global_accelerator._operations.global_accelerator_v20180706.untag_resource.untag_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_global_accelerator.types.untag_resource_request.UntagResourceRequest = {
        "resource_arn": resource_arn,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output