tencent cloud

Auto Scaling

Product Introduction
Overview
Strengths
Scenarios
Service Limits
Access Management
Purchase Guide
Getting Started
Creating a Scaling Plan in 5 Minutes
Step 1:Creating a Launch Configuration
Step 2:Creating a Scaling Group
Step 3:Creating a Scaling Policy
Tutorial
Creating Web Services
Creating High-performance Computing Cluster
Creating Servers for Sending Requests
Configuring For High Availability Services
Launch Configuration
Launch Configuration Overview
Creating a Launch Configuration
Viewing Launch Configuration List
Modifying Launch Configurations
Exception Detection
Scaling Groups
Scaling Group Overview
Creating a Scaling Group
Viewing Scaling Group List
Modifying Scaling Groups
Modifying Bound Instances
Adding CLBs
Delete scaling group
Creating Notifications
Creating Scaling Activity Notifications
Specifying Notification Recipients
Expanding and Reducing Capacity
Auto Scaling Lifecycle Hook
Managing Scheduled Actions
Managing an Alarm-triggered Policy
Instance Health Check
Expanding Capacity Manually
Scale-in Process
Viewing Scaling Activities
Suspending and Resuming Scaling
Scale-in Removal Protection
Scaling Activity Cancelled
Scaling Activity Failed
Cooldown Period
Monitoring
Monitor Alarm Metrics
Running Status Check
Scheduled Task
Scheduled Task Execution Time Description
Troubleshooting
Scaling Group Doesn't Work
Scaling Activity Failed
Use Cases
Setting a Fixed Outbound IP Address for Scaling Groups
Deploying Elastic Web Application Service
Enabling Services Upon CVM Start-up
Customer Cases
iCarbonX
API Documentation
History
Introduction
API Category
Making API Requests
Scaling Group APIs
Scaling Group Instances APIs
Launch Configuration APIs
Scheduled Action APIs
Alarm Trigger Policy APIs
Notification APIs
Lifecycle Hook APIs
Instance Refresh APIs
Other APIs
Data Types
Error Codes
FAQs
Contact Us
Glossary

CreateAutoScalingGroupFromInstance

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2025-10-30 21:28:17

1. API Description

Domain name for API request: as.intl.tencentcloudapi.com.

This API is used to create launch configurations and scaling groups based on an instance.

A maximum of 20 requests can be initiated per second for this API.

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 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 Instance ID. you can get the instance ID by logging in to the console or making an api call to DescribeInstances and retrieving the InstanceId from the returned information.
MinSize Yes Integer Minimum number of instances. value range: [0,2000]. to meet MaxSize >= DesiredCapacity >= MinSize at the same time.
MaxSize Yes Integer Maximum instance count. value range [0,2000]. to meet MaxSize >= DesiredCapacity >= MinSize.
DesiredCapacity No Integer Expected number of instances, value ranges from 0 to 2000, default value equals current MinSize, to meet MaxSize >= DesiredCapacity >= MinSize.
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, 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.

4. Example

Example1 Creating a launch configuration and scaling group based on an instance

Input Example

POST / HTTP/1.1
Host: as.intl.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
}

Output Example

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

5. Developer Resources

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 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.

Ajuda e Suporte

Esta página foi útil?

comentários