Skip to content
Docs

    Volumes

    Create Volume
    client.Compute.Volumes.New(ctx, body) (*Operation, error)
    POST/v1/compute/volumes
    Get Volume
    client.Compute.Volumes.Get(ctx, volumeID) (*Volume, error)
    GET/v1/compute/volumes/{volume_id}
    Update Volume
    client.Compute.Volumes.Update(ctx, volumeID, body) (*Operation, error)
    PATCH/v1/compute/volumes/{volume_id}
    Delete Volume
    client.Compute.Volumes.Delete(ctx, volumeID) (*Operation, error)
    DELETE/v1/compute/volumes/{volume_id}
    List Volumes
    client.Compute.Volumes.List(ctx, query) (*Cursor[Volume], error)
    GET/v1/compute/volumes
    Attach Volume
    client.Compute.Volumes.Attach(ctx, volumeID, body) (*Operation, error)
    POST/v1/compute/volumes/{volume_id}/attach
    Detach Volume
    client.Compute.Volumes.Detach(ctx, volumeID) (*Operation, error)
    POST/v1/compute/volumes/{volume_id}/detach
    ModelsExpand Collapse
    type Volume struct{…}

    Volume details.

    ID string

    Unique identifier for the Volume.

    CreatedAt Time

    When the Volume was created.

    formatdate-time

    Volume kind.

    One of the following:
    const VolumeKindBoot VolumeKind = "boot"
    const VolumeKindData VolumeKind = "data"
    Name string

    Name of the Volume.

    ProjectID string

    Project ID the Volume belongs to.

    Region RegionName

    Region the resource is in.

    Size int64

    Size of the Volume in GB.

    Status of the resource.

    One of the following:
    const ResourceStatusPending ResourceStatus = "pending"
    const ResourceStatusCreating ResourceStatus = "creating"
    const ResourceStatusUpdating ResourceStatus = "updating"
    const ResourceStatusReady ResourceStatus = "ready"
    const ResourceStatusDeleting ResourceStatus = "deleting"
    const ResourceStatusDeleted ResourceStatus = "deleted"
    const ResourceStatusError ResourceStatus = "error"
    Tags []string

    Tags to attach to the Volume.

    Type of the Volume.

    One of the following:
    const VolumeTypeNvme VolumeType = "nvme"
    const VolumeTypeABS VolumeType = "abs"
    UpdatedAt Time

    When the Volume was updated.

    formatdate-time
    VMID string

    ID of the VM the Volume is attached to.

    VMName string

    Name of the VM the Volume is attached to.

    type VolumeKind string

    Volume kind.

    One of the following:
    const VolumeKindBoot VolumeKind = "boot"
    const VolumeKindData VolumeKind = "data"
    type VolumeList struct{…}
    Items []Volume
    ID string

    Unique identifier for the Volume.

    CreatedAt Time

    When the Volume was created.

    formatdate-time

    Volume kind.

    One of the following:
    const VolumeKindBoot VolumeKind = "boot"
    const VolumeKindData VolumeKind = "data"
    Name string

    Name of the Volume.

    ProjectID string

    Project ID the Volume belongs to.

    Region RegionName

    Region the resource is in.

    Size int64

    Size of the Volume in GB.

    Status of the resource.

    One of the following:
    const ResourceStatusPending ResourceStatus = "pending"
    const ResourceStatusCreating ResourceStatus = "creating"
    const ResourceStatusUpdating ResourceStatus = "updating"
    const ResourceStatusReady ResourceStatus = "ready"
    const ResourceStatusDeleting ResourceStatus = "deleting"
    const ResourceStatusDeleted ResourceStatus = "deleted"
    const ResourceStatusError ResourceStatus = "error"
    Tags []string

    Tags to attach to the Volume.

    Type of the Volume.

    One of the following:
    const VolumeTypeNvme VolumeType = "nvme"
    const VolumeTypeABS VolumeType = "abs"
    UpdatedAt Time

    When the Volume was updated.

    formatdate-time
    VMID string

    ID of the VM the Volume is attached to.

    VMName string

    Name of the VM the Volume is attached to.

    type VolumeType string

    Type of the Volume.

    One of the following:
    const VolumeTypeNvme VolumeType = "nvme"
    const VolumeTypeABS VolumeType = "abs"

    VolumesAvailability

    Check Volume Create Availability
    client.Compute.Volumes.Availability.New(ctx, body) error
    POST/v1/compute/volumes/availability
    Check Volume Update Availability
    client.Compute.Volumes.Availability.Update(ctx, volumeID, body) error
    PATCH/v1/compute/volumes/{volume_id}/availability

    VolumesCost

    Estimate Volume Create Cost
    client.Compute.Volumes.Cost.New(ctx, body) (*CostQuote, error)
    POST/v1/compute/volumes/cost
    Estimate Volume Update Cost
    client.Compute.Volumes.Cost.Update(ctx, volumeID, body) (*CostQuoteUpdate, error)
    PATCH/v1/compute/volumes/{volume_id}/cost