Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
Return type
null (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the k8sDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sDelete instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try {apiInstance.k8sDeleteWithHttpInfo(k8sClusterId, pretty, depth, xContractNumber); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sDelete");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sFindByClusterIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sFindByClusterId instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the K8s cluster to be retrieved. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesCluster> result = apiInstance.k8sFindByClusterIdWithHttpInfo(k8sClusterId, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sFindByClusterId");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesCluster result =apiInstance.k8sFindByClusterId(k8sClusterId).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sFindByClusterId");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Retrieves a list of all K8s clusters provisioned under your account.
Parameters
Name
Type
Description
Notes
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
orderBy
String
Sorts the results alphanumerically in ascending order based on the specified property.
[optional]
maxResults
Integer
Limits the number of results returned.
[optional]
filters
Map<String, String>
Limit results to those containing a matching value for a specific property.
⚠️ Note: the example bellow uses the k8sGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient); Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry { ApiResponse<KubernetesClusters> result = apiInstance.k8sGetWithHttpInfo(pretty, depth, xContractNumber, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesClusters result =apiInstance.k8sGet().pretty(true).depth(0).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Retrieves the configuration file for the specified K8s cluster. You can define the format (YAML or JSON) of the returned file in the Accept header. By default, 'application/yaml' is specified.
Parameters
Name
Type
Description
Notes
k8sClusterId
String
The unique ID of the Kubernetes cluster.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
orderBy
String
Sorts the results alphanumerically in ascending order based on the specified property.
[optional]
maxResults
Integer
Limits the number of results returned.
[optional]
filters
Map<String, String>
Limit results to those containing a matching value for a specific property.
⚠️ Note: the example bellow uses the k8sKubeconfigGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sKubeconfigGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry { ApiResponse<String> result = apiInstance.k8sKubeconfigGetWithHttpInfo(k8sClusterId, pretty, depth, xContractNumber, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sKubeconfigGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {String result =apiInstance.k8sKubeconfigGet(k8sClusterId).pretty(true).depth(0).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sKubeconfigGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
Return type
null (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the k8sNodepoolsDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsDelete instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try {apiInstance.k8sNodepoolsDeleteWithHttpInfo(k8sClusterId, nodepoolId, pretty, depth, xContractNumber); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsDelete");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sNodepoolsFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsFindById instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesNodePool> result = apiInstance.k8sNodepoolsFindByIdWithHttpInfo(k8sClusterId, nodepoolId, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsFindById");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesNodePool result =apiInstance.k8sNodepoolsFindById(k8sClusterId, nodepoolId).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsFindById");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Retrieves a list of K8s node pools of a cluster specified by its ID.
Parameters
Name
Type
Description
Notes
k8sClusterId
String
The unique ID of the Kubernetes cluster.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
orderBy
String
Sorts the results alphanumerically in ascending order based on the specified property.
[optional]
maxResults
Integer
Limits the number of results returned.
[optional]
filters
Map<String, String>
Limit results to those containing a matching value for a specific property.
⚠️ Note: the example bellow uses the k8sNodepoolsGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry { ApiResponse<KubernetesNodePools> result = apiInstance.k8sNodepoolsGetWithHttpInfo(k8sClusterId, pretty, depth, xContractNumber, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesNodePools result =apiInstance.k8sNodepoolsGet(k8sClusterId).pretty(true).depth(0).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
Return type
null (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the k8sNodepoolsNodesDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsNodesDelete instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool.String nodeId ="nodeId_example"; // String | The unique ID of the Kubernetes node. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { apiInstance.k8sNodepoolsNodesDeleteWithHttpInfo(k8sClusterId, nodepoolId, nodeId, pretty, depth, xContractNumber);
} catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsNodesDelete");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sNodepoolsNodesFindByIdWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsNodesFindById instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool.String nodeId ="nodeId_example"; // String | The unique ID of the Kubernetes node. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesNode> result = apiInstance.k8sNodepoolsNodesFindByIdWithHttpInfo(k8sClusterId, nodepoolId, nodeId, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsNodesFindById");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesNode result =apiInstance.k8sNodepoolsNodesFindById(k8sClusterId, nodepoolId, nodeId).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsNodesFindById");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Retrieves the list of all K8s nodes of the specified node pool.
Parameters
Name
Type
Description
Notes
k8sClusterId
String
The unique ID of the Kubernetes cluster.
nodepoolId
String
The unique ID of the Kubernetes node pool.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
orderBy
String
Sorts the results alphanumerically in ascending order based on the specified property.
[optional]
maxResults
Integer
Limits the number of results returned.
[optional]
filters
Map<String, String>
Limit results to those containing a matching value for a specific property.
⚠️ Note: the example bellow uses the k8sNodepoolsNodesGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsNodesGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry { ApiResponse<KubernetesNodes> result = apiInstance.k8sNodepoolsNodesGetWithHttpInfo(k8sClusterId, nodepoolId, pretty, depth, xContractNumber, orderBy, maxResults, filters);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsNodesGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesNodes result =apiInstance.k8sNodepoolsNodesGet(k8sClusterId, nodepoolId).pretty(true).depth(0).xContractNumber(56).orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsNodesGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Recreates the K8s node specified by its ID. If a node becomes unusable, Managed Kubernetes allows you to recreate it with a configuration based on the node pool template. Once the status is 'Active,' all the pods from the failed node will be migrated to the new node. The node pool has an additional billable 'active' node during this process.
Parameters
Name
Type
Description
Notes
k8sClusterId
String
The unique ID of the Kubernetes cluster.
nodepoolId
String
The unique ID of the Kubernetes node pool.
nodeId
String
The unique ID of the Kubernetes node.
pretty
Boolean
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
[optional]
Return type
null (empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the k8sNodepoolsNodesReplacePostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsNodesReplacePost instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool.String nodeId ="nodeId_example"; // String | The unique ID of the Kubernetes node. Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { apiInstance.k8sNodepoolsNodesReplacePostWithHttpInfo(k8sClusterId, nodepoolId, nodeId, pretty, depth, xContractNumber);
} catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsNodesReplacePost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sNodepoolsPostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsPost instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster. properties =newKubernetesNodePoolPropertiesForPost(); // KubernetesNodePoolPropertiesForPost | kubernetesNodePool = new KubernetesNodePoolForPost(KubernetesNodePoolPropertiesForPost); // KubernetesNodePoolForPost | The Kubernetes node pool to create.
Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesNodePool> result = apiInstance.k8sNodepoolsPostWithHttpInfo(k8sClusterId, kubernetesNodePool, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsPost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesNodePool result =apiInstance.k8sNodepoolsPost(k8sClusterId, kubernetesNodePool).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsPost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sNodepoolsPutWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsPut instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.String nodepoolId ="nodepoolId_example"; // String | The unique ID of the Kubernetes node pool. properties =newKubernetesNodePoolPropertiesForPut(); // KubernetesNodePoolPropertiesForPut | kubernetesNodePool = new KubernetesNodePoolForPut(KubernetesNodePoolPropertiesForPut); // KubernetesNodePoolForPut | Details of the Kubernetes Node Pool
Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesNodePool> result = apiInstance.k8sNodepoolsPutWithHttpInfo(k8sClusterId, nodepoolId, kubernetesNodePool, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesNodePool result =apiInstance.k8sNodepoolsPut(k8sClusterId, nodepoolId, kubernetesNodePool).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sNodepoolsPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sPostWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sPost instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient); properties =newKubernetesClusterPropertiesForPost(); // KubernetesClusterPropertiesForPost | kubernetesCluster = new KubernetesClusterForPost(KubernetesClusterPropertiesForPost); // KubernetesClusterForPost | The Kubernetes cluster to create.
Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesCluster> result = apiInstance.k8sPostWithHttpInfo(kubernetesCluster, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sPost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesCluster result =apiInstance.k8sPost(kubernetesCluster).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sPost");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
Controls whether the response is pretty-printed (with indentations and new lines).
[optional] [default to true]
depth
Integer
Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) are not included. - depth=1: Direct properties and children references are included. - depth=2: Direct properties and children properties are included. - depth=3: Direct properties and children properties and children's children are included. - depth=... and so on
[optional] [default to 0]
xContractNumber
Integer
Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
⚠️ Note: the example bellow uses the k8sPutWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sPut instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String k8sClusterId ="k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster. properties =newKubernetesClusterPropertiesForPut(); // KubernetesClusterPropertiesForPut | kubernetesCluster = new KubernetesClusterForPut(KubernetesClusterPropertiesForPut); // KubernetesClusterForPut | The modified Kubernetes cluster.
Boolean pretty = true; // Boolean | Controls whether the response is pretty-printed (with indentations and new lines).
Integer depth = 0; // Integer | Controls the detail depth of the response objects. GET /datacenters/[ID] - depth=0: Only direct properties are included; children (servers and other elements) 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
Integer xContractNumber = 56; // Integer | Users with multiple contracts must provide the contract number, for which all API requests are to be executed.
try { ApiResponse<KubernetesCluster> result = apiInstance.k8sPutWithHttpInfo(k8sClusterId, kubernetesCluster, pretty, depth, xContractNumber);
System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {KubernetesCluster result =apiInstance.k8sPut(k8sClusterId, kubernetesCluster).pretty(true).depth(0).xContractNumber(56).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sPut");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
k8sVersionsDefaultGet
String k8sVersionsDefaultGet()
Get Default Kubernetes Version
Retrieves the current default K8s version to be used by the clusters and node pools.
Parameters
This endpoint does not need any parameter. | orderBy | String | Sorts the results alphanumerically in ascending order based on the specified property. | [optional] | | maxResults | Integer | Limits the number of results returned. | [optional] | | filters | Map<String, String> | Limit results to those containing a matching value for a specific property. | [optional] |
Return type
String
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the k8sVersionsDefaultGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sVersionsDefaultGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry {ApiResponse<String> result =apiInstance.k8sVersionsDefaultGetWithHttpInfo(orderBy, maxResults, filters);System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sVersionsDefaultGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {String result =apiInstance.k8sVersionsDefaultGet().orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sVersionsDefaultGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }
k8sVersionsGet
List<String> k8sVersionsGet()
Get Kubernetes Versions
Lists available K8s versions.
Parameters
This endpoint does not need any parameter. | orderBy | String | Sorts the results alphanumerically in ascending order based on the specified property. | [optional] | | maxResults | Integer | Limits the number of results returned. | [optional] | | filters | Map<String, String> | Limit results to those containing a matching value for a specific property. | [optional] |
Return type
List<String>
HTTP request headers
Content-Type: Not defined
Accept: application/json
⚠️ Note: the example bellow uses the k8sVersionsGetWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sVersionsGet instead
Example
// Import classes:importcom.ionoscloud.ApiClient;importcom.ionoscloud.ApiException;importcom.ionoscloud.ApiResponse;importcom.ionoscloud.Configuration;importcom.ionoscloud.auth.*;importcom.ionoscloud.model.*;importcom.ionoscloud.api.KubernetesApi;publicclassExample {publicstaticvoidmain(String[] args) {ApiClient defaultClient =Configuration.getDefaultApiClient();// Configure HTTP basic authorization: Basic AuthenticationHttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");basicAuthentication.setUsername("YOUR USERNAME");basicAuthentication.setPassword("YOUR PASSWORD");// Configure Api Key authorization: Token AuthenticationdefaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");KubernetesApi apiInstance =newKubernetesApi(defaultClient);String orderBy ="orderBy_example"; // String | Order by fieldInteger maxResults ="maxResults_example"; // Integer | Maximum number of results to returnMap<String,String> filters =newHashMap<String,String>(); // Map<String, String> | Filter results by fieldtry {ApiResponse<List<String>> result =apiInstance.k8sVersionsGetWithHttpInfo(orderBy, maxResults, filters);System.out.println("Response: "+result.getData());System.out.println("Status Code: "+result.getStatusCode());System.out.println("Headers: "+result.getHeaders()); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sVersionsGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); } }}
⚠️ Note: for the example above, you need to provide all parameters to the method call. Null values will resolve to the API defaults.
For convenience, you can alternatively use a builder, which allows to omit optional parameters:
try {List<String> result =apiInstance.k8sVersionsGet().orderBy("orderBy_example").maxResults(5).filters(filters).execute();System.out.println(result); } catch (ApiException e) {System.err.println("Exception when calling KubernetesApi#k8sVersionsGet");System.err.println("Status code: "+e.getCode());System.err.println("Reason: "+e.getResponseBody());System.err.println("Response headers: "+e.getResponseHeaders());e.printStackTrace(); }