DescribeScalingGroupDetail - 查詢指定伸縮組詳情
您可以通過調用API DescribeScalingGroupDetail查詢該伸縮組詳情,例如,查看指定伸縮組的基本資料、伸縮組內執行個體、伸縮配置等資訊。當ECI類型的伸縮組指定OutputFormat參數為YAML時,可以輸出Kubernetes Deployment YAML格式內容。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ess:DescribeScalingGroupDetail |
get |
*ScalingGroup
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
伸縮組所屬的地區 ID。更多資訊,請參見地區與可用性區域。 |
cn-hangzhou |
| ScalingGroupId |
string |
是 |
伸縮組的 ID。 |
asg-bp18p2yfxow2dloq**** |
| OutputFormat |
string |
否 |
Output 輸出格式,現僅支援 YAML 格式。 |
YAML |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
|||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3**** |
| ScalingGroup |
object |
Auto Scaling組。 |
|
| VpcId |
string |
Virtual Private CloudID。 |
vpc-wz9fcq97y1vqkd8bijcq6 |
| CreationTime |
string |
伸縮組的建立時間。 |
2014-08-14T10:58Z |
| TotalInstanceCount |
integer |
伸縮組內所有 ECS 執行個體的數量。 |
1 |
| ScalingGroupName |
string |
伸縮組的名稱,同一地區下伸縮組名稱唯一。 長度為 2~64 個字元,以數字、大小英文字母或中文開頭,可以包含數字、底線(_)、短劃線(-)和半形句號(.)。 |
dyrSuvBOtO1dEdIlIbp**** |
| SpotInstancePools |
integer |
指定可用執行個體規格的個數,伸縮組將按成本最低的多個規格均衡建立搶佔式執行個體。取值範圍:0~10。 |
5 |
| StoppedCapacity |
integer |
伸縮組中處於節省停機效果的執行個體數量。 |
1 |
| OnDemandPercentageAboveBaseCapacity |
integer |
伸縮組滿足最小按量執行個體數(ondemandbasecapacity)要求後,超出的執行個體中按量執行個體應占的比例,取值範圍:0~100。 |
20 |
| ModificationTime |
string |
修改時間。 |
2014-08-14T10:58Z |
| MinSize |
integer |
伸縮組最小執行個體數。 |
1 |
| ScalingGroupId |
string |
伸縮組的 ID。 |
asg-bp14wlu85wrpchm0**** |
| CompensateWithOnDemand |
boolean |
當
|
true |
| ScalingPolicy |
string |
指定伸縮組的回收模式。可能值:
關於被移出執行個體的動作,請參見 RemoveInstances 。 |
recycle |
| RemovingWaitCapacity |
integer |
伸縮組中處於移除掛起狀態的 ECS 執行個體的數量。 |
1 |
| ActiveCapacity |
integer |
已成功加入伸縮組,並正常啟動並執行 ECS 執行個體數量。 |
1 |
| OnDemandBaseCapacity |
integer |
已有伸縮組內所需要的按量執行個體數的最小值,可能值:0~1000。即當伸縮組內按量執行個體個數少於該最小值時,系統將優先建立按量執行個體。 |
30 |
| ProtectedCapacity |
integer |
伸縮組中處於保護中狀態的 ECS 執行個體的數量。 |
1 |
| HealthCheckType |
string |
伸縮組的健全狀態檢查方式。可能值:
|
ECS |
| LifecycleState |
string |
伸縮組的狀態資訊。可能值:
|
Active |
| GroupDeletionProtection |
boolean |
是否開啟了伸縮組刪除保護。可能值:
|
true |
| ActiveScalingConfigurationId |
string |
伸縮組內生效的伸縮配置的 ID。 |
asc-bp1et2qekq3ojr33**** |
| GroupType |
string |
伸縮組管理的執行個體類型。可能值:
|
ECS |
| MultiAZPolicy |
string |
多可用性區域伸縮組 ECS 執行個體擴縮容策略。可能值:
|
PRIORITY |
| RemovingCapacity |
integer |
正在移出伸縮組的 ECS 執行個體的數量。 |
0 |
| PendingWaitCapacity |
integer |
伸縮組中處於加入掛起狀態的 ECS 執行個體的數量。 |
0 |
| StandbyCapacity |
integer |
伸縮組中處於備用狀態的執行個體數量。 |
1 |
| CurrentHostName |
string |
說明
該參數未開放使用。 |
hostname |
| PendingCapacity |
integer |
正在加入伸縮組,還未完成相關配置的 ECS 執行個體的數量。 |
0 |
| LaunchTemplateId |
string |
伸縮組使用的執行個體啟動模板的 ID。 |
lt-m5e3ofjr1zn1aw7**** |
| TotalCapacity |
integer |
當伸縮組設定了執行個體規格權重,表示伸縮組內所有執行個體的加權容量總和。否則,表示伸縮組內所有執行個體的數量。 |
1 |
| DesiredCapacity |
integer |
伸縮組內執行個體的期望數量,伸縮組會自動將 ECS 執行個體數量維持在期望執行個體數。 |
5 |
| SpotInstanceRemedy |
boolean |
是否開啟補齊搶佔式執行個體。開啟後,當收到搶佔式執行個體將被回收的系統訊息時,伸縮組將嘗試建立新的執行個體,替換掉將被回收的搶佔式執行個體。 |
true |
| LaunchTemplateVersion |
string |
執行個體啟動模板的版本。 |
Default |
| RegionId |
string |
伸縮組所屬的地區 ID。 |
cn-shenzhen |
| VSwitchId |
string |
伸縮組關聯虛擬交換器的 ID。 |
vsw-bp1whw2u46cn8zubm**** |
| MaxSize |
integer |
伸縮組最大執行個體數。 |
2 |
| DefaultCooldown |
integer |
冷卻時間,單位秒。 |
60 |
| VServerGroups |
array<object> |
後端伺服器組列表。 |
|
|
array<object> |
後端伺服器組列表。 |
||
| LoadBalancerId |
string |
虛擬伺服器組所屬傳統型負載平衡 CLB(原 SLB)執行個體的 ID。 |
147b46d767c-cn-qingdao-cm5**** |
| VServerGroupAttributes |
array<object> |
後端伺服器組屬性。 |
|
|
object |
後端伺服器組屬性。 |
||
| VServerGroupId |
string |
後端伺服器組的 ID。 |
rsp-bp12bjrny**** |
| Weight |
integer |
後端伺服器組的權重。 |
1 |
| Port |
integer |
後端伺服器連接埠。 |
80 |
| LaunchTemplateOverrides |
array<object> |
擴充啟動模板的執行個體規格資訊。 |
|
|
object |
擴充啟動模板的執行個體規格資訊。 |
||
| WeightedCapacity |
integer |
指定執行個體規格的權重,即執行個體規格的單台執行個體在伸縮組中表示的容量大小。權重越大,滿足期望容量所需的本執行個體規格的執行個體數量越少。 |
4 |
| InstanceType |
string |
指定的執行個體規格,會覆蓋啟動模板中的執行個體規格。 |
ecs.c5.xlarge |
| SpotPriceLimit |
number |
本參數用於指定執行個體啟動模板覆蓋規格(即 說明
僅當 |
0.025 |
| AlbServerGroups |
array<object> |
ALB 伺服器組的相關資訊集合。 |
|
|
object |
ALB 伺服器組的相關資訊集合。 |
||
| AlbServerGroupId |
string |
ALB 伺服器組的 ID。 |
sgp-ddwb0y0g6y9bjm**** |
| Weight |
integer |
Auto Scaling將執行個體添加到 ALB 伺服器組後,執行個體作為後端伺服器的權重。 |
100 |
| Port |
integer |
Auto Scaling將執行個體添加到 ALB 伺服器組後,執行個體使用的連接埠號碼。 |
80 |
| ServerGroups |
array<object> |
負載平衡伺服器組的相關資訊集合。 說明
您可以通過此參數擷取伸縮組關聯的 ALB 類型服務組、NLB 類型伺服器組和 GWLB 類型服務組的相關資訊集合。 |
|
|
object |
負載平衡伺服器組的相關資訊集合。 |
||
| ServerGroupId |
string |
伺服器組的 ID。 |
sgp-i9ouakeaerr***** |
| Type |
string |
負載平衡伺服器群組類型,可能值:
|
ALB |
| Weight |
integer |
Auto Scaling將執行個體添加到伺服器組後,執行個體作為後端伺服器的權重。 |
100 |
| Port |
integer |
Auto Scaling將執行個體添加到伺服器組後,執行個體使用的連接埠號碼。 |
80 |
| RemovalPolicies |
array |
執行個體移出伸縮組的策略的集合。 |
|
|
string |
ECS 執行個體移出伸縮組的策略的集合。可能值:
|
OldestScalingConfiguration |
|
| DBInstanceIds |
array |
伸縮組關聯 RDS 執行個體的 ID。 |
|
|
string |
伸縮組關聯 RDS 執行個體的 ID。 |
rm-bp15556qzebg1**** |
|
| LoadBalancerIds |
array |
伸縮組關聯的Server Load Balancer執行個體的 ID 列表。 |
|
|
string |
伸縮組關聯的Server Load Balancer執行個體的 ID 列表。 |
lb-bp19byhscefk3x0li**** |
|
| VSwitchIds |
array |
伸縮組關聯虛擬交換器的 ID 集合。如果您使用了 VSwitchIds 參數,VSwitchId 參數將被忽略。 |
|
|
string |
伸縮組關聯虛擬交換器的 ID 集合。如果您使用了 VSwitchIds 參數,VSwitchId 參數將被忽略。 |
vsw-bp1whw2u46cn8zubm**** |
|
| SuspendedProcesses |
array |
暫停中的流程,如果沒有,則傳回值為空白。可能值:
|
|
|
string |
暫停中的流程,如果沒有,則傳回值為空白。可能值:
|
ScaleIn |
|
| SystemSuspended |
boolean |
Auto Scaling是否停止執行伸縮組內的伸縮活動。可能值:
|
true |
| IsElasticStrengthInAlarm |
boolean |
說明
該參數未開放使用。 |
false |
| MonitorGroupId |
string |
伸縮組關聯的CloudMonitor應用分組 ID。 |
1497**** |
| AzBalance |
boolean |
伸縮組的容量是否在多個可用性區域間均衡分布(僅當
|
false |
| AllocationStrategy |
string |
容量分配策略,決定了伸縮組如何選擇可用的執行個體規格類型滿足容量。容量分布策略同時對按量和搶佔式容量生效(僅當
|
priority |
| SpotAllocationStrategy |
string |
容量分配策略,決定了伸縮組如何選擇可用的執行個體規格類型滿足容量。容量分布策略同時對按量和搶佔式容量生效(僅當
|
lowestPrice |
| MaxInstanceLifetime |
integer |
執行個體在伸縮組中存活的最大時間。單位為秒。 取值範圍:0 或 預設值:null。 說明
ECI 類型的伸縮組或停機不收費的伸縮組不支援設定該參數。 |
null |
| CustomPolicyARN |
string |
自訂縮容策略 Function 函數 ARN。僅當 RemovalPolicies 配置第一個移除策略為 CustomPolicy 時生效。 |
null |
| InitCapacity |
integer |
伸縮組中處於執行個體擴容前初始化狀態的執行個體數量。 |
0 |
| ResourceGroupId |
string |
新建立的伸縮組所屬的資源群組 ID。 說明
將新建立的伸縮組歸屬到指定的資源群組中。如果不指定該參數,則歸屬為預設資源群組。 |
rg-aek2epf32c4uyji |
| LoadBalancerConfigs |
array<object> |
負載平衡配置列表。 |
|
|
object |
負載平衡配置列表。 |
||
| LoadBalancerId |
string |
負載平衡 CLB(原 SLB)執行個體的 ID。 |
lb-2zein3ytoeq49cmkbyxr0 |
| Weight |
integer |
後端伺服器的權重。 |
100 |
| EnableDesiredCapacity |
boolean |
是否開啟期望執行個體數標識。可能值:
|
true |
| Tags |
array<object> |
伸縮組的標籤資訊集合。 |
|
|
object |
伸縮組的標籤資訊集合。 |
||
| TagKey |
string |
伸縮組的標籤鍵。 |
Department |
| TagValue |
string |
伸縮組的標籤值。 |
Finance |
| Propagate |
boolean |
標識該標籤是否為可傳播標籤,可能值:
預設值:false。 |
false |
| HealthCheckTypes |
array |
伸縮組的健全狀態檢查方式。可能值:
|
|
|
string |
伸縮組的健全狀態檢查方式。可能值:
|
ECS |
|
| Output |
string |
ECI 伸縮組輸出詳情。目前僅支援 Kubernetes Deployment YAML 格式輸出。 |
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 |
樣本
正常返回樣本
JSON格式
{
"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"
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。