Queries the basic information, instances, and scaling configurations of a scaling group. If you set OutputFormat to YAML for a scaling group of the Elastic Container Instance type, the output is a Kubernetes Deployment file in YAML format.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
ess:DescribeScalingGroupDetail |
get |
*ScalingGroup
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
Yes |
The region ID of the scaling group. For more information, see Regions and zones. |
cn-hangzhou |
| ScalingGroupId |
string |
Yes |
The ID of the scaling group. |
asg-bp18p2yfxow2dloq**** |
| OutputFormat |
string |
No |
The output format. Set the value to yaml. |
YAML |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| ScalingGroup |
object |
The scaling group. |
|
| VpcId |
string |
The virtual private cloud (VPC) ID of the scaling group. |
vpc-wz9fcq97y1vqkd8bijcq6 |
| CreationTime |
string |
The time when the scaling group was created. |
2014-08-14T10:58Z |
| TotalInstanceCount |
integer |
The total number of Elastic Compute Service (ECS) instances in the scaling group. |
1 |
| ScalingGroupName |
string |
The name of the scaling group. The name of each scaling group must be unique in a region. The name must be 2 to 64 characters in length, and can contain letters, digits, underscores (_), hyphens (-), and periods (.). It must start with a letter or digit. |
dyrSuvBOtO1dEdIlIbp**** |
| SpotInstancePools |
integer |
The number of instance types that are specified. Preemptible instances of multiple lowest-priced instance types are evenly distributed across the zones of the scaling group. Valid values: 0 to 10. |
5 |
| StoppedCapacity |
integer |
The number of instances that are stopped in Economical Mode in the scaling group. |
1 |
| OnDemandPercentageAboveBaseCapacity |
integer |
The percentage of pay-as-you-go instances among the excess instances when the minimum number of pay-as-you-go instances reaches the requirement. Valid values: 0 to 100. |
20 |
| ModificationTime |
string |
The time when the scaling group was modified. |
2014-08-14T10:58Z |
| MinSize |
integer |
The minimum number of ECS instances that must be contained in the scaling group. |
1 |
| ScalingGroupId |
string |
The ID of the scaling group. |
asg-bp14wlu85wrpchm0**** |
| CompensateWithOnDemand |
boolean |
Whether pay-as-you-go ECS instances can be automatically created to meet the required number when preemptible ECS instances cannot be created due to high prices or insufficient resources. This parameter takes effect when you set
|
true |
| ScalingPolicy |
string |
The reclaim mode of the scaling group. Valid values:
For more information, see RemoveInstances. |
recycle |
| RemovingWaitCapacity |
integer |
The number of ECS instances that are in the Pending Remove state in the scaling group. |
1 |
| ActiveCapacity |
integer |
The number of ECS instances that are in the In Service state in the scaling group. |
1 |
| OnDemandBaseCapacity |
integer |
The minimum number of pay-as-you-go instances that must be contained in the scaling group. Valid values: 0 to 1000. If the number of pay-as-you-go instances in the scaling group is less than the value of this parameter, Auto Scaling preferentially creates pay-as-you-go instances. |
30 |
| ProtectedCapacity |
integer |
The number of ECS instances that are in the Protected state in the scaling group. |
1 |
| HealthCheckType |
string |
The health check mode of the scaling group. Valid values:
|
ECS |
| LifecycleState |
string |
The status of the scaling group. Valid values:
|
Active |
| GroupDeletionProtection |
boolean |
Indicates whether Deletion Protection is enabled for the scaling group. Valid values:
|
true |
| ActiveScalingConfigurationId |
string |
The ID of the active scaling configuration in the scaling group. |
asc-bp1et2qekq3ojr33**** |
| GroupType |
string |
The type of the instances that are managed by the scaling group. Valid values:
|
ECS |
| MultiAZPolicy |
string |
The scaling policy of the ECS instances in the multi-zone scaling group. Valid values:
|
PRIORITY |
| RemovingCapacity |
integer |
The number of ECS instances that are being removed from the scaling group. |
0 |
| PendingWaitCapacity |
integer |
The number of ECS instances that are in the Pending Add state in the scaling group. |
0 |
| StandbyCapacity |
integer |
The number of ECS instances that are in the Standby state in the scaling group. |
1 |
| CurrentHostName |
string |
Note
This parameter is not available for use. |
hostname |
| PendingCapacity |
integer |
The number of ECS instances that are being added to the scaling group and configured. |
0 |
| LaunchTemplateId |
string |
The ID of the launch template that is used by the scaling group. |
lt-m5e3ofjr1zn1aw7**** |
| TotalCapacity |
integer |
The total weighted capacity of all ECS instances in the scaling group if Weighted is specified. Otherwise, the total number of ECS instances in the scaling group. |
1 |
| DesiredCapacity |
integer |
The expected number of ECS instances in the scaling group. Auto Scaling automatically maintains the expected number of ECS instances. |
5 |
| SpotInstanceRemedy |
boolean |
Whether preemptible instances can be supplemented. If set to true, Auto Scaling creates a replacement instance when a preemptible instance is about to be reclaimed. |
true |
| LaunchTemplateVersion |
string |
The version number of the launch template. |
Default |
| RegionId |
string |
The region ID of the scaling group. |
cn-shenzhen |
| VSwitchId |
string |
The vSwitch ID of the scaling group. |
vsw-bp1whw2u46cn8zubm**** |
| MaxSize |
integer |
The maximum number of ECS instances that can be contained in the scaling group. |
2 |
| DefaultCooldown |
integer |
The cooldown period of the scaling group. Unit: seconds. |
60 |
| VServerGroups |
array<object> |
The backend vServer groups. |
|
|
array<object> |
|||
| LoadBalancerId |
string |
The ID of the Classic Load Balancer (CLB, formerly known as Server Load Balancer or SLB) instance to which the backend vServer group belongs. |
147b46d767c-cn-qingdao-cm5**** |
| VServerGroupAttributes |
array<object> |
The attributes of the backend vServer group. |
|
|
object |
|||
| VServerGroupId |
string |
The ID of the backend vServer group. |
rsp-bp12bjrny**** |
| Weight |
integer |
The weight of the backend vServer group. |
1 |
| Port |
integer |
The port number of a backend vServer. |
80 |
| LaunchTemplateOverrides |
array<object> |
The information about the instance types that are extended in the launch template. |
|
|
object |
|||
| WeightedCapacity |
integer |
The weight of the instance type. The value of this parameter indicates the capacity of an instance of the specified instance type in the scaling group. A higher weight indicates that a smaller number of instances of the specified instance type are required to meet the expected capacity requirement. |
4 |
| InstanceType |
string |
The instance type. The instance type that is specified by using this parameter overwrites the instance type of the launch template. |
ecs.c5.xlarge |
| SpotPriceLimit |
number |
The maximum bid price of the instance type that is specified by Note
This parameter takes effect only if you specify |
0.025 |
| AlbServerGroups |
array<object> |
The information about the Application Load Balancer (ALB) server groups. |
|
|
object |
|||
| AlbServerGroupId |
string |
The ID of the Application Load Balancer (ALB) server group. |
sgp-ddwb0y0g6y9bjm**** |
| Weight |
integer |
The weight of an ECS instance as a backend server in the ALB server group. |
100 |
| Port |
integer |
The port number used by an ECS instance as a backend server in the ALB server group. |
80 |
| ServerGroups |
array<object> |
The information about the server groups. Note
You can use this parameter to obtain the information about the ALB, NLB, and GWLB server groups associated with a scaling group. |
|
|
object |
The server groups. |
||
| ServerGroupId |
string |
The ID of the server group. |
sgp-i9ouakeaerr***** |
| Type |
string |
The type of the server group. Valid values:
|
ALB |
| Weight |
integer |
The weight of an ECS instance as a backend server in the server group. |
100 |
| Port |
integer |
The port number used by an ECS instance as a backend server in the server group. |
80 |
| RemovalPolicies |
array |
The instance removal policies. |
|
|
string |
The instance removal policy. Valid values:
|
OldestScalingConfiguration |
|
| DBInstanceIds |
array |
The IDs of the ApsaraDB RDS instances that are associated with the scaling group. |
|
|
string |
The ID of the ApsaraDB RDS instance that is associated with the scaling group. |
rm-bp15556qzebg1**** |
|
| LoadBalancerIds |
array |
The IDs of the SLB instances that are associated with the scaling group. |
|
|
string |
The ID of the SLB instance that is associated with the scaling group. |
lb-bp19byhscefk3x0li**** |
|
| VSwitchIds |
array |
The IDs of the vSwitches that are associated with the scaling group. If you specify VSwitchIds, VSwitchId is ignored. |
|
|
string |
The ID of the vSwitch that is associated with the scaling group. If you specify VSwitchIds, VSwitchId is ignored. |
vsw-bp1whw2u46cn8zubm**** |
|
| SuspendedProcesses |
array |
The processes that are suspended. If no process is suspended, null is returned. Valid values:
|
|
|
string |
The process that is suspended. If no process is suspended, null is returned. Valid values:
|
ScaleIn |
|
| SystemSuspended |
boolean |
Indicates whether Auto Scaling stops executing scaling activities in the scaling group. Valid values:
|
true |
| IsElasticStrengthInAlarm |
boolean |
Note
This parameter is not available for use. |
false |
| MonitorGroupId |
string |
The ID of the CloudMonitor application group that is associated with the scaling group. |
1497**** |
| AzBalance |
boolean |
Indicates whether instances in the scaling group are evenly distributed across zones. This parameter takes effect only if you set
|
false |
| AllocationStrategy |
string |
The allocation policy of instances. Auto Scaling selects instance types based on the allocation policy to create the required number of instances. You can apply the policy to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set
|
priority |
| SpotAllocationStrategy |
string |
The allocation policy of preemptible instances. Auto Scaling selects instance types based on the allocation policy to create the required number of preemptible instances. You can apply the policy to pay-as-you-go instances and preemptible instances. This parameter takes effect only if you set
|
lowestPrice |
| MaxInstanceLifetime |
integer |
The maximum life span of an instance in the scaling group. Unit: seconds. Valid values: 0 or from 86400 to Default value: null. Note
This parameter is not supported by scaling groups of the Elastic Container Instance type and scaling groups whose ScalingPolicy is set to Recycle. |
null |
| CustomPolicyARN |
string |
The Alibaba Cloud Resource Name (ARN) of the function that is specified in the custom scale-in policy. This parameter takes effect only if you set the first value of RemovalPolicies to CustomPolicy. |
null |
| InitCapacity |
integer |
The number of instances that are in the Initialized state and not added to the scaling group. |
0 |
| ResourceGroupId |
string |
The ID of the resource group to which the scaling group belongs. Note
If you specify this parameter, new scaling groups are added to the specified resource group. If you do not specify this parameter, new scaling groups are added to the default resource group. |
rg-aek2epf32c4uyji |
| LoadBalancerConfigs |
array<object> |
The CLB configurations. |
|
|
object |
|||
| LoadBalancerId |
string |
The ID of the CLB instance. |
lb-2zein3ytoeq49cmkbyxr0 |
| Weight |
integer |
The weight of a backend server. |
100 |
| EnableDesiredCapacity |
boolean |
Indicates whether the Expected Number of Instances feature is enabled. Valid values:
|
true |
| Tags |
array<object> |
The tags of the scaling group. |
|
|
object |
|||
| TagKey |
string |
The tag key of the scaling group. |
Department |
| TagValue |
string |
The tag value of the scaling group. |
Finance |
| Propagate |
boolean |
Indicates whether the tags of the scaling group can be propagated to instances. Valid values:
Default value: false. |
false |
| HealthCheckTypes |
array |
The health check mode of the scaling group. Valid values:
|
|
|
string |
The health check modes of the scaling group. Valid values:
|
ECS |
|
| Output |
string |
The output details of the scaling group of the Elastic Container Instance type. Currently, the output is displayed in a Kubernetes Deployment YAML file. |
apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx annotations: k8s.aliyun.com/eip-bandwidth: 10 k8s.aliyun.com/eci-with-eip: true spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 |
Examples
Success response
JSON format
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****",
"ScalingGroup": {
"VpcId": "vpc-wz9fcq97y1vqkd8bijcq6",
"CreationTime": "2014-08-14T10:58Z\n",
"TotalInstanceCount": 1,
"ScalingGroupName": "dyrSuvBOtO1dEdIlIbp****\n",
"SpotInstancePools": 5,
"StoppedCapacity": 1,
"OnDemandPercentageAboveBaseCapacity": 20,
"ModificationTime": "2014-08-14T10:58Z\n",
"MinSize": 1,
"ScalingGroupId": "asg-bp14wlu85wrpchm0****\n",
"CompensateWithOnDemand": true,
"ScalingPolicy": "recycle",
"RemovingWaitCapacity": 1,
"ActiveCapacity": 1,
"OnDemandBaseCapacity": 30,
"ProtectedCapacity": 1,
"HealthCheckType": "ECS",
"LifecycleState": "Active",
"GroupDeletionProtection": true,
"ActiveScalingConfigurationId": "asc-bp1et2qekq3ojr33****\n",
"GroupType": "ECS",
"MultiAZPolicy": "PRIORITY",
"RemovingCapacity": 0,
"PendingWaitCapacity": 0,
"StandbyCapacity": 1,
"CurrentHostName": "hostname",
"PendingCapacity": 0,
"LaunchTemplateId": "lt-m5e3ofjr1zn1aw7****\n",
"TotalCapacity": 1,
"DesiredCapacity": 5,
"SpotInstanceRemedy": true,
"LaunchTemplateVersion": "Default",
"RegionId": "cn-shenzhen",
"VSwitchId": "vsw-bp1whw2u46cn8zubm****\n",
"MaxSize": 2,
"DefaultCooldown": 60,
"VServerGroups": [
{
"LoadBalancerId": "147b46d767c-cn-qingdao-cm5****\n",
"VServerGroupAttributes": [
{
"VServerGroupId": "rsp-bp12bjrny****\n",
"Weight": 1,
"Port": 80
}
]
}
],
"LaunchTemplateOverrides": [
{
"WeightedCapacity": 4,
"InstanceType": "ecs.c5.xlarge\n",
"SpotPriceLimit": 0.025
}
],
"AlbServerGroups": [
{
"AlbServerGroupId": "sgp-ddwb0y0g6y9bjm****\n",
"Weight": 100,
"Port": 80
}
],
"ServerGroups": [
{
"ServerGroupId": "sgp-i9ouakeaerr*****\n",
"Type": "ALB",
"Weight": 100,
"Port": 80
}
],
"RemovalPolicies": [
"OldestScalingConfiguration"
],
"DBInstanceIds": [
"rm-bp15556qzebg1****\n"
],
"LoadBalancerIds": [
"lb-bp19byhscefk3x0li****\n"
],
"VSwitchIds": [
"vsw-bp1whw2u46cn8zubm****\n"
],
"SuspendedProcesses": [
"ScaleIn"
],
"SystemSuspended": true,
"IsElasticStrengthInAlarm": false,
"MonitorGroupId": "1497****\n",
"AzBalance": false,
"AllocationStrategy": "priority",
"SpotAllocationStrategy": "lowestPrice",
"MaxInstanceLifetime": 0,
"CustomPolicyARN": "null",
"InitCapacity": 0,
"ResourceGroupId": "rg-aek2epf32c4uyji",
"LoadBalancerConfigs": [
{
"LoadBalancerId": "lb-2zein3ytoeq49cmkbyxr0",
"Weight": 100
}
],
"EnableDesiredCapacity": true,
"Tags": [
{
"TagKey": "Department",
"TagValue": "Finance",
"Propagate": false
}
],
"HealthCheckTypes": [
"ECS"
]
},
"Output": "apiVersion: apps/v1\nkind: Deployment\nmetadata:\n name: nginx-deployment\n labels:\n app: nginx\n spec:\n replicas: 3\n selector:\n matchLabels:\n app: nginx\n template:\n metadata:\n labels:\n app: nginx\n annotations:\n k8s.aliyun.com/eip-bandwidth: 10\n k8s.aliyun.com/eci-with-eip: true\n spec:\n containers:\n - name: nginx\n image: nginx:1.14.2\n ports:\n - containerPort: 80"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.