Gets a persistent volume.
Parameters:
-
farm_id
(FarmId)
–
The farm ID of the farm that contains the fleet.
-
fleet_id
(FleetId)
–
The fleet ID of the fleet that contains the volume.
-
volume_id
(VolumeId)
–
The volume ID of the volume to retrieve.
Raises:
Examples:
Get a volume
>>> client.get_volume(farm_id='farm-1234567890abcdef1234567890abcdef', fleet_id='fleet-1234567890abcdef1234567890abcdef', volume_id='volume-1234567890abcdef1234567890abcdef')
Source code in docs_src/capo_deadline/_services/deadline.py
| def get_volume(
self,
farm_id: "capo_deadline.types.farm_id.FarmId",
fleet_id: "capo_deadline.types.fleet_id.FleetId",
volume_id: "capo_deadline.types.volume_id.VolumeId",
*,
config_overrides: Optional[deadlineClientConfig] = None,
) -> "capo_deadline.types.get_volume_response.GetVolumeResponse":
"""Gets a persistent volume.
Args:
farm_id: The farm ID of the farm that contains the fleet.
fleet_id: The fleet ID of the fleet that contains the volume.
volume_id: The volume ID of the volume to retrieve.
Raises:
capo_deadline.errors.access_denied_exception.AccessDeniedException: You don't have permission to perform the action.
capo_deadline.errors.internal_server_error_exception.InternalServerErrorException: Deadline Cloud can't process your request right now. Try again later.
capo_deadline.errors.resource_not_found_exception.ResourceNotFoundException: The requested resource can't be found.
capo_deadline.errors.throttling_exception.ThrottlingException: Your request exceeded a request rate quota.
capo_deadline.errors.validation_exception.ValidationException: The request isn't valid. This can occur if your request contains malformed JSON or unsupported characters.
capo_deadline.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Get a volume
>>> client.get_volume(farm_id='farm-1234567890abcdef1234567890abcdef', fleet_id='fleet-1234567890abcdef1234567890abcdef', volume_id='volume-1234567890abcdef1234567890abcdef')
"""
def _handler(
req: "OperationRequest[capo_deadline.types.get_volume_request.GetVolumeRequest]",
) -> OperationResponse[
"capo_deadline.types.get_volume_response.GetVolumeResponse"
]:
import capo_deadline._operations.deadline.get_volume
output, http_response = (
capo_deadline._operations.deadline.get_volume.get_volume(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("GetVolume")
)
input_: capo_deadline.types.get_volume_request.GetVolumeRequest = {
"farm_id": farm_id,
"fleet_id": fleet_id,
"volume_id": volume_id,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|