Skip to content

untag_resource

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

Removes the specified tags from the specified resource.

Parameters:

  • resource_arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the resource.

  • tag_keys (TagKeyList) –

    The tag keys of the tags to remove.

Raises:

Examples:

To remove tags from a proxy The following example removes the specified tags from the specified proxy.

>>> client.untag_resource(resource_arn='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', tag_keys=['Team'])
Source code in docs_src/capo_elb_proxy/_services/elb_proxy.py
def untag_resource(
    self,
    resource_arn: "capo_elb_proxy.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_elb_proxy.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[ELBProxyClientConfig] = None,
) -> "capo_elb_proxy.types.untag_resource_output.UntagResourceOutput":
    """Removes the specified tags from the specified resource.

    Args:
        resource_arn: The Amazon Resource Name (ARN) of the resource.
        tag_keys: The tag keys of the tags to remove.

    Raises:
        capo_elb_proxy.errors.internal_server_exception.InternalServerException: An unexpected error occurred while processing the request.
        capo_elb_proxy.errors.throttling_exception.ThrottlingException: The limit on the number of requests per second was exceeded.
        capo_elb_proxy.errors.access_denied_exception.AccessDeniedException: The user does not have sufficient access to perform this action.
        capo_elb_proxy.errors.resource_not_found_exception.ResourceNotFoundException: The request references a resource that does not exist.
        capo_elb_proxy.errors.validation_exception.ValidationException: The input does not satisfy the constraints specified by an AWS service.
        capo_elb_proxy.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        To remove tags from a proxy
        The following example removes the specified tags from the specified proxy.

        >>> client.untag_resource(resource_arn='arn:aws:elasticloadbalancing:us-east-1:123456789012:proxy/my-proxy:0123456789abcdef', tag_keys=['Team'])
    """

    def _handler(
        req: "OperationRequest[capo_elb_proxy.types.untag_resource_input.UntagResourceInput]",
    ) -> OperationResponse[
        "capo_elb_proxy.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_elb_proxy._operations.elb_proxy.untag_resource

        output, http_response = (
            capo_elb_proxy._operations.elb_proxy.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_elb_proxy.types.untag_resource_input.UntagResourceInput = {
        "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