CreateAutoScalingGroupFromInstance

Last updated: 2020-09-04 09:46:48

1. API Description

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.

Note: This API supports Finance regions. If the common parameter Region is a Finance region, a domain name with the Finance region needs to be specified, for example: as.ap-shanghai-fsi.tencentcloudapi.com

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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 parameter. The value used for this API: CreateAutoScalingGroupFromInstance.
Version Yes String Common parameter. The value used for this API: 2018-04-19.
Region Yes String Common parameter. 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 maximum number of instances. Value range: 0 - 2000.
MaxSize Yes Integer The minimum 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

3. Output Parameters

Parameter Name Type Description
AutoScalingGroupId String The scaling group ID.
RequestId String The unique request ID, which is returned for each request. RequestId is required for locating a problem.

4. Example

Example1 Creating launch configuration and scaling group based on an instance

Input Example

https://as.tencentcloudapi.com/?Action=CreateAutoScalingGroupFromInstance
&AutoScalingGroupName=as-test
&InstanceId=ins-19a14o9y
&MinSize=0&MaxSize=1&DesiredCapacity=0
&InheritInstanceTag=False
&<Common request parameters>

Output Example

{
  "Response": {
    "AutoScalingGroupId": "asg-cqatht5b",
    "RequestId": "19c10733-d0e8-4f58-ac82-e1b1affb0bbb"
  }
}

5. Developer Resources

API Explorer

This tool allows online call, signature authentication, SDK code generation and quick search of APIs to greatly improve the efficiency of using TencentCloud APIs.

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

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 Internal error.
InvalidParameter.InScenario The parameter is invalid in a specific scenario.
InvalidParameterValue.CvmError Exception with CVM parameter validation.
InvalidParameterValue.ForwardLb An application load balancer is incorrectly specified.
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.StoppedInstanceNotAllowAttach The shutdown instances cannot be added to the scaling group.
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.MaxSizeLimitExceeded The maximum number of instances exceeds the limit.
LimitExceeded.MinSizeLimitExceeded The minimum number of instances is below the limit.
MissingParameter Missing parameter.
ResourceNotFound.InstancesNotFound The specified instance does not exist.
ResourceUnavailable.LaunchConfigurationStatusAbnormal The launch configuration is exceptional.
ResourceUnavailable.ProjectInconsistent Project inconsistency.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help