Skip to content

get_volume async

get_volume(
    farm_id: FarmId,
    fleet_id: FleetId,
    volume_id: VolumeId,
    *,
    config_overrides: Optional[AsyncdeadlineClientConfig] = None,
) -> GetVolumeResponse

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

>>> await client.get_volume(farm_id='farm-1234567890abcdef1234567890abcdef', fleet_id='fleet-1234567890abcdef1234567890abcdef', volume_id='volume-1234567890abcdef1234567890abcdef')
Source code in docs_src/capo_deadline/_services/async_deadline.py
async 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[AsyncdeadlineClientConfig] = 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

        >>> await client.get_volume(farm_id='farm-1234567890abcdef1234567890abcdef', fleet_id='fleet-1234567890abcdef1234567890abcdef', volume_id='volume-1234567890abcdef1234567890abcdef')
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_deadline.types.get_volume_request.GetVolumeRequest]",
    ) -> AsyncOperationResponse[
        "capo_deadline.types.get_volume_response.GetVolumeResponse"
    ]:
        import capo_deadline._operations.deadline.get_volume

        (
            output,
            http_response,
        ) = await capo_deadline._operations.deadline.get_volume.async_get_volume(
            req.options, req.input
        )
        return AsyncOperationResponse(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 = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output