All Products
Search
Document Center

Serverless App Engine:DescribeApplicationScalingRule

Last Updated:Jan 14, 2026

Describes a single auto scaling policy for an application.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

sae:DescribeApplicationScalingRule

get

*All Resource

*

None None

Request syntax

GET /pop/v1/sam/scale/applicationScalingRule HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

AppId

string

Yes

The application ID.

a0d2e04c-159d-40a8-b240-d2f2c263****

ScalingRuleName

string

Yes

The name of the auto scaling policy.

test

Response elements

Element

Type

Description

Example

object

The returned information.

RequestId

string

The request ID.

73404D3D-EE4F-4CB2-B197-5C46F6A1****

TraceId

string

The trace ID. Use this ID to query the details of a request.

0b57ff7e16243300839193068e****

Data

object

The returned data.

Timer

object

The scheduled scaling policy.

EndDate

string

The end date of a short-term scheduled scaling policy. The following list describes the valid values:

  • If you leave both BeginDate and EndDate empty, the policy is a long-term policy. This is the default value.

  • If you specify a date, for example, you set BeginDate to 2021-03-25 and EndDate to 2021-04-25, the policy is effective for one month.

2021-04-25

BeginDate

string

The start date of a short-term scheduled scaling policy. The following list describes the valid values:

  • If you leave both BeginDate and EndDate empty, the policy is a long-term policy. This is the default value.

  • If you specify a date, for example, you set BeginDate to 2021-03-25 and EndDate to 2021-04-25, the policy is effective for one month.

2021-03-25

Schedules

array<object>

The points in time when the auto scaling policy is triggered within a day.

object

The data of a point in time.

AtTime

string

The point in time. Format: HH:mm.

08:00

TargetReplicas

integer

The target number of instances.

2

MinReplicas

integer

The minimum number of instances.

1

MaxReplicas

integer

The maximum number of instances.

10

Period

string

The period in which the scheduled scaling policy is executed. Valid values:

  • * * *: The policy is executed at a specified time every day.

  • * * Fri,Mon: The policy is executed at a specified time on one or more days of a week. You can select multiple days. The time is in GMT+8. Valid values:

    • Sun: Sunday

    • Mon: Monday

    • Tue: Tuesday

    • Wed: Wednesday

    • Thu: Thursday

    • Fri: Friday

    • Sat: Saturday

  • 1,2,3,28,31 * *: The policy is executed at a specified time on one or more days of a month. You can select multiple days. The value can be an integer from 1 to 31. If a month does not have a 31st day, the policy is not executed on that day.

* * *

UpdateTime

integer

The time when the auto scaling policy was updated. Unit: milliseconds.

1624330075827

AppId

string

The application ID.

a0d2e04c-159d-40a8-b240-d2f2c263****

CreateTime

integer

The time when the auto scaling policy was created. Unit: milliseconds.

1624329843790

LastDisableTime

integer

The time when the auto scaling policy was last disabled.

1641882854484

ScaleRuleEnabled

boolean

Indicates whether the auto scaling policy is enabled. Valid values:

  • true: The policy is enabled.

  • false: The policy is disabled.

true

ScaleRuleType

string

The type of the auto scaling policy. Valid values:

  • timing: scheduled scaling.

  • metric: metric-based scaling.

  • mix: hybrid scaling.

timing

Metric

object

The metric-based scaling policy.

Metrics

array<object>

The list of metric-based scaling policies.

object

The metric data.

MetricTargetAverageUtilization

integer

The target value of the metric.

  • The target CPU utilization. Unit: percent.

  • The target memory usage. Unit: percent.

  • The number of queries per second (QPS).

  • The response time. Unit: milliseconds.

  • The average number of active TCP connections per second.

  • The QPS of a public-facing SLB instance.

  • The response time of a public-facing SLB instance. Unit: milliseconds.

  • The QPS of a private SLB instance.

  • The response time of a private SLB instance. Unit: milliseconds.

20

MetricType

string

The metric that is used to trigger the auto scaling policy. Valid values:

  • CPU: CPU utilization.

  • MEMORY: memory usage.

  • QPS: the average QPS of a single instance of a Java application in one minute.

  • RT: the average response time (RT) of all service interfaces of a Java application in one minute.

  • tcpActiveConn: the average number of active TCP connections of a single instance in 30 seconds.

  • SLB_QPS: the average QPS of a single instance for a public-facing SLB instance in 15 seconds.

  • SLB_RT: the average RT of a public-facing SLB instance in 15 seconds.

  • INTRANET_SLB_QPS: the average QPS of a single instance for a private SLB instance in 15 seconds.

  • INTRANET_SLB_RT: the average RT of a private SLB instance in 15 seconds.

CPU

SlbProject

string

The SLB access log Project.

test

SlbLogstore

string

The SLB access log Logstore.

test

Vport

string

The port of the SLB instance.

80

SlbId

string

The ID of the SLB instance.

lb-xxx

MetricsStatus

object

The status of the metric-based scaling policy.

DesiredReplicas

integer

The target number of instances.

2

NextScaleTimePeriod

integer

The period of the next metric-based scaling.

3

CurrentReplicas

integer

The current number of instances.

2

LastScaleTime

string

The time of the last scaling activity.

2022-01-11T08:14:32Z

CurrentMetrics

array<object>

The data of the current metric-based scaling.

object

The metric data.

Type

string

The type of the metric. This parameter is associated with the monitoring metric.

  • Resource: the metric value of cpu or memory.

  • Pods: the metric value of tcpActiveConn.

  • External: the metric value of arms or slb.

Resource

CurrentValue

integer

The current value.

0

Name

string

The name of the metric.

  • cpu: CPU utilization.

  • memory: memory usage.

  • arms_incall_qps: the average QPS of a single instance of a Java application in one minute.

  • arms_incall_rt: the average RT of all service interfaces of a Java application in one minute.

  • tcpActiveConn: the number of active TCP connections.

  • slb_incall_qps: the QPS of a public-facing SLB instance.

  • slb_incall_rt: the RT of a public-facing SLB instance.

  • intranet_slb_incall_qps: the QPS of a private SLB instance.

  • intranet_slb_incall_rt: the RT of a private SLB instance.

cpu

NextScaleMetrics

array<object>

The list of metrics for the next scaling activity.

object

The metric data.

NextScaleOutAverageUtilization

integer

The metric threshold for the next scale-out. The value is a percentage.

21

NextScaleInAverageUtilization

integer

The metric threshold for the next scale-in. The value is a percentage.

10

Name

string

The name of the metric.

  • cpu: CPU utilization.

  • memory: memory usage.

  • arms_incall_qps: the average QPS of a single instance of a Java application in one minute.

  • arms_incall_rt: the average RT of all service interfaces of a Java application in one minute.

  • tcpActiveConn: the number of active TCP connections.

  • slb_incall_qps: the QPS of a public-facing SLB instance.

  • slb_incall_rt: the RT of a public-facing SLB instance.

  • intranet_slb_incall_qps: the QPS of a private SLB instance.

  • intranet_slb_incall_rt: the RT of a private SLB instance.

cpu

MaxReplicas

integer

The maximum number of instances.

3

MinReplicas

integer

The minimum number of instances.

1

ScaleUpRules

object

The scale-out rules.

Step

integer

The scaling step size for scale-outs. The maximum number of instances that can be added at a time.

100

StabilizationWindowSeconds

integer

The cooldown period for scale-outs. The value can be an integer from 0 to 3600. Unit: seconds. Default value: 0.

300

Disabled

boolean

Indicates whether scale-in is disabled. Valid values:

  • true: enabled.

  • false: disabled.

Note

If you enable this feature, the application is never scaled in. This prevents business risks that are caused by scale-ins during peak hours. By default, this feature is disabled.

false

ScaleDownRules

object

The scale-in rules.

Step

integer

The scaling step size for scale-ins. The maximum number of instances that can be removed at a time.

100

StabilizationWindowSeconds

integer

The cooldown period for scale-ins. The value can be an integer from 0 to 3600. Unit: seconds. Default value: 0.

300

Disabled

boolean

Indicates whether scale-in is disabled. Valid values:

  • true: enabled.

  • false: disabled.

Note

If you enable this feature, the application is never scaled in. This prevents business risks that are caused by scale-ins during peak hours. By default, this feature is disabled.

false

ScaleRuleName

string

The name of the auto scaling policy.

test

MinReadyInstances

integer

The minimum number of ready instances. Valid values:

  • If you set this parameter to 0, the application is interrupted during an upgrade.

  • If you set this parameter to -1, the system uses a recommended value for the minimum number of ready instances. The value is 25% of the current number of instances. For example, if the current number of instances is 5, the minimum number of ready instances is 2 after 5 × 25% = 1.25 is rounded up.

Note

Set the minimum number of ready instances to a value greater than or equal to 1 for each rolling deployment to ensure business continuity.

1

MinReadyInstanceRatio

integer

The percentage of the minimum number of ready instances. Valid values:

  • -1: an initial value, which indicates that a percentage is not used.

  • 0 to 100: a percentage that is rounded up. For example, if you set this parameter to 50% and the current number of instances is 5, the minimum number of ready instances is 3.

Note

If you specify both MinReadyInstances and MinReadyInstanceRatio, and the value of MinReadyInstanceRatio is not -1, the value of MinReadyInstanceRatio prevails. For example, if MinReadyInstances is set to 5 and MinReadyInstanceRatio is set to 50, the value 50 is used to calculate the minimum number of ready instances.

-1

Message

string

The additional information. Valid values:

  • If the request is successful, success is returned.

  • If the request fails, a specific error code is returned.

success

ErrorCode

string

The error code. Valid values:

  • If the request is successful, the ErrorCode field is not returned.

  • If the request fails, the ErrorCode field is returned. For more information, see the Error codes section in this topic.

Code

string

The HTTP status code or a POP error code. Valid values:

  • 2xx: The operation is successful.

  • 3xx: A redirection is required.

  • 4xx: A request error occurred.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the application instance was successfully restarted.

  • true: The restart succeeded.

  • false: The restart failed.

true

Examples

Success response

JSON format

{
  "RequestId": "73404D3D-EE4F-4CB2-B197-5C46F6A1****",
  "TraceId": "0b57ff7e16243300839193068e****",
  "Data": {
    "Timer": {
      "EndDate": "2021-04-25",
      "BeginDate": "2021-03-25",
      "Schedules": [
        {
          "AtTime": "08:00",
          "TargetReplicas": 2,
          "MinReplicas": 1,
          "MaxReplicas": 10
        }
      ],
      "Period": "* * *"
    },
    "UpdateTime": 1624330075827,
    "AppId": "a0d2e04c-159d-40a8-b240-d2f2c263****",
    "CreateTime": 1624329843790,
    "LastDisableTime": 1641882854484,
    "ScaleRuleEnabled": true,
    "ScaleRuleType": "timing",
    "Metric": {
      "Metrics": [
        {
          "MetricTargetAverageUtilization": 20,
          "MetricType": "CPU",
          "SlbProject": "test",
          "SlbLogstore": "test",
          "Vport": "80",
          "SlbId": "lb-xxx"
        }
      ],
      "MetricsStatus": {
        "DesiredReplicas": 2,
        "NextScaleTimePeriod": 3,
        "CurrentReplicas": 2,
        "LastScaleTime": "2022-01-11T08:14:32Z",
        "CurrentMetrics": [
          {
            "Type": "Resource",
            "CurrentValue": 0,
            "Name": "cpu"
          }
        ],
        "NextScaleMetrics": [
          {
            "NextScaleOutAverageUtilization": 21,
            "NextScaleInAverageUtilization": 10,
            "Name": "cpu"
          }
        ]
      },
      "MaxReplicas": 3,
      "MinReplicas": 1,
      "ScaleUpRules": {
        "Step": 100,
        "StabilizationWindowSeconds": 300,
        "Disabled": false
      },
      "ScaleDownRules": {
        "Step": 100,
        "StabilizationWindowSeconds": 300,
        "Disabled": false
      }
    },
    "ScaleRuleName": "test",
    "MinReadyInstances": 1,
    "MinReadyInstanceRatio": -1
  },
  "Message": "success",
  "ErrorCode": "空",
  "Code": "200",
  "Success": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.