适用于 JSON 方法的 IAM 权限

下表列出了在给定资源上运行每个 Cloud Storage JSON 方法所需的 Identity and Access Management (IAM) 权限。将 IAM 权限捆绑在一起即可创建角色。您可以向用户和群组授予角色

对于只适用于已停用统一存储分区级访问权限的存储分区的其他方法,请参阅 ACL 方法表

资源 方法 必需的 IAM 权限1
Buckets delete storage.buckets.delete
Buckets get storage.buckets.get
storage.buckets.getIamPolicy2
Buckets getIamPolicy storage.buckets.getIamPolicy
Buckets insert storage.buckets.create
Buckets list storage.buckets.list
storage.buckets.getIamPolicy2
Buckets lockRetentionPolicy storage.buckets.update
Buckets patch storage.buckets.update
storage.buckets.getIamPolicy3
storage.buckets.setIamPolicy5
Buckets setIamPolicy storage.buckets.setIamPolicy
Buckets testIamPermissions
Buckets update storage.buckets.setIamPolicy
storage.buckets.update
Channels stop
Notifications delete storage.buckets.update
Notifications get storage.buckets.get
Notifications insert storage.buckets.update
Notifications list storage.buckets.get
Objects compose storage.objects.create
storage.objects.delete4
storage.objects.get
Objects copy storage.objects.create(针对目标存储分区)
storage.objects.delete(针对目标存储分区)4
storage.objects.get(针对源存储分区)
Objects delete storage.objects.delete
Objects get storage.objects.get
storage.objects.getIamPolicy2,6
Objects insert storage.objects.create
storage.objects.delete4
Objects list storage.objects.list
storage.objects.getIamPolicy2,6
Objects patch storage.objects.get
storage.objects.getIamPolicy6
storage.objects.update
storage.objects.setIamPolicy3,6
Objects rewrite storage.objects.create(针对目标存储分区)
storage.objects.delete(针对目标存储分区)4
storage.objects.get(针对源存储分区)
Objects update storage.objects.setIamPolicy6
storage.objects.update
Objects watchAll storage.buckets.update
Projects.hmacKeys create storage.hmacKeys.create
Projects.hmacKeys delete storage.hmacKeys.delete
Projects.hmacKeys get storage.hmacKeys.get
Projects.hmacKeys list storage.hmacKeys.list
Projects.hmacKeys update storage.hmacKeys.update
Projects.serviceAccount get resourceManager.projects.get

1 如果您在请求中使用 userProject 参数或 x-goog-user-project 标头,则除了发出请求所需的正常 IAM 权限之外,您还必须拥有所指定项目 ID 的 serviceusage.services.use 权限。

2 仅当您希望在 full 投影中包含 ACL 或 IAM 政策时,才需要此权限。如果您在没有这项权限的情况下发出 full 投影请求,那么只会收到部分投影。

3 仅当您希望在响应中包含 ACL 或 IAM 政策时,才需要此权限。

4 只有在插入的对象与存储分区中现有的对象名称相同时,才需要这项权限。

5 如果您希望在请求中包含 ACL 或 IAM 政策,则需要此权限。

6 此权限不适用于启用了统一存储分区级访问权限的存储分区。

与 ACL 相关的方法

下表列出了运行仅适用于管理 ACL 的 JSON 方法所需的 IAM 权限。这些方法仅适用于已停用统一存储分区级访问权限的存储分区。

资源 方法 必需的 IAM 权限1
BucketAccessControls delete storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
BucketAccessControls get storage.buckets.get
storage.buckets.getIamPolicy
BucketAccessControls insert storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
BucketAccessControls list storage.buckets.get
storage.buckets.getIamPolicy
BucketAccessControls patch storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
BucketAccessControls update storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
DefaultObjectAccessControls delete storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
DefaultObjectAccessControls get storage.buckets.get
storage.buckets.getIamPolicy
DefaultObjectAccessControls insert storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
DefaultObjectAccessControls list storage.buckets.get
storage.buckets.getIamPolicy
DefaultObjectAccessControls patch storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
DefaultObjectAccessControls update storage.buckets.get
storage.buckets.getIamPolicy
storage.buckets.setIamPolicy
storage.buckets.update
ObjectAccessControls delete storage.objects.get
storage.objects.getIamPolicy
storage.objects.setIamPolicy
storage.objects.update
ObjectAccessControls get storage.objects.get
storage.objects.getIamPolicy
ObjectAccessControls insert storage.objects.get
storage.objects.getIamPolicy
storage.objects.setIamPolicy
storage.objects.update
ObjectAccessControls list storage.objects.get
storage.objects.getIamPolicy
ObjectAccessControls patch storage.objects.get
storage.objects.getIamPolicy
storage.objects.setIamPolicy
storage.objects.update
ObjectAccessControls update storage.objects.get
storage.objects.getIamPolicy
storage.objects.setIamPolicy
storage.objects.update

1 如果您在请求中使用 userProject 参数或 x-goog-user-project 标头,则除了发出请求所需的正常 IAM 权限之外,您还必须拥有所指定项目 ID 的 serviceusage.services.use 权限。

后续步骤