Disables 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. For more information, see the topic about common request parameters.

Request syntax

PUT /pop/v1/eam/scale/disable_application_scaling_rule 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.

ScalingRuleName String Query No cron-trigger

The name of the auto scaling policy.

Response parameters

Parameter Type Example Description
AppScalingRule Struct N/A

The information about the auto scaling policy.

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 12

This parameter is deprecated.

Metrics Array of Metric N/A

This parameter is deprecated.

MetricTargetAverageUtilization Integer 1

This parameter is deprecated.

MetricType String 1

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 cron-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 12

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.

Code Integer 200

The HTTP status code.

Message String success

The returned message.

RequestId String 5d6fa0bc-cc3**********

The ID of the request.

Examples

Sample requests

PUT /pop/v1/eam/scale/disable_application_scaling_rule HTTP/1.1
Common request headers

Sample success responses

XML format

<Message>success</Message>
<RequestId>5d6fa0bc-cc3**********</RequestId>
<AppScalingRule>
    <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>cron-trigger</ScaleRuleName>
    <ScaleRuleType>trigger</ScaleRuleType>
    <Metric>
        <MinReplicas>1</MinReplicas>
        <MaxReplicas>12</MaxReplicas>
        <Metrics>
            <MetricType>1</MetricType>
            <MetricTargetAverageUtilization>1</MetricTargetAverageUtilization>
        </Metrics>
    </Metric>
    <Trigger>
        <MinReplicas>1</MinReplicas>
        <MaxReplicas>12</MaxReplicas>
        <Triggers>
            <Type>cron</Type>
            <MetaData>{"dryRun":true}</MetaData>
            <Name>cron-trigger</Name>
        </Triggers>
    </Trigger>
</AppScalingRule>
<Code>200</Code>

JSON format

{
    "Message": "success",
    "RequestId": "5d6fa0bc-cc3**********",
    "AppScalingRule": {
        "ScaleRuleEnabled": true,
        "LastDisableTime": 23212323123,
        "AppId": "78194c76-3dca-418e-a263-cccd1ab4****",
        "MinReplicas": 1,
        "MaxReplicas": 1,
        "CreateTime": 23212323123,
        "UpdateTime": 23212323123,
        "ScaleRuleName": "cron-trigger",
        "ScaleRuleType": "trigger",
        "Metric": {
            "MinReplicas": 1,
            "MaxReplicas": 12,
            "Metrics": {
                "MetricType": 1,
                "MetricTargetAverageUtilization": 1
            }
        },
        "Trigger": {
            "MinReplicas": 1,
            "MaxReplicas": 12,
            "Triggers": {
                "Type": "cron",
                "MetaData": "{\"dryRun\":true}",
                "Name": "cron-trigger"
            }
        }
    },
    "Code": 200
}

Error codes

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