限制工作負載的資源使用量

本頁說明如何為 Assured Workloads 資料夾中的不符規範資源啟用或停用限制。根據預設,每個資料夾的控制套件會判斷支援哪些產品,進而決定可使用的資源。這項功能是由 gcp.restrictServiceUsage 機構政策限制條件強制執行,系統會在建立資料夾時自動套用這項限制條件。

事前準備

必要的 IAM 角色

如要修改資源使用限制,呼叫端必須使用包含更廣泛權限集合的預先定義角色,或限制為必要最低權限的自訂角色,才能授予 Identity and Access Management (IAM) 權限。

目標工作負載必須具備下列權限:

  • assuredworkloads.workload.update
  • orgpolicy.policy.set

下列兩個角色具備這些權限:

  • Assured Workloads 管理員 (roles/assuredworkloads.admin)
  • Assured Workloads 編輯器 (roles/assuredworkloads.editor)

如要進一步瞭解 Assured Workloads 的角色,請參閱「身分與存取權管理角色」。

啟用資源使用限制

如要為工作負載啟用資源使用量限制,請執行下列指令。這項指令會根據控管機制套件支援的服務,對 Assured Workloads 資料夾套用限制:

curl  -d '{ "restrictionType": "ALLOW_COMPLIANT_RESOURCES" }' \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer TOKEN"   -X POST \
      "SERVICE_ENDPOINT/v1/organizations/ORGANIZATION_ID/locations/WORKLOAD_LOCATION/workloads/WORKLOAD_ID:restrictAllowedServices"

將下列預留位置值替換為您自己的值:

  • TOKEN:要求的驗證權杖,例如:ya29.a0AfB_byDnQW7A2Vr5...tanw0427

    如果您在環境中安裝了 Google Cloud SDK,且已通過驗證,可以使用 gcloud auth print-access-token 指令:-H "Authorization: Bearer $(gcloud auth print-access-token)" -X POST \

  • SERVICE_ENDPOINT:所需的服務端點,例如:https://us-central1-assuredworkloads.googleapis.com

  • ORGANIZATION_ID: Google Cloud機構的專屬 ID,例如:12321311

  • WORKLOAD_LOCATION:工作負載的位置,例如:us-central1

  • WORKLOAD_ID:工作負載的專屬 ID,例如:00-c25febb1-f3c1-4f19-8965-a25

取代預留位置值後,要求應類似於以下範例:

curl  -d '{ "restrictionType": "ALLOW_COMPLIANT_RESOURCES" }' \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer ya29.a0AfB_byDnQW7A2Vr5...tanw0427"   -X POST \
      "https://us-central1-assuredworkloads.googleapis.com/v1/organizations/12321311/locations/us-central1/workloads/00-c25febb1-f3c1-4f19-8965-a25:restrictAllowedServices"

如果成功,回應會留白。

停用資源用量限制

如要停用工作負載的資源用量限制,請執行下列指令。這項指令可有效移除 Assured Workloads 資料夾的所有服務和資源限制:

curl  -d '{ "restrictionType": "ALLOW_ALL_GCP_RESOURCES" }' \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer TOKEN"   -X POST \
      "SERVICE_ENDPOINT/v1/organizations/ORGANIZATION_ID/locations/WORKLOAD_LOCATION/workloads/WORKLOAD_ID:restrictAllowedServices"

將下列預留位置值替換為您自己的值:

  • TOKEN:要求的驗證權杖,例如:ya29.a0AfB_byDnQW7A2Vr5...tanw0427

    如果您在環境中安裝了 Google Cloud SDK,且已通過驗證,可以使用 gcloud auth print-access-token 指令:-H "Authorization: Bearer $(gcloud auth print-access-token)" -X POST \

  • SERVICE_ENDPOINT:所需的服務端點,例如:https://us-central1-assuredworkloads.googleapis.com

  • ORGANIZATION_ID: Google Cloud機構的專屬 ID,例如:12321311

  • WORKLOAD_LOCATION:工作負載的位置,例如:us-central1

  • WORKLOAD_ID:工作負載的專屬 ID,例如:00-c25febb1-f3c1-4f19-8965-a25

取代預留位置值後,要求應類似於以下範例:

curl  -d '{ "restrictionType": "ALLOW_ALL_GCP_RESOURCES" }' \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer ya29.a0AfB_byDnQW7A2Vr5...tanw0427"   -X POST \
      "https://us-central1-assuredworkloads.googleapis.com/v1/organizations/12321311/locations/us-central1/workloads/00-c25febb1-f3c1-4f19-8965-a25:restrictAllowedServices"

如果成功,回應會留白。

支援和不支援的產品

本節的資料表列出各種控管機制套件支援和不支援的產品。如果啟用預設資源使用限制,則只能使用支援的產品。如果停用資源用量限制,則可使用支援和不支援的產品。

FedRAMP 中影響等級資料邊界

端點 支援的產品 不支援的產品
aiplatform.googleapis.com Vertex AI AI Platform Training and Prediction API

FedRAMP 高影響等級資料邊界

端點 支援的產品 不支援的產品
compute.googleapis.com
Compute Engine
Persistent Disk
AI Platform Training and Prediction API
Cloud CDN
虛擬私人雲端
Cloud Interconnect
Cloud Load Balancing
Cloud NAT
Cloud Router
Cloud VPN
Google Cloud Armor
網路服務級別

刑事司法資訊服務 (CJIS) 的資料邊界

端點 支援的產品 不支援的產品
accesscontextmanager.googleapis.com
VPC Service Controls
Access Context Manager
compute.googleapis.com
虛擬私人雲端
Persistent Disk
Compute Engine
Cloud CDN
Cloud Interconnect
Cloud Load Balancing
Cloud NAT
Cloud Router
Cloud VPN
Google Cloud Armor
網路服務級別
cloudkms.googleapis.com
Cloud Key Management Service
Cloud HSM

影響等級 4 (IL4) 資料邊界

端點 支援的產品 不支援的產品
compute.googleapis.com
Compute Engine
Persistent Disk
AI Platform Training and Prediction API
Cloud CDN
虛擬私人雲端
Cloud Interconnect
Cloud Load Balancing
Cloud NAT
Cloud Router
Cloud VPN
Google Cloud Armor
網路服務級別
cloudkms.googleapis.com
Cloud Key Management Service
Cloud HSM

美國資料邊界與支援

端點 支援的產品 不支援的產品
accesscontextmanager.googleapis.com
VPC Service Controls
Access Context Manager
compute.googleapis.com
虛擬私人雲端
Persistent Disk
Compute Engine
Cloud CDN
Cloud Interconnect
Cloud Load Balancing
Cloud NAT
Cloud Router
Cloud VPN
Google Cloud Armor
網路服務級別
cloudkms.googleapis.com
Cloud Key Management Service
Cloud HSM

Service 端點

本節列出啟用資源用量限制後未遭封鎖的 API 端點。

API 名稱 端點網址
Cloud Asset API cloudasset.googleapis.com
Cloud Logging API logging.googleapis.com
服務控制 servicecontrol.googleapis.com
Cloud Monitoring API monitoring.googleapis.com
Google Cloud Observability stackdriver.googleapis.com
Security Token Service API sts.googleapis.com
Identity and Access Management API iam.googleapis.com
Cloud Resource Manager API cloudresourcemanager.googleapis.com
Advisory Notifications API advisorynotifications.googleapis.com
IAM Service Account Credentials API iamcredentials.googleapis.com
機構政策服務 API orgpolicy.googleapis.com
Policy Troubleshooter API policytroubleshooter.googleapis.com
Network Telemetry API networktelemetry.googleapis.com
Service Usage API serviceusage.googleapis.com
Service Networking API servicenetworking.googleapis.com
Cloud Billing API cloudbilling.googleapis.com
Service Management API servicemanagement.googleapis.com
Identity Toolkit API identitytoolkit.googleapis.com
Access Context Manager API accesscontextmanager.googleapis.com
Service Consumer Management API serviceconsumermanagement.googleapis.com

後續步驟