class Ionoscloud::LabelApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/ionoscloud/api/label_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

datacenters_labels_delete(datacenter_id, key, opts = {}) click to toggle source

Delete a Label from Data Center This will remove a label from the data center. @param datacenter_id [String] The unique ID of the Data Center @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - 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 (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Object]

# File lib/ionoscloud/api/label_api.rb, line 31
def datacenters_labels_delete(datacenter_id, key, opts = {})
  data, _status_code, _headers = datacenters_labels_delete_with_http_info(datacenter_id, key, opts)
  data
end
datacenters_labels_delete_with_http_info(datacenter_id, key, opts = {}) click to toggle source

Delete a Label from Data Center This will remove a label from the data center. @param datacenter_id [String] The unique ID of the Data Center @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 45
def datacenters_labels_delete_with_http_info(datacenter_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_delete ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_delete"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_labels_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_delete, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_labels_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_labels_find_by_key(datacenter_id, key, opts = {}) click to toggle source

Retrieve a Label of Data Center This will retrieve the properties of a associated label to a data center. @param datacenter_id [String] The unique ID of the Data Center @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 117
def datacenters_labels_find_by_key(datacenter_id, key, opts = {})
  data, _status_code, _headers = datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts)
  data
end
datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts = {}) click to toggle source

Retrieve a Label of Data Center This will retrieve the properties of a associated label to a data center. @param datacenter_id [String] The unique ID of the Data Center @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 131
def datacenters_labels_find_by_key_with_http_info(datacenter_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_find_by_key ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_find_by_key"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_labels_find_by_key"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_find_by_key, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_find_by_key, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_labels_find_by_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_labels_get(datacenter_id, opts = {}) click to toggle source

List all Data Center Labels You can retrieve a list of all labels associated with a data center @param datacenter_id [String] The unique ID of the Data Center @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) (default to 0) @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) (default to 1000) @return [LabelResources]

# File lib/ionoscloud/api/label_api.rb, line 204
def datacenters_labels_get(datacenter_id, opts = {})
  data, _status_code, _headers = datacenters_labels_get_with_http_info(datacenter_id, opts)
  data
end
datacenters_labels_get_with_http_info(datacenter_id, opts = {}) click to toggle source

List all Data Center Labels You can retrieve a list of all labels associated with a data center @param datacenter_id [String] The unique ID of the Data Center @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 219
def datacenters_labels_get_with_http_info(datacenter_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_get ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_get, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_get, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LabelApi.datacenters_labels_get, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_labels_get, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_labels_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResources'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_labels_post(datacenter_id, label, opts = {}) click to toggle source

Add a Label to Data Center This will add a label to the data center. @param datacenter_id [String] The unique ID of the Data Center @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 301
def datacenters_labels_post(datacenter_id, label, opts = {})
  data, _status_code, _headers = datacenters_labels_post_with_http_info(datacenter_id, label, opts)
  data
end
datacenters_labels_post_with_http_info(datacenter_id, label, opts = {}) click to toggle source

Add a Label to Data Center This will add a label to the data center. @param datacenter_id [String] The unique ID of the Data Center @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 315
def datacenters_labels_post_with_http_info(datacenter_id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_post ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_labels_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_post, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_labels_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_labels_put(datacenter_id, key, label, opts = {}) click to toggle source

Modify a Label of Data Center This will modify the value of the label on a data center. @param datacenter_id [String] The unique ID of the Data Center @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 390
def datacenters_labels_put(datacenter_id, key, label, opts = {})
  data, _status_code, _headers = datacenters_labels_put_with_http_info(datacenter_id, key, label, opts)
  data
end
datacenters_labels_put_with_http_info(datacenter_id, key, label, opts = {}) click to toggle source

Modify a Label of Data Center This will modify the value of the label on a data center. @param datacenter_id [String] The unique ID of the Data Center @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 405
def datacenters_labels_put_with_http_info(datacenter_id, key, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_labels_put ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_labels_put"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_labels_put"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_labels_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_put, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_labels_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_labels_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_servers_labels_delete(datacenter_id, server_id, key, opts = {}) click to toggle source

Delete a Label from Server This will remove a label from the server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Object]

# File lib/ionoscloud/api/label_api.rb, line 484
def datacenters_servers_labels_delete(datacenter_id, server_id, key, opts = {})
  data, _status_code, _headers = datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts)
  data
end
datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts = {}) click to toggle source

Delete a Label from Server This will remove a label from the server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 499
def datacenters_servers_labels_delete_with_http_info(datacenter_id, server_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_delete ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_delete"
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_delete"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_servers_labels_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_delete, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_servers_labels_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts = {}) click to toggle source

Retrieve a Label of Server This will retrieve the properties of a associated label to a server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 576
def datacenters_servers_labels_find_by_key(datacenter_id, server_id, key, opts = {})
  data, _status_code, _headers = datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts)
  data
end
datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts = {}) click to toggle source

Retrieve a Label of Server This will retrieve the properties of a associated label to a server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 591
def datacenters_servers_labels_find_by_key_with_http_info(datacenter_id, server_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_find_by_key ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_find_by_key"
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_find_by_key"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_servers_labels_find_by_key"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_find_by_key, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_find_by_key, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_servers_labels_find_by_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_servers_labels_get(datacenter_id, server_id, opts = {}) click to toggle source

List all Server Labels You can retrieve a list of all labels associated with a server @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) (default to 0) @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) (default to 1000) @return [LabelResources]

# File lib/ionoscloud/api/label_api.rb, line 669
def datacenters_servers_labels_get(datacenter_id, server_id, opts = {})
  data, _status_code, _headers = datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts)
  data
end
datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts = {}) click to toggle source

List all Server Labels You can retrieve a list of all labels associated with a server @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 685
def datacenters_servers_labels_get_with_http_info(datacenter_id, server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_get ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_get"
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_get, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_get, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LabelApi.datacenters_servers_labels_get, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_servers_labels_get, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_servers_labels_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResources'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_servers_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_servers_labels_post(datacenter_id, server_id, label, opts = {}) click to toggle source

Add a Label to Server This will add a label to the server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 772
def datacenters_servers_labels_post(datacenter_id, server_id, label, opts = {})
  data, _status_code, _headers = datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts)
  data
end
datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts = {}) click to toggle source

Add a Label to Server This will add a label to the server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 787
def datacenters_servers_labels_post_with_http_info(datacenter_id, server_id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_post ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_post"
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_servers_labels_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_post, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_servers_labels_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_servers_labels_put(datacenter_id, server_id, key, label, opts = {}) click to toggle source

Modify a Label of Server This will modify the value of the label on a server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 867
def datacenters_servers_labels_put(datacenter_id, server_id, key, label, opts = {})
  data, _status_code, _headers = datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts)
  data
end
datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts = {}) click to toggle source

Modify a Label of Server This will modify the value of the label on a server. @param datacenter_id [String] The unique ID of the Datacenter @param server_id [String] The unique ID of the Server @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 883
def datacenters_servers_labels_put_with_http_info(datacenter_id, server_id, key, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_servers_labels_put ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_servers_labels_put"
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling LabelApi.datacenters_servers_labels_put"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_servers_labels_put"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_servers_labels_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_put, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_servers_labels_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/servers/{serverId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_servers_labels_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_servers_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_volumes_labels_delete(datacenter_id, volume_id, key, opts = {}) click to toggle source

Delete a Label from Volume This will remove a label from the volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Object]

# File lib/ionoscloud/api/label_api.rb, line 966
def datacenters_volumes_labels_delete(datacenter_id, volume_id, key, opts = {})
  data, _status_code, _headers = datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts)
  data
end
datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts = {}) click to toggle source

Delete a Label from Volume This will remove a label from the volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 981
def datacenters_volumes_labels_delete_with_http_info(datacenter_id, volume_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_delete ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_delete"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_delete"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_volumes_labels_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_delete, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_volumes_labels_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, opts = {}) click to toggle source

Retrieve a Label of Volume This will retrieve the properties of a associated label to a volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 1058
def datacenters_volumes_labels_find_by_key(datacenter_id, volume_id, key, opts = {})
  data, _status_code, _headers = datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts)
  data
end
datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts = {}) click to toggle source

Retrieve a Label of Volume This will retrieve the properties of a associated label to a volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1073
def datacenters_volumes_labels_find_by_key_with_http_info(datacenter_id, volume_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_find_by_key ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_find_by_key"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_find_by_key"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_volumes_labels_find_by_key"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_find_by_key, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_find_by_key, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_volumes_labels_find_by_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_volumes_labels_get(datacenter_id, volume_id, opts = {}) click to toggle source

List all Volume Labels You can retrieve a list of all labels associated with a volume @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) (default to 0) @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) (default to 1000) @return [LabelResources]

# File lib/ionoscloud/api/label_api.rb, line 1151
def datacenters_volumes_labels_get(datacenter_id, volume_id, opts = {})
  data, _status_code, _headers = datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts)
  data
end
datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts = {}) click to toggle source

List all Volume Labels You can retrieve a list of all labels associated with a volume @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @option opts [Integer] :offset the first element (of the total list of elements) to include in the response (use together with &lt;code&gt;limit&lt;/code&gt; for pagination) @option opts [Integer] :limit the maximum number of elements to return (use together with &lt;code&gt;offset&lt;/code&gt; for pagination) @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1167
def datacenters_volumes_labels_get_with_http_info(datacenter_id, volume_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_get ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_get"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_get, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_get, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling LabelApi.datacenters_volumes_labels_get, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 10000
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_volumes_labels_get, must be smaller than or equal to 10000.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LabelApi.datacenters_volumes_labels_get, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResources'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_volumes_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_volumes_labels_post(datacenter_id, volume_id, label, opts = {}) click to toggle source

Add a Label to Volume This will add a label to the volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 1254
def datacenters_volumes_labels_post(datacenter_id, volume_id, label, opts = {})
  data, _status_code, _headers = datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts)
  data
end
datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts = {}) click to toggle source

Add a Label to Volume This will add a label to the volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1269
def datacenters_volumes_labels_post_with_http_info(datacenter_id, volume_id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_post ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_post"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_volumes_labels_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_post, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_volumes_labels_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, opts = {}) click to toggle source

Modify a Label of Volume This will modify the value of the label on a volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 1349
def datacenters_volumes_labels_put(datacenter_id, volume_id, key, label, opts = {})
  data, _status_code, _headers = datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts)
  data
end
datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts = {}) click to toggle source

Modify a Label of Volume This will modify the value of the label on a volume. @param datacenter_id [String] The unique ID of the Datacenter @param volume_id [String] The unique ID of the Volume @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1365
def datacenters_volumes_labels_put_with_http_info(datacenter_id, volume_id, key, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.datacenters_volumes_labels_put ...'
  end
  # verify the required parameter 'datacenter_id' is set
  if @api_client.config.client_side_validation && datacenter_id.nil?
    fail ArgumentError, "Missing the required parameter 'datacenter_id' when calling LabelApi.datacenters_volumes_labels_put"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling LabelApi.datacenters_volumes_labels_put"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.datacenters_volumes_labels_put"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.datacenters_volumes_labels_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_put, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.datacenters_volumes_labels_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/datacenters/{datacenterId}/volumes/{volumeId}/labels/{key}'.sub('{' + 'datacenterId' + '}', CGI.escape(datacenter_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.datacenters_volumes_labels_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#datacenters_volumes_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
ipblocks_labels_delete(ipblock_id, key, opts = {}) click to toggle source

Delete a Label from IP Block This will remove a label from the Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Object]

# File lib/ionoscloud/api/label_api.rb, line 1447
def ipblocks_labels_delete(ipblock_id, key, opts = {})
  data, _status_code, _headers = ipblocks_labels_delete_with_http_info(ipblock_id, key, opts)
  data
end
ipblocks_labels_delete_with_http_info(ipblock_id, key, opts = {}) click to toggle source

Delete a Label from IP Block This will remove a label from the Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1461
def ipblocks_labels_delete_with_http_info(ipblock_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_delete ...'
  end
  # verify the required parameter 'ipblock_id' is set
  if @api_client.config.client_side_validation && ipblock_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_delete"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.ipblocks_labels_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_delete, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/ipblocks/{ipblockId}/labels/{key}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.ipblocks_labels_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
ipblocks_labels_find_by_key(ipblock_id, key, opts = {}) click to toggle source

Retrieve a Label of IP Block This will retrieve the properties of a associated label to a Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 1533
def ipblocks_labels_find_by_key(ipblock_id, key, opts = {})
  data, _status_code, _headers = ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, opts)
  data
end
ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, opts = {}) click to toggle source

Retrieve a Label of IP Block This will retrieve the properties of a associated label to a Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1547
def ipblocks_labels_find_by_key_with_http_info(ipblock_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_find_by_key ...'
  end
  # verify the required parameter 'ipblock_id' is set
  if @api_client.config.client_side_validation && ipblock_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_find_by_key"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.ipblocks_labels_find_by_key"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_find_by_key, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_find_by_key, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/ipblocks/{ipblockId}/labels/{key}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.ipblocks_labels_find_by_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
ipblocks_labels_get(ipblock_id, opts = {}) click to toggle source

List all Ip Block Labels You can retrieve a list of all labels associated with a IP Block @param ipblock_id [String] The unique ID of the Ip Block @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResources]

# File lib/ionoscloud/api/label_api.rb, line 1618
def ipblocks_labels_get(ipblock_id, opts = {})
  data, _status_code, _headers = ipblocks_labels_get_with_http_info(ipblock_id, opts)
  data
end
ipblocks_labels_get_with_http_info(ipblock_id, opts = {}) click to toggle source

List all Ip Block Labels You can retrieve a list of all labels associated with a IP Block @param ipblock_id [String] The unique ID of the Ip Block @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1631
def ipblocks_labels_get_with_http_info(ipblock_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_get ...'
  end
  # verify the required parameter 'ipblock_id' is set
  if @api_client.config.client_side_validation && ipblock_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_get, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/ipblocks/{ipblockId}/labels'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResources'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.ipblocks_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
ipblocks_labels_post(ipblock_id, label, opts = {}) click to toggle source

Add a Label to IP Block This will add a label to the Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 1699
def ipblocks_labels_post(ipblock_id, label, opts = {})
  data, _status_code, _headers = ipblocks_labels_post_with_http_info(ipblock_id, label, opts)
  data
end
ipblocks_labels_post_with_http_info(ipblock_id, label, opts = {}) click to toggle source

Add a Label to IP Block This will add a label to the Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1713
def ipblocks_labels_post_with_http_info(ipblock_id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_post ...'
  end
  # verify the required parameter 'ipblock_id' is set
  if @api_client.config.client_side_validation && ipblock_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.ipblocks_labels_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_post, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/ipblocks/{ipblockId}/labels'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.ipblocks_labels_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
ipblocks_labels_put(ipblock_id, key, label, opts = {}) click to toggle source

Modify a Label of IP Block This will modify the value of the label on a Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 1788
def ipblocks_labels_put(ipblock_id, key, label, opts = {})
  data, _status_code, _headers = ipblocks_labels_put_with_http_info(ipblock_id, key, label, opts)
  data
end
ipblocks_labels_put_with_http_info(ipblock_id, key, label, opts = {}) click to toggle source

Modify a Label of IP Block This will modify the value of the label on a Ip Block. @param ipblock_id [String] The unique ID of the Ip Block @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1803
def ipblocks_labels_put_with_http_info(ipblock_id, key, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.ipblocks_labels_put ...'
  end
  # verify the required parameter 'ipblock_id' is set
  if @api_client.config.client_side_validation && ipblock_id.nil?
    fail ArgumentError, "Missing the required parameter 'ipblock_id' when calling LabelApi.ipblocks_labels_put"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.ipblocks_labels_put"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.ipblocks_labels_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_put, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.ipblocks_labels_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/ipblocks/{ipblockId}/labels/{key}'.sub('{' + 'ipblockId' + '}', CGI.escape(ipblock_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.ipblocks_labels_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#ipblocks_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
labels_find_by_urn(labelurn, opts = {}) click to toggle source

Returns the label by its URN. You can retrieve the details of a specific label using its URN. A URN is for uniqueness of a Label and composed using urn:label:<resource_type>:<resource_uuid>:<key> @param labelurn [String] The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn:label:&lt;resource_type&gt;:&lt;resource_uuid&gt;:&lt;key&gt; @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Label]

# File lib/ionoscloud/api/label_api.rb, line 1880
def labels_find_by_urn(labelurn, opts = {})
  data, _status_code, _headers = labels_find_by_urn_with_http_info(labelurn, opts)
  data
end
labels_find_by_urn_with_http_info(labelurn, opts = {}) click to toggle source

Returns the label by its URN. You can retrieve the details of a specific label using its URN. A URN is for uniqueness of a Label and composed using urn:label:&lt;resource_type&gt;:&lt;resource_uuid&gt;:&lt;key&gt; @param labelurn [String] The URN representing the unique ID of the label. A URN is for uniqueness of a Label and composed using urn:label:&lt;resource_type&gt;:&lt;resource_uuid&gt;:&lt;key&gt; @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Label, Integer, Hash)>] Label data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1893
def labels_find_by_urn_with_http_info(labelurn, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.labels_find_by_urn ...'
  end
  # verify the required parameter 'labelurn' is set
  if @api_client.config.client_side_validation && labelurn.nil?
    fail ArgumentError, "Missing the required parameter 'labelurn' when calling LabelApi.labels_find_by_urn"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_find_by_urn, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_find_by_urn, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/labels/{labelurn}'.sub('{' + 'labelurn' + '}', CGI.escape(labelurn.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Label'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.labels_find_by_urn",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#labels_find_by_urn\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
labels_get(opts = {}) click to toggle source

List Labels You can retrieve a complete list of labels that you have access to. @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Labels]

# File lib/ionoscloud/api/label_api.rb, line 1959
def labels_get(opts = {})
  data, _status_code, _headers = labels_get_with_http_info(opts)
  data
end
labels_get_with_http_info(opts = {}) click to toggle source

List Labels You can retrieve a complete list of labels that you have access to. @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Labels, Integer, Hash)>] Labels data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 1971
def labels_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.labels_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_get, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.labels_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/labels'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Labels'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
snapshots_labels_delete(snapshot_id, key, opts = {}) click to toggle source

Delete a Label from Snapshot This will remove a label from the snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Object]

# File lib/ionoscloud/api/label_api.rb, line 2035
def snapshots_labels_delete(snapshot_id, key, opts = {})
  data, _status_code, _headers = snapshots_labels_delete_with_http_info(snapshot_id, key, opts)
  data
end
snapshots_labels_delete_with_http_info(snapshot_id, key, opts = {}) click to toggle source

Delete a Label from Snapshot This will remove a label from the snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 2049
def snapshots_labels_delete_with_http_info(snapshot_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_delete ...'
  end
  # verify the required parameter 'snapshot_id' is set
  if @api_client.config.client_side_validation && snapshot_id.nil?
    fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_delete"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.snapshots_labels_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_delete, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/snapshots/{snapshotId}/labels/{key}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Object'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.snapshots_labels_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#snapshots_labels_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
snapshots_labels_find_by_key(snapshot_id, key, opts = {}) click to toggle source

Retrieve a Label of Snapshot This will retrieve the properties of a associated label to a snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 2121
def snapshots_labels_find_by_key(snapshot_id, key, opts = {})
  data, _status_code, _headers = snapshots_labels_find_by_key_with_http_info(snapshot_id, key, opts)
  data
end
snapshots_labels_find_by_key_with_http_info(snapshot_id, key, opts = {}) click to toggle source

Retrieve a Label of Snapshot This will retrieve the properties of a associated label to a snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param key [String] The key of the Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 2135
def snapshots_labels_find_by_key_with_http_info(snapshot_id, key, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_find_by_key ...'
  end
  # verify the required parameter 'snapshot_id' is set
  if @api_client.config.client_side_validation && snapshot_id.nil?
    fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_find_by_key"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.snapshots_labels_find_by_key"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_find_by_key, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_find_by_key, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/snapshots/{snapshotId}/labels/{key}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.snapshots_labels_find_by_key",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#snapshots_labels_find_by_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
snapshots_labels_get(snapshot_id, opts = {}) click to toggle source

List all Snapshot Labels You can retrieve a list of all labels associated with a snapshot @param snapshot_id [String] The unique ID of the Snapshot @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResources]

# File lib/ionoscloud/api/label_api.rb, line 2206
def snapshots_labels_get(snapshot_id, opts = {})
  data, _status_code, _headers = snapshots_labels_get_with_http_info(snapshot_id, opts)
  data
end
snapshots_labels_get_with_http_info(snapshot_id, opts = {}) click to toggle source

List all Snapshot Labels You can retrieve a list of all labels associated with a snapshot @param snapshot_id [String] The unique ID of the Snapshot @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResources, Integer, Hash)>] LabelResources data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 2219
def snapshots_labels_get_with_http_info(snapshot_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_get ...'
  end
  # verify the required parameter 'snapshot_id' is set
  if @api_client.config.client_side_validation && snapshot_id.nil?
    fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_get, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/snapshots/{snapshotId}/labels'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResources'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.snapshots_labels_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#snapshots_labels_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
snapshots_labels_post(snapshot_id, label, opts = {}) click to toggle source

Add a Label to Snapshot This will add a label to the snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 2287
def snapshots_labels_post(snapshot_id, label, opts = {})
  data, _status_code, _headers = snapshots_labels_post_with_http_info(snapshot_id, label, opts)
  data
end
snapshots_labels_post_with_http_info(snapshot_id, label, opts = {}) click to toggle source

Add a Label to Snapshot This will add a label to the snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param label [LabelResource] Label to be added @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 2301
def snapshots_labels_post_with_http_info(snapshot_id, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_post ...'
  end
  # verify the required parameter 'snapshot_id' is set
  if @api_client.config.client_side_validation && snapshot_id.nil?
    fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_post"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.snapshots_labels_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_post, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/snapshots/{snapshotId}/labels'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.snapshots_labels_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#snapshots_labels_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
snapshots_labels_put(snapshot_id, key, label, opts = {}) click to toggle source

Modify a Label of Snapshot This will modify the value of the label on a snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on (default to 0) @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [LabelResource]

# File lib/ionoscloud/api/label_api.rb, line 2376
def snapshots_labels_put(snapshot_id, key, label, opts = {})
  data, _status_code, _headers = snapshots_labels_put_with_http_info(snapshot_id, key, label, opts)
  data
end
snapshots_labels_put_with_http_info(snapshot_id, key, label, opts = {}) click to toggle source

Modify a Label of Snapshot This will modify the value of the label on a snapshot. @param snapshot_id [String] The unique ID of the Snapshot @param key [String] The key of the Label @param label [LabelResource] Modified Label @param [Hash] opts the optional parameters @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/ - depth&#x3D;0: only direct properties are included. Children (servers etc.) are not included - depth&#x3D;1: direct properties and children references are included - depth&#x3D;2: direct properties and children properties are included - depth&#x3D;3: direct properties and children properties and children&#39;s children are included - depth&#x3D;… and so on @option opts [Integer] :x_contract_number Users having more than 1 contract need to provide contract number, against which all API requests should be executed @return [Array<(LabelResource, Integer, Hash)>] LabelResource data, response status code and response headers

# File lib/ionoscloud/api/label_api.rb, line 2391
def snapshots_labels_put_with_http_info(snapshot_id, key, label, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: LabelApi.snapshots_labels_put ...'
  end
  # verify the required parameter 'snapshot_id' is set
  if @api_client.config.client_side_validation && snapshot_id.nil?
    fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling LabelApi.snapshots_labels_put"
  end
  # verify the required parameter 'key' is set
  if @api_client.config.client_side_validation && key.nil?
    fail ArgumentError, "Missing the required parameter 'key' when calling LabelApi.snapshots_labels_put"
  end
  # verify the required parameter 'label' is set
  if @api_client.config.client_side_validation && label.nil?
    fail ArgumentError, "Missing the required parameter 'label' when calling LabelApi.snapshots_labels_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_put, must be smaller than or equal to 10.'
  end

  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling LabelApi.snapshots_labels_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/snapshots/{snapshotId}/labels/{key}'.sub('{' + 'snapshotId' + '}', CGI.escape(snapshot_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
  query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
  header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(label)

  # return_type
  return_type = opts[:debug_return_type] || 'LabelResource'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']

  new_options = opts.merge(
    :operation => :"LabelApi.snapshots_labels_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: LabelApi#snapshots_labels_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end