本主題列出可用於條件中資源屬性的值,包括資源服務和資源類型的字串值,以及資源名稱字串的格式。
您可以使用資源屬性,變更角色繫結提供的授權範圍。當角色包含適用於不同類型資源的權限時,條件可根據資源服務、資源類型和資源名稱,授予角色權限的子集。
這個頁面列出的 Cloud de Confiance by S3NS 服務和資源類型,都有可用的資源屬性。其他服務和資源類型無法辨識資源屬性。
如要進一步瞭解 Identity and Access Management (IAM) 條件,請參閱下列文章:
資源服務值
下表列出資源服務屬性可包含的值。
| 資源服務值 | 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 參考資料 |
dns.googleapis.com |
API 參考資料 |
logging.googleapis.com |
API 參考資料 |
networksecurity.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/Cluster |
閱讀完整內容 |
dns.googleapis.com/ResourceRecordSet |
閱讀完整內容 |
logging.googleapis.com/LogBucket |
閱讀完整內容 |
logging.googleapis.com/LogView |
閱讀完整內容 |
networksecurity.googleapis.com/AddressGroup |
閱讀完整內容 |
networksecurity.googleapis.com/FirewallEndpoint |
閱讀完整內容 |
networksecurity.googleapis.com/FirewallEndpointAssociation |
閱讀完整內容 |
networksecurity.googleapis.com/InterceptDeployment |
閱讀完整內容 |
networksecurity.googleapis.com/InterceptDeploymentGroup |
閱讀完整內容 |
networksecurity.googleapis.com/InterceptEndpointGroup |
閱讀完整內容 |
networksecurity.googleapis.com/InterceptEndpointGroupAssociation |
閱讀完整內容 |
networksecurity.googleapis.com/MirroringDeployment |
閱讀完整內容 |
networksecurity.googleapis.com/MirroringDeploymentGroup |
閱讀完整內容 |
networksecurity.googleapis.com/MirroringEndpointGroup |
閱讀完整內容 |
networksecurity.googleapis.com/MirroringEndpointGroupAssociation |
閱讀完整內容 |
networksecurity.googleapis.com/SecurityProfile |
閱讀完整內容 |
networksecurity.googleapis.com/SecurityProfileGroup |
閱讀完整內容 |
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 assignments | 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 locations | projects/project-id/locations/location-id |
| BigQuery Reservation API reservations | projects/project-id/locations/location-id/reservations/reservation-id |
| Cloud NGFW 位址群組 |
projects/project-number/locations/location/addressGroups/address-group-nameorganizations/organization-id/locations/location/addressGroups/address-group-name
|
| Cloud NGFW 防火牆端點 |
projects/project-number/locations/location/firewallEndpoints/firewall-endpoint-idorganizations/organization-id/locations/location/firewallEndpoints/firewall-endpoint-id
|
| Cloud NGFW 防火牆端點關聯 |
projects/project-number/locations/location/firewallEndpointAssociations/firewall-endpoint-association-id
|
| Cloud NGFW 安全性設定檔群組1 |
projects/project-number/locations/location/securityProfileGroups/security-profile-group-id
|
| Cloud NGFW 安全性設定檔1 |
projects/project-number/locations/location/securityProfiles/security-profile-id
|
| 網路安全整合服務攔截部署項目群組 |
projects/project-number/locations/location/interceptDeploymentGroups/intercept-deployment-group-id
|
| 網路安全整合服務 攔截部署作業 |
projects/project-number/locations/location/interceptDeployments/intercept-deployment-id
|
| 網路安全整合服務 攔截端點群組關聯 |
projects/project-number/locations/location/interceptEndpointGroupAssociations/intercept-endpoint-group-association-id
|
| 網路安全整合服務 攔截端點群組 |
projects/project-number/locations/location/interceptEndpoints/intercept-endpoint-group-id
|
| 網路安全整合服務 鏡像流量部署項目群組 |
projects/project-number/locations/location/mirroringDeploymentGroups/mirroring-deployment-group-id
|
| 網路安全整合服務 鏡像部署 |
projects/project-number/locations/location/mirroringDeployments/mirroring-deployment-id
|
| 網路安全整合服務 鏡像端點群組關聯 |
projects/project-number/locations/location/mirroringEndpointGroupAssociations/mirroring-endpoint-group-association-id
|
| 網路安全整合服務 mirroring 端點群組 |
projects/project-number/locations/location/mirroringEndpoints/mirroring-endpoint-group-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 記錄檔 bucket | 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 buckets2 | projects/_/buckets/bucket-name |
| Cloud Storage 受管理資料夾2、3 | projects/_/buckets/bucket-name/managedFolders/managed-folder-name |
| Cloud Storage 物件2、4 | 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 防火牆 | 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 Proxy | projects/project-id/global/targetHttpProxies/target-http-proxy-id |
| Compute Engine 區域目標 HTTP Proxy | projects/project-id/regions/region-id/targetHttpProxies/target-http-proxy-id |
| Compute Engine 全域目標 HTTPS Proxy | projects/project-id/global/targetHttpsProxies/target-https-proxy-id |
| Compute Engine 區域目標 HTTPS Proxy | projects/project-id/regions/region-id/targetHttpsProxies/target-https-proxy-id |
| Compute Engine 目標 SSL Proxy | projects/project-id/global/targetSslProxies/target-ssl-proxy-id |
| Compute Engine 目標 TCP Proxy | projects/project-id/global/targetTcpProxies/target-tcp-proxy-id |
| Google Kubernetes Engine 區域叢集 | projects/project-id/zones/zone/clusters/cluster-id |
| Google Kubernetes Engine 區域叢集 | projects/project-id/locations/location/clusters/cluster-id |
| Cloud DNS 資源記錄集 | projects/project-id/managedZones/zone-id/rrsets/rrset-name/rrset-type |
| Resource Manager organizations | organizations/organization-name |
1 IAM 條件僅支援專案層級的 Cloud NGFW 資源,不支援機構層級的 Cloud NGFW 資源。
2 對於 Cloud Storage,資源名稱包含底線 (_),而非專案 ID。您無法將底線替換為專案 ID、專案名稱或專案號碼。
3 使用完整的受管理資料夾名稱,包括正斜線。在 Cloud Storage 中,這些字元是受管理資料夾名稱的一部分,而非路徑分隔符。
4 使用完整物件名稱,包括正斜線。在 Cloud Storage 中,這些字元是物件名稱的一部分,而非路徑分隔符。
資源標記
您可以將標記附加至機構、專案和資料夾。任何 Cloud de Confiance by S3NS 資源都可以沿用這些較高層級資源的標記。
您可以使用幾種不同類型的 ID 參照標記鍵和值:
-
永久 ID:全域不重複,且不得重複使用。舉例來說,標記鍵可能具有永久 ID
tagKeys/123456789012,而標記值可能具有永久 IDtagValues/567890123456。 - 簡稱。每個鍵的簡稱在鍵所屬的專案或機構中不得重複,且每個值的簡稱在相關聯的鍵中不得重複。舉例來說,標記鍵的簡稱可以是
env,標記值的簡稱可以是prod。 -
命名空間名稱:在標記鍵的簡稱中加入機構的數字 ID 或專案 ID。舉例來說,為機構建立的標記鍵可能具有命名空間名稱
123456789012/env。如要瞭解如何取得機構 ID,請參閱「取得機構資源 ID」。為專案建立的標記鍵可能具有命名空間名稱myproject/env。如要瞭解如何取得專案 ID,請參閱「識別專案」。