Skip to content

untag_resource

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

Deletes specified tags from an Amazon EKS resource.

Parameters:

  • resource_arn (String) –

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

  • tag_keys (TagKeyList) –

    The keys of the tags to remove.

Raises:

  • BadRequestException –

    This exception is thrown if the request contains a semantic error. The precise meaning will depend on the API, and will be documented in the error message.

  • NotFoundException –

    A service resource associated with the request could not be found. Clients should not retry such requests.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_eks/_services/eks.py
def untag_resource(
    self,
    resource_arn: "capo_eks.types.string.String",
    tag_keys: "capo_eks.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[EKSClientConfig] = None,
) -> "capo_eks.types.untag_resource_response.UntagResourceResponse":
    """<p>Deletes specified tags from an Amazon EKS resource.</p>

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

    Raises:
        capo_eks.errors.bad_request_exception.BadRequestException: <p>This exception is thrown if the request contains a semantic error. The precise meaning will depend on the API, and will be documented in the error message.</p>
        capo_eks.errors.not_found_exception.NotFoundException: <p>A service resource associated with the request could not be found. Clients should not retry such requests.</p>
        capo_eks.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_eks._operations.aws_wesley_frontend.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_eks.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