Skip to content

untag_resource

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

Remove one or more tags (keys and values) from a specified resource.

Parameters:

  • resource_arn (TaggableResourceArn) –

    The Amazon Resource Name (ARN) of the resource that you want to untag.

  • tag_keys (TagKeyList) –

    The keys of the key-value pairs for the tag or tags you want to remove from the specified resource.

Raises:

Source code in docs_src/capo_mailmanager/_services/mail_manager.py
def untag_resource(
    self,
    resource_arn: "capo_mailmanager.types.taggable_resource_arn.TaggableResourceArn",
    tag_keys: "capo_mailmanager.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[MailManagerClientConfig] = None,
) -> "capo_mailmanager.types.untag_resource_response.UntagResourceResponse":
    """<p> Remove one or more tags (keys and values) from a specified resource. </p>

    Args:
        resource_arn: <p> The Amazon Resource Name (ARN) of the resource that you want to untag. </p>
        tag_keys: <p> The keys of the key-value pairs for the tag or tags you want to remove from the specified resource. </p>

    Raises:
        capo_mailmanager.errors.conflict_exception.ConflictException: <p>The request configuration has conflicts. For details, see the accompanying error message.</p>
        capo_mailmanager.errors.resource_not_found_exception.ResourceNotFoundException: <p>Occurs when a requested resource is not found.</p>
        capo_mailmanager.errors.validation_exception.ValidationException: <p>The request validation has failed. For details, see the accompanying error message.</p>
        capo_mailmanager.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_mailmanager._operations.mail_manager_svc.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_mailmanager.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