gpt4 book ai didi

google-cloud-sdk - Google 的云 SDK 不返回 `createTime`

转载 作者:行者123 更新时间:2023-12-05 02:13:09 25 4
gpt4 key购买 nike

我正在尝试使用 cloud sdk 列出有关某些实例的信息,但由于某种原因,未返回 createTime 字段。知道为什么吗?

$ gcloud compute instances list --format="table(name,createTime)" --filter="name:florin*"
NAME CREATE_TIME
florin-ubuntu-18-playground

这应该根据这个 https://cloud.google.com/sdk/gcloud/reference/topic/filters 工作

最佳答案

gcloud compute instances list 命令默认不显示实例创建时间。但是 gcloud --format flag可以更改显示的默认输出。

gcloud compute instances list --format="table(name,creationTimestamp)"

也可以从 gcloud compute describe command 检索实例创建时间:

gcloud compute instances describe yourInstance --zone=yourInstanceZone | grep creationTimestamp

或者:

gcloud compute instances describe yourInstance --zone=yourInstanceZone --flatten=creationTimestamp

关于google-cloud-sdk - Google 的云 SDK 不返回 `createTime`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55121632/

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