Skip to content

untag_resource async

untag_resource(
    resource_arn: MonitorArn,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[AsyncInternetMonitorClientConfig] = None,
) -> UntagResourceOutput

Removes a tag from a resource.

Parameters:

  • resource_arn (MonitorArn) –

    The Amazon Resource Name (ARN) for a tag you remove a resource from.

  • tag_keys (TagKeys) –

    Tag keys that you remove from a resource.

Raises:

Source code in docs_src/capo_internetmonitor/_services/async_internet_monitor.py
async def untag_resource(
    self,
    resource_arn: "capo_internetmonitor.types.monitor_arn.MonitorArn",
    tag_keys: "capo_internetmonitor.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[AsyncInternetMonitorClientConfig] = None,
) -> "capo_internetmonitor.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes a tag from a resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) for a tag you remove a resource from.</p>
        tag_keys: <p>Tag keys that you remove from a resource.</p>

    Raises:
        capo_internetmonitor.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permission to perform this action.</p>
        capo_internetmonitor.errors.bad_request_exception.BadRequestException: <p>A bad request was received.</p>
        capo_internetmonitor.errors.internal_server_error_exception.InternalServerErrorException: <p>There was an internal server error.</p>
        capo_internetmonitor.errors.not_found_exception.NotFoundException: <p>The request specifies something that doesn't exist.</p>
        capo_internetmonitor.errors.too_many_requests_exception.TooManyRequestsException: <p>There were too many requests.</p>
        capo_internetmonitor.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_internetmonitor.types.untag_resource_input.UntagResourceInput]",
    ) -> AsyncOperationResponse[
        "capo_internetmonitor.types.untag_resource_output.UntagResourceOutput"
    ]:
        import capo_internetmonitor._operations.internet_monitor20210603.untag_resource

        (
            output,
            http_response,
        ) = await capo_internetmonitor._operations.internet_monitor20210603.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_internetmonitor.types.untag_resource_input.UntagResourceInput = {
        "resource_arn": resource_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