Removes one or more tags (keys and values) from an Amazon Macie resource.
Parameters:
-
resource_arn
(__string)
–
The Amazon Resource Name (ARN) of the resource.
-
tag_keys
(Optional[__listOf__string], default:
None
)
–
One or more tags (keys) to remove from the resource. In an HTTP request to remove multiple tags, append the tagKeys parameter and argument for each tag to remove, separated by an ampersand (&).
Raises:
Source code in docs_src/capo_macie2/_services/macie2.py
| def untag_resource(
self,
resource_arn: "capo_macie2.types.__string.__string",
*,
config_overrides: Optional[Macie2ClientConfig] = None,
tag_keys: Optional[
"capo_macie2.types.__list_of__string.__listOf__string"
] = None,
) -> "capo_macie2.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes one or more tags (keys and values) from an Amazon Macie resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource.</p>
tag_keys: <p>One or more tags (keys) to remove from the resource. In an HTTP request to remove multiple tags, append the tagKeys parameter and argument for each tag to remove, separated by an ampersand (&).</p>
Raises:
capo_macie2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_macie2.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_macie2.types.untag_resource_response.UntagResourceResponse"
]:
import capo_macie2._operations.macie2.untag_resource
output, http_response = (
capo_macie2._operations.macie2.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_macie2.types.untag_resource_request.UntagResourceRequest = {
"resource_arn": resource_arn
}
if tag_keys is not None:
input_["tag_keys"] = tag_keys
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|