适用于 IAM Conditions 的资源特性

本主题包含可用于条件中资源特性的值列表,其中包括用于资源服务、资源类型和资源名称字符串格式的字符串值。

您可以使用资源特性来更改角色绑定提供的授权范围。如果角色包含适用于不同类型资源的权限,则条件可根据资源服务、资源类型和资源名称授予角色的一部分权限。

资源属性可用于本页面上列出的 Trusted Cloud by S3NS 服务和资源类型。其他服务和资源类型不识别资源属性。

如需详细了解 Identity and Access Management (IAM) Conditions,请参阅以下内容:

资源服务值

下表列出了资源服务特性可以包含的值。

资源服务值 REST 参考文档
bigquery.googleapis.com API 参考文档
bigqueryreservation.googleapis.com API 参考文档
cloudkms.googleapis.com API 参考文档
cloudresourcemanager.googleapis.com API 参考文档
compute.googleapis.com API 参考文档
container.googleapis.com API 参考文档
logging.googleapis.com API 参考文档
sqladmin.googleapis.com API 参考文档
storage.googleapis.com API 参考文档

资源类型值

下表列出了资源类型特性可以包含的值。

资源类型值 参考
bigquery.googleapis.com/Dataset 了解详情
bigquery.googleapis.com/Model 了解详情
bigquery.googleapis.com/Routine 了解详情
bigquery.googleapis.com/Table 了解详情
bigqueryreservation.googleapis.com/Assignment 了解详情
bigqueryreservation.googleapis.com/BiReservation 了解详情
bigqueryreservation.googleapis.com/CapacityCommitment 了解详情
bigqueryreservation.googleapis.com/Location 了解详情
bigqueryreservation.googleapis.com/Reservation 了解详情
cloud.googleapis.com/Location1 了解详情
cloudkms.googleapis.com/CryptoKey 了解详情
cloudkms.googleapis.com/CryptoKeyVersion 了解详情
cloudkms.googleapis.com/KeyRing 了解详情
cloudresourcemanager.googleapis.com/Project 了解详情
compute.googleapis.com/BackendService 了解详情
compute.googleapis.com/Disk 了解详情
compute.googleapis.com/Firewall 了解详情
compute.googleapis.com/ForwardingRule 了解详情
compute.googleapis.com/GlobalForwardingRule 了解详情
compute.googleapis.com/Image 了解详情
compute.googleapis.com/Instance 了解详情
compute.googleapis.com/InstanceTemplate 了解详情
compute.googleapis.com/Snapshot 了解详情
compute.googleapis.com/TargetHttpProxy 了解详情
compute.googleapis.com/TargetHttpsProxy 了解详情
compute.googleapis.com/TargetSslProxy 了解详情
compute.googleapis.com/TargetTcpProxy 了解详情
container.googleapis.com/Clusters 了解详情
logging.googleapis.com/LogBucket 了解详情
logging.googleapis.com/LogView 了解详情
sqladmin.googleapis.com/BackupRun 了解详情
sqladmin.googleapis.com/Instance 了解详情
storage.googleapis.com/Bucket 了解详情
storage.googleapis.com/ManagedFolder 了解详情
storage.googleapis.com/Object 了解详情

1 Cloud Key Management Service 将此资源类型用作密钥环资源的父级。

资源名称格式

下表列出了每种资源名称特性的格式。

资源参考文档 资源名称格式模板
BigQuery 数据集 projects/project-id/datasets/dataset-id
BigQuery 模型 projects/project-id/datasets/dataset-id/models/model-id
BigQuery 例程 projects/project-id/datasets/dataset-id/routines/routine-id
BigQuery projects/project-id/datasets/dataset-id/tables/table-id
BigQuery Reservation API 分配 projects/project-id/locations/location-id/reservations/reservation-id/assignments/assignment-id
BigQuery Reservation API BI 预留 projects/project-id/locations/location-id/biReservation
BigQuery Reservation API 容量承诺 projects/project-id/locations/location-id/capacityCommitments/capacity-commitment-id
BigQuery Reservation API 位置 projects/project-id/locations/location-id
BigQuery Reservation API reservations projects/project-id/locations/location-id/reservations/reservation-id
Cloud Key Management Service 加密密钥 projects/project-id/locations/location-id/keyRings/keyring-id/cryptoKeys/cryptokey-id
Cloud Key Management Service 加密密钥版本 projects/project-id/locations/location-id/keyRings/keyring-id/cryptoKeys/cryptokey-id/cryptoKeyVersions/cryptokeyversion-id
Cloud Key Management Service 密钥环 projects/project-id/locations/location-id/keyRings/keyring-id
Cloud Logging 日志存储桶 projects/project-id/locations/location-id/buckets/bucket-id
Cloud Logging 日志视图 projects/project-id/locations/location-id/buckets/bucket-id/views/view-id
Cloud SQL 备份作业 projects/project-id/instances/instance-id/backupRuns/backup-id
Cloud SQL 实例 projects/project-id/instances/instance-id
Cloud Storage 存储桶1 projects/_/buckets/bucket-name
Cloud Storage 托管式文件夹1、2 projects/_/buckets/bucket-name/managedFolders/managed-folder-name
Cloud Storage 对象1、3 projects/_/buckets/bucket-name/objects/object-name
Compute Engine 全局后端服务 projects/project-id/global/backendServices/backend-service-id
Compute Engine 地区后端服务 projects/project-id/regions/region-id/backendServices/backend-service-id
Compute Engine firewalls projects/project-id/global/firewalls/firewall-id
Compute Engine 全局转发规则 projects/project-id/global/forwardingRules/forwarding-rule-id
Compute Engine 地区转发规则 projects/project-id/regions/region-id/forwardingRules/forwarding-rule-id
Compute Engine 映像 projects/project-id/global/images/image-id
Compute Engine 实例模板 projects/project-id/global/instanceTemplates/instance-template-id
Compute Engine 实例 projects/project-id/zones/zone-id/instances/instance-id
Compute Engine 地区永久性磁盘 projects/project-id/regions/region-id/disks/disk-id
Compute Engine 区域永久性磁盘 projects/project-id/zones/zone-id/disks/disk-id
Compute Engine 快照 projects/project-id/global/snapshots/snapshot-id
Compute Engine 全局目标 HTTP 代理 projects/project-id/global/targetHttpProxies/target-http-proxy-id
Compute Engine 地区目标 HTTP 代理 projects/project-id/regions/region-id/targetHttpProxies/target-http-proxy-id
Compute Engine 全局目标 HTTPS 代理 projects/project-id/global/targetHttpsProxies/target-https-proxy-id
Compute Engine 地区目标 HTTPS 代理 projects/project-id/regions/region-id/targetHttpsProxies/target-https-proxy-id
Compute Engine 目标 SSL 代理 projects/project-id/global/targetSslProxies/target-ssl-proxy-id
Compute Engine 目标 TCP 代理 projects/project-id/global/targetTcpProxies/target-tcp-proxy-id
Google Kubernetes Engine 集群 projects/project-id/locations/location/clusters/cluster-id
Resource Manager 组织 organizations/organization-name

1 对于 Cloud Storage,资源名称包含下划线 (_),而不是项目 ID。您不能将下划线替换为项目 ID、项目名称或项目编号。

2 使用整个托管式文件夹名称,包括正斜杠。在 Cloud Storage 中,这些字符是托管式文件夹名称的一部分,而不是路径分隔符。

3 使用完整的对象名称,包括正斜杠。在 Cloud Storage 中,这些字符是对象名称的一部分,而不是路径分隔符。

资源标记

您可以将标记添加到组织、项目和文件夹。任何 Trusted Cloud by S3NS 资源都可以沿用这些更高级别资源的标记。

您可以使用几种不同类型的标识符来引用标记键和值:

  • 永久 ID,它是全局唯一的,并且永远不能重复使用。例如,标记键可以具有永久 ID tagKeys/123456789012,而标记值可以是永久 ID tagValues/567890123456
  • 短名称。每个键的短名称必须在定义键的项目或组织内具有唯一性,并且每个值的短名称对于关联的键而言必须是唯一的。例如,标记键可以具有短名称 env,标记值可以简称为 prod
  • 命名空间名称,将组织的数字 ID 或项目的 ID 添加到标记键的短名称。例如,为组织创建的标记键可以具有命名空间名称 123456789012/env。如需了解如何获取组织 ID,请参阅获取组织资源 ID。为项目创建的标记键可以具有命名空间名称 myproject/env。如需了解如何获取项目 ID,请参阅识别项目

具体标识符取决于您为组织创建的标记键和值。如需了解如何列出可用的标记键和值,请参阅列出标记键列出标记值