=begin #CLOUD API #An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech OpenAPI Generator version: 5.0.1-SNAPSHOT =end require 'cgi' module Ionoscloud class KubernetesApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] def k8s_delete(k8s_cluster_id, opts = {}) data, _status_code, _headers = k8s_delete_with_http_info(k8s_cluster_id, opts) data end # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] def k8s_get(opts = {}) data, _status_code, _headers = k8s_get_with_http_info(opts) data end # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # Retrieve Kubernetes Configuration File # You can retrieve kubernetes configuration file in YAML or JSON format for the kubernetes cluster. You can send the Accept header accordingly. Default Accept header is application/yaml # @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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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 [String] def k8s_kubeconfig_get(k8s_cluster_id, opts = {}) data, _status_code, _headers = k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts) data end # Retrieve Kubernetes Configuration File # You can retrieve kubernetes configuration file in YAML or JSON format for the kubernetes cluster. You can send the Accept header accordingly. Default Accept header is application/yaml # @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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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<(String, Integer, Hash)>] String data, response status code and response headers 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/yaml', 'application/x-yaml', '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] || 'String' # 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] def k8s_nodepools_get(k8s_cluster_id, opts = {}) data, _status_code, _headers = k8s_nodepools_get_with_http_info(k8s_cluster_id, opts) data end # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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) # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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 [KubernetesNodePool] 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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 [KubernetesNodePool] 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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 [KubernetesNodePool] 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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 [KubernetesNodePoolForPut] 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 # 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 [KubernetesNodePool] 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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<(KubernetesNodePoolForPut, Integer, Hash)>] KubernetesNodePoolForPut data, response status code and response headers 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] || 'KubernetesNodePoolForPut' # 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 # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] def k8s_post(kubernetes_cluster, opts = {}) data, _status_code, _headers = k8s_post_with_http_info(kubernetes_cluster, opts) data end # 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on (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] 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 # 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 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/[ID] - depth=0: only direct properties are included. Children (servers etc.) are not included - depth=1: direct properties and children references are included - depth=2: direct properties and children properties are included - depth=3: direct properties and children properties and children's children are included - depth=... and so on # @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 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 # 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] def k8s_versions_default_get(opts = {}) data, _status_code, _headers = k8s_versions_default_get_with_http_info(opts) data end # 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 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 # Retrieve available Kubernetes versions # You can retrieve a list of available kubernetes versions # @param [Hash] opts the optional parameters # @return [Array] def k8s_versions_get(opts = {}) data, _status_code, _headers = k8s_versions_get_with_http_info(opts) data end # Retrieve available Kubernetes versions # You can retrieve a list of available kubernetes versions # @param [Hash] opts the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers 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' # 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 end end