ionoscloud 5.0.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. checksums.yaml +7 -0
  2. data/DOCS.md +14618 -0
  3. data/Gemfile +9 -0
  4. data/README.md +55 -0
  5. data/Rakefile +10 -0
  6. data/git_push.sh +58 -0
  7. data/ionoscloud.gemspec +38 -0
  8. data/lib/ionoscloud.rb +181 -0
  9. data/lib/ionoscloud/api/_api.rb +96 -0
  10. data/lib/ionoscloud/api/backup_unit_api.rb +583 -0
  11. data/lib/ionoscloud/api/contract_api.rb +96 -0
  12. data/lib/ionoscloud/api/data_center_api.rb +532 -0
  13. data/lib/ionoscloud/api/image_api.rb +432 -0
  14. data/lib/ionoscloud/api/ip_blocks_api.rb +514 -0
  15. data/lib/ionoscloud/api/kubernetes_api.rb +1479 -0
  16. data/lib/ionoscloud/api/label_api.rb +2460 -0
  17. data/lib/ionoscloud/api/lan_api.rb +858 -0
  18. data/lib/ionoscloud/api/load_balancer_api.rb +950 -0
  19. data/lib/ionoscloud/api/location_api.rb +262 -0
  20. data/lib/ionoscloud/api/nic_api.rb +1222 -0
  21. data/lib/ionoscloud/api/private_cross_connect_api.rb +426 -0
  22. data/lib/ionoscloud/api/request_api.rb +283 -0
  23. data/lib/ionoscloud/api/server_api.rb +1679 -0
  24. data/lib/ionoscloud/api/snapshot_api.rb +432 -0
  25. data/lib/ionoscloud/api/user_management_api.rb +2495 -0
  26. data/lib/ionoscloud/api/volume_api.rb +763 -0
  27. data/lib/ionoscloud/api_client.rb +521 -0
  28. data/lib/ionoscloud/api_error.rb +57 -0
  29. data/lib/ionoscloud/configuration.rb +291 -0
  30. data/lib/ionoscloud/models/attached_volumes.rb +278 -0
  31. data/lib/ionoscloud/models/backup_unit.rb +294 -0
  32. data/lib/ionoscloud/models/backup_unit_properties.rb +242 -0
  33. data/lib/ionoscloud/models/backup_unit_sso.rb +217 -0
  34. data/lib/ionoscloud/models/backup_units.rb +283 -0
  35. data/lib/ionoscloud/models/balanced_nics.rb +278 -0
  36. data/lib/ionoscloud/models/cdroms.rb +278 -0
  37. data/lib/ionoscloud/models/connectable_datacenter.rb +234 -0
  38. data/lib/ionoscloud/models/contract.rb +231 -0
  39. data/lib/ionoscloud/models/contract_properties.rb +256 -0
  40. data/lib/ionoscloud/models/data_center_entities.rb +243 -0
  41. data/lib/ionoscloud/models/datacenter.rb +269 -0
  42. data/lib/ionoscloud/models/datacenter_element_metadata.rb +321 -0
  43. data/lib/ionoscloud/models/datacenter_properties.rb +296 -0
  44. data/lib/ionoscloud/models/datacenters.rb +278 -0
  45. data/lib/ionoscloud/models/error.rb +228 -0
  46. data/lib/ionoscloud/models/error_message.rb +227 -0
  47. data/lib/ionoscloud/models/firewall_rule.rb +260 -0
  48. data/lib/ionoscloud/models/firewall_rules.rb +278 -0
  49. data/lib/ionoscloud/models/firewallrule_properties.rb +468 -0
  50. data/lib/ionoscloud/models/group.rb +260 -0
  51. data/lib/ionoscloud/models/group_entities.rb +225 -0
  52. data/lib/ionoscloud/models/group_members.rb +249 -0
  53. data/lib/ionoscloud/models/group_properties.rb +307 -0
  54. data/lib/ionoscloud/models/group_share.rb +251 -0
  55. data/lib/ionoscloud/models/group_share_properties.rb +227 -0
  56. data/lib/ionoscloud/models/group_shares.rb +249 -0
  57. data/lib/ionoscloud/models/group_users.rb +250 -0
  58. data/lib/ionoscloud/models/groups.rb +249 -0
  59. data/lib/ionoscloud/models/image.rb +260 -0
  60. data/lib/ionoscloud/models/image_properties.rb +428 -0
  61. data/lib/ionoscloud/models/images.rb +249 -0
  62. data/lib/ionoscloud/models/info.rb +237 -0
  63. data/lib/ionoscloud/models/ip_block.rb +260 -0
  64. data/lib/ionoscloud/models/ip_block_properties.rb +271 -0
  65. data/lib/ionoscloud/models/ip_blocks.rb +249 -0
  66. data/lib/ionoscloud/models/ip_consumer.rb +270 -0
  67. data/lib/ionoscloud/models/ip_failover.rb +225 -0
  68. data/lib/ionoscloud/models/kubernetes_auto_scaling.rb +227 -0
  69. data/lib/ionoscloud/models/kubernetes_cluster.rb +303 -0
  70. data/lib/ionoscloud/models/kubernetes_cluster_entities.rb +216 -0
  71. data/lib/ionoscloud/models/kubernetes_cluster_properties.rb +265 -0
  72. data/lib/ionoscloud/models/kubernetes_cluster_properties_for_post_and_put.rb +241 -0
  73. data/lib/ionoscloud/models/kubernetes_clusters.rb +283 -0
  74. data/lib/ionoscloud/models/kubernetes_config.rb +285 -0
  75. data/lib/ionoscloud/models/kubernetes_config_properties.rb +217 -0
  76. data/lib/ionoscloud/models/kubernetes_maintenance_window.rb +261 -0
  77. data/lib/ionoscloud/models/kubernetes_node.rb +294 -0
  78. data/lib/ionoscloud/models/kubernetes_node_metadata.rb +291 -0
  79. data/lib/ionoscloud/models/kubernetes_node_pool.rb +294 -0
  80. data/lib/ionoscloud/models/kubernetes_node_pool_for_put.rb +294 -0
  81. data/lib/ionoscloud/models/kubernetes_node_pool_lan.rb +217 -0
  82. data/lib/ionoscloud/models/kubernetes_node_pool_properties.rb +476 -0
  83. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_post.rb +464 -0
  84. data/lib/ionoscloud/models/kubernetes_node_pool_properties_for_put.rb +464 -0
  85. data/lib/ionoscloud/models/kubernetes_node_pools.rb +283 -0
  86. data/lib/ionoscloud/models/kubernetes_node_properties.rb +252 -0
  87. data/lib/ionoscloud/models/kubernetes_nodes.rb +283 -0
  88. data/lib/ionoscloud/models/label.rb +294 -0
  89. data/lib/ionoscloud/models/label_properties.rb +257 -0
  90. data/lib/ionoscloud/models/label_resource.rb +294 -0
  91. data/lib/ionoscloud/models/label_resource_properties.rb +227 -0
  92. data/lib/ionoscloud/models/label_resources.rb +312 -0
  93. data/lib/ionoscloud/models/labels.rb +283 -0
  94. data/lib/ionoscloud/models/lan.rb +269 -0
  95. data/lib/ionoscloud/models/lan_entities.rb +216 -0
  96. data/lib/ionoscloud/models/lan_nics.rb +278 -0
  97. data/lib/ionoscloud/models/lan_post.rb +269 -0
  98. data/lib/ionoscloud/models/lan_properties.rb +249 -0
  99. data/lib/ionoscloud/models/lan_properties_post.rb +249 -0
  100. data/lib/ionoscloud/models/lans.rb +278 -0
  101. data/lib/ionoscloud/models/loadbalancer.rb +269 -0
  102. data/lib/ionoscloud/models/loadbalancer_entities.rb +216 -0
  103. data/lib/ionoscloud/models/loadbalancer_properties.rb +271 -0
  104. data/lib/ionoscloud/models/loadbalancers.rb +278 -0
  105. data/lib/ionoscloud/models/location.rb +260 -0
  106. data/lib/ionoscloud/models/location_properties.rb +263 -0
  107. data/lib/ionoscloud/models/locations.rb +249 -0
  108. data/lib/ionoscloud/models/nic.rb +269 -0
  109. data/lib/ionoscloud/models/nic_entities.rb +216 -0
  110. data/lib/ionoscloud/models/nic_properties.rb +284 -0
  111. data/lib/ionoscloud/models/nics.rb +278 -0
  112. data/lib/ionoscloud/models/no_state_meta_data.rb +277 -0
  113. data/lib/ionoscloud/models/pagination_links.rb +237 -0
  114. data/lib/ionoscloud/models/peer.rb +252 -0
  115. data/lib/ionoscloud/models/private_cross_connect.rb +260 -0
  116. data/lib/ionoscloud/models/private_cross_connect_properties.rb +251 -0
  117. data/lib/ionoscloud/models/private_cross_connects.rb +249 -0
  118. data/lib/ionoscloud/models/request.rb +260 -0
  119. data/lib/ionoscloud/models/request_metadata.rb +246 -0
  120. data/lib/ionoscloud/models/request_properties.rb +245 -0
  121. data/lib/ionoscloud/models/request_status.rb +246 -0
  122. data/lib/ionoscloud/models/request_status_metadata.rb +280 -0
  123. data/lib/ionoscloud/models/request_target.rb +259 -0
  124. data/lib/ionoscloud/models/requests.rb +293 -0
  125. data/lib/ionoscloud/models/resource.rb +265 -0
  126. data/lib/ionoscloud/models/resource_entities.rb +216 -0
  127. data/lib/ionoscloud/models/resource_groups.rb +250 -0
  128. data/lib/ionoscloud/models/resource_limits.rb +462 -0
  129. data/lib/ionoscloud/models/resource_properties.rb +227 -0
  130. data/lib/ionoscloud/models/resource_reference.rb +242 -0
  131. data/lib/ionoscloud/models/resources.rb +250 -0
  132. data/lib/ionoscloud/models/resources_users.rb +250 -0
  133. data/lib/ionoscloud/models/s3_key.rb +260 -0
  134. data/lib/ionoscloud/models/s3_key_metadata.rb +227 -0
  135. data/lib/ionoscloud/models/s3_key_properties.rb +227 -0
  136. data/lib/ionoscloud/models/s3_keys.rb +249 -0
  137. data/lib/ionoscloud/models/s3_object_storage_sso.rb +217 -0
  138. data/lib/ionoscloud/models/server.rb +269 -0
  139. data/lib/ionoscloud/models/server_entities.rb +234 -0
  140. data/lib/ionoscloud/models/server_properties.rb +341 -0
  141. data/lib/ionoscloud/models/servers.rb +278 -0
  142. data/lib/ionoscloud/models/snapshot.rb +260 -0
  143. data/lib/ionoscloud/models/snapshot_properties.rb +401 -0
  144. data/lib/ionoscloud/models/snapshots.rb +249 -0
  145. data/lib/ionoscloud/models/type.rb +59 -0
  146. data/lib/ionoscloud/models/user.rb +269 -0
  147. data/lib/ionoscloud/models/user_metadata.rb +237 -0
  148. data/lib/ionoscloud/models/user_properties.rb +297 -0
  149. data/lib/ionoscloud/models/users.rb +249 -0
  150. data/lib/ionoscloud/models/users_entities.rb +225 -0
  151. data/lib/ionoscloud/models/volume.rb +260 -0
  152. data/lib/ionoscloud/models/volume_properties.rb +463 -0
  153. data/lib/ionoscloud/models/volumes.rb +278 -0
  154. data/lib/ionoscloud/version.rb +15 -0
  155. data/spec/api/_api_spec.rb +49 -0
  156. data/spec/api/backup_unit_api_spec.rb +140 -0
  157. data/spec/api/contract_api_spec.rb +49 -0
  158. data/spec/api/data_center_api_spec.rb +128 -0
  159. data/spec/api/image_api_spec.rb +111 -0
  160. data/spec/api/ip_blocks_api_spec.rb +126 -0
  161. data/spec/api/kubernetes_api_spec.rb +306 -0
  162. data/spec/api/label_api_spec.rb +480 -0
  163. data/spec/api/lan_api_spec.rb +186 -0
  164. data/spec/api/load_balancer_api_spec.rb +203 -0
  165. data/spec/api/location_api_spec.rb +80 -0
  166. data/spec/api/nic_api_spec.rb +251 -0
  167. data/spec/api/private_cross_connect_api_spec.rb +110 -0
  168. data/spec/api/request_api_spec.rb +84 -0
  169. data/spec/api/server_api_spec.rb +337 -0
  170. data/spec/api/snapshot_api_spec.rb +111 -0
  171. data/spec/api/user_management_api_spec.rb +495 -0
  172. data/spec/api/volume_api_spec.rb +171 -0
  173. data/spec/api_client_spec.rb +226 -0
  174. data/spec/configuration_spec.rb +42 -0
  175. data/spec/models/attached_volumes_spec.rb +70 -0
  176. data/spec/models/backup_unit_properties_spec.rb +46 -0
  177. data/spec/models/backup_unit_spec.rb +62 -0
  178. data/spec/models/backup_unit_sso_spec.rb +34 -0
  179. data/spec/models/backup_units_spec.rb +56 -0
  180. data/spec/models/balanced_nics_spec.rb +70 -0
  181. data/spec/models/cdroms_spec.rb +70 -0
  182. data/spec/models/connectable_datacenter_spec.rb +46 -0
  183. data/spec/models/contract_properties_spec.rb +58 -0
  184. data/spec/models/contract_spec.rb +40 -0
  185. data/spec/models/data_center_entities_spec.rb +52 -0
  186. data/spec/models/datacenter_element_metadata_spec.rb +80 -0
  187. data/spec/models/datacenter_properties_spec.rb +68 -0
  188. data/spec/models/datacenter_spec.rb +64 -0
  189. data/spec/models/datacenters_spec.rb +70 -0
  190. data/spec/models/error_message_spec.rb +40 -0
  191. data/spec/models/error_spec.rb +40 -0
  192. data/spec/models/firewall_rule_spec.rb +58 -0
  193. data/spec/models/firewall_rules_spec.rb +70 -0
  194. data/spec/models/firewallrule_properties_spec.rb +98 -0
  195. data/spec/models/group_entities_spec.rb +40 -0
  196. data/spec/models/group_members_spec.rb +52 -0
  197. data/spec/models/group_properties_spec.rb +88 -0
  198. data/spec/models/group_share_properties_spec.rb +40 -0
  199. data/spec/models/group_share_spec.rb +52 -0
  200. data/spec/models/group_shares_spec.rb +52 -0
  201. data/spec/models/group_spec.rb +58 -0
  202. data/spec/models/group_users_spec.rb +52 -0
  203. data/spec/models/groups_spec.rb +52 -0
  204. data/spec/models/image_properties_spec.rb +138 -0
  205. data/spec/models/image_spec.rb +58 -0
  206. data/spec/models/images_spec.rb +52 -0
  207. data/spec/models/info_spec.rb +46 -0
  208. data/spec/models/ip_block_properties_spec.rb +58 -0
  209. data/spec/models/ip_block_spec.rb +58 -0
  210. data/spec/models/ip_blocks_spec.rb +52 -0
  211. data/spec/models/ip_consumer_spec.rb +70 -0
  212. data/spec/models/ip_failover_spec.rb +40 -0
  213. data/spec/models/kubernetes_auto_scaling_spec.rb +40 -0
  214. data/spec/models/kubernetes_cluster_entities_spec.rb +34 -0
  215. data/spec/models/kubernetes_cluster_properties_for_post_and_put_spec.rb +46 -0
  216. data/spec/models/kubernetes_cluster_properties_spec.rb +58 -0
  217. data/spec/models/kubernetes_cluster_spec.rb +68 -0
  218. data/spec/models/kubernetes_clusters_spec.rb +56 -0
  219. data/spec/models/kubernetes_config_properties_spec.rb +34 -0
  220. data/spec/models/kubernetes_config_spec.rb +56 -0
  221. data/spec/models/kubernetes_maintenance_window_spec.rb +44 -0
  222. data/spec/models/kubernetes_node_metadata_spec.rb +62 -0
  223. data/spec/models/kubernetes_node_pool_for_put_spec.rb +62 -0
  224. data/spec/models/kubernetes_node_pool_lan_spec.rb +34 -0
  225. data/spec/models/kubernetes_node_pool_properties_for_post_spec.rb +132 -0
  226. data/spec/models/kubernetes_node_pool_properties_for_put_spec.rb +132 -0
  227. data/spec/models/kubernetes_node_pool_properties_spec.rb +138 -0
  228. data/spec/models/kubernetes_node_pool_spec.rb +62 -0
  229. data/spec/models/kubernetes_node_pools_spec.rb +56 -0
  230. data/spec/models/kubernetes_node_properties_spec.rb +46 -0
  231. data/spec/models/kubernetes_node_spec.rb +62 -0
  232. data/spec/models/kubernetes_nodes_spec.rb +56 -0
  233. data/spec/models/label_properties_spec.rb +58 -0
  234. data/spec/models/label_resource_properties_spec.rb +40 -0
  235. data/spec/models/label_resource_spec.rb +62 -0
  236. data/spec/models/label_resources_spec.rb +74 -0
  237. data/spec/models/label_spec.rb +62 -0
  238. data/spec/models/labels_spec.rb +56 -0
  239. data/spec/models/lan_entities_spec.rb +34 -0
  240. data/spec/models/lan_nics_spec.rb +70 -0
  241. data/spec/models/lan_post_spec.rb +64 -0
  242. data/spec/models/lan_properties_post_spec.rb +52 -0
  243. data/spec/models/lan_properties_spec.rb +52 -0
  244. data/spec/models/lan_spec.rb +64 -0
  245. data/spec/models/lans_spec.rb +70 -0
  246. data/spec/models/loadbalancer_entities_spec.rb +34 -0
  247. data/spec/models/loadbalancer_properties_spec.rb +50 -0
  248. data/spec/models/loadbalancer_spec.rb +64 -0
  249. data/spec/models/loadbalancers_spec.rb +70 -0
  250. data/spec/models/location_properties_spec.rb +50 -0
  251. data/spec/models/location_spec.rb +58 -0
  252. data/spec/models/locations_spec.rb +52 -0
  253. data/spec/models/nic_entities_spec.rb +34 -0
  254. data/spec/models/nic_properties_spec.rb +70 -0
  255. data/spec/models/nic_spec.rb +64 -0
  256. data/spec/models/nics_spec.rb +70 -0
  257. data/spec/models/no_state_meta_data_spec.rb +70 -0
  258. data/spec/models/pagination_links_spec.rb +46 -0
  259. data/spec/models/peer_spec.rb +58 -0
  260. data/spec/models/private_cross_connect_properties_spec.rb +52 -0
  261. data/spec/models/private_cross_connect_spec.rb +58 -0
  262. data/spec/models/private_cross_connects_spec.rb +52 -0
  263. data/spec/models/request_metadata_spec.rb +52 -0
  264. data/spec/models/request_properties_spec.rb +52 -0
  265. data/spec/models/request_spec.rb +58 -0
  266. data/spec/models/request_status_metadata_spec.rb +56 -0
  267. data/spec/models/request_status_spec.rb +52 -0
  268. data/spec/models/request_target_spec.rb +44 -0
  269. data/spec/models/requests_spec.rb +70 -0
  270. data/spec/models/resource_entities_spec.rb +34 -0
  271. data/spec/models/resource_groups_spec.rb +52 -0
  272. data/spec/models/resource_limits_spec.rb +130 -0
  273. data/spec/models/resource_properties_spec.rb +40 -0
  274. data/spec/models/resource_reference_spec.rb +46 -0
  275. data/spec/models/resource_spec.rb +64 -0
  276. data/spec/models/resources_spec.rb +52 -0
  277. data/spec/models/resources_users_spec.rb +52 -0
  278. data/spec/models/s3_key_metadata_spec.rb +40 -0
  279. data/spec/models/s3_key_properties_spec.rb +40 -0
  280. data/spec/models/s3_key_spec.rb +58 -0
  281. data/spec/models/s3_keys_spec.rb +52 -0
  282. data/spec/models/s3_object_storage_sso_spec.rb +34 -0
  283. data/spec/models/server_entities_spec.rb +46 -0
  284. data/spec/models/server_properties_spec.rb +84 -0
  285. data/spec/models/server_spec.rb +64 -0
  286. data/spec/models/servers_spec.rb +70 -0
  287. data/spec/models/snapshot_properties_spec.rb +128 -0
  288. data/spec/models/snapshot_spec.rb +58 -0
  289. data/spec/models/snapshots_spec.rb +52 -0
  290. data/spec/models/type_spec.rb +28 -0
  291. data/spec/models/user_metadata_spec.rb +46 -0
  292. data/spec/models/user_properties_spec.rb +82 -0
  293. data/spec/models/user_spec.rb +64 -0
  294. data/spec/models/users_entities_spec.rb +40 -0
  295. data/spec/models/users_spec.rb +52 -0
  296. data/spec/models/volume_properties_spec.rb +152 -0
  297. data/spec/models/volume_spec.rb +58 -0
  298. data/spec/models/volumes_spec.rb +70 -0
  299. data/spec/spec_helper.rb +111 -0
  300. metadata +532 -0
@@ -0,0 +1,1479 @@
1
+ =begin
2
+ #CLOUD API
3
+
4
+ #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.
5
+
6
+ The version of the OpenAPI document: 5.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Ionoscloud
16
+ class KubernetesApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Delete Kubernetes Cluster
23
+ # This will remove a Kubernetes Cluster.
24
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
27
+ # @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)
28
+ # @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
29
+ # @return [Object]
30
+ def k8s_delete(k8s_cluster_id, opts = {})
31
+ data, _status_code, _headers = k8s_delete_with_http_info(k8s_cluster_id, opts)
32
+ data
33
+ end
34
+
35
+ # Delete Kubernetes Cluster
36
+ # This will remove a Kubernetes Cluster.
37
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
40
+ # @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
41
+ # @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
42
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
43
+ def k8s_delete_with_http_info(k8s_cluster_id, opts = {})
44
+ if @api_client.config.debugging
45
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_delete ...'
46
+ end
47
+ # verify the required parameter 'k8s_cluster_id' is set
48
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
49
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_delete"
50
+ end
51
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
52
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_delete, must be smaller than or equal to 10.'
53
+ end
54
+
55
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
56
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_delete, must be greater than or equal to 0.'
57
+ end
58
+
59
+ # resource path
60
+ local_var_path = '/k8s/{k8sClusterId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s))
61
+
62
+ # query parameters
63
+ query_params = opts[:query_params] || {}
64
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
65
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
66
+
67
+ # header parameters
68
+ header_params = opts[:header_params] || {}
69
+ # HTTP header 'Accept' (if needed)
70
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
71
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
72
+
73
+ # form parameters
74
+ form_params = opts[:form_params] || {}
75
+
76
+ # http body (model)
77
+ post_body = opts[:debug_body]
78
+
79
+ # return_type
80
+ return_type = opts[:debug_return_type] || 'Object'
81
+
82
+ # auth_names
83
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
84
+
85
+ new_options = opts.merge(
86
+ :operation => :"KubernetesApi.k8s_delete",
87
+ :header_params => header_params,
88
+ :query_params => query_params,
89
+ :form_params => form_params,
90
+ :body => post_body,
91
+ :auth_names => auth_names,
92
+ :return_type => return_type
93
+ )
94
+
95
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
96
+ if @api_client.config.debugging
97
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
98
+ end
99
+ return data, status_code, headers
100
+ end
101
+
102
+ # Retrieve Kubernetes Cluster
103
+ # This will retrieve a single Kubernetes Cluster.
104
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
105
+ # @param [Hash] opts the optional parameters
106
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
107
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
108
+ # @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
109
+ # @return [KubernetesCluster]
110
+ def k8s_find_by_cluster_id(k8s_cluster_id, opts = {})
111
+ data, _status_code, _headers = k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts)
112
+ data
113
+ end
114
+
115
+ # Retrieve Kubernetes Cluster
116
+ # This will retrieve a single Kubernetes Cluster.
117
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
118
+ # @param [Hash] opts the optional parameters
119
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
120
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
121
+ # @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
122
+ # @return [Array<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers
123
+ def k8s_find_by_cluster_id_with_http_info(k8s_cluster_id, opts = {})
124
+ if @api_client.config.debugging
125
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_find_by_cluster_id ...'
126
+ end
127
+ # verify the required parameter 'k8s_cluster_id' is set
128
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
129
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_find_by_cluster_id"
130
+ end
131
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
132
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_find_by_cluster_id, must be smaller than or equal to 10.'
133
+ end
134
+
135
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
136
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_find_by_cluster_id, must be greater than or equal to 0.'
137
+ end
138
+
139
+ # resource path
140
+ local_var_path = '/k8s/{k8sClusterId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s))
141
+
142
+ # query parameters
143
+ query_params = opts[:query_params] || {}
144
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
145
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
146
+
147
+ # header parameters
148
+ header_params = opts[:header_params] || {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
152
+
153
+ # form parameters
154
+ form_params = opts[:form_params] || {}
155
+
156
+ # http body (model)
157
+ post_body = opts[:debug_body]
158
+
159
+ # return_type
160
+ return_type = opts[:debug_return_type] || 'KubernetesCluster'
161
+
162
+ # auth_names
163
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
164
+
165
+ new_options = opts.merge(
166
+ :operation => :"KubernetesApi.k8s_find_by_cluster_id",
167
+ :header_params => header_params,
168
+ :query_params => query_params,
169
+ :form_params => form_params,
170
+ :body => post_body,
171
+ :auth_names => auth_names,
172
+ :return_type => return_type
173
+ )
174
+
175
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
176
+ if @api_client.config.debugging
177
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_find_by_cluster_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
178
+ end
179
+ return data, status_code, headers
180
+ end
181
+
182
+ # List Kubernetes Clusters
183
+ # You can retrieve a list of all kubernetes clusters associated with a contract
184
+ # @param [Hash] opts the optional parameters
185
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
186
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
187
+ # @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
188
+ # @return [KubernetesClusters]
189
+ def k8s_get(opts = {})
190
+ data, _status_code, _headers = k8s_get_with_http_info(opts)
191
+ data
192
+ end
193
+
194
+ # List Kubernetes Clusters
195
+ # You can retrieve a list of all kubernetes clusters associated with a contract
196
+ # @param [Hash] opts the optional parameters
197
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
198
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
199
+ # @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
200
+ # @return [Array<(KubernetesClusters, Integer, Hash)>] KubernetesClusters data, response status code and response headers
201
+ def k8s_get_with_http_info(opts = {})
202
+ if @api_client.config.debugging
203
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_get ...'
204
+ end
205
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
206
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_get, must be smaller than or equal to 10.'
207
+ end
208
+
209
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
210
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_get, must be greater than or equal to 0.'
211
+ end
212
+
213
+ # resource path
214
+ local_var_path = '/k8s'
215
+
216
+ # query parameters
217
+ query_params = opts[:query_params] || {}
218
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
219
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
220
+
221
+ # header parameters
222
+ header_params = opts[:header_params] || {}
223
+ # HTTP header 'Accept' (if needed)
224
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
225
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
226
+
227
+ # form parameters
228
+ form_params = opts[:form_params] || {}
229
+
230
+ # http body (model)
231
+ post_body = opts[:debug_body]
232
+
233
+ # return_type
234
+ return_type = opts[:debug_return_type] || 'KubernetesClusters'
235
+
236
+ # auth_names
237
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
238
+
239
+ new_options = opts.merge(
240
+ :operation => :"KubernetesApi.k8s_get",
241
+ :header_params => header_params,
242
+ :query_params => query_params,
243
+ :form_params => form_params,
244
+ :body => post_body,
245
+ :auth_names => auth_names,
246
+ :return_type => return_type
247
+ )
248
+
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
252
+ end
253
+ return data, status_code, headers
254
+ end
255
+
256
+ # Retrieve Kubernetes Configuration File
257
+ # You can retrieve kubernetes configuration file for the kubernetes cluster.
258
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
259
+ # @param [Hash] opts the optional parameters
260
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
261
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
262
+ # @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
263
+ # @return [KubernetesConfig]
264
+ def k8s_kubeconfig_get(k8s_cluster_id, opts = {})
265
+ data, _status_code, _headers = k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts)
266
+ data
267
+ end
268
+
269
+ # Retrieve Kubernetes Configuration File
270
+ # You can retrieve kubernetes configuration file for the kubernetes cluster.
271
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
272
+ # @param [Hash] opts the optional parameters
273
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
274
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
275
+ # @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
276
+ # @return [Array<(KubernetesConfig, Integer, Hash)>] KubernetesConfig data, response status code and response headers
277
+ def k8s_kubeconfig_get_with_http_info(k8s_cluster_id, opts = {})
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_kubeconfig_get ...'
280
+ end
281
+ # verify the required parameter 'k8s_cluster_id' is set
282
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
283
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_kubeconfig_get"
284
+ end
285
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
286
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_kubeconfig_get, must be smaller than or equal to 10.'
287
+ end
288
+
289
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
290
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_kubeconfig_get, must be greater than or equal to 0.'
291
+ end
292
+
293
+ # resource path
294
+ local_var_path = '/k8s/{k8sClusterId}/kubeconfig'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s))
295
+
296
+ # query parameters
297
+ query_params = opts[:query_params] || {}
298
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
299
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
300
+
301
+ # header parameters
302
+ header_params = opts[:header_params] || {}
303
+ # HTTP header 'Accept' (if needed)
304
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
305
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
306
+
307
+ # form parameters
308
+ form_params = opts[:form_params] || {}
309
+
310
+ # http body (model)
311
+ post_body = opts[:debug_body]
312
+
313
+ # return_type
314
+ return_type = opts[:debug_return_type] || 'KubernetesConfig'
315
+
316
+ # auth_names
317
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
318
+
319
+ new_options = opts.merge(
320
+ :operation => :"KubernetesApi.k8s_kubeconfig_get",
321
+ :header_params => header_params,
322
+ :query_params => query_params,
323
+ :form_params => form_params,
324
+ :body => post_body,
325
+ :auth_names => auth_names,
326
+ :return_type => return_type
327
+ )
328
+
329
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
330
+ if @api_client.config.debugging
331
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_kubeconfig_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
332
+ end
333
+ return data, status_code, headers
334
+ end
335
+
336
+ # Delete Kubernetes Node Pool
337
+ # This will remove a Kubernetes Node Pool.
338
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
339
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
340
+ # @param [Hash] opts the optional parameters
341
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
342
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
343
+ # @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
344
+ # @return [Object]
345
+ def k8s_nodepools_delete(k8s_cluster_id, nodepool_id, opts = {})
346
+ data, _status_code, _headers = k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, opts)
347
+ data
348
+ end
349
+
350
+ # Delete Kubernetes Node Pool
351
+ # This will remove a Kubernetes Node Pool.
352
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
353
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
354
+ # @param [Hash] opts the optional parameters
355
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
356
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
357
+ # @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
358
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
359
+ def k8s_nodepools_delete_with_http_info(k8s_cluster_id, nodepool_id, opts = {})
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_delete ...'
362
+ end
363
+ # verify the required parameter 'k8s_cluster_id' is set
364
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
365
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_delete"
366
+ end
367
+ # verify the required parameter 'nodepool_id' is set
368
+ if @api_client.config.client_side_validation && nodepool_id.nil?
369
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_delete"
370
+ end
371
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
372
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_delete, must be smaller than or equal to 10.'
373
+ end
374
+
375
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
376
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_delete, must be greater than or equal to 0.'
377
+ end
378
+
379
+ # resource path
380
+ local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_id.to_s))
381
+
382
+ # query parameters
383
+ query_params = opts[:query_params] || {}
384
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
385
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
386
+
387
+ # header parameters
388
+ header_params = opts[:header_params] || {}
389
+ # HTTP header 'Accept' (if needed)
390
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
391
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
392
+
393
+ # form parameters
394
+ form_params = opts[:form_params] || {}
395
+
396
+ # http body (model)
397
+ post_body = opts[:debug_body]
398
+
399
+ # return_type
400
+ return_type = opts[:debug_return_type] || 'Object'
401
+
402
+ # auth_names
403
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
404
+
405
+ new_options = opts.merge(
406
+ :operation => :"KubernetesApi.k8s_nodepools_delete",
407
+ :header_params => header_params,
408
+ :query_params => query_params,
409
+ :form_params => form_params,
410
+ :body => post_body,
411
+ :auth_names => auth_names,
412
+ :return_type => return_type
413
+ )
414
+
415
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
416
+ if @api_client.config.debugging
417
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
418
+ end
419
+ return data, status_code, headers
420
+ end
421
+
422
+ # Retrieve Kubernetes Node Pool
423
+ # You can retrieve a single Kubernetes Node Pool.
424
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
425
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
426
+ # @param [Hash] opts the optional parameters
427
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
428
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
429
+ # @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
430
+ # @return [KubernetesNodePool]
431
+ def k8s_nodepools_find_by_id(k8s_cluster_id, nodepool_id, opts = {})
432
+ data, _status_code, _headers = k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, opts)
433
+ data
434
+ end
435
+
436
+ # Retrieve Kubernetes Node Pool
437
+ # You can retrieve a single Kubernetes Node Pool.
438
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
439
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
440
+ # @param [Hash] opts the optional parameters
441
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
442
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
443
+ # @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
444
+ # @return [Array<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers
445
+ def k8s_nodepools_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, opts = {})
446
+ if @api_client.config.debugging
447
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_find_by_id ...'
448
+ end
449
+ # verify the required parameter 'k8s_cluster_id' is set
450
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
451
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_find_by_id"
452
+ end
453
+ # verify the required parameter 'nodepool_id' is set
454
+ if @api_client.config.client_side_validation && nodepool_id.nil?
455
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_find_by_id"
456
+ end
457
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
458
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_find_by_id, must be smaller than or equal to 10.'
459
+ end
460
+
461
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
462
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_find_by_id, must be greater than or equal to 0.'
463
+ end
464
+
465
+ # resource path
466
+ local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_id.to_s))
467
+
468
+ # query parameters
469
+ query_params = opts[:query_params] || {}
470
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
471
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
472
+
473
+ # header parameters
474
+ header_params = opts[:header_params] || {}
475
+ # HTTP header 'Accept' (if needed)
476
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
477
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
478
+
479
+ # form parameters
480
+ form_params = opts[:form_params] || {}
481
+
482
+ # http body (model)
483
+ post_body = opts[:debug_body]
484
+
485
+ # return_type
486
+ return_type = opts[:debug_return_type] || 'KubernetesNodePool'
487
+
488
+ # auth_names
489
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
490
+
491
+ new_options = opts.merge(
492
+ :operation => :"KubernetesApi.k8s_nodepools_find_by_id",
493
+ :header_params => header_params,
494
+ :query_params => query_params,
495
+ :form_params => form_params,
496
+ :body => post_body,
497
+ :auth_names => auth_names,
498
+ :return_type => return_type
499
+ )
500
+
501
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
502
+ if @api_client.config.debugging
503
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
504
+ end
505
+ return data, status_code, headers
506
+ end
507
+
508
+ # List Kubernetes Node Pools
509
+ # You can retrieve a list of all kubernetes node pools part of kubernetes cluster
510
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
511
+ # @param [Hash] opts the optional parameters
512
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
513
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
514
+ # @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
515
+ # @return [KubernetesNodePools]
516
+ def k8s_nodepools_get(k8s_cluster_id, opts = {})
517
+ data, _status_code, _headers = k8s_nodepools_get_with_http_info(k8s_cluster_id, opts)
518
+ data
519
+ end
520
+
521
+ # List Kubernetes Node Pools
522
+ # You can retrieve a list of all kubernetes node pools part of kubernetes cluster
523
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
524
+ # @param [Hash] opts the optional parameters
525
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
526
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
527
+ # @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
528
+ # @return [Array<(KubernetesNodePools, Integer, Hash)>] KubernetesNodePools data, response status code and response headers
529
+ def k8s_nodepools_get_with_http_info(k8s_cluster_id, opts = {})
530
+ if @api_client.config.debugging
531
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_get ...'
532
+ end
533
+ # verify the required parameter 'k8s_cluster_id' is set
534
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
535
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_get"
536
+ end
537
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
538
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_get, must be smaller than or equal to 10.'
539
+ end
540
+
541
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
542
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_get, must be greater than or equal to 0.'
543
+ end
544
+
545
+ # resource path
546
+ local_var_path = '/k8s/{k8sClusterId}/nodepools'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s))
547
+
548
+ # query parameters
549
+ query_params = opts[:query_params] || {}
550
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
551
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
552
+
553
+ # header parameters
554
+ header_params = opts[:header_params] || {}
555
+ # HTTP header 'Accept' (if needed)
556
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
557
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
558
+
559
+ # form parameters
560
+ form_params = opts[:form_params] || {}
561
+
562
+ # http body (model)
563
+ post_body = opts[:debug_body]
564
+
565
+ # return_type
566
+ return_type = opts[:debug_return_type] || 'KubernetesNodePools'
567
+
568
+ # auth_names
569
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
570
+
571
+ new_options = opts.merge(
572
+ :operation => :"KubernetesApi.k8s_nodepools_get",
573
+ :header_params => header_params,
574
+ :query_params => query_params,
575
+ :form_params => form_params,
576
+ :body => post_body,
577
+ :auth_names => auth_names,
578
+ :return_type => return_type
579
+ )
580
+
581
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
582
+ if @api_client.config.debugging
583
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
584
+ end
585
+ return data, status_code, headers
586
+ end
587
+
588
+ # Delete Kubernetes node
589
+ # This will remove a Kubernetes node.
590
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
591
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
592
+ # @param node_id [String] The unique ID of the Kubernetes node
593
+ # @param [Hash] opts the optional parameters
594
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
595
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
596
+ # @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
597
+ # @return [Object]
598
+ def k8s_nodepools_nodes_delete(k8s_cluster_id, nodepool_id, node_id, opts = {})
599
+ data, _status_code, _headers = k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts)
600
+ data
601
+ end
602
+
603
+ # Delete Kubernetes node
604
+ # This will remove a Kubernetes node.
605
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
606
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
607
+ # @param node_id [String] The unique ID of the Kubernetes node
608
+ # @param [Hash] opts the optional parameters
609
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
610
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
611
+ # @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
612
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
613
+ def k8s_nodepools_nodes_delete_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {})
614
+ if @api_client.config.debugging
615
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_delete ...'
616
+ end
617
+ # verify the required parameter 'k8s_cluster_id' is set
618
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
619
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_delete"
620
+ end
621
+ # verify the required parameter 'nodepool_id' is set
622
+ if @api_client.config.client_side_validation && nodepool_id.nil?
623
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_delete"
624
+ end
625
+ # verify the required parameter 'node_id' is set
626
+ if @api_client.config.client_side_validation && node_id.nil?
627
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling KubernetesApi.k8s_nodepools_nodes_delete"
628
+ end
629
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
630
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_delete, must be smaller than or equal to 10.'
631
+ end
632
+
633
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
634
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_delete, must be greater than or equal to 0.'
635
+ end
636
+
637
+ # resource path
638
+ 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))
639
+
640
+ # query parameters
641
+ query_params = opts[:query_params] || {}
642
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
643
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
644
+
645
+ # header parameters
646
+ header_params = opts[:header_params] || {}
647
+ # HTTP header 'Accept' (if needed)
648
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
649
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
650
+
651
+ # form parameters
652
+ form_params = opts[:form_params] || {}
653
+
654
+ # http body (model)
655
+ post_body = opts[:debug_body]
656
+
657
+ # return_type
658
+ return_type = opts[:debug_return_type] || 'Object'
659
+
660
+ # auth_names
661
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
662
+
663
+ new_options = opts.merge(
664
+ :operation => :"KubernetesApi.k8s_nodepools_nodes_delete",
665
+ :header_params => header_params,
666
+ :query_params => query_params,
667
+ :form_params => form_params,
668
+ :body => post_body,
669
+ :auth_names => auth_names,
670
+ :return_type => return_type
671
+ )
672
+
673
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
674
+ if @api_client.config.debugging
675
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_nodes_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
676
+ end
677
+ return data, status_code, headers
678
+ end
679
+
680
+ # Retrieve Kubernetes node
681
+ # You can retrieve a single Kubernetes Node.
682
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
683
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
684
+ # @param node_id [String] The unique ID of the Kubernetes Node.
685
+ # @param [Hash] opts the optional parameters
686
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
687
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
688
+ # @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
689
+ # @return [KubernetesNode]
690
+ def k8s_nodepools_nodes_find_by_id(k8s_cluster_id, nodepool_id, node_id, opts = {})
691
+ data, _status_code, _headers = k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts)
692
+ data
693
+ end
694
+
695
+ # Retrieve Kubernetes node
696
+ # You can retrieve a single Kubernetes Node.
697
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
698
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
699
+ # @param node_id [String] The unique ID of the Kubernetes Node.
700
+ # @param [Hash] opts the optional parameters
701
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
702
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
703
+ # @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
704
+ # @return [Array<(KubernetesNode, Integer, Hash)>] KubernetesNode data, response status code and response headers
705
+ def k8s_nodepools_nodes_find_by_id_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {})
706
+ if @api_client.config.debugging
707
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_find_by_id ...'
708
+ end
709
+ # verify the required parameter 'k8s_cluster_id' is set
710
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
711
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_find_by_id"
712
+ end
713
+ # verify the required parameter 'nodepool_id' is set
714
+ if @api_client.config.client_side_validation && nodepool_id.nil?
715
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_find_by_id"
716
+ end
717
+ # verify the required parameter 'node_id' is set
718
+ if @api_client.config.client_side_validation && node_id.nil?
719
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling KubernetesApi.k8s_nodepools_nodes_find_by_id"
720
+ end
721
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
722
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_find_by_id, must be smaller than or equal to 10.'
723
+ end
724
+
725
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
726
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_find_by_id, must be greater than or equal to 0.'
727
+ end
728
+
729
+ # resource path
730
+ 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))
731
+
732
+ # query parameters
733
+ query_params = opts[:query_params] || {}
734
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
735
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
736
+
737
+ # header parameters
738
+ header_params = opts[:header_params] || {}
739
+ # HTTP header 'Accept' (if needed)
740
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
741
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
742
+
743
+ # form parameters
744
+ form_params = opts[:form_params] || {}
745
+
746
+ # http body (model)
747
+ post_body = opts[:debug_body]
748
+
749
+ # return_type
750
+ return_type = opts[:debug_return_type] || 'KubernetesNode'
751
+
752
+ # auth_names
753
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
754
+
755
+ new_options = opts.merge(
756
+ :operation => :"KubernetesApi.k8s_nodepools_nodes_find_by_id",
757
+ :header_params => header_params,
758
+ :query_params => query_params,
759
+ :form_params => form_params,
760
+ :body => post_body,
761
+ :auth_names => auth_names,
762
+ :return_type => return_type
763
+ )
764
+
765
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
766
+ if @api_client.config.debugging
767
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_nodes_find_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
768
+ end
769
+ return data, status_code, headers
770
+ end
771
+
772
+ # Retrieve Kubernetes nodes.
773
+ # You can retrieve all nodes of Kubernetes Node Pool.
774
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
775
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
776
+ # @param [Hash] opts the optional parameters
777
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
778
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
779
+ # @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
780
+ # @return [KubernetesNodes]
781
+ def k8s_nodepools_nodes_get(k8s_cluster_id, nodepool_id, opts = {})
782
+ data, _status_code, _headers = k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, opts)
783
+ data
784
+ end
785
+
786
+ # Retrieve Kubernetes nodes.
787
+ # You can retrieve all nodes of Kubernetes Node Pool.
788
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
789
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
790
+ # @param [Hash] opts the optional parameters
791
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
792
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
793
+ # @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
794
+ # @return [Array<(KubernetesNodes, Integer, Hash)>] KubernetesNodes data, response status code and response headers
795
+ def k8s_nodepools_nodes_get_with_http_info(k8s_cluster_id, nodepool_id, opts = {})
796
+ if @api_client.config.debugging
797
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_get ...'
798
+ end
799
+ # verify the required parameter 'k8s_cluster_id' is set
800
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
801
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_get"
802
+ end
803
+ # verify the required parameter 'nodepool_id' is set
804
+ if @api_client.config.client_side_validation && nodepool_id.nil?
805
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_get"
806
+ end
807
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
808
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_get, must be smaller than or equal to 10.'
809
+ end
810
+
811
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
812
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_get, must be greater than or equal to 0.'
813
+ end
814
+
815
+ # resource path
816
+ 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))
817
+
818
+ # query parameters
819
+ query_params = opts[:query_params] || {}
820
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
821
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
822
+
823
+ # header parameters
824
+ header_params = opts[:header_params] || {}
825
+ # HTTP header 'Accept' (if needed)
826
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
827
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
828
+
829
+ # form parameters
830
+ form_params = opts[:form_params] || {}
831
+
832
+ # http body (model)
833
+ post_body = opts[:debug_body]
834
+
835
+ # return_type
836
+ return_type = opts[:debug_return_type] || 'KubernetesNodes'
837
+
838
+ # auth_names
839
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
840
+
841
+ new_options = opts.merge(
842
+ :operation => :"KubernetesApi.k8s_nodepools_nodes_get",
843
+ :header_params => header_params,
844
+ :query_params => query_params,
845
+ :form_params => form_params,
846
+ :body => post_body,
847
+ :auth_names => auth_names,
848
+ :return_type => return_type
849
+ )
850
+
851
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
852
+ if @api_client.config.debugging
853
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_nodes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
854
+ end
855
+ return data, status_code, headers
856
+ end
857
+
858
+ # Recreate the Kubernetes node
859
+ # 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.
860
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
861
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
862
+ # @param node_id [String] The unique ID of the Kubernetes Node.
863
+ # @param [Hash] opts the optional parameters
864
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
865
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
866
+ # @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
867
+ # @return [Object]
868
+ def k8s_nodepools_nodes_replace_post(k8s_cluster_id, nodepool_id, node_id, opts = {})
869
+ data, _status_code, _headers = k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts)
870
+ data
871
+ end
872
+
873
+ # Recreate the Kubernetes node
874
+ # 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 \&quot;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 \&quot;ACTIVE\&quot; node.
875
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
876
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
877
+ # @param node_id [String] The unique ID of the Kubernetes Node.
878
+ # @param [Hash] opts the optional parameters
879
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
880
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
881
+ # @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
882
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
883
+ def k8s_nodepools_nodes_replace_post_with_http_info(k8s_cluster_id, nodepool_id, node_id, opts = {})
884
+ if @api_client.config.debugging
885
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_nodes_replace_post ...'
886
+ end
887
+ # verify the required parameter 'k8s_cluster_id' is set
888
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
889
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_nodes_replace_post"
890
+ end
891
+ # verify the required parameter 'nodepool_id' is set
892
+ if @api_client.config.client_side_validation && nodepool_id.nil?
893
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_nodes_replace_post"
894
+ end
895
+ # verify the required parameter 'node_id' is set
896
+ if @api_client.config.client_side_validation && node_id.nil?
897
+ fail ArgumentError, "Missing the required parameter 'node_id' when calling KubernetesApi.k8s_nodepools_nodes_replace_post"
898
+ end
899
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
900
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_replace_post, must be smaller than or equal to 10.'
901
+ end
902
+
903
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
904
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_nodes_replace_post, must be greater than or equal to 0.'
905
+ end
906
+
907
+ # resource path
908
+ 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))
909
+
910
+ # query parameters
911
+ query_params = opts[:query_params] || {}
912
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
913
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
914
+
915
+ # header parameters
916
+ header_params = opts[:header_params] || {}
917
+ # HTTP header 'Accept' (if needed)
918
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
919
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
920
+
921
+ # form parameters
922
+ form_params = opts[:form_params] || {}
923
+
924
+ # http body (model)
925
+ post_body = opts[:debug_body]
926
+
927
+ # return_type
928
+ return_type = opts[:debug_return_type] || 'Object'
929
+
930
+ # auth_names
931
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
932
+
933
+ new_options = opts.merge(
934
+ :operation => :"KubernetesApi.k8s_nodepools_nodes_replace_post",
935
+ :header_params => header_params,
936
+ :query_params => query_params,
937
+ :form_params => form_params,
938
+ :body => post_body,
939
+ :auth_names => auth_names,
940
+ :return_type => return_type
941
+ )
942
+
943
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
944
+ if @api_client.config.debugging
945
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_nodes_replace_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
946
+ end
947
+ return data, status_code, headers
948
+ end
949
+
950
+ # Create a Kubernetes Node Pool
951
+ # This will create a new Kubernetes Node Pool inside a Kubernetes Cluster.
952
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
953
+ # @param kubernetes_node_pool [KubernetesNodePool] Details of Kubernetes Node Pool
954
+ # @param [Hash] opts the optional parameters
955
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
956
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
957
+ # @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
958
+ # @return [KubernetesNodePool]
959
+ def k8s_nodepools_post(k8s_cluster_id, kubernetes_node_pool, opts = {})
960
+ data, _status_code, _headers = k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, opts)
961
+ data
962
+ end
963
+
964
+ # Create a Kubernetes Node Pool
965
+ # This will create a new Kubernetes Node Pool inside a Kubernetes Cluster.
966
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
967
+ # @param kubernetes_node_pool [KubernetesNodePool] Details of Kubernetes Node Pool
968
+ # @param [Hash] opts the optional parameters
969
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
970
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
971
+ # @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
972
+ # @return [Array<(KubernetesNodePool, Integer, Hash)>] KubernetesNodePool data, response status code and response headers
973
+ def k8s_nodepools_post_with_http_info(k8s_cluster_id, kubernetes_node_pool, opts = {})
974
+ if @api_client.config.debugging
975
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_post ...'
976
+ end
977
+ # verify the required parameter 'k8s_cluster_id' is set
978
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
979
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_post"
980
+ end
981
+ # verify the required parameter 'kubernetes_node_pool' is set
982
+ if @api_client.config.client_side_validation && kubernetes_node_pool.nil?
983
+ fail ArgumentError, "Missing the required parameter 'kubernetes_node_pool' when calling KubernetesApi.k8s_nodepools_post"
984
+ end
985
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
986
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_post, must be smaller than or equal to 10.'
987
+ end
988
+
989
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
990
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_post, must be greater than or equal to 0.'
991
+ end
992
+
993
+ # resource path
994
+ local_var_path = '/k8s/{k8sClusterId}/nodepools'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s))
995
+
996
+ # query parameters
997
+ query_params = opts[:query_params] || {}
998
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
999
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1000
+
1001
+ # header parameters
1002
+ header_params = opts[:header_params] || {}
1003
+ # HTTP header 'Accept' (if needed)
1004
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1005
+ # HTTP header 'Content-Type'
1006
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1007
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1008
+
1009
+ # form parameters
1010
+ form_params = opts[:form_params] || {}
1011
+
1012
+ # http body (model)
1013
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(kubernetes_node_pool)
1014
+
1015
+ # return_type
1016
+ return_type = opts[:debug_return_type] || 'KubernetesNodePool'
1017
+
1018
+ # auth_names
1019
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1020
+
1021
+ new_options = opts.merge(
1022
+ :operation => :"KubernetesApi.k8s_nodepools_post",
1023
+ :header_params => header_params,
1024
+ :query_params => query_params,
1025
+ :form_params => form_params,
1026
+ :body => post_body,
1027
+ :auth_names => auth_names,
1028
+ :return_type => return_type
1029
+ )
1030
+
1031
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1032
+ if @api_client.config.debugging
1033
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1034
+ end
1035
+ return data, status_code, headers
1036
+ end
1037
+
1038
+ # Modify Kubernetes Node Pool
1039
+ # This will modify the Kubernetes Node Pool.
1040
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
1041
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
1042
+ # @param kubernetes_node_pool [KubernetesNodePool] Details of the Kubernetes Node Pool
1043
+ # @param [Hash] opts the optional parameters
1044
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1045
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
1046
+ # @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
1047
+ # @return [KubernetesNodePoolForPut]
1048
+ def k8s_nodepools_put(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {})
1049
+ data, _status_code, _headers = k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts)
1050
+ data
1051
+ end
1052
+
1053
+ # Modify Kubernetes Node Pool
1054
+ # This will modify the Kubernetes Node Pool.
1055
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
1056
+ # @param nodepool_id [String] The unique ID of the Kubernetes Node Pool
1057
+ # @param kubernetes_node_pool [KubernetesNodePool] Details of the Kubernetes Node Pool
1058
+ # @param [Hash] opts the optional parameters
1059
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1060
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
1061
+ # @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
1062
+ # @return [Array<(KubernetesNodePoolForPut, Integer, Hash)>] KubernetesNodePoolForPut data, response status code and response headers
1063
+ def k8s_nodepools_put_with_http_info(k8s_cluster_id, nodepool_id, kubernetes_node_pool, opts = {})
1064
+ if @api_client.config.debugging
1065
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_nodepools_put ...'
1066
+ end
1067
+ # verify the required parameter 'k8s_cluster_id' is set
1068
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
1069
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_nodepools_put"
1070
+ end
1071
+ # verify the required parameter 'nodepool_id' is set
1072
+ if @api_client.config.client_side_validation && nodepool_id.nil?
1073
+ fail ArgumentError, "Missing the required parameter 'nodepool_id' when calling KubernetesApi.k8s_nodepools_put"
1074
+ end
1075
+ # verify the required parameter 'kubernetes_node_pool' is set
1076
+ if @api_client.config.client_side_validation && kubernetes_node_pool.nil?
1077
+ fail ArgumentError, "Missing the required parameter 'kubernetes_node_pool' when calling KubernetesApi.k8s_nodepools_put"
1078
+ end
1079
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1080
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_put, must be smaller than or equal to 10.'
1081
+ end
1082
+
1083
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1084
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_nodepools_put, must be greater than or equal to 0.'
1085
+ end
1086
+
1087
+ # resource path
1088
+ local_var_path = '/k8s/{k8sClusterId}/nodepools/{nodepoolId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s)).sub('{' + 'nodepoolId' + '}', CGI.escape(nodepool_id.to_s))
1089
+
1090
+ # query parameters
1091
+ query_params = opts[:query_params] || {}
1092
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1093
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1094
+
1095
+ # header parameters
1096
+ header_params = opts[:header_params] || {}
1097
+ # HTTP header 'Accept' (if needed)
1098
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1099
+ # HTTP header 'Content-Type'
1100
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1101
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1102
+
1103
+ # form parameters
1104
+ form_params = opts[:form_params] || {}
1105
+
1106
+ # http body (model)
1107
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(kubernetes_node_pool)
1108
+
1109
+ # return_type
1110
+ return_type = opts[:debug_return_type] || 'KubernetesNodePoolForPut'
1111
+
1112
+ # auth_names
1113
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1114
+
1115
+ new_options = opts.merge(
1116
+ :operation => :"KubernetesApi.k8s_nodepools_put",
1117
+ :header_params => header_params,
1118
+ :query_params => query_params,
1119
+ :form_params => form_params,
1120
+ :body => post_body,
1121
+ :auth_names => auth_names,
1122
+ :return_type => return_type
1123
+ )
1124
+
1125
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1126
+ if @api_client.config.debugging
1127
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_nodepools_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1128
+ end
1129
+ return data, status_code, headers
1130
+ end
1131
+
1132
+ # Create Kubernetes Cluster
1133
+ # This will create a new Kubernetes Cluster.
1134
+ # @param kubernetes_cluster [KubernetesCluster] Properties of the Kubernetes Cluster
1135
+ # @param [Hash] opts the optional parameters
1136
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1137
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
1138
+ # @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
1139
+ # @return [KubernetesCluster]
1140
+ def k8s_post(kubernetes_cluster, opts = {})
1141
+ data, _status_code, _headers = k8s_post_with_http_info(kubernetes_cluster, opts)
1142
+ data
1143
+ end
1144
+
1145
+ # Create Kubernetes Cluster
1146
+ # This will create a new Kubernetes Cluster.
1147
+ # @param kubernetes_cluster [KubernetesCluster] Properties of the Kubernetes Cluster
1148
+ # @param [Hash] opts the optional parameters
1149
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1150
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
1151
+ # @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
1152
+ # @return [Array<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers
1153
+ def k8s_post_with_http_info(kubernetes_cluster, opts = {})
1154
+ if @api_client.config.debugging
1155
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_post ...'
1156
+ end
1157
+ # verify the required parameter 'kubernetes_cluster' is set
1158
+ if @api_client.config.client_side_validation && kubernetes_cluster.nil?
1159
+ fail ArgumentError, "Missing the required parameter 'kubernetes_cluster' when calling KubernetesApi.k8s_post"
1160
+ end
1161
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1162
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_post, must be smaller than or equal to 10.'
1163
+ end
1164
+
1165
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1166
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_post, must be greater than or equal to 0.'
1167
+ end
1168
+
1169
+ # resource path
1170
+ local_var_path = '/k8s'
1171
+
1172
+ # query parameters
1173
+ query_params = opts[:query_params] || {}
1174
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1175
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1176
+
1177
+ # header parameters
1178
+ header_params = opts[:header_params] || {}
1179
+ # HTTP header 'Accept' (if needed)
1180
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1181
+ # HTTP header 'Content-Type'
1182
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1183
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1184
+
1185
+ # form parameters
1186
+ form_params = opts[:form_params] || {}
1187
+
1188
+ # http body (model)
1189
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(kubernetes_cluster)
1190
+
1191
+ # return_type
1192
+ return_type = opts[:debug_return_type] || 'KubernetesCluster'
1193
+
1194
+ # auth_names
1195
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1196
+
1197
+ new_options = opts.merge(
1198
+ :operation => :"KubernetesApi.k8s_post",
1199
+ :header_params => header_params,
1200
+ :query_params => query_params,
1201
+ :form_params => form_params,
1202
+ :body => post_body,
1203
+ :auth_names => auth_names,
1204
+ :return_type => return_type
1205
+ )
1206
+
1207
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1208
+ if @api_client.config.debugging
1209
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1210
+ end
1211
+ return data, status_code, headers
1212
+ end
1213
+
1214
+ # Modify Kubernetes Cluster
1215
+ # This will modify the Kubernetes Cluster.
1216
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
1217
+ # @param kubernetes_cluster [KubernetesCluster] Properties of the Kubernetes Cluster
1218
+ # @param [Hash] opts the optional parameters
1219
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines) (default to true)
1220
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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)
1221
+ # @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
1222
+ # @return [KubernetesCluster]
1223
+ def k8s_put(k8s_cluster_id, kubernetes_cluster, opts = {})
1224
+ data, _status_code, _headers = k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, opts)
1225
+ data
1226
+ end
1227
+
1228
+ # Modify Kubernetes Cluster
1229
+ # This will modify the Kubernetes Cluster.
1230
+ # @param k8s_cluster_id [String] The unique ID of the Kubernetes Cluster
1231
+ # @param kubernetes_cluster [KubernetesCluster] Properties of the Kubernetes Cluster
1232
+ # @param [Hash] opts the optional parameters
1233
+ # @option opts [Boolean] :pretty Controls whether response is pretty-printed (with indentation and new lines)
1234
+ # @option opts [Integer] :depth Controls the details depth of response objects. Eg. GET /datacenters/[ID] - 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
1235
+ # @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
1236
+ # @return [Array<(KubernetesCluster, Integer, Hash)>] KubernetesCluster data, response status code and response headers
1237
+ def k8s_put_with_http_info(k8s_cluster_id, kubernetes_cluster, opts = {})
1238
+ if @api_client.config.debugging
1239
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_put ...'
1240
+ end
1241
+ # verify the required parameter 'k8s_cluster_id' is set
1242
+ if @api_client.config.client_side_validation && k8s_cluster_id.nil?
1243
+ fail ArgumentError, "Missing the required parameter 'k8s_cluster_id' when calling KubernetesApi.k8s_put"
1244
+ end
1245
+ # verify the required parameter 'kubernetes_cluster' is set
1246
+ if @api_client.config.client_side_validation && kubernetes_cluster.nil?
1247
+ fail ArgumentError, "Missing the required parameter 'kubernetes_cluster' when calling KubernetesApi.k8s_put"
1248
+ end
1249
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] > 10
1250
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_put, must be smaller than or equal to 10.'
1251
+ end
1252
+
1253
+ if @api_client.config.client_side_validation && !opts[:'depth'].nil? && opts[:'depth'] < 0
1254
+ fail ArgumentError, 'invalid value for "opts[:"depth"]" when calling KubernetesApi.k8s_put, must be greater than or equal to 0.'
1255
+ end
1256
+
1257
+ # resource path
1258
+ local_var_path = '/k8s/{k8sClusterId}'.sub('{' + 'k8sClusterId' + '}', CGI.escape(k8s_cluster_id.to_s))
1259
+
1260
+ # query parameters
1261
+ query_params = opts[:query_params] || {}
1262
+ query_params[:'pretty'] = opts[:'pretty'] if !opts[:'pretty'].nil?
1263
+ query_params[:'depth'] = opts[:'depth'] if !opts[:'depth'].nil?
1264
+
1265
+ # header parameters
1266
+ header_params = opts[:header_params] || {}
1267
+ # HTTP header 'Accept' (if needed)
1268
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1269
+ # HTTP header 'Content-Type'
1270
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1271
+ header_params[:'X-Contract-Number'] = opts[:'x_contract_number'] if !opts[:'x_contract_number'].nil?
1272
+
1273
+ # form parameters
1274
+ form_params = opts[:form_params] || {}
1275
+
1276
+ # http body (model)
1277
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(kubernetes_cluster)
1278
+
1279
+ # return_type
1280
+ return_type = opts[:debug_return_type] || 'KubernetesCluster'
1281
+
1282
+ # auth_names
1283
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1284
+
1285
+ new_options = opts.merge(
1286
+ :operation => :"KubernetesApi.k8s_put",
1287
+ :header_params => header_params,
1288
+ :query_params => query_params,
1289
+ :form_params => form_params,
1290
+ :body => post_body,
1291
+ :auth_names => auth_names,
1292
+ :return_type => return_type
1293
+ )
1294
+
1295
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1296
+ if @api_client.config.debugging
1297
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1298
+ end
1299
+ return data, status_code, headers
1300
+ end
1301
+
1302
+ # Retrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster.
1303
+ # You can retrieve a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster.
1304
+ # @param cluster_version [String]
1305
+ # @param [Hash] opts the optional parameters
1306
+ # @return [Array<String>]
1307
+ def k8s_versions_compatibilities_get(cluster_version, opts = {})
1308
+ data, _status_code, _headers = k8s_versions_compatibilities_get_with_http_info(cluster_version, opts)
1309
+ data
1310
+ end
1311
+
1312
+ # Retrieves a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster.
1313
+ # You can retrieve a list of available kubernetes versions for nodepools depending on the given kubernetes version running in the cluster.
1314
+ # @param cluster_version [String]
1315
+ # @param [Hash] opts the optional parameters
1316
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1317
+ def k8s_versions_compatibilities_get_with_http_info(cluster_version, opts = {})
1318
+ if @api_client.config.debugging
1319
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_compatibilities_get ...'
1320
+ end
1321
+ # verify the required parameter 'cluster_version' is set
1322
+ if @api_client.config.client_side_validation && cluster_version.nil?
1323
+ fail ArgumentError, "Missing the required parameter 'cluster_version' when calling KubernetesApi.k8s_versions_compatibilities_get"
1324
+ end
1325
+ # resource path
1326
+ local_var_path = '/k8s/versions/{clusterVersion}/compatibilities'.sub('{' + 'clusterVersion' + '}', CGI.escape(cluster_version.to_s))
1327
+
1328
+ # query parameters
1329
+ query_params = opts[:query_params] || {}
1330
+
1331
+ # header parameters
1332
+ header_params = opts[:header_params] || {}
1333
+ # HTTP header 'Accept' (if needed)
1334
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1335
+
1336
+ # form parameters
1337
+ form_params = opts[:form_params] || {}
1338
+
1339
+ # http body (model)
1340
+ post_body = opts[:debug_body]
1341
+
1342
+ # return_type
1343
+ return_type = opts[:debug_return_type] || 'Array<String>'
1344
+
1345
+ # auth_names
1346
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1347
+
1348
+ new_options = opts.merge(
1349
+ :operation => :"KubernetesApi.k8s_versions_compatibilities_get",
1350
+ :header_params => header_params,
1351
+ :query_params => query_params,
1352
+ :form_params => form_params,
1353
+ :body => post_body,
1354
+ :auth_names => auth_names,
1355
+ :return_type => return_type
1356
+ )
1357
+
1358
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1359
+ if @api_client.config.debugging
1360
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_versions_compatibilities_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1361
+ end
1362
+ return data, status_code, headers
1363
+ end
1364
+
1365
+ # Retrieve the current default kubernetes version for clusters and nodepools.
1366
+ # You can retrieve the current default kubernetes version for clusters and nodepools.
1367
+ # @param [Hash] opts the optional parameters
1368
+ # @return [String]
1369
+ def k8s_versions_default_get(opts = {})
1370
+ data, _status_code, _headers = k8s_versions_default_get_with_http_info(opts)
1371
+ data
1372
+ end
1373
+
1374
+ # Retrieve the current default kubernetes version for clusters and nodepools.
1375
+ # You can retrieve the current default kubernetes version for clusters and nodepools.
1376
+ # @param [Hash] opts the optional parameters
1377
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
1378
+ def k8s_versions_default_get_with_http_info(opts = {})
1379
+ if @api_client.config.debugging
1380
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_default_get ...'
1381
+ end
1382
+ # resource path
1383
+ local_var_path = '/k8s/versions/default'
1384
+
1385
+ # query parameters
1386
+ query_params = opts[:query_params] || {}
1387
+
1388
+ # header parameters
1389
+ header_params = opts[:header_params] || {}
1390
+ # HTTP header 'Accept' (if needed)
1391
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1392
+
1393
+ # form parameters
1394
+ form_params = opts[:form_params] || {}
1395
+
1396
+ # http body (model)
1397
+ post_body = opts[:debug_body]
1398
+
1399
+ # return_type
1400
+ return_type = opts[:debug_return_type] || 'String'
1401
+
1402
+ # auth_names
1403
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1404
+
1405
+ new_options = opts.merge(
1406
+ :operation => :"KubernetesApi.k8s_versions_default_get",
1407
+ :header_params => header_params,
1408
+ :query_params => query_params,
1409
+ :form_params => form_params,
1410
+ :body => post_body,
1411
+ :auth_names => auth_names,
1412
+ :return_type => return_type
1413
+ )
1414
+
1415
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1416
+ if @api_client.config.debugging
1417
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_versions_default_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1418
+ end
1419
+ return data, status_code, headers
1420
+ end
1421
+
1422
+ # Retrieve available Kubernetes versions
1423
+ # You can retrieve a list of available kubernetes versions
1424
+ # @param [Hash] opts the optional parameters
1425
+ # @return [Array<String>]
1426
+ def k8s_versions_get(opts = {})
1427
+ data, _status_code, _headers = k8s_versions_get_with_http_info(opts)
1428
+ data
1429
+ end
1430
+
1431
+ # Retrieve available Kubernetes versions
1432
+ # You can retrieve a list of available kubernetes versions
1433
+ # @param [Hash] opts the optional parameters
1434
+ # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
1435
+ def k8s_versions_get_with_http_info(opts = {})
1436
+ if @api_client.config.debugging
1437
+ @api_client.config.logger.debug 'Calling API: KubernetesApi.k8s_versions_get ...'
1438
+ end
1439
+ # resource path
1440
+ local_var_path = '/k8s/versions'
1441
+
1442
+ # query parameters
1443
+ query_params = opts[:query_params] || {}
1444
+
1445
+ # header parameters
1446
+ header_params = opts[:header_params] || {}
1447
+ # HTTP header 'Accept' (if needed)
1448
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1449
+
1450
+ # form parameters
1451
+ form_params = opts[:form_params] || {}
1452
+
1453
+ # http body (model)
1454
+ post_body = opts[:debug_body]
1455
+
1456
+ # return_type
1457
+ return_type = opts[:debug_return_type] || 'Array<String>'
1458
+
1459
+ # auth_names
1460
+ auth_names = opts[:debug_auth_names] || ['Basic Authentication', 'Token Authentication']
1461
+
1462
+ new_options = opts.merge(
1463
+ :operation => :"KubernetesApi.k8s_versions_get",
1464
+ :header_params => header_params,
1465
+ :query_params => query_params,
1466
+ :form_params => form_params,
1467
+ :body => post_body,
1468
+ :auth_names => auth_names,
1469
+ :return_type => return_type
1470
+ )
1471
+
1472
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1473
+ if @api_client.config.debugging
1474
+ @api_client.config.logger.debug "API called: KubernetesApi#k8s_versions_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1475
+ end
1476
+ return data, status_code, headers
1477
+ end
1478
+ end
1479
+ end