列出在线存储区

您可以检索 Google Cloud 项目中针对特定位置创建的所有在线存储区实例列表,以及每个在线存储区的在线传送配置。

使用以下示例可检索项目中特定位置的所有在线存储区实例的列表。

控制台

请按照以下说明,使用 Google Cloud 控制台查看特定位置的在线存储区列表。

  1. 在 Google Cloud 控制台的“Vertex AI”部分,转到 Feature Store 页面。

    转到 Feature Store 页面

  2. 点击在线存储区

  3. 在线存储区部分,您可以查看所选位置的所有在线存储区的列表。

REST

要检索项目中所有 FeatureOnlineStore 资源的列表,请使用 featureOnlineStores.list 方法发送 GET 请求。

在使用任何请求数据之前,请先进行以下替换:

  • LOCATION_ID:您要查看其在线存储区列表的区域,例如 us-central1
  • PROJECT_ID:您的项目 ID。

HTTP 方法和网址:

GET https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores

如需发送请求,请选择以下方式之一:

curl

执行以下命令:

curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores"

PowerShell

执行以下命令:

$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }

Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores" | Select-Object -Expand Content

您应该会看到类似如下所示的输出。您可以使用响应中的 OPERATION_ID获取操作的状态

{
  "featureOnlineStores": [
    {
      "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME_1",
      "createTime": "2023-09-06T23:25:04.256314Z",
      "updateTime": "2023-09-06T23:25:04.256314Z",
      "etag": "AMEw9yMgoV0bAsYuKwVxz4Y7lOmxV7riNVHg217KaQAKORqvdqGCrQ1DIt8yHgoGXf8=",
      "bigtable": {
        "autoScaling": {
          "minNodeCount": 1,
          "maxNodeCount": 4,
          "cpuUtilizationTarget": 70
        }
      }
    },
    {
      "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME_2",
      "createTime": "2023-07-21T14:24:20.206446Z",
      "updateTime": "2023-07-21T14:24:20.206446Z",
      "etag": "AMEw9yPTfvIHvpFD-mbtMVKG4Sp_y08aDFZiZl4m_97VvC0YiyEVj-sbDo_NkVueeBo=",
      "bigtable": {
        "autoScaling": {
          "minNodeCount": 1,
          "maxNodeCount": 4,
          "cpuUtilizationTarget": 70
        }
      }
    }
  ]
}

后续步骤