Skip to content

untag_resource

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

Deletes specified tags from an Amazon EVS resource.

Parameters:

  • resource_arn (Arn) –

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

  • tag_keys (TagKeys) –

    The keys of the tags to delete.

Raises:

  • ResourceNotFoundException –

    A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a state of DELETED.

  • TagPolicyException –

    TagPolicyException is deprecated. See ValidationException instead.

    The request doesn't comply with IAM tag policy. Correct your request and then retry it.

  • UnknownServiceError –

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

Source code in docs_src/capo_evs/_services/evs.py
def untag_resource(
    self,
    resource_arn: "capo_evs.types.arn.Arn",
    tag_keys: "capo_evs.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[evsClientConfig] = None,
) -> "capo_evs.types.untag_resource_response.UntagResourceResponse":
    """<p>Deletes specified tags from an Amazon EVS 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 delete.</p>

    Raises:
        capo_evs.errors.resource_not_found_exception.ResourceNotFoundException: <p>A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a <code>state</code> of <code>DELETED</code>.</p>
        capo_evs.errors.tag_policy_exception.TagPolicyException: <note> <p> <code>TagPolicyException</code> is deprecated. See <a href="https://docs.aws.amazon.com/evs/latest/APIReference/API_ValidationException.html"> <code>ValidationException</code> </a> instead.</p> </note> <p>The request doesn't comply with IAM tag policy. Correct your request and then retry it.</p>
        capo_evs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_evs._operations.amazon_elastic_v_mware_service.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_evs.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