Comment on page
LabelsApi
All URIs are relative to https://api.ionos.com/cloudapi/v6
Method | HTTP request | Description |
---|---|---|
DELETE /datacenters/{datacenterId}/labels/{key} | Delete data center labels | |
GET /datacenters/{datacenterId}/labels/{key} | Retrieve data center labels | |
GET /datacenters/{datacenterId}/labels | List data center labels | |
POST /datacenters/{datacenterId}/labels | Create a Data Center Label | |
PUT /datacenters/{datacenterId}/labels/{key} | Modify a Data Center Label by Key | |
DELETE /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Delete server labels | |
GET /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Retrieve server labels | |
GET /datacenters/{datacenterId}/servers/{serverId}/labels | List server labels | |
POST /datacenters/{datacenterId}/servers/{serverId}/labels | Create a Server Label | |
PUT /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify a Server Label | |
DELETE /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Delete volume labels | |
GET /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Retrieve volume labels | |
GET /datacenters/{datacenterId}/volumes/{volumeId}/labels | List volume labels | |
POST /datacenters/{datacenterId}/volumes/{volumeId}/labels | Create a Volume Label | |
PUT /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify a Volume Label | |
DELETE /ipblocks/{ipblockId}/labels/{key} | Delete IP block labels | |
GET /ipblocks/{ipblockId}/labels/{key} | Retrieve IP block labels | |
GET /ipblocks/{ipblockId}/labels | List IP block labels | |
POST /ipblocks/{ipblockId}/labels | Create IP block labels | |
PUT /ipblocks/{ipblockId}/labels/{key} | Modify a IP Block Label by ID | |
GET /labels/{labelurn} | Retrieve labels by URN | |
GET /labels | List labels | |
DELETE /snapshots/{snapshotId}/labels/{key} | Delete snapshot labels | |
GET /snapshots/{snapshotId}/labels/{key} | Retrieve snapshot labels | |
GET /snapshots/{snapshotId}/labels | List snapshot labels | |
POST /snapshots/{snapshotId}/labels | Create a Snapshot Label | |
PUT /snapshots/{snapshotId}/labels/{key} | Modify a Snapshot Label by ID |
datacentersLabelsDelete(datacenterId, key, opts)
Delete data center labels
Delete the specified data center label.
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.LabelsApi(config);
// Delete data center labels
api_instance
.datacentersLabelsDelete({
datacenterId: datacenterId_example,
key: key_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
key | string | The label key | [default to undefined] |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
nil (empty response body)
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
datacentersLabelsFindByKey(datacenterId, key, opts)
Retrieve data center labels
Retrieve the properties of the specified data center label.
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.LabelsApi(config);
// Retrieve data center labels
api_instance
.datacentersLabelsFindByKey({
datacenterId: datacenterId_example,
key: key_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
key | string | The label key | [default to undefined] |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
datacentersLabelsGet(datacenterId, opts)
List data center labels
List all the the labels for the specified data center.
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.LabelsApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List data center labels
api_instance
.datacentersLabelsGet({
datacenterId: datacenterId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
orderBy: "<property_name>"
maxResults: 2,
filters: filterMap
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
datacentersLabelsPost(datacenterId, label, opts)
Create a Data Center Label
Adds a new label to the specified data center.
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.LabelsApi(config);
// Create a Data Center Label
api_instance
.datacentersLabelsPost({
datacenterId: datacenterId_example,
label: label_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
label | The label to create. | ​ | |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
Basic Authentication, Token Authentication
- Content-Type: application/json
- Accept: application/json
datacentersLabelsPut(datacenterId, key, label, opts)
Modify a Data Center Label by Key
Modifies the specified data center label.
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.LabelsApi(config);
// Modify a Data Center Label by Key
api_instance
.datacentersLabelsPut({
datacenterId: datacenterId_example,
key: key_example,
label: label_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
key | string | The label key | [default to undefined] |
label | The modified label | ​ | |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
Basic Authentication, Token Authentication
- Content-Type: application/json
- Accept: application/json
datacentersServersLabelsDelete(datacenterId, serverId, key, opts)
Delete server labels
Delete the specified server label.
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.LabelsApi(config);
// Delete server labels
api_instance
.datacentersServersLabelsDelete({
datacenterId: datacenterId_example,
serverId: serverId_example,
key: key_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
serverId | string | The unique ID of the server. | [default to undefined] |
key | string | The label key | [default to undefined] |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
nil (empty response body)
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
datacentersServersLabelsFindByKey(datacenterId, serverId, key, opts)
Retrieve server labels
Retrieve the properties of the specified server label.
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.LabelsApi(config);
// Retrieve server labels
api_instance
.datacentersServersLabelsFindByKey({
datacenterId: datacenterId_example,
serverId: serverId_example,
key: key_example,
pretty: true,
depth: 56,
xContractNumber: 56,
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
serverId | string | The unique ID of the server. | [default to undefined] |
key | string | The label key | [default to undefined] |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional][default to undefined] |
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
datacentersServersLabelsGet(datacenterId, serverId, opts)
List server labels
List all the the labels for the specified server.
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.LabelsApi(config);
var filterMap = new Map()
filterMap.set("<property_name>", "<property_value>")
// List server labels
api_instance
.datacentersServersLabelsGet({
datacenterId: datacenterId_example,
serverId: serverId_example,
pretty: true,
depth: 56,
xContractNumber: 56,
orderBy: "<property_name>"
maxResults: 2,
filters: filterMap
options: {}
})
.then((response) => console.log(response.data))
.catch((error) => console.log(error.response.data));
Name | Type | Description | Notes |
---|---|---|---|
datacenterId | string | The unique ID of the data center. | [default to undefined] |
serverId | string | The unique ID of the server. | [default to undefined] |
pretty | boolean | Controls whether the response is pretty-printed (with indentations and new lines). | [optional][default to true] |
depth | number | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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 |