# Update UK8S Autoscaler Configuration - UpdateUK8SAutoscaler

## Overview

Update cluster-wide scale-down thresholds and waiting periods. Cluster-autoscaler must be disabled before calling this API; re-enable it afterward to apply the new configuration.






## Definition

### Public Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Action**     | string  | Corresponding API command name, the current API is `UpdateUK8SAutoscaler`.                      | **Yes** |
| **PublicKey**  | string  | AccessKey ID, obtained from [Console](https://console.ziguang.unicloud.com/uaccount/api_manage)                                              | **Yes** |
| **Signature**  | string  | User signature generated based on public key and API command, see [Signature Algorithm](/docs/api/summary/signature.md)  | **Yes** |

### Request Parameters

| Parameter Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **Region** | string | Region. See [Regions and Availability Zones](/docs/api/summary/regionlist). |**Yes**|
| **ProjectId** | string | Project ID. If omitted, the default project is used. Required for sub-accounts. See [GetProjectList](/docs/api/summary/get_project_list). |No|
| **ClusterId** | string | UK8S cluster ID. |**Yes**|
| **ScaleDownUnneededTime** | int | Time an unneeded node must remain unneeded before scale-down, in minutes, from 1 to 1440. |**Yes**|
| **ScaleDownUtilizationThreshold** | int | Node utilization threshold for scale-down, as a percentage from 0 to 100. For example, 50 means 50%. |**Yes**|
| **ScaleDownDelayAfterAdd** | int | Delay before scale-down after adding a node, in minutes, from 1 to 1440. |**Yes**|
| **ScaleDownGPUUtilizationThreshold** | int | GPU utilization threshold for scale-down, as a percentage from 0 to 100. Defaults to ScaleDownUtilizationThreshold when omitted. |No|

### Response Field

| Field Name | Type | Description Information | Required |
|:---|:---|:---|:---|
| **RetCode** | int | Return status code. If it is 0, it means successful return. If it is not 0, it means failure. |**Yes**|
| **Action** | string | Operation command name. |**Yes**|
| **Message** | string | Returns an error message, providing detailed description when `RetCode` is non-zero. |No|




## Example

### Request Example
    
```
https://api.ziguang.unicloud.com/?Action=UpdateUK8SAutoscaler
&Region=cn-zj
&ProjectId=MhyFaNhs
&ClusterId=zjkQIvXU
&ScaleDownUnneededTime=3
&ScaleDownUtilizationThreshold=3
&ScaleDownDelayAfterAdd=7
&ScaleDownGPUUtilizationThreshold=5
```

### Response Example
    
```json
{
  "Action": "UpdateUK8SAutoscalerResponse",
  "RetCode": 0
}
```





