您可以刪除現有的網路商店執行個體,即使其中包含特徵檢視執行個體也沒問題。如果線上商店例項包含現有的特徵檢視例項,您可以使用 force
查詢參數刪除線上商店及其特徵檢視。
事前準備
向 Vertex AI 進行驗證 (如果尚未完成)。
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
REST
如要在本機開發環境中使用本頁的 REST API 範例,請使用您提供給 gcloud CLI 的憑證。
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
詳情請參閱 Google Cloud 驗證說明文件中的「Authenticate for using REST」。
刪除線上商店執行個體
使用下列範例,從專案中刪除線上商店及其組成特徵檢視畫面。
控制台
按照下列操作說明,使用 Google Cloud 控制台刪除線上商店及其所有特徵檢視表。
在 Google Cloud 控制台的 Vertex AI 專區中,前往「Feature Store」頁面。
按一下「網路商店」。
選取要刪除的網路商店旁的核取方塊。
依序點選「Delete」(刪除) 和「Confirm」(確認)。
REST
如要刪除 FeatureOnlineStore
資源,請使用 featureOnlineStores.delete 方法傳送 DELETE
要求。
使用任何要求資料之前,請先替換以下項目:
- LOCATION_ID:線上商店所在的區域,例如
us-central1
。 - PROJECT_ID:您的專案 ID。
- FEATUREONLINESTORE_NAME:要刪除的線上商店執行個體名稱。
- BOOLEAN:選用。如要刪除線上執行個體 (即使其中包含特徵檢視表),請輸入
true
。預設值為false
。
HTTP 方法和網址:
DELETE https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME?force=BOOLEAN
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME?force=BOOLEAN"
PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME?force=BOOLEAN" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteOperationMetadata", "genericMetadata": { "createTime": "2023-09-15T17:30:31.741064Z", "updateTime": "2023-09-15T17:30:31.741064Z" } } }
後續步驟
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-09 (世界標準時間)。