Removes a tag from the specified resource.
Parameters:
-
resource_arn
(str)
–
The ARN of the resource to remove the tag from.
-
tag_keys
(TagKeys)
–
The key for the tag to add.
Raises:
Source code in docs_src/capo_accessanalyzer/_services/access_analyzer.py
| def untag_resource(
self,
resource_arn: str,
tag_keys: "capo_accessanalyzer.types.tag_keys.TagKeys",
*,
config_overrides: Optional[AccessAnalyzerClientConfig] = None,
) -> "capo_accessanalyzer.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes a tag from the specified resource.</p>
Args:
resource_arn: <p>The ARN of the resource to remove the tag from.</p>
tag_keys: <p>The key for the tag to add.</p>
Raises:
capo_accessanalyzer.errors.access_denied_exception.AccessDeniedException: <p>You do not have sufficient access to perform this action.</p>
capo_accessanalyzer.errors.internal_server_exception.InternalServerException: <p>Internal server error.</p>
capo_accessanalyzer.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource could not be found.</p>
capo_accessanalyzer.errors.throttling_exception.ThrottlingException: <p>Throttling limit exceeded error.</p>
capo_accessanalyzer.errors.validation_exception.ValidationException: <p>Validation exception error.</p>
capo_accessanalyzer.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_accessanalyzer.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_accessanalyzer.types.untag_resource_response.UntagResourceResponse"
]:
import capo_accessanalyzer._operations.access_analyzer.untag_resource
output, http_response = (
capo_accessanalyzer._operations.access_analyzer.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_accessanalyzer.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
|