Models

LabelApi

All URIs are relative to https://api.ionos.com/cloudapi/v5

Method

HTTP request

Description

datacenters_labels_delete

DELETE /datacenters/{datacenterId}/labels/{key}

Delete a Label from Data Center

datacenters_labels_find_by_key

GET /datacenters/{datacenterId}/labels/{key}

Retrieve a Label of Data Center

datacenters_labels_get

GET /datacenters/{datacenterId}/labels

List all Data Center Labels

datacenters_labels_post

POST /datacenters/{datacenterId}/labels

Add a Label to Data Center

datacenters_labels_put

PUT /datacenters/{datacenterId}/labels/{key}

Modify a Label of Data Center

datacenters_servers_labels_delete

DELETE /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Delete a Label from Server

datacenters_servers_labels_find_by_key

GET /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Retrieve a Label of Server

datacenters_servers_labels_get

GET /datacenters/{datacenterId}/servers/{serverId}/labels

List all Server Labels

datacenters_servers_labels_post

POST /datacenters/{datacenterId}/servers/{serverId}/labels

Add a Label to Server

datacenters_servers_labels_put

PUT /datacenters/{datacenterId}/servers/{serverId}/labels/{key}

Modify a Label of Server

datacenters_volumes_labels_delete

DELETE /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Delete a Label from Volume

datacenters_volumes_labels_find_by_key

GET /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Retrieve a Label of Volume

datacenters_volumes_labels_get

GET /datacenters/{datacenterId}/volumes/{volumeId}/labels

List all Volume Labels

datacenters_volumes_labels_post

POST /datacenters/{datacenterId}/volumes/{volumeId}/labels

Add a Label to Volume

datacenters_volumes_labels_put

PUT /datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}

Modify a Label of Volume

ipblocks_labels_delete

DELETE /ipblocks/{ipblockId}/labels/{key}

Delete a Label from IP Block

ipblocks_labels_find_by_key

GET /ipblocks/{ipblockId}/labels/{key}

Retrieve a Label of IP Block

ipblocks_labels_get

GET /ipblocks/{ipblockId}/labels

List all Ip Block Labels

ipblocks_labels_post

POST /ipblocks/{ipblockId}/labels

Add a Label to IP Block

ipblocks_labels_put

PUT /ipblocks/{ipblockId}/labels/{key}

Modify a Label of IP Block

labels_find_by_urn

GET /labels/{labelurn}

Returns the label by its URN.

labels_get

GET /labels

List Labels

snapshots_labels_delete

DELETE /snapshots/{snapshotId}/labels/{key}

Delete a Label from Snapshot

snapshots_labels_find_by_key

GET /snapshots/{snapshotId}/labels/{key}

Retrieve a Label of Snapshot

snapshots_labels_get

GET /snapshots/{snapshotId}/labels

List all Snapshot Labels

snapshots_labels_post

POST /snapshots/{snapshotId}/labels

Add a Label to Snapshot

snapshots_labels_put

PUT /snapshots/{snapshotId}/labels/{key}

Modify a Label of Snapshot

datacenters_labels_delete

Object datacenters_labels_delete(datacenter_id, key, opts)

Delete a Label from Data Center

This will remove a label from the data center.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Data Center
key = 'key_example' # String | The key of the Label
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
# Delete a Label from Data Center
result = api_instance.datacenters_labels_delete(datacenter_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

datacenters_labels_delete_with_http_info(datacenter_id, key, opts)

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 # => 2xx
p headers # => { ... }
p data # => Object
rescue Ionoscloud::ApiError => e
puts "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

[optional]

Return type

Object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_labels_find_by_key

datacenters_labels_find_by_key(datacenter_id, key, opts)

Retrieve a Label of Data Center

This will retrieve the properties of a associated label to a data center.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Data Center
key = 'key_example' # String | The key of the Label
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
# Retrieve a Label of Data Center
result = api_instance.datacenters_labels_find_by_key(datacenter_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts)

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 # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "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

[optional]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_labels_get

datacenters_labels_get(datacenter_id, opts)

List all Data Center Labels

You can retrieve a list of all labels associated with a data center

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Data Center
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
offset: 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 result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_labels_get_with_http_info(datacenter_id, opts)

begin
# List all Data Center Labels
data, status_code, headers = api_instance.datacenters_labels_get_with_http_info(datacenter_id, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResources>
rescue Ionoscloud::ApiError => e
puts "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)

[optional][default to 1000]

Return type

LabelResources

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_labels_post

datacenters_labels_post(datacenter_id, label, opts)

Add a Label to Data Center

This will add a label to the data center.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Data Center
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be added
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
# Add a Label to Data Center
result = api_instance.datacenters_labels_post(datacenter_id, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_labels_post_with_http_info(datacenter_id, label, opts)

begin
# Add a Label to Data Center
data, status_code, headers = api_instance.datacenters_labels_post_with_http_info(datacenter_id, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelApi->datacenters_labels_post_with_http_info: #{e}"
end

Parameters

Name

Type

Description

Notes

datacenter_id

String

The unique ID of the Data Center

label

LabelResource

Label to be added

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]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_labels_put

datacenters_labels_put(datacenter_id, key, label, opts)

Modify a Label of Data Center

This will modify the value of the label on a data center.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Data Center
key = 'key_example' # String | The key of the Label
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Label
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
# Modify a Label of Data Center
result = api_instance.datacenters_labels_put(datacenter_id, key, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_labels_put_with_http_info(datacenter_id, key, label, opts)

begin
# Modify a Label of Data Center
data, status_code, headers = api_instance.datacenters_labels_put_with_http_info(datacenter_id, key, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelApi->datacenters_labels_put_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

label

LabelResource

Modified 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

[optional]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_labels_delete

Object datacenters_servers_labels_delete(datacenter_id, server_id, key, opts)

Delete a Label from Server

This will remove a label from the server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
key = 'key_example' # String | The key of the Label
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
# Delete a Label from Server
result = api_instance.datacenters_servers_labels_delete(datacenter_id, server_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts)

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 # => 2xx
p headers # => { ... }
p data # => Object
rescue Ionoscloud::ApiError => e
puts "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

[optional]

Return type

Object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_labels_find_by_key

datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts)

Retrieve a Label of Server

This will retrieve the properties of a associated label to a server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
key = 'key_example' # String | The key of the Label
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
# Retrieve a Label of Server
result = api_instance.datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts)

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 # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "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

[optional]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_labels_get

datacenters_servers_labels_get(datacenter_id, server_id, opts)

List all Server Labels

You can retrieve a list of all labels associated with a server

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
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
offset: 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 result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts)

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 # => 2xx
p headers # => { ... }
p data # => <LabelResources>
rescue Ionoscloud::ApiError => e
puts "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)

[optional][default to 1000]

Return type

LabelResources

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_servers_labels_post

datacenters_servers_labels_post(datacenter_id, server_id, label, opts)

Add a Label to Server

This will add a label to the server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be added
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
# Add a Label to Server
result = api_instance.datacenters_servers_labels_post(datacenter_id, server_id, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts)

begin
# Add a Label to Server
data, status_code, headers = api_instance.datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelApi->datacenters_servers_labels_post_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

label

LabelResource

Label to be added

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]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_servers_labels_put

datacenters_servers_labels_put(datacenter_id, server_id, key, label, opts)

Modify a Label of Server

This will modify the value of the label on a server.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
server_id = 'server_id_example' # String | The unique ID of the Server
key = 'key_example' # String | The key of the Label
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Label
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
# Modify a Label of Server
result = api_instance.datacenters_servers_labels_put(datacenter_id, server_id, key, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts)

begin
# Modify a Label of Server
data, status_code, headers = api_instance.datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelApi->datacenters_servers_labels_put_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

label

LabelResource

Modified 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

[optional]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_volumes_labels_delete

Object datacenters_volumes_labels_delete(datacenter_id, volume_id, key, opts)

Delete a Label from Volume

This will remove a label from the volume.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
volume_id = 'volume_id_example' # String | The unique ID of the Volume
key = 'key_example' # String | The key of the Label
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
# Delete a Label from Volume
result = api_instance.datacenters_volumes_labels_delete(datacenter_id, volume_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts)

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 # => 2xx
p headers # => { ... }
p data # => Object
rescue Ionoscloud::ApiError => e
puts "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

[optional]

Return type

Object

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_volumes_labels_find_by_key

datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, opts)

Retrieve a Label of Volume

This will retrieve the properties of a associated label to a volume.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
volume_id = 'volume_id_example' # String | The unique ID of the Volume
key = 'key_example' # String | The key of the Label
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
# Retrieve a Label of Volume
result = api_instance.datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts)

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 # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "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

[optional]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_volumes_labels_get

datacenters_volumes_labels_get(datacenter_id, volume_id, opts)

List all Volume Labels

You can retrieve a list of all labels associated with a volume

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
volume_id = 'volume_id_example' # String | The unique ID of the Volume
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
offset: 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 result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts)

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 # => 2xx
p headers # => { ... }
p data # => <LabelResources>
rescue Ionoscloud::ApiError => e
puts "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)

[optional][default to 1000]

Return type

LabelResources

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: Not defined

  • Accept: application/json

datacenters_volumes_labels_post

datacenters_volumes_labels_post(datacenter_id, volume_id, label, opts)

Add a Label to Volume

This will add a label to the volume.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
volume_id = 'volume_id_example' # String | The unique ID of the Volume
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | Label to be added
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
# Add a Label to Volume
result = api_instance.datacenters_volumes_labels_post(datacenter_id, volume_id, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts)

begin
# Add a Label to Volume
data, status_code, headers = api_instance.datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelApi->datacenters_volumes_labels_post_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

label

LabelResource

Label to be added

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]

Return type

LabelResource

Authorization

Basic Authentication, Token Authentication

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

datacenters_volumes_labels_put

datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, opts)

Modify a Label of Volume

This will modify the value of the label on a volume.

Examples

require 'time'
require 'ionoscloud'
# setup authorization
Ionoscloud.configure do |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'
end
api_instance = Ionoscloud::LabelApi.new
datacenter_id = 'datacenter_id_example' # String | The unique ID of the Datacenter
volume_id = 'volume_id_example' # String | The unique ID of the Volume
key = 'key_example' # String | The key of the Label
label = Ionoscloud::LabelResource.new({properties: Ionoscloud::LabelResourceProperties.new}) # LabelResource | Modified Label
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
# Modify a Label of Volume
result = api_instance.datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, opts)
p result
rescue Ionoscloud::ApiError => e
puts "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.

, Integer, Hash)> datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts)

begin
# Modify a Label of Volume
data, status_code, headers = api_instance.datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <LabelResource>
rescue Ionoscloud::ApiError => e
puts "Error when calling LabelApi->datacenters_volumes_labels_put_with_http_info: #{e}"
end

Parameters

Name

Type

Description

Notes

datacenter_id