Queries the auto scaling policies of an application.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

This operation uses only common request headers. For more information, see the topic about common request parameters.

Request syntax

GET /pop/v1/eam/scale/application_scaling_rules HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
AppId String Query No 78194c76-3dca-418e-a263-cccd1ab4****

The ID of the application. You can call the ListApplication operation to query the application ID.

Response parameters

Parameter Type Example Description
AppScalingRules Struct N/A

The auto scaling policies of the application.

CurrentPage Integer 1

The page number of the returned page.

PageSize Integer 10

The number of auto scaling policies returned per page.

Result Array of Rule N/A

The list of auto scaling policies.

AppId String 78194c76-3dca-418e-a263-cccd1ab4****

The ID of the application to which the auto scaling policy belongs.

CreateTime Long 23212323123

The timestamp when the auto scaling policy was created.

LastDisableTime Long 23212323123

The timestamp when the auto scaling policy was last disabled.

MaxReplicas Integer 1

This parameter is deprecated.

Metric Struct N/A

This parameter is deprecated.

MaxReplicas Integer 1

This parameter is deprecated.

Metrics Array of Metric N/A

This parameter is deprecated.

MetricTargetAverageUtilization Integer 1

This parameter is deprecated.

MetricType String asd

This parameter is deprecated.

MinReplicas Integer 1

This parameter is deprecated.

MinReplicas Integer 1

This parameter is deprecated.

ScaleRuleEnabled Boolean true

Indicates whether the auto scaling policy is enabled.

  • true: The auto scaling policy is enabled.
  • false: The auto scaling policy is disabled.
ScaleRuleName String cpu-trigger

The name of the auto scaling policy.

ScaleRuleType String trigger

The type of the auto scaling policy. The value is fixed to trigger.

Trigger Struct N/A

The configurations of the trigger.

MaxReplicas Integer 122

The maximum number of replicas. Maximum value: 1000.

MinReplicas Integer 1

The minimum number of replicas. Minimum value: 0.

Triggers Array of Trigger N/A

The list of triggers.

MetaData String {"dryRun":true}

The metadata of the trigger.

Name String cron-trigger

The name of the trigger.

Type String cron

The type of the trigger. Valid values: cron and app_metric.

UpdateTime Long 23212323123

The timestamp when the auto scaling policy was last updated.

TotalSize Long 20

The total number of auto scaling policies.

Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String a5281053-08e4-47a5-b2ab-5c0323de7b5a

The ID of the request.

Examples

Sample requests

GET /pop/v1/eam/scale/application_scaling_rules HTTP/1.1
Common request headers

Sample success responses

XML format

<AppScalingRules>
    <PageSize>10</PageSize>
    <CurrentPage>1</CurrentPage>
    <TotalSize>20</TotalSize>
    <Result>
        <ScaleRuleEnabled>true</ScaleRuleEnabled>
        <LastDisableTime>23212323123</LastDisableTime>
        <AppId>78194c76-3dca-418e-a263-cccd1ab4****</AppId>
        <MinReplicas>1</MinReplicas>
        <MaxReplicas>1</MaxReplicas>
        <CreateTime>23212323123</CreateTime>
        <UpdateTime>23212323123</UpdateTime>
        <ScaleRuleName>cpu-trigger</ScaleRuleName>
        <ScaleRuleType>trigger</ScaleRuleType>
        <Metric>
            <MinReplicas>1</MinReplicas>
            <MaxReplicas>1</MaxReplicas>
            <Metrics>
                <MetricType>asd</MetricType>
                <MetricTargetAverageUtilization>1</MetricTargetAverageUtilization>
            </Metrics>
        </Metric>
        <Trigger>
            <MinReplicas>1</MinReplicas>
            <MaxReplicas>122</MaxReplicas>
            <Triggers>
                <Type>cron</Type>
                <MetaData>{"dryRun":true}</MetaData>
                <Name>cron-trigger</Name>
            </Triggers>
        </Trigger>
    </Result>
</AppScalingRules>
<Message>success</Message>
<RequestId>a5281053-08e4-47a5-b2ab-5c0323de7b5a</RequestId>
<Code>200</Code>

JSON format

{
    "AppScalingRules": {
        "PageSize": 10,
        "CurrentPage": 1,
        "TotalSize": 20,
        "Result": {
            "ScaleRuleEnabled": true,
            "LastDisableTime": 23212323123,
            "AppId": "78194c76-3dca-418e-a263-cccd1ab4****",
            "MinReplicas": 1,
            "MaxReplicas": 1,
            "CreateTime": 23212323123,
            "UpdateTime": 23212323123,
            "ScaleRuleName": "cpu-trigger",
            "ScaleRuleType": "trigger",
            "Metric": {
                "MinReplicas": 1,
                "MaxReplicas": 1,
                "Metrics": {
                    "MetricType": "asd",
                    "MetricTargetAverageUtilization": 1
                }
            },
            "Trigger": {
                "MinReplicas": 1,
                "MaxReplicas": 122,
                "Triggers": {
                    "Type": "cron",
                    "MetaData": "{\"dryRun\":true}",
                    "Name": "cron-trigger"
                }
            }
        }
    },
    "Message": "success",
    "RequestId": "a5281053-08e4-47a5-b2ab-5c0323de7b5a",
    "Code": 200
}

Error codes

For a list of error codes, visit the API Error Center.