Skip to content

untag_resource async

untag_resource(
    resource_arn: ProfilingGroupArn,
    tag_keys: TagKeys,
    *,
    config_overrides: Optional[AsyncCodeGuruProfilerClientConfig] = None,
) -> UntagResourceResponse

Use to remove one or more tags from a resource.

Parameters:

  • resource_arn (ProfilingGroupArn) –

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

  • tag_keys (TagKeys) –

    A list of tag keys. Existing tags of resources with keys in this list are removed from the specified resource.

Raises:

Source code in docs_src/capo_codeguruprofiler/_services/async_code_guru_profiler.py
async def untag_resource(
    self,
    resource_arn: "capo_codeguruprofiler.types.profiling_group_arn.ProfilingGroupArn",
    tag_keys: "capo_codeguruprofiler.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[AsyncCodeGuruProfilerClientConfig] = None,
) -> "capo_codeguruprofiler.types.untag_resource_response.UntagResourceResponse":
    """<p> Use to remove one or more tags from a resource. </p>

    Args:
        resource_arn: <p> The Amazon Resource Name (ARN) of the resource that contains the tags to remove. </p>
        tag_keys: <p> A list of tag keys. Existing tags of resources with keys in this list are removed from the specified resource. </p>

    Raises:
        capo_codeguruprofiler.errors.internal_server_exception.InternalServerException: <p>The server encountered an internal error and is unable to complete the request.</p>
        capo_codeguruprofiler.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource specified in the request does not exist.</p>
        capo_codeguruprofiler.errors.validation_exception.ValidationException: <p>The parameter is not valid.</p>
        capo_codeguruprofiler.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_codeguruprofiler._operations.code_guru_profiler.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_codeguruprofiler.types.untag_resource_request.UntagResourceRequest = {
        "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