Domain name for API request: as.intl.tencentcloudapi.com.
This API (ModifyAutoScalingGroup) is used to modify an auto scaling group.
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: ModifyAutoScalingGroup. |
| Version | Yes | String | Common Params. The value used for this API: 2018-04-19. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| AutoScalingGroupId | Yes | String | Scaling group ID. obtain available scaling group ids in the following ways:. |
| AutoScalingGroupName | No | String | Auto scaling group name, which can only contain letters, numbers, underscores, hyphens ("-"), and decimal points with a maximum length of 55 bytes and must be unique under your account. |
| DefaultCooldown | No | Integer | Default cooldown period in seconds. value ranges from 0 to 3600. default value: 300. |
| DesiredCapacity | No | Integer | Expected number of instances, value ranges from 0 to 2000. to meet maximum value greater than or equal to expected value, expected value greater than or equal to minimum value. |
| LaunchConfigurationId | No | String | Launch configuration ID. obtain available launch configuration ids in the following ways:. |
| MaxSize | No | Integer | Maximum number of instances, value range from 0 to 2000. to meet maximum value greater than or equal to expected value, expected value greater than or equal to minimum value. |
| MinSize | No | Integer | Minimum number of instances. value range [0,2000]. to meet maximum value equal to or greater than expected value, expected value equal to or greater than minimum value. |
| ProjectId | No | Integer | Project ID. obtain this parameter by calling DescribeProject, ProjectId field in the return value. default value is 0, indicates usage of the default project. |
| SubnetIds.N | No | Array of String | subnet ID list. you can obtain a valid vpc subnet ID by logging in to the console. you can also call the API DescribeSubnets and retrieve the valid vpc subnet ID from the SubnetId field in the API response. |
| TerminationPolicies.N | No | Array of String | Termination policy, whose maximum length is currently 1. Valid values include OLDEST_INSTANCE and NEWEST_INSTANCE. |
| VpcId | No | String | 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 (https://console.tencentcloud.com/vpc/vpc) or obtained from the VpcId field in the api response by calling the DescribeVpc api (https://www.tencentcloud.com/document/api/215/15778?from_cn_redirect=1). |
| Zones.N | No | Array of String | List of availability zones |
| RetryPolicy | No | String | Retry policy, whose valid values include IMMEDIATE_RETRY, INCREMENTAL_INTERVALS, and NO_RETRY, with the default value being IMMEDIATE_RETRY. A partially successful scaling activity is considered a failed activity. |
| ZonesCheckPolicy | No | String | AZ verification policy, whose valid values include ALL and ANY, with the default value being ANY. This policy comes into effect when actual changes are made to resource-related fields in the scaling group (such as launch configuration, AZ, or subnet). Common reasons for unavailable AZs or subnets include the CVM InstanceType in the AZ being sold out, the CBS cloud disk in the AZ being sold out, insufficient quota in the AZ, and insufficient IP addresses in the subnet. If there is no AZ or subnet in Zones/SubnetIds, a verification error will be reported regardless of the values of ZonesCheckPolicy. |
| ServiceSettings | No | ServiceSettings | Service settings such as unhealthy instance replacement. |
| Ipv6AddressCount | No | Integer | The number of IPv6 addresses that an instance has. valid values: 0 and 1. default value: 0, which means the instance does not allocate an IPv6 address. use a private network that supports IPv6 and enable IPv6 CIDR in the subnet. for usage restrictions, see IPv6 usage limits. |
| MultiZoneSubnetPolicy | No | String | Multi-AZ/multi-subnet policy, whose valid values include PRIORITY and EQUALITY, with the default value being PRIORITY. Points to consider regarding this policy: |
| HealthCheckType | No | String | Scaling group instance health check type, whose valid values include: |
| LoadBalancerHealthCheckGracePeriod | No | Integer | Grace period of the CLB health check |
| InstanceAllocationPolicy | No | String | Instance assignment policy, whose valid values include LAUNCH_CONFIGURATION and SPOT_MIXED. |
| SpotMixedAllocationPolicy | No | SpotMixedAllocationPolicy | Specifies how to assign pay-as-you-go instances and spot instances. This parameter is valid only when InstanceAllocationPolicy is set to SPOT_MIXED. |
| CapacityRebalance | No | Boolean | Capacity rebalancing feature, which is applicable only to spot instances within the scaling group. Valid values: |
| InstanceNameIndexSettings | No | InstanceNameIndexSettings | Instance name sequencing settings. When enabled, an incremental numeric sequence will be appended to the names of instances automatically created within the scaling group. |
| Parameter Name | 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. |
This example shows you how to modify the VpcId and SubnetIds of the specific scaling group.
POST / HTTP/1.1
Host: as.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAutoScalingGroup
<Common request parameters>
{
"AutoScalingGroupId": "asg-ka0s0q80",
"SubnetIds": [
"subnet-b0vxjhot",
"subnet-3tmerl37"
],
"VpcId": "vpc-hy436tmc"
}{
"Response": {
"RequestId": "c503ddc6-496c-44c9-8cec-e9f1c3f9c11c"
}
}
This example shows you how to modify the desired capacity of a scaling group to 3, the maximum capacity to 10, and the minimum capacity to 1.
POST / HTTP/1.1
Host: as.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: ModifyAutoScalingGroup
<Common request parameters>
{
"AutoScalingGroupId": "asg-ka0s0q80",
"MinSize": 1,
"MaxSize": 10,
"DesiredCapacity": 3
}{
"Response": {
"RequestId": "b41d8d30-21d4-412c-b7f3-53041879968c"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
| Error Code | Description |
|---|---|
| InternalError.CallVpcError | VPC API call failed. |
| InternalError.RequestError | An internal request error occurred. |
| InvalidParameter.ActionNotFound | Invalid Action request. |
| InvalidParameter.Conflict | Multiple parameters specified conflict and cannot co-exist. |
| InvalidParameter.InScenario | The parameter is invalid in a specific scenario. |
| InvalidParameterValue.AssertDesiredCapacityFailed | The declared original expected instance number does not match the actual original expected instance number. |
| InvalidParameterValue.BaseCapacityTooLarge | The specified base capacity cannot exceed the max capacity. |
| InvalidParameterValue.CvmError | Exception with CVM parameter validation. |
| InvalidParameterValue.DuplicatedSubnet | Duplicated subnet. |
| InvalidParameterValue.GroupNameDuplicated | The auto scaling group name already exists. |
| InvalidParameterValue.InvalidAutoScalingGroupId | Invalid scaling group ID. |
| InvalidParameterValue.InvalidLaunchConfigurationId | Invalid launch configuration ID. |
| InvalidParameterValue.InvalidSubnetId | Invalid subnet ID. |
| InvalidParameterValue.LaunchConfigurationNotFound | The specified launch configuration was not found. |
| InvalidParameterValue.LbProjectInconsistent | The load balancer is in a different project. |
| InvalidParameterValue.LimitExceeded | The value exceeds the limit. |
| InvalidParameterValue.OnlyVpc | The account only supports VPCs. |
| InvalidParameterValue.ProjectIdNotFound | The project ID does not exist. |
| InvalidParameterValue.Range | The value is outside the specified range. |
| InvalidParameterValue.Size | The value of maximum, minimum, or desired number of instances in the auto scaling group is invalid. |
| InvalidParameterValue.SubnetIds | The subnet information is invalid. |
| InvalidParameterValue.SubnetNotInDedicatedCluster | The subnet is not in the designated local dedicated cluster. |
| InvalidParameterValue.TooLong | Too many values. |
| LimitExceeded | The quota limit is exceeded. |
| LimitExceeded.MaxSizeLimitExceeded | The maximum number of instances exceeds the limit. |
| LimitExceeded.MinSizeLimitExceeded | The minimum number of instances is below the limit. |
| MissingParameter | Parameter missing. |
| MissingParameter.InScenario | A parameter is missing in a specific scenario. |
| ResourceNotFound.AutoScalingGroupNotFound | The scaling group does not exist. |
| ResourceUnavailable.ForbiddenModifyVpc | You cannot modify the VPC of a scaling group bound with a load balancer. |
| ResourceUnavailable.LaunchConfigurationStatusAbnormal | The launch configuration is exceptional. |
| ResourceUnavailable.ProjectInconsistent | Project inconsistency. |
Feedback