def untag_resource(
self,
resource_arn: "capo_device_farm.types.device_farm_arn.DeviceFarmArn",
tag_keys: "capo_device_farm.types.tag_key_list.TagKeyList",
*,
config_overrides: Optional[DeviceFarmClientConfig] = None,
) -> "capo_device_farm.types.untag_resource_response.UntagResourceResponse":
"""<p>Deletes the specified tags from a resource.</p>
Args:
resource_arn: <p>The Amazon Resource Name (ARN) of the resource or resources from which to delete tags. You can associate tags with the following Device Farm resources: <code>PROJECT</code>, <code>TESTGRID_PROJECT</code>, <code>RUN</code>, <code>NETWORK_PROFILE</code>, <code>INSTANCE_PROFILE</code>, <code>DEVICE_INSTANCE</code>, <code>SESSION</code>, <code>DEVICE_POOL</code>, <code>DEVICE</code>, and <code>VPCE_CONFIGURATION</code>.</p>
tag_keys: <p>The keys of the tags to be removed.</p>
Raises:
capo_device_farm.errors.argument_exception.ArgumentException: <p>An invalid argument was specified.</p>
capo_device_farm.errors.not_found_exception.NotFoundException: <p>The specified entity was not found.</p>
capo_device_farm.errors.tag_operation_exception.TagOperationException: <p>The operation was not successful. Try again.</p>
capo_device_farm.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_device_farm.types.untag_resource_request.UntagResourceRequest]",
) -> OperationResponse[
"capo_device_farm.types.untag_resource_response.UntagResourceResponse"
]:
import capo_device_farm._operations.device_farm_20150623.untag_resource
output, http_response = (
capo_device_farm._operations.device_farm_20150623.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_device_farm.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