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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume_id ='volume_id_example'# String | The unique ID of the Volumeopts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56, # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
name: 'name_example',# String | The name of the snapshot description: 'description_example',# String | The description of the snapshot sec_auth_protection: true, # Boolean | Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc.
licence_type: 'UNKNOWN'# String | The OS type of this Snapshot}begin# Create Volume Snapshot result = api_instance.datacenters_volumes_create_snapshot_post(datacenter_id, volume_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_create_snapshot_post: #{e}"end
Using the datacenters_volumes_create_snapshot_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
Deletes the specified volume. This will result in the volume being removed from your datacenter. Use this with caution.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume_id ='volume_id_example'# String | The unique ID of the Volumeopts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}begin# Delete a Volume result = api_instance.datacenters_volumes_delete(datacenter_id, volume_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_delete: #{e}"end
Using the datacenters_volumes_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume_id ='volume_id_example'# String | The unique ID of the Volumeopts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}begin# Retrieve a Volume result = api_instance.datacenters_volumes_find_by_id(datacenter_id, volume_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_find_by_id: #{e}"end
Using the datacenters_volumes_find_by_id_with_http_info variant
This returns an Array which contains the response data, status code and headers.
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacenteropts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56, # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
offset: 56, # Integer | the first element (of the total list of elements) to include in the response (use together with <code>limit</code> for pagination)
limit: 56# Integer | the maximum number of elements to return (use together with <code>offset</code> for pagination)}begin# List Volumes result = api_instance.datacenters_volumes_get(datacenter_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_get: #{e}"end
Using the datacenters_volumes_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume_id ='volume_id_example'# String | The unique ID of the Volumevolume =Ionoscloud::VolumeProperties.new({size: 100.0}) # VolumeProperties | Modified properties of Volumeopts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}begin# Partially modify a Volume result = api_instance.datacenters_volumes_patch(datacenter_id, volume_id, volume, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_patch: #{e}"end
Using the datacenters_volumes_patch_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume = Ionoscloud::Volume.new({properties: Ionoscloud::VolumeProperties.new({size: 100.0})}) # Volume | Volume to be created
opts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}begin# Create a Volume result = api_instance.datacenters_volumes_post(datacenter_id, volume, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_post: #{e}"end
Using the datacenters_volumes_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume_id ='volume_id_example'# String | The unique ID of the Volumevolume = Ionoscloud::Volume.new({properties: Ionoscloud::VolumeProperties.new({size: 100.0})}) # Volume | Modified Volume
opts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56 # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
}begin# Modify a Volume result = api_instance.datacenters_volumes_put(datacenter_id, volume_id, volume, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_put: #{e}"end
Using the datacenters_volumes_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configure do|config|# Configure HTTP basic authorization: Basic Authentication config.username ='YOUR USERNAME' config.password ='YOUR PASSWORD'# Configure API key authorization: Token Authentication config.api_key['Authorization'] ='YOUR API KEY'# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)# config.api_key_prefix['Authorization'] = 'Bearer'endapi_instance =Ionoscloud::VolumeApi.newdatacenter_id ='datacenter_id_example'# String | The unique ID of the datacentervolume_id ='volume_id_example'# String | The unique ID of the Volumeopts = { pretty: true,# Boolean | Controls whether response is pretty-printed (with indentation and new lines) depth: 56, # 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
x_contract_number: 56, # Integer | Users having more than 1 contract need to provide contract number, against which all API requests should be executed
snapshot_id: 'snapshot_id_example'# String | This is the ID of the snapshot}begin# Restore Volume Snapshot result = api_instance.datacenters_volumes_restore_snapshot_post(datacenter_id, volume_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling VolumeApi->datacenters_volumes_restore_snapshot_post: #{e}"end
Using the datacenters_volumes_restore_snapshot_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
POST /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot
Restore Volume Snapshot
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]
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]
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]
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)
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
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
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]
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