Domain name for API request: as.tencentcloudapi.com.
This API is used to create launch configurations and scaling groups based on an instance.
Note: for a scaling group that is created based on a monthly-subscribed instance, the instances added for scale-out are pay-as-you-go instance.
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: CreateAutoScalingGroupFromInstance. |
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. |
AutoScalingGroupName | Yes | String | The scaling group name. It must be unique under your account. The name can only contain letters, numbers, underscore, hyphen “-” and periods. It cannot exceed 55 bytes. |
InstanceId | Yes | String | The instance ID. |
MinSize | Yes | Integer | The minimum number of instances. Value range: 0-2000. |
MaxSize | Yes | Integer | The maximum number of instances. Value range: 0-2000. |
DesiredCapacity | No | Integer | The desired capacity. Its value must be greater than the minimum and smaller than the maximum. |
InheritInstanceTag | No | Boolean | Whether to inherit the instance tag. Default value: False |
Parameter Name | Type | Description |
---|---|---|
AutoScalingGroupId | String | The scaling group ID. |
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. |
POST / HTTP/1.1
Host: as.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAutoScalingGroupFromInstance
<Common request parameters>
{
"DesiredCapacity": 0,
"InstanceId": "ins-19a14o9y",
"AutoScalingGroupName": "as-test",
"MinSize": 0,
"MaxSize": 1,
"InheritInstanceTag": false
}
{
"Response": {
"AutoScalingGroupId": "asg-cqatht5b",
"RequestId": "19c10733-d0e8-4f58-ac82-e1b1affb0bbb"
}
}
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 |
---|---|
AccountQualificationRestrictions | The requesting account failed to pass the qualification review. |
CallCvmError | CVM API call failed. |
InternalError | An internal error occurred. |
InternalError.CallVpcError | VPC API call failed. |
InternalError.CalleeError | Exceptions occurred while invoking other services. |
InvalidParameter.ActionNotFound | Invalid Action request. |
InvalidParameter.InScenario | The parameter is invalid in a specific scenario. |
InvalidParameterValue.CvmConfigurationError | Exception with CVM parameter validation. |
InvalidParameterValue.CvmError | Exception with CVM parameter validation. |
InvalidParameterValue.DuplicatedSubnet | Duplicated subnet. |
InvalidParameterValue.ForwardLb | A CLB should be specified. |
InvalidParameterValue.InvalidInstanceId | Invalid instance ID. |
InvalidParameterValue.LaunchConfigurationNameDuplicated | The launch configuration name already exists. |
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.TooLong | Too many values. |
LimitExceeded.AutoScalingGroupLimitExceeded | The number of auto scaling groups exceeds the limit. |
LimitExceeded.DesiredCapacityLimitExceeded | The desired number of instances exceeds the limit. |
LimitExceeded.LaunchConfigurationQuotaNotEnough | You are short of the launch configuration quota. |
LimitExceeded.MaxSizeLimitExceeded | The maximum number of instances exceeds the limit. |
LimitExceeded.MinSizeLimitExceeded | The minimum number of instances is below the limit. |
MissingParameter | Parameter missing. |
ResourceNotFound.InstancesNotFound | The specified instance does not exist. |
ResourceUnavailable.LaunchConfigurationStatusAbnormal | The launch configuration is exceptional. |
ResourceUnavailable.ProjectInconsistent | Project inconsistency. |
ResourceUnavailable.StoppedInstanceNotAllowAttach | Unable to add instances to the scaling group when they are shut down. |
Was this page helpful?