Volumes

Contents

Volumes

Allow the user to manage volumes. Available from version 8.2 onwards.

List volumes

GET /v2/storage/volumes

Lists all volumes.

Inputs

Field Type Description Required
server_id String Id of a server to return only the volumes that are attached with that server   No

Returns

An array of volumes of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String An identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Show volume

GET /v2/storage/volumes/:id

Shows information about a specific volume.

Inputs

None

Returns

a volume of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String The identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Create volume

POST /v2/storage/volumes

Creates a new volume.

Inputs

Field Type Description Required
cloud_account_id String Identifier of the cloud account of the volume. Yes
label_ids String List of ids corresponding to the labels the volume has assigned. Yes
name String Name of the volume Yes
size Integer Size for the volume, in GB Yes
storage_plan_id String Identifier of the realm in which the floating IP is. Yes

Returns

a volume of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String An identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Update volume

PUT /v2/storage/volumes/:id

Updates an existing volume.

Inputs

Field Type Description Required
name String The new name of the volume. No

Returns

a volume of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String The identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Destroy volume

DELETE /v2/storage/volumes/:id

Deletes a volume.

Inputs

None

Returns

the deleted volume with the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String An identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Resize volume

PUT /v2/storage/volumes/:id/resize

Resize an existing volume.

Inputs

Field Type Description Required
size Integer Size of the volume, in GB. Yes

Returns

a volume of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String The identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Discard volume

DELETE /v2/storage/volumes/:id/discard

Discards a volume from IMCO but does not delete it from the cloud provider.

Inputs

None

Returns

the discarded volume with the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String An identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Attach volume to server

POST /v2/storage/volumes/:volume_id/attached_server

Attaches a volume to a server.

Inputs

Field Type Description Required
attached_server_id String Identifier of the server where the volume will be attached Yes

Returns

a volume of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String An identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top

Detach volume to server

DELETE /v2/storage/volumes/:volume_id/attached_server

Detaches a volume from a server.

Inputs

None

Returns

a volume of the following format:

Field Type Description
id String Identifier of the volume.
name String Name of the volume.
size Integer Size of the volume, in GB
device String The logical device where the volume is mounted inside the server, when available.
state String State of the floating IP.
remote_id String Identifier of the volume resource on the cloud provider
storage_plan_id String Identifier of the storage plan of the cloud provider.
cloud_account_id String Identifier of the cloud account of the volume.
realm_id String Identifier of the realm in which the volume is.
attached_server_id String Identifier of the server which the volume is attached. Nil If the volume is not attached.
brownfield Boolean Flag indicating if the volume is brownfield (imported).
resource_type String An identifier for the type of resource, specifically "volume".
label_ids Array of Strings List of ids corresponding to the labels the volume has assigned.

Back to top