我想在 gcp 中获取有关实例停止时间的数据。即从实例停止时开始。我想在脚本中实现它以进一步使用它并将服务器移动到快照。谁能帮助我了解如何使用 gcloud
或调用 google api 的 python 脚本从 gcp
获取这些数据?
最佳答案
获取所有计算实例及其上次开始和停止日期和时间的列表。
gcloud compute instances list --format='table(name,status,lastStartTimestamp,lastStopTimestamp.list())'
关于google-cloud-platform - 需要获取关于实例上次在 gcp 中停止的时间数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57726995/