Skip to content

untag_resource

untag_resource(
    resource_arn: ARN,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[drsClientConfig] = None,
) -> None

Deletes the specified set of tags from the specified set of Elastic Disaster Recovery resources.

Parameters:

  • resource_arn (ARN) –

    ARN of the resource for which tags are to be removed.

  • tag_keys (TagKeys) –

    Array of tags to be removed.

Raises:

Source code in docs_src/capo_drs/_services/drs.py
def untag_resource(
    self,
    resource_arn: "capo_drs.types.arn.ARN",
    tag_keys: "capo_drs.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[drsClientConfig] = None,
) -> None:
    """<p>Deletes the specified set of tags from the specified set of Elastic Disaster Recovery resources.</p>

    Args:
        resource_arn: <p>ARN of the resource for which tags are to be removed.</p>
        tag_keys: <p>Array of tags to be removed.</p>

    Raises:
        capo_drs.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_drs.errors.internal_server_exception.InternalServerException: <p>The request processing has failed because of an unknown error, exception or failure.</p>
        capo_drs.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource for this operation was not found.</p>
        capo_drs.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_drs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by the AWS service.</p>
        capo_drs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_drs.types.untag_resource_request.UntagResourceRequest]",
    ) -> OperationResponse[None]:
        import capo_drs._operations.elastic_disaster_recovery_service.untag_resource

        output, http_response = (
            capo_drs._operations.elastic_disaster_recovery_service.untag_resource.untag_resource(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    def _redact_input(
        input_: "capo_drs.types.untag_resource_request.UntagResourceRequest",
    ) -> dict[str, Any]:
        import capo_drs.types.untag_resource_request

        return capo_drs.types.untag_resource_request.redact_sensitive(input_)

    interceptors_, options_ = self.operation_options(
        config_overrides,
        OperationLogging("UntagResource", redact_input=_redact_input),
    )
    input_: capo_drs.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