Enables an auto scaling policy for an application.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:ManageApplication |
update |
*Application
|
None | None |
Request syntax
PUT /pop/v1/eam/scale/enable_application_scaling_rule HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
No |
The ID of the application. You can call the ListApplication operation to query the application ID. For more information, see ListApplication. |
78194c76-3dca-418e-a263-cccd1ab4**** |
| ScalingRuleName |
string |
No |
The name of the auto scaling policy. |
cpu-trigger |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The HTTP status code. |
200 |
| Message |
string |
The returned message. |
success |
| RequestId |
string |
The ID of the request. |
a5281053-08e4-47a5-b2ab-5c0323de7b5a |
| AppScalingRule |
object |
The information about the auto scaling policy. |
|
| UpdateTime |
integer |
The time when the auto scaling policy was last modified. |
23212323123 |
| CreateTime |
integer |
The time when the auto scaling policy was created. |
23212323123 |
| AppId |
string |
The ID of the application to which the auto scaling policy belongs. |
78194c76-3dca-418e-a263-cccd1ab4**** |
| LastDisableTime |
integer |
The time when the auto scaling policy was last disabled. |
23212323123 |
| MaxReplicas |
integer |
This parameter is deprecated. |
1 |
| ScaleRuleEnabled |
boolean |
Indicates whether the auto scaling policy is enabled. Valid values:
|
true |
| ScaleRuleType |
string |
The type of the auto scaling policy. The value is fixed to trigger. |
trigger |
| MinReplicas |
integer |
This parameter is deprecated. |
1 |
| ScaleRuleName |
string |
The name of the auto scaling policy. |
cpu-trigger |
| Metric |
object |
This parameter is deprecated. |
|
| MinReplicas |
integer |
This parameter is deprecated. |
1 |
| MaxReplicas |
integer |
This parameter is deprecated. |
1 |
| Metrics |
array<object> |
This parameter is deprecated. |
|
|
object |
|||
| MetricTargetAverageUtilization |
integer |
This parameter is deprecated. |
12 |
| MetricType |
string |
This parameter is deprecated. |
cpu |
| Trigger |
object |
The configurations of the trigger. |
|
| MinReplicas |
integer |
The minimum number of replicas. The lower limit is 0. |
1 |
| MaxReplicas |
integer |
The maximum number of replicas. The upper limit is 1000. |
122 |
| Triggers |
array<object> |
The list of triggers. |
|
|
object |
|||
| Type |
string |
The type of the trigger. Valid values: cron and app_metric. |
cron |
| MetaData |
string |
The metadata of the trigger. |
{"dryRun":true} |
| Name |
string |
The name of the trigger. |
cpu |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "success",
"RequestId": "a5281053-08e4-47a5-b2ab-5c0323de7b5a",
"AppScalingRule": {
"UpdateTime": 23212323123,
"CreateTime": 23212323123,
"AppId": "78194c76-3dca-418e-a263-cccd1ab4****",
"LastDisableTime": 23212323123,
"MaxReplicas": 1,
"ScaleRuleEnabled": true,
"ScaleRuleType": "trigger",
"MinReplicas": 1,
"ScaleRuleName": "cpu-trigger",
"Metric": {
"MinReplicas": 1,
"MaxReplicas": 1,
"Metrics": [
{
"MetricTargetAverageUtilization": 12,
"MetricType": "cpu"
}
]
},
"Trigger": {
"MinReplicas": 1,
"MaxReplicas": 122,
"Triggers": [
{
"Type": "cron",
"MetaData": "{\"dryRun\":true}",
"Name": "cpu"
}
]
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.