VolumeApi
All URIs are relative to https://api.ionos.com/cloudapi/v5
POST /datacenters/{datacenterId}/volumes/{volumeId}/create-snapshot
Create Volume Snapshot
PATCH /datacenters/{datacenterId}/volumes/{volumeId}
Partially modify a Volume
POST /datacenters/{datacenterId}/volumes/{volumeId}/restore-snapshot
Restore Volume Snapshot
datacentersVolumesCreateSnapshotPost
datacentersVolumesCreateSnapshotPost(datacenterId, volumeId, 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
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Create Volume Snapshot
api_instance
.datacentersVolumesCreateSnapshotPost({
datacenterId: datacenterId_example,
volumeId: volumeId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
name: name_example,
description: description_example,
secAuthProtection: true,
licenceType: licenceType_example,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
volumeId
string
The unique ID of the Volume
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
name
string
The name of the snapshot
[optional][default to undefined]
description
string
The description of the snapshot
[optional][default to undefined]
secAuthProtection
boolean
Flag representing if extra protection is enabled on snapshot e.g. Two Factor protection etc.
[optional][default to undefined]
licenceType
string
The OS type of this Snapshot
[optional][default to undefined]
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json
datacentersVolumesDelete
object datacentersVolumesDelete(datacenterId, volumeId, opts)
Delete a Volume
Deletes the specified volume. This will result in the volume being removed from your datacenter. Use this with caution.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Delete a Volume
api_instance
.datacentersVolumesDelete({
datacenterId: datacenterId_example,
volumeId: volumeId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
volumeId
string
The unique ID of the Volume
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
Return type
object
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: Not defined
Accept: application/json
datacentersVolumesFindById
datacentersVolumesFindById(datacenterId, volumeId, opts)
Retrieve a Volume
Retrieves the attributes of a given Volume
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Retrieve a Volume
api_instance
.datacentersVolumesFindById({
datacenterId: datacenterId_example,
volumeId: volumeId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
volumeId
string
The unique ID of the Volume
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: Not defined
Accept: application/json
datacentersVolumesGet
datacentersVolumesGet(datacenterId, opts)
List Volumes
Retrieves a list of Volumes.
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// List Volumes
api_instance
.datacentersVolumesGet({
datacenterId: datacenterId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
offset: 56,
limit: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
offset
number
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
number
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
datacentersVolumesPatch
datacentersVolumesPatch(datacenterId, volumeId, volume, opts)
Partially modify a Volume
You can use update attributes of a Volume
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Partially modify a Volume
api_instance
.datacentersVolumesPatch({
datacenterId: datacenterId_example,
volumeId: volumeId_example,
volume: volume_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
volumeId
string
The unique ID of the Volume
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/json
Accept: application/json
datacentersVolumesPost
datacentersVolumesPost(datacenterId, 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
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Create a Volume
api_instance
.datacentersVolumesPost({
datacenterId: datacenterId_example,
volume: volume_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/json
Accept: application/json
datacentersVolumesPut
datacentersVolumesPut(datacenterId, volumeId, volume, opts)
Modify a Volume
You can use update attributes of a Volume
Examples
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Modify a Volume
api_instance
.datacentersVolumesPut({
datacenterId: datacenterId_example,
volumeId: volumeId_example,
volume: volume_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
volumeId
string
The unique ID of the Volume
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
Return type
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/json
Accept: application/json
datacentersVolumesRestoreSnapshotPost
object datacentersVolumesRestoreSnapshotPost(datacenterId, volumeId, 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
const ionoscloud = require('@ionos-cloud/sdk-nodejs');
// setup authorization
const config = new ionoscloud.Configuration({
username: 'YOUR_USERNAME',
password: 'YOUR_PASSWORD',
apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.VolumeApi(config);
// Restore Volume Snapshot
api_instance
.datacentersVolumesRestoreSnapshotPost({
datacenterId: datacenterId_example,
volumeId: volumeId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
snapshotId: snapshotId_example,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Parameters
datacenterId
string
The unique ID of the datacenter
[default to undefined]
volumeId
string
The unique ID of the Volume
[default to undefined]
pretty
boolean
Controls whether response is pretty-printed (with indentation and new lines)
[optional][default to true]
depth
number
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]
xContractNumber
number
Users having more than 1 contract need to provide contract number, against which all API requests should be executed
[optional][default to undefined]
snapshotId
string
This is the ID of the snapshot
[optional][default to undefined]
Return type
object
Authorization
Basic Authentication, Token Authentication
HTTP request headers
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Last updated