【问题标题】:What are the exact permissions I need to run the gsutil notification create command?运行 gsutil notification create 命令所需的确切权限是什么?
【发布时间】:2018-06-01 08:19:17
【问题描述】:

我有一个 GCS(Google 云服务)存储桶和一个 Google PubSub 主题,我希望该存储桶中的事件自动发送到 PubSub 主题。

当我运行这个命令时

gsutil notification create -t pubsub_topic_name -f json gs://bucket-name

我不断得到

AccessDeniedException: 403

我需要为我的用户帐户设置哪些确切权限才能运行该 gsutil 命令?

谢谢 是

【问题讨论】:

    标签: google-app-engine google-cloud-datastore google-cloud-platform google-cloud-storage google-cloud-pubsub


    【解决方案1】:

    您始终需要存储桶的所有权 (storage.buckets.update)。

    如果主题 pubsub_topic_name 不存在,您需要获得创建它的权限 (projects.topics.create)。

    您需要权限才能向新服务帐户 (projects.topics.setIamPolicy) 授予发布权限。

    此外,如果您在 gsutil 中启用调试输出(使用 gsutil -D notification create...,您可能会得到关于哪个调用失败的更好提示。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-27
      • 2018-03-08
      • 2019-11-18
      • 1970-01-01
      • 2018-06-01
      • 1970-01-01
      • 2021-11-25
      • 1970-01-01
      相关资源
      最近更新 更多