Skip to content

untag_resource async

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

Removes one or more tags from an Athena resource.

Parameters:

  • resource_arn (AmazonResourceName) –

    Specifies the ARN of the resource from which tags are to be removed.

  • tag_keys (TagKeyList) –

    A comma-separated list of one or more tag keys whose tags are to be removed from the specified resource.

Raises:

Source code in docs_src/capo_athena/_services/async_athena.py
async def untag_resource(
    self,
    resource_arn: "capo_athena.types.amazon_resource_name.AmazonResourceName",
    tag_keys: "capo_athena.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsyncAthenaClientConfig] = None,
) -> "capo_athena.types.untag_resource_output.UntagResourceOutput":
    """<p>Removes one or more tags from an Athena resource.</p>

    Args:
        resource_arn: <p>Specifies the ARN of the resource from which tags are to be removed.</p>
        tag_keys: <p>A comma-separated list of one or more tag keys whose tags are to be removed from the specified resource.</p>

    Raises:
        capo_athena.errors.internal_server_exception.InternalServerException: <p>Indicates a platform issue, which may be due to a transient condition or outage.</p>
        capo_athena.errors.invalid_request_exception.InvalidRequestException: <p>Indicates that something is wrong with the input to the request. For example, a required parameter may be missing or out of range.</p>
        capo_athena.errors.resource_not_found_exception.ResourceNotFoundException: <p>A resource, such as a workgroup, was not found.</p>
        capo_athena.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_athena._operations.amazon_athena.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_athena.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