Removes tags from the specified resource.
Parameters:
-
resource_arn
(ResourceArn)
–
The Amazon Resource Name (ARN) of the resource to remove tags from.
-
tag_keys
(TagKeys)
–
The names (keys) of the tags to remove from the resource.
Raises:
-
ResourceNotFoundException
–
The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_odb/_services/odb.py
| def untag_resource(
self,
resource_arn: "capo_odb.types.resource_arn.ResourceArn",
tag_keys: "capo_odb.types.tag_keys.TagKeys",
*,
config_overrides: Optional[odbClientConfig] = None,
) -> "capo_odb.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes tags from the specified resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource to remove tags from.</p>
tag_keys: <p>The names (keys) of the tags to remove from the resource.</p>
Raises:
capo_odb.errors.resource_not_found_exception.ResourceNotFoundException: <p>The operation tried to access a resource that doesn't exist. Make sure you provided the correct resource and try again.</p>
capo_odb.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_odb.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_odb.types.untag_resource_response.UntagResourceResponse"
]:
import capo_odb._operations.odb.untag_resource
output, http_response = (
capo_odb._operations.odb.untag_resource.untag_resource(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UntagResource")
)
input_: capo_odb.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn,
"tag_keys": tag_keys,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|