本文介绍了Google Cloud Role访问特定的发布/订阅主题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以通过指定角色来允许您收听非常特定的发布/订阅主题而不是全部主题?
Is it possible to specify a Role in such a way that it allows you to listen to a very specific Pub/Sub topic rather than all of them?
推荐答案角色适用于资源,因此最适当的问题是可以将策略设置为发布/订阅资源吗?"
Roles apply to a resource, so the most adequate question would be "Can a policy be set into a Pub/Sub resource?"
答案是肯定的,并且通过Pub/Sub API方法完成 projects.topics.setIamPolicy .对于该端点,您必须通过政策,该政策将允许您为角色 Owner , Editor 或 Viewer 设置绑定.
The answer is yes, and it's done through the Pub/Sub API method projects.topics.setIamPolicy. To that endpoint, you must pass a policy, which will allow you to set bindings for the roles Owner, Editor, or Viewer.
更多推荐
Google Cloud Role访问特定的发布/订阅主题
发布评论