Deletes specified tags from a resource.
The WorkloadArn parameter can be a workload ARN, a custom lens ARN, a profile ARN, or review template ARN.
To specify multiple tags, use separate tagKeys parameters, for example:
DELETE /tags/WorkloadArn?tagKeys=key1&tagKeys=key2
Parameters:
-
tag_keys
(Optional[TagKeyList], default:
None
)
–
A list of tag keys. Existing tags of the resource whose keys are members of this list are removed from the resource.
Raises:
Source code in docs_src/capo_wellarchitected/_services/well_architected.py
| def untag_resource(
self,
workload_arn: "capo_wellarchitected.types.workload_arn.WorkloadArn",
*,
config_overrides: Optional[WellArchitectedClientConfig] = None,
tag_keys: Optional["capo_wellarchitected.types.tag_key_list.TagKeyList"] = None,
) -> "capo_wellarchitected.types.untag_resource_output.UntagResourceOutput":
"""<p>Deletes specified tags from a resource.</p> <note> <p>The WorkloadArn parameter can be a workload ARN, a custom lens ARN, a profile ARN, or review template ARN.</p> </note> <p>To specify multiple tags, use separate <b>tagKeys</b> parameters, for example:</p> <p> <code>DELETE /tags/WorkloadArn?tagKeys=key1&tagKeys=key2</code> </p>
Args:
tag_keys: <p>A list of tag keys. Existing tags of the resource whose keys are members of this list are removed from the resource.</p>
Raises:
capo_wellarchitected.errors.internal_server_exception.InternalServerException: <p>There is a problem with the Well-Architected Tool API service.</p>
capo_wellarchitected.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource was not found.</p>
capo_wellarchitected.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_wellarchitected.types.untag_resource_input.UntagResourceInput]",
) -> OperationResponse[
"capo_wellarchitected.types.untag_resource_output.UntagResourceOutput"
]:
import capo_wellarchitected._operations.well_architected_api_service_lambda.untag_resource
output, http_response = (
capo_wellarchitected._operations.well_architected_api_service_lambda.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_wellarchitected.types.untag_resource_input.UntagResourceInput = {
"workload_arn": workload_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
|