Enables an auto scaling policy for 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 and does not have operation-specific request headers. For more information, see Common request and response headers.

Request syntax

PUT /pop/v1/sam/scale/enableApplicationScalingRule HTTP/1.1

Request parameters

ParameterTypePositionRequiredExampleDescription
AppIdStringQueryYes7171a6ca-d1cd-4928-8642-7d5cfe69****

The application ID.

ScalingRuleNameStringQueryYestimer-0800-2100

The name of the auto scaling policy.

Response parameters

ParameterTypeExampleDescription
RequestIdString91F93257-7A4A-4BD3-9A7E-2F6EAE6D****

The request ID.

TraceIdString0a98a02315955564772843261e****

The trace ID that is used to query the details of the request.

MessageStringsuccess

The returned message. Valid values:

  • success: If the call is successful, success is returned.
  • An error code: If the call fails, an error code is returned.
ErrorCodeStringNull

The error code. Valid values:

  • If the call is successful, the ErrorCode parameter is not returned.
  • If the call fails, the ErrorCode parameter is returned. For more information, see the "Error codes" section in this topic.
CodeString200

The HTTP status code. Valid values:

  • 2xx: The call was successful.
  • 3xx: The call was redirected.
  • 4xx: The call failed.
  • 5xx: A server error occurred.
SuccessBooleantrue

Indicates whether the application instances were restarted. Valid values:

  • true: The application instances were restarted.
  • false: The application instances failed to be restarted.

Examples

Sample requests

PUT /pop/v1/sam/scale/enableApplicationScalingRule?AppId=7171a6ca-d1cd-4928-8642-7d5cfe69****&ScalingRuleName=timer-0800-2100 HTTP/1.1
Host:sae.aliyuncs.com
Content-Type:application/json

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<EnableApplicationScalingRuleResponse>
    <RequestId>91F93257-7A4A-4BD3-9A7E-2F6EAE6D****</RequestId>
    <TraceId>0a98a02315955564772843261e****</TraceId>
</EnableApplicationScalingRuleResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "91F93257-7A4A-4BD3-9A7E-2F6EAE6D****",
  "TraceId" : "0a98a02315955564772843261e****"
}

Error codes

HTTP status codeError codeError messageDescription
400user.indebtThe user has an outstanding payment.The current user has overdue payments.
400NoComputeResourceQuota.App.ExceedYou can create %s instances for each application. Please submit a ticket to raise the quota.A maximum of %s instances can be created for each application. Join the DingTalk group 32874633 for technical support.
400NoComputeResourceQuota.User.ExceedYour account is limited to create %s instances. Please submit a ticket to raise the quota.A maximum of %s instances can be created within your account. Join the DingTalk group 32874633 for technical support.
400System.UpgradingThe system is being upgraded. Please try again later.The system is being upgraded. Try again later.
400Application.ChangerOrderRunningAn application change process is in progress. Please try again later.An application change is in progress. Try again later.

For a list of error codes, see Service error codes.