Removes one or more tags from the specified resource.
Parameters:
-
resource_arn
(ResourceArn)
–
The ARN of the canary or group that you're removing tags from.
The ARN format of a canary is arn:aws:synthetics:Region:account-id:canary:canary-name .
The ARN format of a group is arn:aws:synthetics:Region:account-id:group:group-name
-
tag_keys
(TagKeyList)
–
The list of tag keys to remove from the resource.
Raises:
Source code in docs_src/capo_synthetics/_services/synthetics.py
| def untag_resource(
self,
resource_arn: "capo_synthetics.types.resource_arn.ResourceArn",
tag_keys: "capo_synthetics.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[syntheticsClientConfig] = None,
) -> "capo_synthetics.types.untag_resource_response.UntagResourceResponse":
"""<p>Removes one or more tags from the specified resource.</p>
Args:
resource_arn: <p>The ARN of the canary or group that you're removing tags from.</p> <p>The ARN format of a canary is <code>arn:aws:synthetics:<i>Region</i>:<i>account-id</i>:canary:<i>canary-name</i> </code>.</p> <p>The ARN format of a group is <code>arn:aws:synthetics:<i>Region</i>:<i>account-id</i>:group:<i>group-name</i> </code> </p>
tag_keys: <p>The list of tag keys to remove from the resource.</p>
Raises:
capo_synthetics.errors.bad_request_exception.BadRequestException: <p>The request was not valid.</p>
capo_synthetics.errors.conflict_exception.ConflictException: <p>A conflicting operation is already in progress.</p>
capo_synthetics.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred. Try the operation again.</p>
capo_synthetics.errors.not_found_exception.NotFoundException: <p>The specified resource was not found.</p>
capo_synthetics.errors.too_many_requests_exception.TooManyRequestsException: <p>There were too many simultaneous requests. Try the operation again.</p>
capo_synthetics.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_synthetics.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_synthetics.types.untag_resource_response.UntagResourceResponse"
]:
import capo_synthetics._operations.synthetics.untag_resource
output, http_response = (
capo_synthetics._operations.synthetics.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_synthetics.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
|