本文档介绍了在启用数据驻留时如何使用 Security Command Center 资源。只有在为组织激活标准或高级服务层级时,您才能为 Security Command Center 启用数据驻留。
包含数据驻留控制措施的资源
以下 Security Command Center 资源类型受数据驻留控制措施约束:
- 所有 Model Armor 资源
- BigQuery 导出配置
- 持续导出配置
- 发现结果
- 忽略规则配置
如需以编程方式或在命令行中使用这些资源,您必须使用 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 的标准或高级服务层级时启用数据驻留。它还可提供对特定位置的资源的访问权限。
使用管辖区级 Google Cloud 控制台有助于您在资源处于静态、使用中和传输中时对资源强制执行数据驻留控制措施。
您可以使用管辖区级 Google Cloud 控制台仅访问受数据驻留控制措施约束的资源类型。如需打开控制台,请使用适合您所在位置的网址:
- 欧盟
- 联合身份用户:
console.eu.cloud.google
- 所有其他用户:
console.eu.cloud.google.com
- 沙特阿拉伯王国 (KSA)
- 联合身份用户:
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
- 沙特阿拉伯王国 (KSA)
me-central2
- 美国
us
Model Armor API 的位置
Model Armor API 在以下位置提供区域级端点:
- 欧盟
europe-west4
:荷兰二氧化碳排放量低
- 美国
us-central1
:艾奥瓦二氧化碳排放量低
us-east1
:南卡罗来纳us-east4
:北弗吉尼亚us-west1
:俄勒冈二氧化碳排放量低
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
:要配置的服务;对于 Model Armor API,使用modelarmor
;对于 Security Command Center API,使用securitycenter
LOCATION
:服务的受支持位置
(可选)您可以为使用区域端点的 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
替换为该服务的受支持位置。
对于所有其他资源类型,您必须使用默认端点。