Volumes
Contents
Volumes
Allow the user to manage volumes. Available from version 8.2 onwards.
List volumes
GET /v3/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". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Show volume
GET /v3/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 | An identifier for the type of resource, specifically "volume". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Create volume
POST /v3/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 |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. | No |
| 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". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Update volume
PUT /v3/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 | An identifier for the type of resource, specifically "volume". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Destroy volume
DELETE /v3/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". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Resize volume
PUT /v3/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 | An identifier for the type of resource, specifically "volume". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Discard volume
DELETE /v3/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". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Attach volume to server
POST /v3/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". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |
Detach volume to server
DELETE /v3/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". |
| desired_remote_id | String | Identifier that the user wants to have as Identifier of the resource on the cloud. Available from version 10.3 onwards. |
| label_ids | Array of Strings | List of ids corresponding to the labels the volume has assigned. |