from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 keytry:# 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)
Retrieve the properties of the specified data center label.
Example
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 keytry:# 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)
List all the the labels for the specified data center.
Example
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 a Data Center Label 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)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 labeltry:# Modify a Data Center Label by Key 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)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 keytry:# 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)
Retrieve the properties of the specified server label.
Example
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 keytry:# 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)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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. label = ionoscloud.LabelResource()# LabelResource | The label to create.try:# Create a Server Label api_response = api_instance.datacenters_servers_labels_post(datacenter_id, server_id, label)print(api_response)except ApiException as e:print('Exception when calling LabelsApi.datacenters_servers_labels_post: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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 label = ionoscloud.LabelResource()# LabelResource | The modified labeltry:# Modify a Server Label api_response = api_instance.datacenters_servers_labels_put(datacenter_id, server_id, key, label)print(api_response)except ApiException as e:print('Exception when calling LabelsApi.datacenters_servers_labels_put: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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. volume_id ='volume_id_example'# str | The unique ID of the volume. key ='key_example'# str | The label keytry:# Delete volume labels api_instance.datacenters_volumes_labels_delete(datacenter_id, volume_id, key)except ApiException as e:print('Exception when calling LabelsApi.datacenters_volumes_labels_delete: %s\n'% e)
Retrieve the properties of the specified volume label.
Example
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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. volume_id ='volume_id_example'# str | The unique ID of the volume. key ='key_example'# str | The label keytry:# Retrieve volume labels api_response = api_instance.datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key)print(api_response)except ApiException as e:print('Exception when calling LabelsApi.datacenters_volumes_labels_find_by_key: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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. volume_id ='volume_id_example'# str | The unique ID of the volume.try:# List volume labels api_response = api_instance.datacenters_volumes_labels_get(datacenter_id, volume_id)print(api_response)except ApiException as e:print('Exception when calling LabelsApi.datacenters_volumes_labels_get: %s\n'% e)
from__future__import print_functionimport timeimport ionoscloudfrom ionoscloud.rest import ApiException# Defining the host is optional and defaults to https://api.ionos.com/cloudapi/v6configuration = ionoscloud.Configuration( host ='https://api.ionos.com/cloudapi/v6',)# Example of configuring HTTP Basic Authorizationconfiguration.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. volume_id ='volume_id_example'# str | The unique ID of the volume. label = ionoscloud.LabelResource()# LabelResource | The label to create.try: