You can call AddScalingConfigItemV2 operation to add a scaling configuration item.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddScalingConfigItemV2 |
The operation that you want to perform. Set the value to AddScalingConfigItemV2. |
ConfigItemInformation | String | Yes | { "ruleName": "Triggered by Load", "adjustmentType": "QUANTITYCHANGEINCAPACITY", "coolDownTime": 100, "ruleParam": { "metricName": "YarnFreeCores", "period": 10, "statistics": "xxx", "comparisonOperator": "\u003e\u003d", "threshold": 10, "evaluationCount": 1 }, "adjustmentValue": 1, "ruleType": "BYLOAD", "configItemType": "SCALING_RULE" } |
configuration items information. Information varies with configuration items type. Valid values:
|
ConfigItemType | String | Yes | SCALING_RULE |
The type of the configuration parameters. Valid values:
|
RegionId | String | Yes | cn-hangzhou |
The region ID of the instance. You can call DescribeRegions You can call this operation to view the latest list of Alibaba Cloud regions. |
ScalingGroupBizId | String | Yes | SGB-A4521231C**** |
The ID of the scaling group. You can call ListScalingGroupV2 View the ID of the scaling group. |
ResourceGroupId | String | No | rg-acfmv6jutt6**** |
The ID of the resource group. You can call ListResourceGroups View the ID of the resource group. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Data | String | SRB-DA382429BA82**** |
The ID of the new configuration items. |
RequestId | String | 6C96FD2C-95A0-4C03-8A19-7D84A4BAAA1E |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=AddScalingConfigItemV2
&ConfigItemInformation={ "ruleName": "Trigger by payload", "adjustmentType": "QUANTITYCHANGEINCAPACITY", "coolDownTime": 100, "ruleParam": { "metricName": "YarnFreeCores", "period": 10, "statistics": "xxx", "comparisonOperator": "\u003e\u003d", "threshold": 10, "evaluationCount": 1 }, " adjustmentValue ": 1, " ruleType ": " BYLOAD ", " configItemType ": " SCALING_RULE " }
&ConfigItemType=SCALING_RULE
&RegionId=cn-hangzhou
&ScalingGroupBizId=SGB-A4521231C****
&<common request parameters>
Sample success responses
XML
format
<RequestId>6C96FD2C-95A0-4C03-8A19-7D84A4BAAA1E</RequestId>
<Data>SRB-DA382429BA82****</Data>
JSON
Syntax
{
"RequestId":"6C96FD2C-95A0-4C03-8A19-7D84A4BAAA1E",
"Data":"SRB-DA382429BA82****"
}