Skip to content
  • Auto
  • Light
  • Dark

Volumes

Volumes

Create a New Block Storage Volume
client.gpuDroplets.volumes.create(VolumeCreateParamsbody, RequestOptionsoptions?): VolumeCreateResponse { volume }
post/v2/volumes
Delete a Block Storage Volume
client.gpuDroplets.volumes.delete(stringvolumeID, RequestOptionsoptions?): void
delete/v2/volumes/{volume_id}
Delete a Block Storage Volume by Name
client.gpuDroplets.volumes.deleteByName(VolumeDeleteByNameParams { name, region } params?, RequestOptionsoptions?): void
delete/v2/volumes
List All Block Storage Volumes
client.gpuDroplets.volumes.list(VolumeListParams { name, page, per_page, region } query?, RequestOptionsoptions?): VolumeListResponse { meta, volumes, links }
get/v2/volumes
Retrieve an Existing Block Storage Volume
client.gpuDroplets.volumes.retrieve(stringvolumeID, RequestOptionsoptions?): VolumeRetrieveResponse { volume }
get/v2/volumes/{volume_id}

VolumesActions

Initiate A Block Storage Action By Volume Id
client.gpuDroplets.volumes.actions.initiateByID(stringvolumeID, ActionInitiateByIDParamsparams, RequestOptionsoptions?): ActionInitiateByIDResponse { action }
post/v2/volumes/{volume_id}/actions
Initiate A Block Storage Action By Volume Name
client.gpuDroplets.volumes.actions.initiateByName(ActionInitiateByNameParamsparams, RequestOptionsoptions?): ActionInitiateByNameResponse { action }
post/v2/volumes/actions
List All Actions for a Volume
client.gpuDroplets.volumes.actions.list(stringvolumeID, ActionListParams { page, per_page } query?, RequestOptionsoptions?): ActionListResponse { meta, actions, links }
get/v2/volumes/{volume_id}/actions
Retrieve an Existing Volume Action
client.gpuDroplets.volumes.actions.retrieve(numberactionID, ActionRetrieveParams { volume_id, page, per_page } params, RequestOptionsoptions?): ActionRetrieveResponse { action }
get/v2/volumes/{volume_id}/actions/{action_id}
ModelsExpand Collapse
VolumeAction extends Action { id, completed_at, region, 6 more } { resource_id, type }
resource_id?: number | null
type?: string

This is the type of action that the object represents. For example, this could be "attach_volume" to represent the state of a volume attach action.

VolumesSnapshots

Create Snapshot from a Volume
client.gpuDroplets.volumes.snapshots.create(stringvolumeID, SnapshotCreateParams { name, tags } body, RequestOptionsoptions?): SnapshotCreateResponse { snapshot }
post/v2/volumes/{volume_id}/snapshots
Delete a Volume Snapshot
client.gpuDroplets.volumes.snapshots.delete(stringsnapshotID, RequestOptionsoptions?): void
delete/v2/volumes/snapshots/{snapshot_id}
List Snapshots for a Volume
client.gpuDroplets.volumes.snapshots.list(stringvolumeID, SnapshotListParams { page, per_page } query?, RequestOptionsoptions?): SnapshotListResponse { meta, links, snapshots }
get/v2/volumes/{volume_id}/snapshots
Retrieve an Existing Volume Snapshot
client.gpuDroplets.volumes.snapshots.retrieve(stringsnapshotID, RequestOptionsoptions?): SnapshotRetrieveResponse { snapshot }
get/v2/volumes/snapshots/{snapshot_id}