VolumeApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
Method | HTTP request | Description |
---|---|---|
POST /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot | Create Volume Snapshot | |
DELETE /datacenters/{datacenterId}/volumes/{volumeId} | Delete a Volume | |
GET /datacenters/{datacenterId}/volumes/{volumeId} | Retrieve a Volume | |
GET /datacenters/{datacenterId}/volumes | List Volumes | |
PATCH /datacenters/{datacenterId}/volumes/{volumeId} | Partially modify a Volume | |
POST /datacenters/{datacenterId}/volumes | Create a Volume | |
PUT /datacenters/{datacenterId}/volumes/{volumeId} | Modify a Volume | |
POST /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot | Restore Volume Snapshot |
datacenters_volumes_create_snapshot_post
datacenters_volumes_create_snapshot_post(datacenter_id, volume_id, opts)
Create Volume Snapshot
Creates a snapshot of a volume within the datacenter. You can use a snapshot to create a new storage volume or to restore a storage volume.
Examples
Using the datacenters_volumes_create_snapshot_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_volumes_create_snapshot_post_with_http_info(datacenter_id, volume_id, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume_id | String | The unique ID of the Volume | |
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
name | String | The name of the snapshot | [optional] |
description | String | The description of the snapshot | [optional] |
sec_auth_protection | Boolean | Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc. | [optional] |
licence_type | String | The OS type of this Snapshot | [optional] |
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json
datacenters_volumes_delete
Object datacenters_volumes_delete(datacenter_id, volume_id, opts)
Delete a Volume
Deletes the specified volume. This will result in the volume being removed from your datacenter. Use this with caution.
Examples
Using the datacenters_volumes_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> datacenters_volumes_delete_with_http_info(datacenter_id, volume_id, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume_id | String | The unique ID of the Volume | |
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
Return type
Object
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: Not defined
Accept: application/json
datacenters_volumes_find_by_id
datacenters_volumes_find_by_id(datacenter_id, volume_id, opts)
Retrieve a Volume
Retrieves the attributes of a given Volume
Examples
Using the datacenters_volumes_find_by_id_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_volumes_find_by_id_with_http_info(datacenter_id, volume_id, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume_id | String | The unique ID of the Volume | |
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: Not defined
Accept: application/json
datacenters_volumes_get
datacenters_volumes_get(datacenter_id, opts)
List Volumes
Retrieves a list of Volumes.
Examples
Using the datacenters_volumes_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_volumes_get_with_http_info(datacenter_id, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
offset | Integer | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination) | [optional][default to 0] |
limit | Integer | the maximum number of elements to return (use together with <code>offset</code> for pagination) | [optional][default to 1000] |
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: Not defined
Accept: application/json
datacenters_volumes_patch
datacenters_volumes_patch(datacenter_id, volume_id, volume, opts)
Partially modify a Volume
You can use update attributes of a Volume
Examples
Using the datacenters_volumes_patch_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_volumes_patch_with_http_info(datacenter_id, volume_id, volume, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume_id | String | The unique ID of the Volume | |
volume | Modified properties of Volume | ||
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/json
Accept: application/json
datacenters_volumes_post
datacenters_volumes_post(datacenter_id, volume, opts)
Create a Volume
Creates a volume within the datacenter. This will not attach the volume to a server. Please see the Servers section for details on how to attach storage volumes
Examples
Using the datacenters_volumes_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_volumes_post_with_http_info(datacenter_id, volume, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume | Volume to be created | ||
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/json
Accept: application/json
datacenters_volumes_put
datacenters_volumes_put(datacenter_id, volume_id, volume, opts)
Modify a Volume
You can use update attributes of a Volume
Examples
Using the datacenters_volumes_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> datacenters_volumes_put_with_http_info(datacenter_id, volume_id, volume, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume_id | String | The unique ID of the Volume | |
volume | Modified Volume | ||
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/json
Accept: application/json
datacenters_volumes_restore_snapshot_post
Object datacenters_volumes_restore_snapshot_post(datacenter_id, volume_id, opts)
Restore Volume Snapshot
This will restore a snapshot onto a volume. A snapshot is created as just another image that can be used to create subsequent volumes if you want or to restore an existing volume.
Examples
Using the datacenters_volumes_restore_snapshot_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
<Array(Object, Integer, Hash)> datacenters_volumes_restore_snapshot_post_with_http_info(datacenter_id, volume_id, opts)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | String | The unique ID of the datacenter | |
volume_id | String | The unique ID of the Volume | |
pretty | Boolean | Controls whether response is pretty-printed (with indentation and new lines) | [optional][default to true] |
depth | Integer | Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on | [optional][default to 0] |
x_contract_number | Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed | [optional] |
snapshot_id | String | This is the ID of the snapshot | [optional] |
Return type
Object
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Last updated