as — Auto Scaling
as · 2018-04-19
ModifyAutoScalingGroup
POST
Modify an auto scaling group.
Wire call
Converge Cloud is RPC over HTTP. There is one path — / — and the action travels in the X-TC-Action header. The /as/ModifyAutoScalingGroup path used in the OpenAPI document is a documentation convenience so each action is addressable; it is not a route on the server.
curl
curl -sS https://as.api3.convergecloud.com/ \
-H 'Authorization: TC3-HMAC-SHA256 Credential=<SecretId>/<YYYY-MM-DD>/as/tc3_request, SignedHeaders=content-type;host;x-tc-action, Signature=<sig>' \
-H 'Content-Type: application/json; charset=utf-8' \
-H 'Host: as.api3.convergecloud.com' \
-H 'X-TC-Action: ModifyAutoScalingGroup' \
-H 'X-TC-Version: 2018-04-19' \
-H 'X-TC-Timestamp: <unix-seconds>' \
-H 'X-TC-Region: luzon' \
-d '{"AutoScalingGroupId":"<AutoScalingGroupId>"}'Request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| AutoScalingGroupId | string | Yes | Scaling group ID. obtain available scaling group ids in the following ways: query scaling group ids by logging in to the console. obtain scaling group ids by calling the DescribeAutoScalingGroups api and retrieving AutoScalingGroupId from the returned information.. |
| AutoScalingGroupName | string | No | The scaling group name must be unique in your account. name only supports chinese, english, digits, underscore, separator "-", and decimal point. the maximum length cannot exceed 55 bytes.. |
| DefaultCooldown | integer | No | Default cooldown in seconds, value ranges from 0 to 3600, default value is 300.. |
| DesiredCapacity | integer | No | Expected number of instances. value range [0,2000]. to meet the maximum value equal to or greater than the expected value, and the expected value equal to or greater than the minimum value.. |
| LaunchConfigurationId | string | No | Launch configuration ID. obtain available launch configuration ids in the following ways: query the launch configuration ID by logging in to the console. obtain the launch configuration ID by calling the DescribeLaunchConfigurations api and retrieving the LaunchConfigurationId from the returned information.. |
| MaxSize | integer | No | Maximum number of instances. value range: [0,2000]. to meet the requirement, the maximum value must be equal to or greater than the expected value, and the expected value must be equal to or greater than the minimum value.. |
| MinSize | integer | No | Minimum number of instances. value range: [0,2000]. to meet the requirement, the maximum value must be equal to or greater than the expected value, and the expected value must be equal to or greater than the minimum value.. |
| ProjectId | integer | No | Project ID. obtain this parameter by calling the `ProjectId` field in the return value of DescribeProject. default value is 0, indicating usage of the default project.. |
| SubnetIds | string[] | No | subnet ID list. valid vpc subnet ids can be obtained by logging in to the console for querying. you can also call the API DescribeSubnets and retrieve them from the SubnetId field in the API response.. |
| TerminationPolicies | string[] | No | Termination policy, whose maximum length is currently 1. valid values: OLDEST_INSTANCE and NEWEST_INSTANCE. OLDEST_INSTANCE terminates the OLDEST INSTANCE in the scaling group first. NEWEST_INSTANCE terminates the NEWEST INSTANCE in the scaling group first.. |
| VpcId | string | No | vpc ID. when modifying the vpc, you need to change the SubnetIds parameter to the subnet of this vpc. effective VpcId can be queried by logging in to the console; you can also call the DescribeVpc api and get the VpcId field from the api response.. |
| Zones | string[] | No | AZ list. |
| RetryPolicy | string | No | RETRY policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. a partially successful scaling operation is considered a failed activity. IMMEDIATE_RETRY: RETRY immediately, attempting retries in rapid succession over a short period, and cease further retries after a certain number of consecutive failures (5 times). IN… |
| ZonesCheckPolicy | string | No | Availability Zone validation policy. valid values include ALL and ANY. default value: ANY. it is effective when scaling group actual change resource-related fields (launch configuration, az, subnet) are modified. ALL: verification passes if ALL azs (Zone) or subnets (SubnetId) are available. otherwise, a verification error will be reported. ANY: verification passes if ANY AZ (Zone) or subnet (S… |
| ServiceSettings | ServiceSettings | No | Service settings, including cloud monitoring and unhealthy instance replacement.. |
| Ipv6AddressCount | integer | No | The instance has a configuration for the number of IPv6 addresses. valid values include 0 and 1. the default value is 0, which means the instance does not allocate an IPv6 address. you need to use a VPC that supports IPv6 and enable IPv6 CIDR in the subnet. |
| MultiZoneSubnetPolicy | string | No | The multi-az/subnet policy, with values including PRIORITY and EQUALITY, defaults to PRIORITY. PRIORITY: attempt to create instances taking the order of the az/subnet list as the PRIORITY. if instances can be successfully created in the az/subnet with the highest PRIORITY, they will always be created there. EQUALITY: instances added through scale-out will be distributed across multiple azs/subn… |
| HealthCheckType | string | No | Scaling group instance health check type, values are as follows: CVM: determine whether an instance is unhealthy based on its network status. an unhealthy network status refers to an event where instances become unreachable via PING. for detailed criteria of judgment, refer to instance health check. CLB: determine whether an instance is unhealthy based on the health check status of CLB. for the… |
| LoadBalancerHealthCheckGracePeriod | integer | No | Specifies the CLB health check grace period in seconds. value range: [0, 7200]. default value: 0. |
| InstanceAllocationPolicy | string | No | Instance allocation policy. valid values include LAUNCH_CONFIGURATION and SPOT_MIXED. LAUNCH_CONFIGURATION represents the traditional startup CONFIGURATION mode. SPOT_MIXED represents the SPOT hybrid mode. currently only support hybrid mode when the LAUNCH CONFIGURATION uses pay-as-you-go billing mode. in hybrid mode, the scaling group will scale out based on the SPOT model. the billing type of… |
| SpotMixedAllocationPolicy | SpotMixedAllocationPolicy | No | Allocation policy of instances for each billing type in SPOT hybrid mode. available only when InstanceAllocationPolicy is set to SPOT_MIXED.. |
| CapacityRebalance | boolean | No | The capacity rebalancing feature is only applicable to spot instances within the scaling group. valid values: TRUE: enable this feature. when spot instances within the scaling group are about to be automatically recycled by the spot instance service, AS initiates the termination process of spot instances. if a scale-in hook is configured, trigger before termination. after the termination proces… |
| InstanceNameIndexSettings | InstanceNameIndexSettings | No | Instance name sequencing settings. once enabled, append incremental numeric sequence to the names of instances automatically created within the scaling group.. |
| HostNameIndexSettings | HostNameIndexSettings | No | Instance hostname sequencing settings. once enabled, append incremental numeric sequence to the hostname of instances automatically created within the scaling group.. |
| ConcurrentScaleOutForDesiredCapacity | boolean | No | The concurrent scaling up functionality for matching expected numbers cannot be set when InstanceAllocationPolicy is in spot hybrid mode or when ScalingMode is in the scaling-prioritized startup mode. currently only two matching expected number scale-out activities are supported to run concurrently. other types of activities such as specified quantity scale-out or scale-in cannot be specified. … |
Response
Fields are returned inside the Response envelope. Converge Cloud answers HTTP 200 for errors as well as successes, so read Response.Error rather than the status code — and test for the presence of that object, because Code is occasionally the empty string.
| Field | Type | Description |
|---|---|---|
| RequestId | string | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Success
{
"Response": {
// action-specific fields,
"RequestId": "…"
}
}Error
{
"Response": {
"Error": { "Code": "…", "Message": "…" },
"RequestId": "…"
}
}Try it
CredentialThe key never leaves this tab — it signs the request here. The signed request goes to /api-relay/as.
Request bodyvalid JSONPOST as.api3.convergecloud.com · ModifyAutoScalingGroup
What failure looks like
Example error responses for this action. Match on Code.
Recorded error 1
{
"Response": {
"Error": {
"Code": "ResourceNotFound.AutoScalingGroupNotFound",
"Message": "The specified auto scaling group `asg-00000000` is not found."
},
"RequestId": "f8f13920-0b97-f519-d934-c798d0941643"
}
}