Removes one or more tags from the specified resource.
Parameters:
-
resource_arn
(str)
–
The Amazon Resource Name (ARN) of the resource that you want to remove the tags from. You can use theListInvestigationGroups operation to find the ARNs of investigation groups.
-
tag_keys
(TagKeys)
–
The list of tag keys to remove from the resource.
Raises:
Source code in docs_src/capo_aiops/_services/async_ai_ops.py
| async def untag_resource(
self,
resource_arn: str,
tag_keys: "capo_aiops.types.tag_keys.TagKeys",
*,
config_overrides: Optional[AsyncAIOpsClientConfig] = None,
) -> "capo_aiops.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes one or more tags from the specified resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource that you want to remove the tags from. You can use the<code>ListInvestigationGroups</code> operation to find the ARNs of investigation groups.</p>
tag_keys: <p>The list of tag keys to remove from the resource.</p>
Raises:
capo_aiops.errors.access_denied_exception.AccessDeniedException: <p>You don't have sufficient permissions to perform this action.</p>
capo_aiops.errors.conflict_exception.ConflictException: <p>This operation couldn't be completed because of a conflict in resource states.</p>
capo_aiops.errors.forbidden_exception.ForbiddenException: <p>Access id denied for this operation, or this operation is not valid for the specified resource.</p>
capo_aiops.errors.internal_server_exception.InternalServerException: <p>An internal server error occurred. You can try again later.</p>
capo_aiops.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource doesn't exist.</p>
capo_aiops.errors.validation_exception.ValidationException: <p>This operation or its parameters aren't formatted correctly.</p>
capo_aiops.errors.throttling_exception.ThrottlingException: <p>The request was throttled because of quota limits. You can try again later.</p>
capo_aiops.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_aiops.types.untag_resource_request.UntagResourceRequest]",
) -> AsyncOperationResponse[
"capo_aiops.types.untag_resource_response.UntagResourceResponse"
]:
import capo_aiops._operations.ai_ops.untag_resource
(
output,
http_response,
) = await capo_aiops._operations.ai_ops.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_aiops.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
|