【问题标题】:How can I view currently configured Object Change Notifications (OCNs) for a given GCS Bucket?如何查看给定 GCS 存储桶的当前配置的对象更改通知 (OCN)?
【发布时间】:2018-02-17 14:31:47
【问题描述】:
如何查看给定 GCS 存储桶当前配置的对象更改通知 (OCN)?
我想应该是这样的:
gsutil notification list gs://my-bucket-name
但后来我在gsutil help notification 中对此感到惊讶:
LIST list 子命令提供通知配置列表
属于给定的桶。每个通知的列出名称
config 可以与 delete 子命令一起使用来删除它
具体通知配置。
不会列出任何对象更改通知。仅限 Cloud Pub/Sub
将列出通知订阅配置。
注意最后一段。
【问题讨论】:
标签:
google-cloud-storage
gsutil
【解决方案1】:
你应该像下面的例子一样添加-o:
gsutil notification list -o gs://${BucketName}
这会列出Object Change Notifications:
Bucket ${BucketName} has the following active Object Change Notifications:
Notification channel 1:
Channel identifier: xxxxxxxx
Resource identifier: xxxxxx
Application URL: url=https://xxxxxx.appspot.com/notify
Created by:
Creation time: xxxx
参考:notification command