Skip to content

untag_resource async

untag_resource(
    resource_arn: AmazonResourceName,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
) -> UntagResourceOutput

Removes tags from an Amazon Web Services resource.

Parameters:

  • resource_arn (AmazonResourceName) –

    The Amazon Resource Name (ARN) of the resource to remove tags from.

  • tag_keys (TagKeyList) –

    The list of keys for the tags to be removed from the resource.

Raises:

Source code in docs_src/capo_codeconnections/_services/async_code_connections.py
async def untag_resource(
    self,
    resource_arn: "capo_codeconnections.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_codeconnections.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncCodeConnectionsClientConfig] = None,
) -> "capo_codeconnections.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes tags from an Amazon Web Services resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource to remove tags from.</p>
        tag_keys: <p>The list of keys for the tags to be removed from the resource.</p>

    Raises:
        capo_codeconnections.errors.resource_not_found_exception.ResourceNotFoundException: <p>Resource not found. Verify the connection resource ARN and try again.</p>
        capo_codeconnections.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_codeconnections._operations.code_connections_20231201.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_codeconnections.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