class Ionoscloud::KubernetesApi

Attributes

api_client[RW]

Public Class Methods

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

Public Instance Methods

k8s_delete(k8s_cluster_id, opts = {}) click to toggle source

Delete Kubernetes Cluster This will remove a Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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/kubernetes_api.rb, line 30
def k8s_delete(k8s_cluster_id, opts = {})
  data, _status_code, _headers = k8s_delete_with_http_info(k8s_cluster_id, opts)
  data
end
k8s_delete_with_http_info(k8s_cluster_id, opts = {}) click to toggle source

Delete Kubernetes Cluster This will remove a Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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/kubernetes_api.rb, line 43
def k8s_delete_with_http_info(k8s_cluster_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_delete ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_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 KubernetesApi.k8s_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_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] || 'Object'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_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: KubernetesApi#k8s_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_find_by_cluster_id(k8s_cluster_id, opts = {}) click to toggle source

Retrieve Kubernetes Cluster This will retrieve a single Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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 [KubernetesCluster]

# File lib/ionoscloud/api/kubernetes_api.rb, line 110
def k8s_find_by_cluster_id(k8s_cluster_id, opts = {})
  data, _status_code, _headers = k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts)
  data
end
k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts = {}) click to toggle source

Retrieve Kubernetes Cluster This will retrieve a single Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 123
def k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_find_by_cluster_id ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_find_by_cluster_id"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_find_by_cluster_id, 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 KubernetesApi.k8s_find_by_cluster_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_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] || 'KubernetesCluster'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_find_by_cluster_id",
    :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: KubernetesApi#k8s_find_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_get(opts = {}) click to toggle source

List Kubernetes Clusters You can retrieve a list of all kubernetes clusters associated with a contract @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 [KubernetesClusters]

# File lib/ionoscloud/api/kubernetes_api.rb, line 189
def k8s_get(opts = {})
  data, _status_code, _headers = k8s_get_with_http_info(opts)
  data
end
k8s_get_with_http_info(opts = {}) click to toggle source

List Kubernetes Clusters You can retrieve a list of all kubernetes clusters associated with a contract @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<(KubernetesClusters, Integer, Hash)>] KubernetesClusters data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 201
def k8s_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_get ...'
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_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 KubernetesApi.k8s_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s'

  # 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] || 'KubernetesClusters'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_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: KubernetesApi#k8s_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_kubeconfig_get(k8s_cluster_id, opts = {}) click to toggle source

Retrieve Kubernetes Configuration File You can retrieve kubernetes configuration file for the kubernetes cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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 [KubernetesConfig]

# File lib/ionoscloud/api/kubernetes_api.rb, line 264
def k8s_kubeconfig_get(k8s_cluster_id, opts = {})
  data, _status_code, _headers = k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts)
  data
end
k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts = {}) click to toggle source

Retrieve Kubernetes Configuration File You can retrieve kubernetes configuration file for the kubernetes cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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<(KubernetesConfig, Integer, Hash)>] KubernetesConfig data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 277
def k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_kubeconfig_get ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_kubeconfig_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_kubeconfig_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 KubernetesApi.k8s_kubeconfig_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/kubeconfig'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_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] || 'KubernetesConfig'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_kubeconfig_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: KubernetesApi#k8s_kubeconfig_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_delete(k8s_cluster_id, nodepool_id, opts = {}) click to toggle source

Delete Kubernetes Node Pool This will remove a Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @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/kubernetes_api.rb, line 345
def k8s_nodepools_delete(k8s_cluster_id, nodepool_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, opts)
  data
end
k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, opts = {}) click to toggle source

Delete Kubernetes Node Pool This will remove a Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @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/kubernetes_api.rb, line 359
def k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_delete ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_delete"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_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 KubernetesApi.k8s_nodepools_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_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] || 'Object'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_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: KubernetesApi#k8s_nodepools_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_find_by_id(k8s_cluster_id, nodepool_id, opts = {}) click to toggle source

Retrieve Kubernetes Node Pool You can retrieve a single Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @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 [KubernetesNodePool]

# File lib/ionoscloud/api/kubernetes_api.rb, line 431
def k8s_nodepools_find_by_id(k8s_cluster_id, nodepool_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, opts)
  data
end
k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, opts = {}) click to toggle source

Retrieve Kubernetes Node Pool You can retrieve a single Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @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<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 445
def k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_find_by_id ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_find_by_id"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_find_by_id"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_find_by_id, 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 KubernetesApi.k8s_nodepools_find_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_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] || 'KubernetesNodePool'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_find_by_id",
    :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: KubernetesApi#k8s_nodepools_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_get(k8s_cluster_id, opts = {}) click to toggle source

List Kubernetes Node Pools You can retrieve a list of all kubernetes node pools part of kubernetes cluster @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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 [KubernetesNodePools]

# File lib/ionoscloud/api/kubernetes_api.rb, line 516
def k8s_nodepools_get(k8s_cluster_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_get_with_http_info(k8s_cluster_id, opts)
  data
end
k8s_nodepools_get_with_http_info(k8s_cluster_id, opts = {}) click to toggle source

List Kubernetes Node Pools You can retrieve a list of all kubernetes node pools part of kubernetes cluster @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @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<(KubernetesNodePools, Integer, Hash)>] KubernetesNodePools data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 529
def k8s_nodepools_get_with_http_info(k8s_cluster_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_get ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_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 KubernetesApi.k8s_nodepools_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_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] || 'KubernetesNodePools'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_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: KubernetesApi#k8s_nodepools_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_nodes_delete(k8s_cluster_id, nodepool_id, node_id, opts = {}) click to toggle source

Delete Kubernetes node This will remove a Kubernetes node. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param node_id [String] The unique ID of the Kubernetes node @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/kubernetes_api.rb, line 598
def k8s_nodepools_nodes_delete(k8s_cluster_id, nodepool_id, node_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts)
  data
end
k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {}) click to toggle source

Delete Kubernetes node This will remove a Kubernetes node. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param node_id [String] The unique ID of the Kubernetes node @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/kubernetes_api.rb, line 613
def k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_delete ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_delete"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_delete"
  end
  # verify the required parameter 'node_id' is set
  if @api_client.config.client_side_validation && node_id.nil?
    fail ArgumentError, "Missing the required parameter 'node_id' when calling KubernetesApi.k8s_nodepools_nodes_delete"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_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 KubernetesApi.k8s_nodepools_nodes_delete, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_id.to_s)).sub('{' + 'nodeId' + '}', CGI.escape(node_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] || 'Object'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_nodes_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: KubernetesApi#k8s_nodepools_nodes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_nodes_find_by_id(k8s_cluster_id, nodepool_id, node_id, opts = {}) click to toggle source

Retrieve Kubernetes node You can retrieve a single Kubernetes Node. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param node_id [String] The unique ID of the Kubernetes Node. @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 [KubernetesNode]

# File lib/ionoscloud/api/kubernetes_api.rb, line 690
def k8s_nodepools_nodes_find_by_id(k8s_cluster_id, nodepool_id, node_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts)
  data
end
k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {}) click to toggle source

Retrieve Kubernetes node You can retrieve a single Kubernetes Node. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param node_id [String] The unique ID of the Kubernetes Node. @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<(KubernetesNode, Integer, Hash)>] KubernetesNode data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 705
def k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_find_by_id ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_find_by_id"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_find_by_id"
  end
  # verify the required parameter 'node_id' is set
  if @api_client.config.client_side_validation && node_id.nil?
    fail ArgumentError, "Missing the required parameter 'node_id' when calling KubernetesApi.k8s_nodepools_nodes_find_by_id"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_find_by_id, 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 KubernetesApi.k8s_nodepools_nodes_find_by_id, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_id.to_s)).sub('{' + 'nodeId' + '}', CGI.escape(node_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] || 'KubernetesNode'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_nodes_find_by_id",
    :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: KubernetesApi#k8s_nodepools_nodes_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_nodes_get(k8s_cluster_id, nodepool_id, opts = {}) click to toggle source

Retrieve Kubernetes nodes. You can retrieve all nodes of Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @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 [KubernetesNodes]

# File lib/ionoscloud/api/kubernetes_api.rb, line 781
def k8s_nodepools_nodes_get(k8s_cluster_id, nodepool_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, opts)
  data
end
k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, opts = {}) click to toggle source

Retrieve Kubernetes nodes. You can retrieve all nodes of Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @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<(KubernetesNodes, Integer, Hash)>] KubernetesNodes data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 795
def k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_get ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_get"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_get"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_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 KubernetesApi.k8s_nodepools_nodes_get, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_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] || 'KubernetesNodes'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_nodes_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: KubernetesApi#k8s_nodepools_nodes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_nodes_replace_post(k8s_cluster_id, nodepool_id, node_id, opts = {}) click to toggle source

Recreate the Kubernetes node You can recreate a single Kubernetes Node. Managed Kubernetes starts a process which based on the nodepool's template creates & configures a new node, waits for status "ACTIVE", and migrates all the pods from the faulty node, deleting it once empty. While this operation occurs, the nodepool will have an extra billable "ACTIVE" node. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param node_id [String] The unique ID of the Kubernetes Node. @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/kubernetes_api.rb, line 868
def k8s_nodepools_nodes_replace_post(k8s_cluster_id, nodepool_id, node_id, opts = {})
  data, _status_code, _headers = k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts)
  data
end
k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {}) click to toggle source

Recreate the Kubernetes node You can recreate a single Kubernetes Node. Managed Kubernetes starts a process which based on the nodepool&#39;s template creates &amp; configures a new node, waits for status "ACTIVE&quot;, and migrates all the pods from the faulty node, deleting it once empty. While this operation occurs, the nodepool will have an extra billable "ACTIVE&quot; node. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param node_id [String] The unique ID of the Kubernetes Node. @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/kubernetes_api.rb, line 883
def k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_replace_post ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_replace_post"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_replace_post"
  end
  # verify the required parameter 'node_id' is set
  if @api_client.config.client_side_validation && node_id.nil?
    fail ArgumentError, "Missing the required parameter 'node_id' when calling KubernetesApi.k8s_nodepools_nodes_replace_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_replace_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 KubernetesApi.k8s_nodepools_nodes_replace_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_id.to_s)).sub('{' + 'nodeId' + '}', CGI.escape(node_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] || 'Object'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_nodes_replace_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: KubernetesApi#k8s_nodepools_nodes_replace_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_post(k8s_cluster_id, kubernetes_node_pool, opts = {}) click to toggle source

Create a Kubernetes Node Pool This will create a new Kubernetes Node Pool inside a Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param kubernetes_node_pool [KubernetesNodePoolForPost] Details of the Kubernetes Node Pool @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 [KubernetesNodePool]

# File lib/ionoscloud/api/kubernetes_api.rb, line 959
def k8s_nodepools_post(k8s_cluster_id, kubernetes_node_pool, opts = {})
  data, _status_code, _headers = k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, opts)
  data
end
k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, opts = {}) click to toggle source

Create a Kubernetes Node Pool This will create a new Kubernetes Node Pool inside a Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param kubernetes_node_pool [KubernetesNodePoolForPost] Details of the Kubernetes Node Pool @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<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 973
def k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_post ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_post"
  end
  # verify the required parameter 'kubernetes_node_pool' is set
  if @api_client.config.client_side_validation && kubernetes_node_pool.nil?
    fail ArgumentError, "Missing the required parameter 'kubernetes_node_pool' when calling KubernetesApi.k8s_nodepools_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_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 KubernetesApi.k8s_nodepools_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_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(kubernetes_node_pool)

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

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_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: KubernetesApi#k8s_nodepools_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {}) click to toggle source

Modify Kubernetes Node Pool This will modify the Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param kubernetes_node_pool [KubernetesNodePoolForPut] Details of the Kubernetes Node Pool @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 [KubernetesNodePool]

# File lib/ionoscloud/api/kubernetes_api.rb, line 1048
def k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {})
  data, _status_code, _headers = k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts)
  data
end
k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {}) click to toggle source

Modify Kubernetes Node Pool This will modify the Kubernetes Node Pool. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param nodepool_id [String] The unique ID of the Kubernetes Node Pool @param kubernetes_node_pool [KubernetesNodePoolForPut] Details of the Kubernetes Node Pool @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<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 1063
def k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_put ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_put"
  end
  # verify the required parameter 'nodepool_id' is set
  if @api_client.config.client_side_validation && nodepool_id.nil?
    fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_put"
  end
  # verify the required parameter 'kubernetes_node_pool' is set
  if @api_client.config.client_side_validation && kubernetes_node_pool.nil?
    fail ArgumentError, "Missing the required parameter 'kubernetes_node_pool' when calling KubernetesApi.k8s_nodepools_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_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 KubernetesApi.k8s_nodepools_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_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(kubernetes_node_pool)

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

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_nodepools_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: KubernetesApi#k8s_nodepools_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_post(kubernetes_cluster, opts = {}) click to toggle source

Create Kubernetes Cluster This will create a new Kubernetes Cluster. @param kubernetes_cluster [KubernetesClusterForPost] Details of the Kubernetes Cluster @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 [KubernetesCluster]

# File lib/ionoscloud/api/kubernetes_api.rb, line 1140
def k8s_post(kubernetes_cluster, opts = {})
  data, _status_code, _headers = k8s_post_with_http_info(kubernetes_cluster, opts)
  data
end
k8s_post_with_http_info(kubernetes_cluster, opts = {}) click to toggle source

Create Kubernetes Cluster This will create a new Kubernetes Cluster. @param kubernetes_cluster [KubernetesClusterForPost] Details of the Kubernetes Cluster @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<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 1153
def k8s_post_with_http_info(kubernetes_cluster, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_post ...'
  end
  # verify the required parameter 'kubernetes_cluster' is set
  if @api_client.config.client_side_validation && kubernetes_cluster.nil?
    fail ArgumentError, "Missing the required parameter 'kubernetes_cluster' when calling KubernetesApi.k8s_post"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_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 KubernetesApi.k8s_post, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s'

  # 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(kubernetes_cluster)

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

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_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: KubernetesApi#k8s_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_put(k8s_cluster_id, kubernetes_cluster, opts = {}) click to toggle source

Modify Kubernetes Cluster This will modify the Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param kubernetes_cluster [KubernetesClusterForPut] Details of the Kubernetes Cluster @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 [KubernetesCluster]

# File lib/ionoscloud/api/kubernetes_api.rb, line 1223
def k8s_put(k8s_cluster_id, kubernetes_cluster, opts = {})
  data, _status_code, _headers = k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, opts)
  data
end
k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, opts = {}) click to toggle source

Modify Kubernetes Cluster This will modify the Kubernetes Cluster. @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster @param kubernetes_cluster [KubernetesClusterForPut] Details of the Kubernetes Cluster @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<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 1237
def k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_put ...'
  end
  # verify the required parameter 'k8s_cluster_id' is set
  if @api_client.config.client_side_validation && k8s_cluster_id.nil?
    fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_put"
  end
  # verify the required parameter 'kubernetes_cluster' is set
  if @api_client.config.client_side_validation && kubernetes_cluster.nil?
    fail ArgumentError, "Missing the required parameter 'kubernetes_cluster' when calling KubernetesApi.k8s_put"
  end
  if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
    fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_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 KubernetesApi.k8s_put, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/k8s/{k8sClusterId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_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(kubernetes_cluster)

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

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_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: KubernetesApi#k8s_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_versions_compatibilities_get(cluster_version, opts = {}) click to toggle source

Retrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. You can retrieve a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. @param cluster_version [String] @param [Hash] opts the optional parameters @return [Array<String>]

# File lib/ionoscloud/api/kubernetes_api.rb, line 1307
def k8s_versions_compatibilities_get(cluster_version, opts = {})
  data, _status_code, _headers = k8s_versions_compatibilities_get_with_http_info(cluster_version, opts)
  data
end
k8s_versions_compatibilities_get_with_http_info(cluster_version, opts = {}) click to toggle source

Retrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. You can retrieve a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster. @param cluster_version [String] @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 1317
def k8s_versions_compatibilities_get_with_http_info(cluster_version, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_compatibilities_get ...'
  end
  # verify the required parameter 'cluster_version' is set
  if @api_client.config.client_side_validation && cluster_version.nil?
    fail ArgumentError, "Missing the required parameter 'cluster_version' when calling KubernetesApi.k8s_versions_compatibilities_get"
  end
  # resource path
  local_var_path = '/k8s/versions/{clusterVersion}/compatibilities'.sub('{' + 'clusterVersion' + '}', CGI.escape(cluster_version.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_versions_compatibilities_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: KubernetesApi#k8s_versions_compatibilities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_versions_default_get(opts = {}) click to toggle source

Retrieve the current default kubernetes version for clusters and nodepools. You can retrieve the current default kubernetes version for clusters and nodepools. @param [Hash] opts the optional parameters @return [String]

# File lib/ionoscloud/api/kubernetes_api.rb, line 1369
def k8s_versions_default_get(opts = {})
  data, _status_code, _headers = k8s_versions_default_get_with_http_info(opts)
  data
end
k8s_versions_default_get_with_http_info(opts = {}) click to toggle source

Retrieve the current default kubernetes version for clusters and nodepools. You can retrieve the current default kubernetes version for clusters and nodepools. @param [Hash] opts the optional parameters @return [Array<(String, Integer, Hash)>] String data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 1378
def k8s_versions_default_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_default_get ...'
  end
  # resource path
  local_var_path = '/k8s/versions/default'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_versions_default_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: KubernetesApi#k8s_versions_default_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end
k8s_versions_get(opts = {}) click to toggle source

Retrieve available Kubernetes versions You can retrieve a list of available kubernetes versions @param [Hash] opts the optional parameters @return [Array<String>]

# File lib/ionoscloud/api/kubernetes_api.rb, line 1426
def k8s_versions_get(opts = {})
  data, _status_code, _headers = k8s_versions_get_with_http_info(opts)
  data
end
k8s_versions_get_with_http_info(opts = {}) click to toggle source

Retrieve available Kubernetes versions You can retrieve a list of available kubernetes versions @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers

# File lib/ionoscloud/api/kubernetes_api.rb, line 1435
def k8s_versions_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_get ...'
  end
  # resource path
  local_var_path = '/k8s/versions'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

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

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

  # return_type
  return_type = opts[:debug_return_type] || 'Array<String>'

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

  new_options = opts.merge(
    :operation => :"KubernetesApi.k8s_versions_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: KubernetesApi#k8s_versions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end