2017-01-23 80 views
0

我正在嘗試編寫一個Python腳本來列出我的Amazon Web Services帳戶中特定Auto Scaling組的掛起進程。boto命令描述一個Auto Scaling組?

從我所看到的,使用boto,(Not boto3)沒有命令列出自動縮放組的特定屬性。

任何人都可以對此有所瞭解嗎? 謝謝。

+1

[文檔](http://boto.cloudhackers.com/en/latest/ref/autoscale.html#boto.ec2.autoscale.AutoScaleConnection.get_all_groups) –

回答

1

您可以在自動縮放組上使用鮮爲人知的suspended_processes attribute

import boto 
autoscale = boto.connect_autoscale() 
group = autoscale.get_all_groups(names=["mygroup"])[0] 
group.suspended_processes