Skip to content

untag_resource

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

Remove tags from a resource.

Parameters:

  • resource_arn (LongStringAttribute) –

    The Amazon Resource Name (ARN) of the resource.

  • tag_keys (TagKeys) –

    Tag keys to remove from the resource.

Raises:

Source code in docs_src/capo_artifact/_services/artifact.py
def untag_resource(
    self,
    resource_arn: "capo_artifact.types.long_string_attribute.LongStringAttribute",
    tag_keys: "capo_artifact.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[ArtifactClientConfig] = None,
) -> "capo_artifact.types.untag_resource_response.UntagResourceResponse":
    """<p>Remove tags from a resource.</p>

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

    Raises:
        capo_artifact.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_artifact.errors.internal_server_exception.InternalServerException: <p>An unknown server exception has occurred.</p>
        capo_artifact.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist.</p>
        capo_artifact.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling.</p>
        capo_artifact.errors.validation_exception.ValidationException: <p>Request fails to satisfy the constraints specified by an AWS service.</p>
        capo_artifact.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_artifact._operations.artifact.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_artifact.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