Updates an Autopilot tuning policy.
Try it now
Test
RAM authorization
Request syntax
PUT /autopilot/v2/namespaces/{namespace}/deployments/{deploymentId}/autopilotpolicy-update HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| namespace |
string |
Yes |
The project space name. |
default-namespace |
| deploymentId |
string |
Yes |
The job ID. |
737d0921-c5ac-47fc-9ba9-07a1e0b4**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| workspace |
string |
Yes |
The workspace ID. |
a14bd5d90a**** |
| body |
object |
No |
The request body for updating the tuning policy. |
|
| enabled |
boolean |
No |
Specifies whether to enable automatic tuning. A value of true enables automatic tuning (ACTIVE), and a value of false disables tuning (DISABLED). If this parameter is not specified, the current status is not changed. |
true |
| policyConfig | AutopilotPolicy |
No |
The tuning policy configuration. This parameter uses full PUT mode: when specified, the complete policy object replaces the existing configuration entirely (fields not included are cleared). If this parameter is not specified, the existing configuration is retained. |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| requestId |
string |
The request ID. |
CBC799F0-AS7S-1D30-8A4F-882ED4DD**** |
| success |
boolean |
Indicates whether the request was successful. |
True |
| httpCode |
integer |
The HTTP status code, which is always 200. Use the success parameter to determine whether the request was successful. |
200 |
| errorCode |
string |
The error code. This parameter is not empty when success is false, indicating a business error code. This parameter is empty when success is true. |
"" |
| errorMessage |
string |
The error message. This parameter is not empty when success is false, indicating a business error message. This parameter is empty when success is true. |
"" |
| data |
object |
The Autopilot tuning policy response data. |
|
| enabled |
boolean |
Indicates whether automatic tuning is enabled. A value of true indicates that automatic tuning is active (ACTIVE), and a value of false indicates that tuning is not enabled. |
true |
| policyConfig | AutopilotPolicy |
The tuning policy configuration. This parameter uses full PUT mode: when specified, the complete policy object replaces the existing configuration entirely (fields not included are cleared). If this parameter is not specified, the existing configuration is retained. |
Examples
Success response
JSON format
{
"requestId": "CBC799F0-AS7S-1D30-8A4F-882ED4DD****",
"success": true,
"httpCode": 200,
"errorCode": "\"\"",
"errorMessage": "\"\"",
"data": {
"enabled": true,
"policyConfig": {
"limits": {
"coolDownMinutes": 0,
"jobMaxCpu": 0,
"jobMaxMemory": "",
"jobMaxParallelism": 0,
"jobMinParallelism": 0
},
"silentPeriodConfig": {
"enabled": false,
"silentPeriods": [
{
"level": "",
"beginTime": 0,
"endTime": 0
}
]
},
"scaleUpRules": {
"delayRule": {
"enabled": false,
"delaySampleInterval": "",
"delayThreshold": ""
},
"slotBusyScaleUpRule": {
"enabled": false,
"slotBusyScaleUpSampleInterval": "",
"slotBusyScaleUpThreshold": 0
},
"memoryScaleUpRule": {
"enabled": false,
"memUsageScaleUpThreshold": 0
},
"oomScaleUpRule": {
"enabled": false
},
"gcRule": {
"enabled": false,
"gcTimeRatioThreshold": 0,
"gcSampleInterval": ""
}
},
"scaleDownRules": {
"slotBusyScaleDownRule": {
"enabled": false,
"slotBusyScaleDownSampleInterval": "",
"slotBusyScaleDownThreshold": 0
},
"memoryScaleDownRule": {
"enabled": false,
"memUsageScaleDownThreshold": 0,
"memUsageScaleDownSampleInterval": ""
}
},
"advancedRules": {
"enabled": false,
"parameters": {
"key": ""
}
}
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.