gpt4 book ai didi

amazon-ec2 - 使用 Boto 获取 ec2 实例状态

转载 作者:行者123 更新时间:2023-12-03 23:33:57 26 4
gpt4 key购买 nike

我正在使用 instace.update() 获取状态,该状态返回已停止、正在运行或...

但是 ec2 Web 界面中还有另一个状态,它也显示它正在初始化或... 2/2 检查已通过。

有没有办法获得初始化的状态?..

最佳答案

该信息来自 DescribeInstanceStatus请求,可通过 get_all_instance_status 在 boto 中获得方法。看:

http://docs.pythonboto.org/en/latest/ref/ec2.html#boto.ec2.connection.EC2Connection.get_all_instance_status

详情。

关于amazon-ec2 - 使用 Boto 获取 ec2 实例状态,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20525825/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com