Domain name for API request: as.intl.tencentcloudapi.com.
This API (DescribeAutoScalingGroups) is used to query the information of auto scaling groups.
Filter.Limit and 20 by default) of auto scaling groups of the current user will be returned.A maximum of 60 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: DescribeAutoScalingGroups. |
| 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. |
| 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 criteria Specifies the scaling group ID obtained by logging in to the console or calling the api DescribeAutoScalingGroups and retrieving the AutoScalingGroupId from the return information. tag-key - String - optional - filter by the tag key. you can call the API GetTags to obtain the tag key from the returned information.The maximum number of Filters per request is 10, and that of Filter.Values is 5. the AutoScalingGroupIds and Filters parameters cannot be specified simultaneously. |
| 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. |
| 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, 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. |
This example shows you how to query scaling groups by ID.
POST / HTTP/1.1
Host: as.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAutoScalingGroups
<Common request parameters>
{
"AutoScalingGroupIds": [
"asg-pts6qcgp"
]
}{
"Response": {
"AutoScalingGroupSet": [
{
"InActivityStatus": "NOT_IN_ACTIVITY",
"LoadBalancerIdSet": [],
"InstanceNameIndexSettings": {
"BeginIndex": 0,
"Enabled": true
},
"RetryPolicy": "IMMEDIATE_RETRY",
"InServiceInstanceCount": 0,
"CreatedTime": "2022-04-21T03:21:14Z",
"SpotMixedAllocationPolicy": {
"CompensateWithBaseInstance": null,
"SpotAllocationStrategy": null,
"OnDemandPercentageAboveBaseCapacity": null,
"BaseCapacity": null
},
"VpcId": "vpc-lceuvai4",
"InstanceAllocationPolicy": "LAUNCH_CONFIGURATION",
"Tags": [],
"LaunchConfigurationId": "asc-mo1woym9",
"MaxSize": 1,
"MultiZoneSubnetPolicy": "PRIORITY",
"SubnetIdSet": [
"subnet-6qqolfi7"
],
"HealthCheckType": "CLB",
"LoadBalancerHealthCheckGracePeriod": 0,
"ForwardLoadBalancerSet": [
{
"TargetAttributes": [
{
"Port": 8080,
"Weight": 10
}
],
"Region": "ap-shanghai",
"LocationId": "loc-5dovrfov",
"ListenerId": "lbl-i4p05pmv",
"LoadBalancerId": "lb-pbx8nq2p"
}
],
"ProjectId": 0,
"AutoScalingGroupName": "product-asg-001",
"MinSize": 0,
"ServiceSettings": {
"ReplaceMonitorUnhealthy": false,
"ReplaceLoadBalancerUnhealthy": false,
"ScalingMode": "CLASSIC_SCALING",
"DesiredCapacitySyncWithMaxMinSize": false,
"ReplaceMode": "RECREATE"
},
"LaunchConfigurationName": "product-asc-001",
"CapacityRebalance": false,
"TerminationPolicySet": [
"OLDEST_INSTANCE"
],
"AutoScalingGroupStatus": "NORMAL",
"InstanceCount": 0,
"DesiredCapacity": 0,
"AutoScalingGroupId": "asg-pts6qcgp",
"Ipv6AddressCount": 0,
"DefaultCooldown": 300,
"EnabledStatus": "ENABLED",
"ZoneSet": []
}
],
"TotalCount": 1,
"RequestId": "53a76c96-a88c-4972-8488-66d6c15a080f"
}
}
This example shows you how to query scaling groups bound with the tag key-value pair (city:shenzhen).
POST / HTTP/1.1
Host: as.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeAutoScalingGroups
<Common request parameters>
{
"Limit": 1,
"Filters": [
{
"Values": [
"shenzhen"
],
"Name": "tag:city"
}
],
"Offset": 0
}{
"Response": {
"AutoScalingGroupSet": [
{
"InActivityStatus": "NOT_IN_ACTIVITY",
"LoadBalancerIdSet": [],
"InstanceNameIndexSettings": {
"BeginIndex": 0,
"Enabled": true
},
"RetryPolicy": "IMMEDIATE_RETRY",
"InServiceInstanceCount": 0,
"CreatedTime": "2019-10-29T02:21:26Z",
"SpotMixedAllocationPolicy": {
"CompensateWithBaseInstance": null,
"SpotAllocationStrategy": null,
"OnDemandPercentageAboveBaseCapacity": null,
"BaseCapacity": null
},
"VpcId": "vpc-qmjyqjnk",
"InstanceAllocationPolicy": "LAUNCH_CONFIGURATION",
"Tags": [
{
"Key": "city",
"ResourceType": "auto-scaling-group",
"Value": "shenzhen"
}
],
"LaunchConfigurationId": "asc-3d9e2zfx",
"MaxSize": 10,
"MultiZoneSubnetPolicy": "PRIORITY",
"SubnetIdSet": [
"subnet-3cpb9yfp",
"subnet-c98udmmr",
"subnet-1xsr551x",
"subnet-o3ibshdr",
"subnet-6c7q2jhz"
],
"HealthCheckType": "CVM",
"LoadBalancerHealthCheckGracePeriod": 0,
"ForwardLoadBalancerSet": [
{
"TargetAttributes": [
{
"Port": 8080,
"Weight": 10
}
],
"Region": "ap-shanghai",
"LocationId": "loc-y6t5rew2",
"ListenerId": "lbl-aiwdu9bd",
"LoadBalancerId": "lb-k264wzwj"
},
{
"TargetAttributes": [
{
"Port": 80,
"Weight": 10
}
],
"Region": "ap-shanghai",
"LocationId": "loc-qmxmx085",
"ListenerId": "lbl-ldjbrn65",
"LoadBalancerId": "lb-k264wzwj"
}
],
"ProjectId": 0,
"AutoScalingGroupName": "sz-asg",
"MinSize": 0,
"ServiceSettings": {
"ReplaceMonitorUnhealthy": false,
"ReplaceLoadBalancerUnhealthy": false,
"ReplaceMode": "RECREATE",
"DesiredCapacitySyncWithMaxMinSize": false,
"ScalingMode": "CLASSIC_SCALING"
},
"LaunchConfigurationName": "sz-asc",
"CapacityRebalance": false,
"TerminationPolicySet": [
"OLDEST_INSTANCE"
],
"AutoScalingGroupStatus": "NORMAL",
"InstanceCount": 0,
"DesiredCapacity": 0,
"AutoScalingGroupId": "asg-h71x7a3f",
"Ipv6AddressCount": 0,
"DefaultCooldown": 300,
"EnabledStatus": "ENABLED",
"ZoneSet": []
}
],
"TotalCount": 1,
"RequestId": "53a76c96-a88c-4972-8488-66d6c15a080f"
}
}
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 |
|---|---|
| InvalidParameter.ActionNotFound | Invalid Action request. |
| InvalidParameter.Conflict | Multiple parameters specified conflict and cannot co-exist. |
| InvalidParameterConflict | The two parameters specified conflict and cannot co-exist. |
| InvalidParameterValue.Filter | Invalid filter. |
| InvalidParameterValue.InvalidAutoScalingGroupId | Invalid scaling group ID. |
| InvalidParameterValue.InvalidFilter | Invalid filter condition. |
| InvalidParameterValue.InvalidLaunchConfigurationId | Invalid launch configuration ID. |
| InvalidParameterValue.LimitExceeded | The value exceeds the limit. |
| InvalidParameterValue.TooLong | Too many values. |
| InvalidPermission | The account does not support this operation. |
| LimitExceeded.FilterValuesTooLong | Too many values for the specified filter |
| UnsupportedOperation | Unsupported operation. |
Feedback