我在这个documentation或任何其他地方都找不到关于我是否可以假设boto3 ec2客户端describe_instance_status
查询响应永远不会是部分的问题的答案
更具体地说,这里是实例状态检查失败时InstanceStatus
属性的典型describe_instance_status
响应的一个片段:
"InstanceStatus": {
"Details": [
{
"ImpairedSince": datetime(2015, 1, 1),
"Name": "reachability",
"Status": "failed",
}
],
"Status": "impaired",
}
实例状态状态为impaired
,因此问题是,我是否可以假设在这种情况下总是给出ImpairedSince
,或者有时,尽管状态为impaired
,但响应中会缺少此数据。
如果它可能丢失,原因是什么
以下是doc所说的:
和另一个doc:
结论:
ImpairedSince
键将仅在InstanceStatusDetails
对象中给出,其中Status
是failed
。如果至少有一个状态检查失败,则整个InstanceStatusSummary
对象的Status
将是impaired
相关问题 更多 >
编程相关推荐