Contents:
1. API Description
Domain name for API request: as.tencentcloudapi.com.
This API (DescribeAutoScalingGroups) is used to query the information of auto scaling groups.
- You can query the details of auto scaling groups based on information such as auto scaling group ID, auto scaling group name, or launch configuration ID. For more information on filters, see
Filter
. - If the parameter is empty, a certain number (specified by
Limit
and 20 by default) of auto scaling groups of the current user will be returned.
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
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: DescribeAutoScalingGroups |
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. |
AutoScalingGroupIds.N | No | Array of String | Queries by one or more auto scaling group IDs in the format of asg-nkdwoui0 . The maximum quantity per request is 100. This parameter does not support specifying both AutoScalingGroupIds and Filters at the same time. |
Filters.N | No | Array of Filter | Filter. The maximum number of Filters per request is 10. The upper limit for Filter.Values is 5. This parameter does not support specifying both AutoScalingGroupIds and Filters at the same time. |
Limit | No | Integer | Number of returned results. Default value: 20. Maximum value: 100. For more information on Limit , see the relevant section in the API overview. |
Offset | No | Integer | Offset. Default value: 0. For more information on Offset , see the relevant section in the API overview. |
3. Output Parameters
Parameter Name | Type | Description |
---|---|---|
AutoScalingGroupSet | Array of AutoScalingGroup | List of auto scaling group details. |
TotalCount | Integer | Number of eligible auto scaling groups. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
4. Example
Example1 Queries auto scaling groups
The sample code below shows how to query an auto scaling group by ID.
Input Example
https://as.tencentcloudapi.com/?Action=DescribeAutoScalingGroups
&AutoScalingGroupIds.0=asg-nkdwoui0
&<Common request parameter>
Output Example
{
"Response": {
"AutoScalingGroupSet": [
{
"LaunchConfigurationId": "asc-7vucy6ae",
"ForwardLoadBalancerSet": [
{
"TargetAttributes": [
{
"Port": 8080,
"Weight": 10
}
],
"LocationId": "loc-l3hmaev9",
"ListenerId": "lbl-ncw704sn",
"LoadBalancerId": "lb-23aejgcv"
}
],
"LoadBalancerIdSet": [],
"InstanceCount": 1,
"DesiredCapacity": 1,
"AutoScalingGroupStatus": "NORMAL",
"AutoScalingGroupId": "asg-nkdwoui0",
"ProjectId": 0,
"TerminationPolicySet": [
"OLDEST_INSTANCE"
],
"AutoScalingGroupName": "vpc-7layer-lb",
"InActivityStatus": "NOT_IN_ACTIVITY",
"InServiceInstanceCount": 1,
"DefaultCooldown": 301,
"MinSize": 0,
"MaxSize": 10,
"VpcId": "vpc-hy436tmc",
"LaunchConfigurationName": "launch configuration 1",
"CreatedTime": "2018-09-27T02:01:28Z",
"SubnetIdSet": [
"subnet-3tmerl37",
"subnet-b0vxjhot"
],
"EnabledStatus": "ENABLED",
"ZoneSet": []
}
],
"TotalCount": 1,
"RequestId": "b8d3660c-bed1-40ad-9e7d-77390c9610be"
}
}
Example2 Querying Auto Scaling Groups Binded to a Tag
Query the auto scaling groups bound to the tag key-value pair (city:shenzhen).
Input Example
https://as.tencentcloudapi.com/?Action=DescribeAutoScalingGroups
&Filters.0.Name=tag:city
&Filters.0.Values.0=shenzhen
&Offset=0
&Limit=1
&<Common request parameter>
Output Example
{
"Response": {
"AutoScalingGroupSet": [
{
"LaunchConfigurationId": "asc-7vucy6ae",
"ForwardLoadBalancerSet": [
{
"TargetAttributes": [
{
"Port": 8080,
"Weight": 10
}
],
"LocationId": "loc-l3hmaev9",
"ListenerId": "lbl-ncw704sn",
"LoadBalancerId": "lb-23aejgcv"
}
],
"LoadBalancerIdSet": [],
"InstanceCount": 1,
"DesiredCapacity": 1,
"AutoScalingGroupStatus": "NORMAL",
"AutoScalingGroupId": "asg-nkdwoui0",
"ProjectId": 0,
"TerminationPolicySet": [
"OLDEST_INSTANCE"
],
"AutoScalingGroupName": "vpc-7layer-lb",
"InActivityStatus": "NOT_IN_ACTIVITY",
"InServiceInstanceCount": 1,
"DefaultCooldown": 301,
"MinSize": 0,
"MaxSize": 10,
"VpcId": "vpc-hy436tmc",
"LaunchConfigurationName": "launch configuration 1",
"CreatedTime": "2018-09-27T02:01:28Z",
"SubnetIdSet": [
"subnet-3tmerl37",
"subnet-b0vxjhot"
],
"EnabledStatus": "ENABLED",
"ZoneSet": [],
"Tags": [
{
"Key": "city",
"Value": "shenzhen"
}
]
}
],
"TotalCount": 1,
"RequestId": "b8d3660c-bed1-40ad-9e7d-77390c9610be"
}
}
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.
- Tencent Cloud SDK 3.0 for Python
- Tencent Cloud SDK 3.0 for Java
- Tencent Cloud SDK 3.0 for PHP
- Tencent Cloud SDK 3.0 for Go
- Tencent Cloud SDK 3.0 for NodeJS
- Tencent Cloud SDK 3.0 for .NET
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 |
---|---|
InvalidFilter | Invalid filter. |
InvalidParameterConflict | The two parameters specified conflict and cannot co-exist. |
InvalidParameterValue.Filter | Invalid filter. |
InvalidPermission | The account does not support this operation. |