ModifyDesiredCapacity

Last updated: 2019-07-16 18:55:10

1. API Description

API request domain name: as.tencentcloudapi.com.

This API (ModifyDesiredCapacity) modifies the desired number of instances for the specified scaling group.

Default API request frequency limit: 20 times/second.

Note: This API supports financial availability zones. Because financial availability zones and non-financial availability zones are isolated. When specifying a financial availability zone (e.g., ap-shanghai-fsi) in the Region (a common parameter), you should also choose the financial availability zone preferably in the same region as that one specified in Region for the domain, such as as.ap-shanghai-fsi.tencentcloudapi.com.

2. Input Parameters

The following parameters are required for requesting this API, including action-specific parameters and common parameters. For more information about common parameters for all requests, see Common Request Parameters.

Parameter name Required Type Description
Action Yes String Common parameter; the name of this API: ModifyDesiredCapacity
Version Yes String Common parameter; the version this API: 2018-04-19
Region Yes String Common parameters; for details, see the Region List.
AutoScalingGroupId Yes String Scaling group ID
DesiredCapacity Yes Integer Desired number of instances

3. Output Parameters

Parameter name Type Description
RequestId String The ID of the request. Each request returns a unique ID. The RequestId is required to troubleshoot issues.

4. Sample

Modifying the Desired Number of Instances in a Scaling Group

Input Sample Code

https://as.tencentcloudapi.com/?Action=ModifyDesiredCapacity
&AutoScalingGroupId=asg-nvnlpbb8
&DesiredCapacity=2
&<Common request parameter>

Output Sample Code

{
    "Response": {
        "RequestId": "2f7c0f11-edfd-4598-a5f6-fb5c10cc9d8e"
    }
}

5. Developer Resources

API Explorer

This tool provides various capabilities such as online call, signature verification, SDK code generation, and quick API retrieval that significantly reduce the difficulty of using TencentCloud API.

SDK

TencentCloud API 3.0 integrates software development toolkits (SDKs) that support various programming languages to make it easier for you to call the APIs.

TCCLI

6. Error Codes

The following error codes are API business logic-related. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error
InvalidParameterValue.Size The value of maximum, minimum, or the desired number of instances is invalid.
LimitExceeded.DesiredCapacityLimitExceeded The desired number of instances exceeds the limit.
ResourceNotFound.AutoScalingGroupIdNotFound The scaling group does not exist.
ResourceUnavailable.AutoScalingGroupAbnormalStatus The scaling group is exceptional.
ResourceUnavailable.AutoScalingGroupDisabled The scaling group is disabled.