Modifies the scaling rule 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
POST /pop/v5/app/scaling_rules HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
Yes |
The ID of the application. |
74ee****-db65-4322-a1f6-bcb60e5b**** |
| GroupId |
string |
Yes |
The ID of the instance group to which the application is deployed. |
8123db90-880f-486f-****-************ |
| InCondition |
string |
No |
The relationship among the conditions that trigger a scale-in.
|
"OR" |
| InEnable |
boolean |
No |
Specifies whether to allow scale-ins.
|
true |
| InCpu |
integer |
No |
The CPU utilization that triggers a scale-in. |
50 |
| InDuration |
integer |
No |
The duration in which the metric threshold is exceeded. Unit: minutes. |
50 |
| InInstanceNum |
integer |
No |
The minimum number of instances that must be retained in each group when a scale-in is performed. |
3 |
| InLoad |
integer |
No |
The system load that triggers a scale-in. |
50 |
| InRT |
integer |
No |
The minimum service latency that triggers a scale-in. The lower limit is 0. Unit: milliseconds. |
50 |
| InStep |
integer |
No |
The number of instances that are removed during each scale-in. |
1 |
| OutCondition |
string |
No |
The relationship among the conditions that trigger a scale-out.
|
"OR" |
| OutCPU |
integer |
No |
The CPU utilization that triggers a scale-out. |
50 |
| OutDuration |
integer |
No |
The duration in which the metric threshold is exceeded. Unit: minutes. |
50 |
| OutEnable |
boolean |
No |
Specifies whether to allow scale-outs. |
true |
| OutInstanceNum |
integer |
No |
The maximum number of instances in each group when a scale-out is performed. |
10 |
| OutLoad |
integer |
No |
The system load that triggers a scale-out. |
50 |
| OutRT |
integer |
No |
The minimum service latency that triggers a scale-out. The lower limit is 0. Unit: milliseconds. |
0 |
| OutStep |
integer |
No |
The number of instances that are added during each scale-out. |
0 |
| ResourceFrom |
string |
No |
The source of the instance to be added during a scale-out. Valid values:
If you set this parameter to NEW or AVAILABLE_FIRST, you must specify the auto-scaling parameters. If you set this parameter to NEW, instances are created based on a launch template or the specifications of an existing instance. |
"AVAILABLE" |
| MultiAzPolicy |
string |
No |
The multi-zone scaling policy. Valid values:
|
"PRIORITY" |
| VpcId |
string |
No |
The ID of the virtual private cloud (VPC) that is associated with the instances created based on a launch template or the specifications of an existing instance. |
"vpc-bp1j55oz3bg*****" |
| VSwitchIds |
string |
No |
The IDs of the vSwitches that are associated with the VPC. Separate multiple IDs with commas (,). |
"vsw-bp1ldxs3d4fd*****" |
| ScalingPolicy |
string |
No |
The instance handling mode during a scale-in. Valid values:
|
"release" |
| TemplateInstanceId |
string |
No |
The ID of the instance whose specifications are used to create instances during a scale-out. This parameter is valid only when you set the OutEnable parameter to true. |
"1" |
| TemplateInstanceName |
string |
No |
The name of the instance whose specifications are used to create instances during a scale-out. This parameter takes effect only if you specify the TemplateInstanceId parameter. |
"tpl-tdy218" |
| Password |
string |
No |
The password that is used to log on to the instance. This parameter takes effect only if you choose to create instances based on the specifications of an existing instance during a scale-out. |
"Pwd*****" |
| KeyPairName |
string |
No |
The key pair that is used to log on to the instance. This parameter takes effect only if you choose to create instances based on the specifications of an existing instance during a scale-out. |
"tdy218" |
| AcceptEULA |
boolean |
No |
Set the value to true if scale-outs are allowed. |
true |
| TemplateId |
string |
No |
The ID of the launch template that is used to create instances during a scale-out. This parameter takes effect only if you set the OutEnable parameter to true. This parameter takes precedence over the TemplateInstanceId parameter. |
"lt-wz9hkhn8wp*****" |
| TemplateVersion |
integer |
No |
The version of the launch template that is used to create instances during a scale-out. This parameter takes effect only if you set the OutEnable parameter to true. To use the default template version, set this parameter to |
-1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The HTTP status code that is returned. |
200 |
| Message |
string |
The message that is returned. |
success |
| RequestId |
string |
The ID of the request. |
CB36E997-FE54-476C-8C0D-******** |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "success",
"RequestId": "CB36E997-FE54-476C-8C0D-********"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.