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 data center labels | |
PUT /datacenters/{datacenterId}/labels/{key} | Modify data center labels | |
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 server labels | |
PUT /datacenters/{datacenterId}/servers/{serverId}/labels/{key} | Modify server labels | |
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 volume labels | |
PUT /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key} | Modify volume labels | |
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 IP block labels | |
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 snapshot labels | |
PUT /snapshots/{snapshotId}/labels/{key} | Modify snapshot labels |
datacenters_labels_delete(datacenter_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Delete data center labels
Delete the specified data center label.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
key = 'key_example' # str | The label key
try:
# Delete data center labels
api_instance.datacenters_labels_delete(datacenter_id, key)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_labels_delete: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
key | str | The label key | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
void (empty response body)
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
LabelResource datacenters_labels_find_by_key(datacenter_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Retrieve data center labels
Retrieve the properties of the specified data center label.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
key = 'key_example' # str | The label key
try:
# Retrieve data center labels
api_response = api_instance.datacenters_labels_find_by_key(datacenter_id, key)
print(api_response)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_labels_find_by_key: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
key | str | The label key | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
LabelResources datacenters_labels_get(datacenter_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
List data center labels
List all the the labels for the specified data center.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
try:
# List data center labels
api_response = api_instance.datacenters_labels_get(datacenter_id)
print(api_response)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_labels_get: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
LabelResource datacenters_labels_post(datacenter_id, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Create data center labels
Add a new label to the specified data center.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
label = ionoscloud.LabelResource() # LabelResource | The label to create.
try:
# Create data center labels
api_response = api_instance.datacenters_labels_post(datacenter_id, label)
print(api_response)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_labels_post: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
label | The label to create. | | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
Basic Authentication, Token Authentication
- Content-Type: application/json
- Accept: application/json
LabelResource datacenters_labels_put(datacenter_id, key, label, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Modify data center labels
Modify the specified data center label.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
key = 'key_example' # str | The label key
label = ionoscloud.LabelResource() # LabelResource | The modified label
try:
# Modify data center labels
api_response = api_instance.datacenters_labels_put(datacenter_id, key, label)
print(api_response)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_labels_put: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
key | str | The label key | |
label | The modified label | | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
Basic Authentication, Token Authentication
- Content-Type: application/json
- Accept: application/json
datacenters_servers_labels_delete(datacenter_id, server_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Delete server labels
Delete the specified server label.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
key = 'key_example' # str | The label key
try:
# Delete server labels
api_instance.datacenters_servers_labels_delete(datacenter_id, server_id, key)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_servers_labels_delete: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
server_id | str | The unique ID of the server. | |
key | str | The label key | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
void (empty response body)
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
LabelResource datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
Retrieve server labels
Retrieve the properties of the specified server label.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
key = 'key_example' # str | The label key
try:
# Retrieve server labels
api_response = api_instance.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key)
print(api_response)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_servers_labels_find_by_key: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
server_id | str | The unique ID of the server. | |
key | str | The label key | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
Basic Authentication, Token Authentication
- Content-Type: Not defined
- Accept: application/json
LabelResources datacenters_servers_labels_get(datacenter_id, server_id, pretty=pretty, depth=depth, x_contract_number=x_contract_number)
List server labels
List all the the labels for the specified server.
from __future__ import print_function
import time
import ionoscloud
from ionoscloud.rest import ApiException
# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6
configuration = ionoscloud.Configuration(
host = 'https://api.ionos.com/cloudapi/v6',
)
# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'
with ionoscloud.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = ionoscloud.LabelsApi(api_client)
datacenter_id = 'datacenter_id_example' # str | The unique ID of the data center.
server_id = 'server_id_example' # str | The unique ID of the server.
try:
# List server labels
api_response = api_instance.datacenters_servers_labels_get(datacenter_id, server_id)
print(api_response)
except ApiException as e:
print('Exception when calling LabelsApi.datacenters_servers_labels_get: %s\n' % e)
Name | Type | Description | Notes |
---|---|---|---|
datacenter_id | str | The unique ID of the data center. | |
server_id | str | The unique ID of the server. | |
pretty | bool | Controls whether the response is pretty-printed (with indentations and new lines). | [optional] [default to True] |
depth | int | 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] |
x_contract_number | int | Users with multiple contracts must provide the contract number, for which all API requests are to be executed. | [optional] |
Basic Authentication, Token Authentication