Skip to content

untag_resource async

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

This operation removes tags from the specified resource.

Parameters:

  • resource_arn (str) –

    The Amazon Resource Name (ARN) that uniquely identifies the resource where you want to remove tags.

  • tag_keys (TagKeys) –

    This required parameter contains the tag keys you want to remove from the source.

Raises:

Source code in docs_src/capo_backupsearch/_services/async_backup_search.py
async def untag_resource(
    self,
    resource_arn: str,
    tag_keys: "capo_backupsearch.types.tag_keys.TagKeys",
    *,
    config_overrides: Optional[AsyncBackupSearchClientConfig] = None,
) -> "capo_backupsearch.types.untag_resource_response.UntagResourceResponse":
    """<p>This operation removes tags from the specified resource.</p>

    Args:
        resource_arn: <p>The Amazon Resource Name (ARN) that uniquely identifies the resource where you want to remove tags.</p>
        tag_keys: <p>This required parameter contains the tag keys you want to remove from the source.</p>

    Raises:
        capo_backupsearch.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
        capo_backupsearch.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. Retry your request.</p>
        capo_backupsearch.errors.throttling_exception.ThrottlingException: <p>The request was denied due to request throttling.</p>
        capo_backupsearch.errors.validation_exception.ValidationException: <p>The input fails to satisfy the constraints specified by a service.</p>
        capo_backupsearch.errors.resource_not_found_exception.ResourceNotFoundException: <p>The resource was not found for this request.</p> <p>Confirm the resource information, such as the ARN or type is correct and exists, then retry the request.</p>
        capo_backupsearch.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

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

        (
            output,
            http_response,
        ) = await capo_backupsearch._operations.cryo_backup_search_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_backupsearch.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