# KubernetesApi

## KubernetesApi

All URIs are relative to *<https://api.ionos.com/cloudapi/v6>*

| Method                                                            | HTTP request                                                               | Description                         |
| ----------------------------------------------------------------- | -------------------------------------------------------------------------- | ----------------------------------- |
| [**k8sDelete**](#k8sdelete)                                       | **DELETE** /k8s/{k8sClusterId}                                             | Delete a Kubernetes Cluster by ID   |
| [**k8sFindByClusterId**](#k8sfindbyclusterid)                     | **GET** /k8s/{k8sClusterId}                                                | Get a Kubernetes Cluster by ID      |
| [**k8sGet**](#k8sget)                                             | **GET** /k8s                                                               | Get Kubernetes Clusters             |
| [**k8sKubeconfigGet**](#k8skubeconfigget)                         | **GET** /k8s/{k8sClusterId}/kubeconfig                                     | Get Kubernetes Configuration File   |
| [**k8sNodepoolsDelete**](#k8snodepoolsdelete)                     | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId}                      | Delete a Kubernetes Node Pool by ID |
| [**k8sNodepoolsFindById**](#k8snodepoolsfindbyid)                 | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}                         | Get a Kubernetes Node Pool by ID    |
| [**k8sNodepoolsGet**](#k8snodepoolsget)                           | **GET** /k8s/{k8sClusterId}/nodepools                                      | Get Kubernetes Node Pools           |
| [**k8sNodepoolsNodesDelete**](#k8snodepoolsnodesdelete)           | **DELETE** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}       | Delete a Kubernetes Node by ID      |
| [**k8sNodepoolsNodesFindById**](#k8snodepoolsnodesfindbyid)       | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}          | Get Kubernetes Node by ID           |
| [**k8sNodepoolsNodesGet**](#k8snodepoolsnodesget)                 | **GET** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes                   | Get Kubernetes Nodes                |
| [**k8sNodepoolsNodesReplacePost**](#k8snodepoolsnodesreplacepost) | **POST** /k8s/{k8sClusterId}/nodepools/{nodepoolId}/nodes/{nodeId}/replace | Recreate a Kubernetes Node by ID    |
| [**k8sNodepoolsPost**](#k8snodepoolspost)                         | **POST** /k8s/{k8sClusterId}/nodepools                                     | Create a Kubernetes Node Pool       |
| [**k8sNodepoolsPut**](#k8snodepoolsput)                           | **PUT** /k8s/{k8sClusterId}/nodepools/{nodepoolId}                         | Modify a Kubernetes Node Pool by ID |
| [**k8sPost**](#k8spost)                                           | **POST** /k8s                                                              | Create a Kubernetes Cluster         |
| [**k8sPut**](#k8sput)                                             | **PUT** /k8s/{k8sClusterId}                                                | Modify a Kubernetes Cluster by ID   |
| [**k8sVersionsDefaultGet**](#k8sversionsdefaultget)               | **GET** /k8s/versions/default                                              | Get Default Kubernetes Version      |
| [**k8sVersionsGet**](#k8sversionsget)                             | **GET** /k8s/versions                                                      | Get Kubernetes Versions             |

## **k8sDelete**

> k8sDelete(k8sClusterId, pretty, depth, xContractNumber)

Delete a Kubernetes Cluster by ID

Deletes the K8s 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]                    |

#### 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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    try {
        apiInstance.k8sDelete(k8sClusterId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } 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();
    }
```

## **k8sFindByClusterId**

> KubernetesCluster k8sFindByClusterId(k8sClusterId, pretty, depth, xContractNumber)

Get a Kubernetes Cluster by ID

Retrieves the K8s cluster specified by its ID.

#### Parameters

| Name                | Type        | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ------------------- | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **k8sClusterId**    | **String**  | The unique ID of the K8s cluster to be retrieved.                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **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

[**KubernetesCluster**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetescluster)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    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();
    }
```

## **k8sGet**

> KubernetesClusters k8sGet(pretty, depth, xContractNumber)

Get Kubernetes Clusters

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.                                                                                                                                                                                                                                                                                                                                                              | \[optional]                    |

#### Return type

[**KubernetesClusters**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesclusters)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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 field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      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:

```java
    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();
    }
```

## **k8sKubeconfigGet**

> String k8sKubeconfigGet(k8sClusterId, pretty, depth, xContractNumber)

Get Kubernetes Configuration File

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.                                                                                                                                                                                                                                                                                                                                                              | \[optional]                    |

#### Return type

**String**

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/yaml, application/x-yaml, application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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 field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      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:

```java
    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();
    }
```

## **k8sNodepoolsDelete**

> k8sNodepoolsDelete(k8sClusterId, nodepoolId, pretty, depth, xContractNumber)

Delete a Kubernetes Node Pool by ID

Deletes the K8s node pool specified by its ID.

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

#### 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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    try {
        apiInstance.k8sNodepoolsDelete(k8sClusterId, nodepoolId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } 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();
    }
```

## **k8sNodepoolsFindById**

> KubernetesNodePool k8sNodepoolsFindById(k8sClusterId, nodepoolId, pretty, depth, xContractNumber)

Get a Kubernetes Node Pool by ID

Retrieves the K8s node pool specified by its ID.

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

#### Return type

[**KubernetesNodePool**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodepool)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    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();
    }
```

## **k8sNodepoolsGet**

> KubernetesNodePools k8sNodepoolsGet(k8sClusterId, pretty, depth, xContractNumber)

Get Kubernetes Node Pools

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.                                                                                                                                                                                                                                                                                                                                                              | \[optional]                    |

#### Return type

[**KubernetesNodePools**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodepools)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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 field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      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:

```java
    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();
    }
```

## **k8sNodepoolsNodesDelete**

> k8sNodepoolsNodesDelete(k8sClusterId, nodepoolId, nodeId, pretty, depth, xContractNumber)

Delete a Kubernetes Node by ID

Deletes the K8s node specified by its ID.

#### 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 k8sNodepoolsNodesDeleteWithHttpInfo which also returns the status code and the headers, if you don't need them you may use k8sNodepoolsNodesDelete instead

#### Example

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    try {
        apiInstance.k8sNodepoolsNodesDelete(k8sClusterId, nodepoolId, nodeId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } 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();
    }
```

## **k8sNodepoolsNodesFindById**

> KubernetesNode k8sNodepoolsNodesFindById(k8sClusterId, nodepoolId, nodeId, pretty, depth, xContractNumber)

Get Kubernetes Node by ID

Retrieves the K8s node specified by its ID.

#### 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

[**KubernetesNode**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnode)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    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();
    }
```

## **k8sNodepoolsNodesGet**

> KubernetesNodes k8sNodepoolsNodesGet(k8sClusterId, nodepoolId, pretty, depth, xContractNumber)

Get Kubernetes Nodes

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.                                                                                                                                                                                                                                                                                                                                                              | \[optional]                    |

#### Return type

[**KubernetesNodes**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodes)

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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 field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      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:

```java
    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();
    }
```

## **k8sNodepoolsNodesReplacePost**

> k8sNodepoolsNodesReplacePost(k8sClusterId, nodepoolId, nodeId, pretty, depth, xContractNumber)

Recreate a Kubernetes Node by ID

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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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:

```java
    try {
        apiInstance.k8sNodepoolsNodesReplacePost(k8sClusterId, nodepoolId, nodeId)
                .pretty(true)
                .depth(0)
                .xContractNumber(56)
                .execute();
        System.out.println(result);
    } 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();
    }
```

## **k8sNodepoolsPost**

> KubernetesNodePool k8sNodepoolsPost(k8sClusterId, kubernetesNodePool, pretty, depth, xContractNumber)

Create a Kubernetes Node Pool

Creates a node pool inside the specified K8s cluster.

#### Parameters

| Name                   | Type                                                                                                                               | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **k8sClusterId**       | **String**                                                                                                                         | The unique ID of the Kubernetes cluster.                                                                                                                                                                                                                                                                                                                                                                                                 |                                |
| **kubernetesNodePool** | [**KubernetesNodePoolForPost**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodepoolforpost) | The Kubernetes node pool to create.                                                                                                                                                                                                                                                                                                                                                                                                      |                                |
| **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

[**KubernetesNodePool**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodepool)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(defaultClient);
    String k8sClusterId = "k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.
    properties = new KubernetesNodePoolPropertiesForPost(); // 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:

```java
    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();
    }
```

## **k8sNodepoolsPut**

> KubernetesNodePool k8sNodepoolsPut(k8sClusterId, nodepoolId, kubernetesNodePool, pretty, depth, xContractNumber)

Modify a Kubernetes Node Pool by ID

Modifies the K8s node pool specified by its ID.

#### Parameters

| Name                   | Type                                                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **k8sClusterId**       | **String**                                                                                                                       | The unique ID of the Kubernetes cluster.                                                                                                                                                                                                                                                                                                                                                                                                 |                                |
| **nodepoolId**         | **String**                                                                                                                       | The unique ID of the Kubernetes node pool.                                                                                                                                                                                                                                                                                                                                                                                               |                                |
| **kubernetesNodePool** | [**KubernetesNodePoolForPut**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodepoolforput) | Details 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]                    |

#### Return type

[**KubernetesNodePool**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesnodepool)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(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 = new KubernetesNodePoolPropertiesForPut(); // 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:

```java
    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();
    }
```

## **k8sPost**

> KubernetesCluster k8sPost(kubernetesCluster, pretty, depth, xContractNumber)

Create a Kubernetes Cluster

Creates a K8s cluster provisioned under your account.

#### Parameters

| Name                  | Type                                                                                                                             | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **kubernetesCluster** | [**KubernetesClusterForPost**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesclusterforpost) | The Kubernetes cluster to create.                                                                                                                                                                                                                                                                                                                                                                                                        |                                |
| **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

[**KubernetesCluster**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetescluster)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(defaultClient);
    properties = new KubernetesClusterPropertiesForPost(); // 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:

```java
    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();
    }
```

## **k8sPut**

> KubernetesCluster k8sPut(k8sClusterId, kubernetesCluster, pretty, depth, xContractNumber)

Modify a Kubernetes Cluster by ID

Modifies the K8s cluster specified by its ID.

#### Parameters

| Name                  | Type                                                                                                                           | Description                                                                                                                                                                                                                                                                                                                                                                                                                              | Notes                          |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ |
| **k8sClusterId**      | **String**                                                                                                                     | The unique ID of the Kubernetes cluster.                                                                                                                                                                                                                                                                                                                                                                                                 |                                |
| **kubernetesCluster** | [**KubernetesClusterForPut**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetesclusterforput) | The modified 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]                    |

#### Return type

[**KubernetesCluster**](https://docs.ionos.com/sections-test/java-sdk/cloud-api-java-sdk/models/kubernetescluster)

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

⚠️ **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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(defaultClient);
    String k8sClusterId = "k8sClusterId_example"; // String | The unique ID of the Kubernetes cluster.
    properties = new KubernetesClusterPropertiesForPut(); // 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:

```java
    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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(defaultClient);
    String orderBy = "orderBy_example"; // String | Order by field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      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:

```java
    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

```java
// Import classes:
import com.ionoscloud.ApiClient;
import com.ionoscloud.ApiException;
import com.ionoscloud.ApiResponse;
import com.ionoscloud.Configuration;
import com.ionoscloud.auth.*;
import com.ionoscloud.model.*;
import com.ionoscloud.api.KubernetesApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    
    // Configure HTTP basic authorization: Basic Authentication
    HttpBasicAuth basicAuthentication = (HttpBasicAuth) defaultClient.getAuthentication("Basic Authentication");
    basicAuthentication.setUsername("YOUR USERNAME");
    basicAuthentication.setPassword("YOUR PASSWORD");

    // Configure Api Key authorization: Token Authentication
    defaultClient.setApiKeyWithBearerPrefix("YOUR TOKEN");

    KubernetesApi apiInstance = new KubernetesApi(defaultClient);
    String orderBy = "orderBy_example"; // String | Order by field
    Integer maxResults = "maxResults_example"; // Integer | Maximum number of results to return
    Map<String, String> filters = new HashMap<String, String>(); // Map<String, String> | Filter results by field
    try {
      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:

```java
    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();
    }
```
