Skip to content

untag_resource async

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

Untags a resource with a specified Amazon Resource Name (ARN).

For more information, see Tagging your Amazon Web Services resources in the Tagging Amazon Web Services Resources User Guide.

Parameters:

Raises:

Source code in docs_src/capo_notifications/_services/async_notifications.py
async def untag_resource(
    self,
    arn: "capo_notifications.types.notification_configuration_arn.NotificationConfigurationArn",
    tag_keys: "capo_notifications.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[AsyncNotificationsClientConfig] = None,
) -> "capo_notifications.types.untag_resource_response.UntagResourceResponse":
    """<p>Untags a resource with a specified Amazon Resource Name (ARN).</p> <p>For more information, see <a href="https://docs.aws.amazon.com/tag-editor/latest/userguide/tagging.html">Tagging your Amazon Web Services resources</a> in the <i>Tagging Amazon Web Services Resources User Guide</i>.</p>

    Args:
        arn: <p>The Amazon Resource Name (ARN) to use to untag a resource.</p>
        tag_keys: <p>The tag keys to use to untag a resource.</p>

    Raises:
        capo_notifications.errors.access_denied_exception.AccessDeniedException: <p>User does not have sufficient access to perform this action.</p>
        capo_notifications.errors.internal_server_exception.InternalServerException: <p>Unexpected error during processing of request.</p>
        capo_notifications.errors.resource_not_found_exception.ResourceNotFoundException: <p>Request references a resource which does not exist. </p>
        capo_notifications.errors.throttling_exception.ThrottlingException: <p>Request was denied due to request throttling. </p>
        capo_notifications.errors.validation_exception.ValidationException: <p>This exception is thrown when the notification event fails validation.</p>
        capo_notifications.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_notifications.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_notifications.types.untag_resource_response.UntagResourceResponse"
    ]:
        import capo_notifications._operations.notifications.untag_resource

        (
            output,
            http_response,
        ) = await capo_notifications._operations.notifications.untag_resource.async_untag_resource(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UntagResource")
    )
    input_: capo_notifications.types.untag_resource_request.UntagResourceRequest = {
        "arn": arn,
        "tag_keys": tag_keys,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output