Skip to content

untag_resource

untag_resource(
    arn: EmailContactArn,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> UntagResourceResponse

Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts..

Parameters:

  • arn (EmailContactArn) –

    The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.

  • tag_keys (TagKeys) –

    Specifies a list of tag keys that you want to remove from the specified resources.

Raises:

Source code in docs_src/capo_notificationscontacts/_services/notifications_contacts.py
def untag_resource(
    self,
    arn: "capo_notificationscontacts.types.email_contact_arn.EmailContactArn",
    tag_keys: "capo_notificationscontacts.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[NotificationsContactsClientConfig] = None,
) -> (
    "capo_notificationscontacts.types.untag_resource_response.UntagResourceResponse"
):
    """<p>Detaches a key-value pair from a resource, as identified by its Amazon Resource Name (ARN). Taggable resources in AWS User Notifications Contacts include email contacts..</p>

    Args:
        arn: <p>The value of the resource that will have the tag removed. An Amazon Resource Name (ARN) is an identifier for a specific AWS resource, such as a server, user, or role.</p>
        tag_keys: <p>Specifies a list of tag keys that you want to remove from the specified resources.</p>

    Raises:
        capo_notificationscontacts.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_notificationscontacts.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_notificationscontacts.errors.resource_not_found_exception.ResourceNotFoundException: <p>Your request references a resource which does not exist. </p>
        capo_notificationscontacts.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_notificationscontacts.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by an AWS service.</p>
        capo_notificationscontacts.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        output, http_response = (
            capo_notificationscontacts._operations.notifications_contacts.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_notificationscontacts.types.untag_resource_request.UntagResourceRequest = {
        "arn": arn,
        "tag_keys": tag_keys,
    }

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output