require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Data Centerkey = 'key_example'# String | The key of the Labelopts = {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 Label from Data Center result = api_instance.datacenters_labels_delete(datacenter_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_delete: #{e}"end
Using the datacenters_labels_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Delete a Label from Data Center data, status_code, headers = api_instance.datacenters_labels_delete_with_http_info(datacenter_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => ObjectrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Data Center
key
String
The key of the Label
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
This will retrieve the properties of a associated label to a data center.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Data Centerkey = 'key_example'# String | The key of the Labelopts = {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 Label of Data Center result = api_instance.datacenters_labels_find_by_key(datacenter_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_find_by_key: #{e}"end
Using the datacenters_labels_find_by_key_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Retrieve a Label of Data Center data, status_code, headers = api_instance.datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResource>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_find_by_key_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Data Center
key
String
The key of the Label
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
You can retrieve a list of all labels associated with a data center
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Data Centeropts = {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 executedoffset: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 all Data Center Labels result = api_instance.datacenters_labels_get(datacenter_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_get: #{e}"end
Using the datacenters_labels_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List all Data Center Labels data, status_code, headers = api_instance.datacenters_labels_get_with_http_info(datacenter_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResources>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Data Center
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)
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Data Centerlabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be addedopts = {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# Add a Label to Data Center result = api_instance.datacenters_labels_post(datacenter_id, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_post: #{e}"end
Using the datacenters_labels_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
This will modify the value of the label on a data center.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Data Centerkey = 'key_example'# String | The key of the Labellabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Labelopts = {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 Label of Data Center result = api_instance.datacenters_labels_put(datacenter_id, key, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_labels_put: #{e}"end
Using the datacenters_labels_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacenterserver_id = 'server_id_example'# String | The unique ID of the Serverkey = 'key_example'# String | The key of the Labelopts = {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 Label from Server result = api_instance.datacenters_servers_labels_delete(datacenter_id, server_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_delete: #{e}"end
Using the datacenters_servers_labels_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Delete a Label from Server data, status_code, headers = api_instance.datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => ObjectrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Datacenter
server_id
String
The unique ID of the Server
key
String
The key of the Label
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
This will retrieve the properties of a associated label to a server.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacenterserver_id = 'server_id_example'# String | The unique ID of the Serverkey = 'key_example'# String | The key of the Labelopts = {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 Label of Server result = api_instance.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_find_by_key: #{e}"end
Using the datacenters_servers_labels_find_by_key_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Retrieve a Label of Server data, status_code, headers = api_instance.datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResource>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_find_by_key_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Datacenter
server_id
String
The unique ID of the Server
key
String
The key of the Label
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
You can retrieve a list of all labels associated with a server
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacenterserver_id = 'server_id_example'# String | The unique ID of the Serveropts = {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 executedoffset: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 all Server Labels result = api_instance.datacenters_servers_labels_get(datacenter_id, server_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_get: #{e}"end
Using the datacenters_servers_labels_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List all Server Labels data, status_code, headers = api_instance.datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResources>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Datacenter
server_id
String
The unique ID of the Server
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)
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacenterserver_id = 'server_id_example'# String | The unique ID of the Serverlabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be addedopts = {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# Add a Label to Server result = api_instance.datacenters_servers_labels_post(datacenter_id, server_id, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_post: #{e}"end
Using the datacenters_servers_labels_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
This will modify the value of the label on a server.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacenterserver_id = 'server_id_example'# String | The unique ID of the Serverkey = 'key_example'# String | The key of the Labellabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Labelopts = {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 Label of Server result = api_instance.datacenters_servers_labels_put(datacenter_id, server_id, key, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_servers_labels_put: #{e}"end
Using the datacenters_servers_labels_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacentervolume_id = 'volume_id_example'# String | The unique ID of the Volumekey = 'key_example'# String | The key of the Labelopts = {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 Label from Volume result = api_instance.datacenters_volumes_labels_delete(datacenter_id, volume_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_delete: #{e}"end
Using the datacenters_volumes_labels_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Delete a Label from Volume data, status_code, headers = api_instance.datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => ObjectrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Datacenter
volume_id
String
The unique ID of the Volume
key
String
The key of the Label
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
This will retrieve the properties of a associated label to a volume.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacentervolume_id = 'volume_id_example'# String | The unique ID of the Volumekey = 'key_example'# String | The key of the Labelopts = {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 Label of Volume result = api_instance.datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_find_by_key: #{e}"end
Using the datacenters_volumes_labels_find_by_key_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Retrieve a Label of Volume data, status_code, headers = api_instance.datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResource>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_find_by_key_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
datacenter_id
String
The unique ID of the Datacenter
volume_id
String
The unique ID of the Volume
key
String
The key of the Label
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
You can retrieve a list of all labels associated with a volume
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.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 executedoffset: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 all Volume Labels result = api_instance.datacenters_volumes_labels_get(datacenter_id, volume_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_get: #{e}"end
Using the datacenters_volumes_labels_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List all Volume Labels data, status_code, headers = api_instance.datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResources>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
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]
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)
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacentervolume_id = 'volume_id_example'# String | The unique ID of the Volumelabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be addedopts = {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# Add a Label to Volume result = api_instance.datacenters_volumes_labels_post(datacenter_id, volume_id, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_post: #{e}"end
Using the datacenters_volumes_labels_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
This will modify the value of the label on a volume.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newdatacenter_id = 'datacenter_id_example'# String | The unique ID of the Datacentervolume_id = 'volume_id_example'# String | The unique ID of the Volumekey = 'key_example'# String | The key of the Labellabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Labelopts = {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 Label of Volume result = api_instance.datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->datacenters_volumes_labels_put: #{e}"end
Using the datacenters_volumes_labels_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newipblock_id = 'ipblock_id_example'# String | The unique ID of the Ip Blockkey = 'key_example'# String | The key of the Labelopts = {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 Label from IP Block result = api_instance.ipblocks_labels_delete(ipblock_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_delete: #{e}"end
Using the ipblocks_labels_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Delete a Label from IP Block data, status_code, headers = api_instance.ipblocks_labels_delete_with_http_info(ipblock_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => ObjectrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
ipblock_id
String
The unique ID of the Ip Block
key
String
The key of the Label
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
This will retrieve the properties of a associated label to a Ip Block.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newipblock_id = 'ipblock_id_example'# String | The unique ID of the Ip Blockkey = 'key_example'# String | The key of the Labelopts = {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 Label of IP Block result = api_instance.ipblocks_labels_find_by_key(ipblock_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_find_by_key: #{e}"end
Using the ipblocks_labels_find_by_key_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Retrieve a Label of IP Block data, status_code, headers = api_instance.ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResource>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_find_by_key_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
ipblock_id
String
The unique ID of the Ip Block
key
String
The key of the Label
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
You can retrieve a list of all labels associated with a IP Block
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newipblock_id = 'ipblock_id_example'# String | The unique ID of the Ip Blockopts = {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# List all Ip Block Labels result = api_instance.ipblocks_labels_get(ipblock_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_get: #{e}"end
Using the ipblocks_labels_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List all Ip Block Labels data, status_code, headers = api_instance.ipblocks_labels_get_with_http_info(ipblock_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResources>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
ipblock_id
String
The unique ID of the Ip Block
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newipblock_id = 'ipblock_id_example'# String | The unique ID of the Ip Blocklabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be addedopts = {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# Add a Label to IP Block result = api_instance.ipblocks_labels_post(ipblock_id, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_post: #{e}"end
Using the ipblocks_labels_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
This will modify the value of the label on a Ip Block.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newipblock_id = 'ipblock_id_example'# String | The unique ID of the Ip Blockkey = 'key_example'# String | The key of the Labellabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Labelopts = {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 Label of IP Block result = api_instance.ipblocks_labels_put(ipblock_id, key, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->ipblocks_labels_put: #{e}"end
Using the ipblocks_labels_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
You can retrieve the details of a specific label using its URN. A URN is for uniqueness of a Label and composed using urn🏷️<resource_type>:<resource_uuid>:
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newlabelurn = 'labelurn_example'# String | The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key>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# Returns the label by its URN. result = api_instance.labels_find_by_urn(labelurn, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->labels_find_by_urn: #{e}"end
Using the labels_find_by_urn_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Returns the label by its URN. data, status_code, headers = api_instance.labels_find_by_urn_with_http_info(labelurn, opts)p status_code # => 2xxp headers # => { ... }p data # => <Label>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->labels_find_by_urn_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
labelurn
String
The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn🏷️<resource_type>:<resource_uuid>:<key>
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
You can retrieve a complete list of labels that you have access to.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newopts = {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# List Labels result = api_instance.labels_get(opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->labels_get: #{e}"end
Using the labels_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List Labels data, status_code, headers = api_instance.labels_get_with_http_info(opts)p status_code # => 2xxp headers # => { ... }p data # => <Labels>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->labels_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newsnapshot_id = 'snapshot_id_example'# String | The unique ID of the Snapshotkey = 'key_example'# String | The key of the Labelopts = {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 Label from Snapshot result = api_instance.snapshots_labels_delete(snapshot_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_delete: #{e}"end
Using the snapshots_labels_delete_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Delete a Label from Snapshot data, status_code, headers = api_instance.snapshots_labels_delete_with_http_info(snapshot_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => ObjectrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_delete_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
snapshot_id
String
The unique ID of the Snapshot
key
String
The key of the Label
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
This will retrieve the properties of a associated label to a snapshot.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newsnapshot_id = 'snapshot_id_example'# String | The unique ID of the Snapshotkey = 'key_example'# String | The key of the Labelopts = {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 Label of Snapshot result = api_instance.snapshots_labels_find_by_key(snapshot_id, key, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_find_by_key: #{e}"end
Using the snapshots_labels_find_by_key_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# Retrieve a Label of Snapshot data, status_code, headers = api_instance.snapshots_labels_find_by_key_with_http_info(snapshot_id, key, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResource>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_find_by_key_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
snapshot_id
String
The unique ID of the Snapshot
key
String
The key of the Label
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
You can retrieve a list of all labels associated with a snapshot
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newsnapshot_id = 'snapshot_id_example'# String | The unique ID of the Snapshotopts = {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# List all Snapshot Labels result = api_instance.snapshots_labels_get(snapshot_id, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_get: #{e}"end
Using the snapshots_labels_get_with_http_info variant
This returns an Array which contains the response data, status code and headers.
begin# List all Snapshot Labels data, status_code, headers = api_instance.snapshots_labels_get_with_http_info(snapshot_id, opts)p status_code # => 2xxp headers # => { ... }p data # => <LabelResources>rescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_get_with_http_info: #{e}"end
Parameters
Name
Type
Description
Notes
snapshot_id
String
The unique ID of the Snapshot
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
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newsnapshot_id = 'snapshot_id_example'# String | The unique ID of the Snapshotlabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be addedopts = {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# Add a Label to Snapshot result = api_instance.snapshots_labels_post(snapshot_id, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_post: #{e}"end
Using the snapshots_labels_post_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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
This will modify the value of the label on a snapshot.
Examples
require'time'require'ionoscloud'# setup authorizationIonoscloud.configuredo|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::LabelApi.newsnapshot_id = 'snapshot_id_example'# String | The unique ID of the Snapshotkey = 'key_example'# String | The key of the Labellabel = Ionoscloud::LabelResource.new({properties:Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Labelopts = {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 Label of Snapshot result = api_instance.snapshots_labels_put(snapshot_id, key, label, opts)p resultrescueIonoscloud::ApiError=> eputs"Error when calling LabelApi->snapshots_labels_put: #{e}"end
Using the snapshots_labels_put_with_http_info variant
This returns an Array which contains the response data, status code and headers.
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