本文說明啟用資料落地設定後,如何使用 Security Command Center 資源。只有在為機構啟用 Standard 或 Premium 服務方案時,才能為 Security Command Center 啟用資料落地設定。
有資料落地權控制項的資源
下列 Security Command Center 資源類型適用資料落地控制選項:
- 所有 Model Armor 資源
- BigQuery Export 設定
- 持續匯出設定
- 發現項目
- 忽略規則設定
如要在程式輔助或指令列中處理這些資源,請使用 Security Command Center API 的區域端點。如要在 Google Cloud 控制台中使用這些資源,請務必使用管轄區 Google Cloud 控制台。
如為其他資源類型,請使用預設 API 端點和Google Cloud 控制台。
關於區域端點
區域端點可存取特定位置的資源。使用地區端點時,要求會直接傳送至端點的位置。您無法使用區域端點存取其他位置的資源。
使用區域端點有助於在資源處於閒置、使用中和傳輸狀態時,強制執行資料落地控制項。
Security Command Center 包含多項服務。如果是受資料落地控制選項限制的資源類型,下列服務必須使用區域端點:
- Model Armor API
modelarmor.LOCATION.rep.googleapis.com
- Security Command Center API
securitycenter.LOCATION.rep.googleapis.com
將 LOCATION
替換為服務的支援位置。
對於所有其他資源類型,您必須使用預設端點。
關於管轄區 Google Cloud 控制台
您可以在管轄區 Google Cloud 控制台中,啟用 Security Command Center 的 Standard 或 Premium 服務級別時,一併啟用資料落地設定。並提供特定位置的資源存取權。
使用管轄區 Google Cloud 控制台,有助於在資源處於靜態、使用中和傳輸狀態時,強制執行資料落地控制項。
您只能使用管轄區 Google Cloud 控制台,存取受資料落地控管的資源類型。如要開啟控制台,請使用您所在位置的適當網址:
- 歐盟
- 聯合身分識別使用者:
console.eu.cloud.google
- 所有其他使用者:
console.eu.cloud.google.com
- 沙烏地阿拉伯王國
- 採聯合驗證的身分使用者:
console.sa.cloud.google
- 所有其他使用者:
console.sa.cloud.google.com
- 美國
- 採聯合驗證的身分使用者:
console.us.cloud.google
- 所有其他使用者:
console.us.cloud.google.com
如要使用所有其他資源類型,請務必使用標準 Google Cloud 控制台。
區域端點的位置
本節列出 Security Command Center API 和相關服務的區域端點適用位置。
Security Command Center API 的位置
Security Command Center API 在下列位置提供區域和多區域端點:
- 歐盟
eu
- 沙烏地阿拉伯王國
me-central2
- 美國
us
Model Armor API 的位置
Model Armor API 在下列位置提供區域端點:
- 歐盟
europe-west4
:荷蘭二氧化碳排放量低2
- 美國
us-central1
:愛荷華州低二氧化碳
us-east1
:南卡羅來納州us-east4
:北維吉尼亞州us-west1
:奧勒岡州 <0
Model Armor API 在下列位置提供多區域端點:
- 歐盟
eu
- 美國
us
區域端點工具
如要管理受資料落地控制選項限制的資源類型,您必須在建立用戶端或執行指令時指定區域端點。
對於所有其他資源類型,您必須使用預設端點。
gcloud
下列 gcloud CLI 指令群組需要使用區域端點:
gcloud model-armor
:管理 Model Armor 資源gcloud scc bqexports
:管理 BigQuery 匯出設定gcloud scc findings
:管理發現項目gcloud scc muteconfigs
:管理忽略規則設定gcloud scc notifications
:管理持續匯出設定
對於所有其他 gcloud scc
指令群組,您必須使用 Security Command Center API 的預設端點。
變更服務端點
如要切換至區域端點,請執行下列指令:
gcloud config set api_endpoint_overrides/SERVICE \ https://SERVICE.LOCATION.rep.googleapis.com/
如要切換至預設端點,請執行下列指令:
gcloud config unset api_endpoint_overrides/SERVICE
更改下列內容:
SERVICE
:要設定的服務;使用modelarmor
適用於 Model Armor API,或使用securitycenter
適用於 Security Command Center APILOCATION
:服務支援的位置
您也可以選擇為 gcloud CLI 建立使用區域端點的具名設定。執行 gcloud CLI 指令前,您可以執行 gcloud config configurations activate
指令,切換至具名設定。
執行 gcloud CLI 指令
執行 Security Command Center API 的 gcloud CLI 指令時,請務必指定位置。做法如下:
- 使用
--location
標記。 - 如果您提供資源名稱的完整路徑,請使用指定位置的格式,例如
projects/123/sources/456/locations/LOCATION/findings/a1b2c3
。
下列範例說明如何使用 --location
旗標。
gcloud scc findings list
指令會列出特定位置的機構發現項目。
使用下方的任何指令資料之前,請先替換以下項目:
-
ORGANIZATION_ID
:機構的數值 ID -
LOCATION
:Security Command Center API 的支援位置
執行
gcloud scc findings list
指令:
Linux、macOS 或 Cloud Shell
gcloud scc findings list ORGANIZATION_ID --location=LOCATION
Windows (PowerShell)
gcloud scc findings list ORGANIZATION_ID --location=LOCATION
Windows (cmd.exe)
gcloud scc findings list ORGANIZATION_ID --location=LOCATION
回應會包含調查結果清單。
Terraform
如要瞭解如何套用或移除 Terraform 設定,請參閱「基本 Terraform 指令」。 詳情請參閱 Terraform供應商參考說明文件。
Go
請使用下列其中一個區域端點:
- Model Armor API
modelarmor.LOCATION.rep.googleapis.com:443
- Security Command Center API
securitycenter.LOCATION.rep.googleapis.com:443
將 LOCATION
替換為服務的支援位置。
以下程式碼範例說明如何建立使用區域端點的 Security Command Center API 用戶端。
Java
請使用下列其中一個區域端點:
- Model Armor API
modelarmor.LOCATION.rep.googleapis.com:443
- Security Command Center API
securitycenter.LOCATION.rep.googleapis.com:443
將 LOCATION
替換為服務的支援位置。
以下程式碼範例說明如何建立使用區域端點的 Security Command Center API 用戶端。
Python
請使用下列其中一個區域端點:
- Model Armor API
modelarmor.LOCATION.rep.googleapis.com
- Security Command Center API
securitycenter.LOCATION.rep.googleapis.com
將 LOCATION
替換為服務的支援位置。
以下程式碼範例說明如何建立使用區域端點的 Security Command Center API 用戶端。
REST
如要存取下列 REST API 資源類型,必須使用區域服務端點:
- Model Armor API
端點:
https://modelarmor.LOCATION.rep.googleapis.com
將
LOCATION
替換為服務的支援位置。資源類型:所有資源類型
- Security Command Center API
端點:
https://securitycenter.LOCATION.rep.googleapis.com
將
LOCATION
替換為服務的支援位置。資源類型:
folders.locations.bigQueryExports
folders.locations.findings
folders.locations.muteConfigs
folders.locations.notificationConfigs
organizations.locations.bigQueryExports
organizations.locations.findings
organizations.locations.muteConfigs
organizations.locations.notificationConfigs
projects.locations.bigQueryExports
projects.locations.findings
projects.locations.muteConfigs
projects.locations.notificationConfigs
將 LOCATION
替換為服務的支援位置。
對於所有其他資源類型,您必須使用預設端點。