Call the DescribeApplicationScalingRules operation to query the scaling rules for an application.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
edas:ReadApplication |
get |
*Application
|
None | None |
Request syntax
GET /pop/v1/eam/scale/application_scaling_rules HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| AppId |
string |
No |
The ID of the application. Call the ListApplication operation to get the application ID. |
78194c76-3dca-418e-a263-cccd1ab4**** |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
integer |
The HTTP status code. |
200 |
| Message |
string |
The returned message. |
success |
| RequestId |
string |
The request ID. |
a5281053-08e4-47a5-b2ab-5c0323de7b5a |
| AppScalingRules |
object |
The Auto Scaling rules for the application. |
|
| CurrentPage |
integer |
The current page number. |
1 |
| PageSize |
integer |
The number of scaling rules returned on each page. |
10 |
| TotalSize |
integer |
The total number of scaling rules. |
20 |
| Result |
array<object> |
The details of the Auto Scaling rules. |
|
|
array<object> |
|||
| UpdateTime |
integer |
The UNIX timestamp when the scaling rule was last updated. |
23212323123 |
| CreateTime |
integer |
The UNIX timestamp when the scaling rule was created. |
23212323123 |
| AppId |
string |
The ID of the application to which the scaling rule belongs. |
78194c76-3dca-418e-a263-cccd1ab4**** |
| LastDisableTime |
integer |
The UNIX timestamp when the scaling rule was last disabled. |
23212323123 |
| MaxReplicas |
integer |
This parameter is deprecated. |
1 |
| ScaleRuleEnabled |
boolean |
Indicates whether the scaling rule is enabled.
|
true |
| ScaleRuleType |
string |
The type of the scaling rule. Only `trigger` is supported. |
trigger |
| MinReplicas |
integer |
This parameter is deprecated. |
1 |
| ScaleRuleName |
string |
The name of the scaling rule. |
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. |
1 |
| MetricType |
string |
This parameter is deprecated. |
asd |
| Trigger |
object |
The trigger configuration. |
|
| MinReplicas |
integer |
The minimum number of replicas. The value cannot be less than 0. |
1 |
| MaxReplicas |
integer |
The maximum number of replicas. The value cannot exceed 1000. |
122 |
| Triggers |
array<object> |
A list of trigger configurations. |
|
|
object |
The trigger configuration. |
||
| 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. |
cron-trigger |
| Behaviour |
object |
The scaling behavior. |
|
| ScaleUp |
object |
The configuration of the scale-out behavior. |
|
| StabilizationWindowSeconds |
integer |
The cooldown period for a scale-out event. Unit: seconds. Valid values: 0 to 3600. Default value: 0. |
15 |
| SelectPolicy |
string |
The policy for the scaling step size for scale-out events. Valid values: `Max`, `Min`, and `Disable`. |
Max |
| Policies |
array<object> |
The policy configuration. |
|
|
object |
The policy configuration. |
||
| PeriodSeconds |
integer |
The execution interval. Unit: seconds. Valid values: 0 to 1800. |
15 |
| Type |
string |
The type of the policy. Valid values: `Pods` and `Percent`. |
Pods |
| Value |
string |
The value for the policy. The value must be an integer greater than 0. If `Type` is `Pods`, this parameter specifies the number of pods. If `Type` is `Percent`, this parameter specifies a percentage. The value can be greater than 100%. |
10 |
| ScaleDown |
object |
The configuration of the scale-in behavior. |
|
| StabilizationWindowSeconds |
integer |
The cooldown period for a scale-in event. Unit: seconds. Valid values: 0 to 3600. Default value: 300. |
300 |
| SelectPolicy |
string |
The policy for the scaling step size for scale-in events. Valid values: `Max`, `Min`, and `Disable`. |
Max |
| Policies |
array<object> |
The policy configuration. |
|
|
object |
The policy configuration. |
||
| PeriodSeconds |
integer |
The execution interval. Unit: seconds. Valid values: 0 to 1800. |
15 |
| Type |
string |
The type of the policy. Valid values: `Pods` and `Percent`. |
Pods |
| Value |
string |
The value for the policy. The value must be an integer greater than 0. If `Type` is `Pods`, this parameter specifies the number of pods. If `Type` is `Percent`, this parameter specifies a percentage. The value can be greater than 100%. |
10 |
Examples
Success response
JSON format
{
"Code": 200,
"Message": "success",
"RequestId": "a5281053-08e4-47a5-b2ab-5c0323de7b5a",
"AppScalingRules": {
"CurrentPage": 1,
"PageSize": 10,
"TotalSize": 20,
"Result": [
{
"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": 1,
"MetricType": "asd"
}
]
},
"Trigger": {
"MinReplicas": 1,
"MaxReplicas": 122,
"Triggers": [
{
"Type": "cron",
"MetaData": "{\"dryRun\":true}",
"Name": "cron-trigger"
}
]
},
"Behaviour": {
"ScaleUp": {
"StabilizationWindowSeconds": 15,
"SelectPolicy": "Max",
"Policies": [
{
"PeriodSeconds": 15,
"Type": "Pods",
"Value": "10"
}
]
},
"ScaleDown": {
"StabilizationWindowSeconds": 300,
"SelectPolicy": "Max",
"Policies": [
{
"PeriodSeconds": 15,
"Type": "Pods",
"Value": "10"
}
]
}
}
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.