Skip to content

untag_resource async

untag_resource(
    resource_arn: Arn,
    tag_keys: TagKeyList,
    *,
    config_overrides: Optional[AsynccodeartifactClientConfig] = None,
) -> UntagResourceResult

Removes tags from a resource in CodeArtifact.

Parameters:

  • resource_arn (Arn) –

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

  • tag_keys (TagKeyList) –

    The tag key for each tag that you want to remove from the resource.

Raises:

  • AccessDeniedException –

    The operation did not succeed because of an unauthorized access attempt.

  • ResourceNotFoundException –

    The operation did not succeed because the resource requested is not found in the service.

  • ThrottlingException –

    The operation did not succeed because too many requests are sent to the service.

  • ValidationException –

    The operation did not succeed because a parameter in the request was sent with an invalid value.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_codeartifact/_services/async_codeartifact.py
async def untag_resource(
    self,
    resource_arn: "capo_codeartifact.types.arn.Arn",
    tag_keys: "capo_codeartifact.types.tag_key_list.TagKeyList",
    *,
    config_overrides: Optional[AsynccodeartifactClientConfig] = None,
) -> "capo_codeartifact.types.untag_resource_result.UntagResourceResult":
    """<p>Removes tags from a resource in CodeArtifact.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to remove tags from.</p>
        tag_keys: <p>The tag key for each tag that you want to remove from the resource.</p>

    Raises:
        capo_codeartifact.errors.access_denied_exception.AccessDeniedException: <p> The operation did not succeed because of an unauthorized access attempt. </p>
        capo_codeartifact.errors.resource_not_found_exception.ResourceNotFoundException: <p> The operation did not succeed because the resource requested is not found in the service. </p>
        capo_codeartifact.errors.throttling_exception.ThrottlingException: <p> The operation did not succeed because too many requests are sent to the service. </p>
        capo_codeartifact.errors.validation_exception.ValidationException: <p> The operation did not succeed because a parameter in the request was sent with an invalid value. </p>
        capo_codeartifact.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_codeartifact.types.untag_resource_request.UntagResourceRequest]",
    ) -> AsyncOperationResponse[
        "capo_codeartifact.types.untag_resource_result.UntagResourceResult"
    ]:
        import capo_codeartifact._operations.code_artifact_control_plane_service.untag_resource

        (
            output,
            http_response,
        ) = await capo_codeartifact._operations.code_artifact_control_plane_service.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_codeartifact.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