本頁說明如何建立及管理 AML AI 引擎設定,也就是訓練模型的設定。引擎設定可能包含針對特定資料集調整的資訊。
如要進一步瞭解引擎設定,請參閱「設定引擎」。
事前準備
-
如要取得建立及管理引擎設定所需的權限,請要求管理員為您授予專案的 Financial Services 管理員 (
financialservices.admin) 身分與存取權管理角色。如要進一步瞭解如何授予角色,請參閱「管理專案、資料夾和機構的存取權」。 - 建立執行個體
- 取得引擎版本
- 建立資料集
建立包含自動調整功能的引擎設定
部分 API 方法會傳回長時間執行的作業 (LRO)。這些方法是以非同步方式執行,並會傳回 Operation 物件。詳情請參閱「REST 參考資料」。方法傳回回應時,作業可能尚未完成。對於這些方法,請先傳送要求,然後檢查結果。一般來說,所有 POST、PUT、UPDATE 和 DELETE 作業都是長時間執行的作業。
傳送要求
如要建立引擎設定,請使用 projects.locations.instances.engineConfigs.create 方法。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用支援的區域之一。顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 IDENGINE_CONFIG_ID:引擎設定的使用者定義 IDENGINE_VERSION_ID:引擎版本,用於引擎設定的初始設定DATASET_ID:使用者定義的 ID,用於調整模型的主要資料集TUNING_END_DATE:系統用來產生訓練特徵的最新時間。這個日期應與資料集的結束時間相同或更早。使用 RFC3339 UTC「Zulu」格式 (例如2014-10-02T15:01:23Z)。PARTY_INVESTIGATIONS_PER_PERIOD_HINT: 這個數字會提示調整器,每個週期 (每月) 要調查的當事人數量。這項設定用於控管模型的評估方式。舉例來說,首次試用 AML AI 時,建議您根據現有自動警示系統的警示,將此值設為每月平均調查的當事人數量。
JSON 要求主體:
{
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE"
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
}
}
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
cat > request.json << 'EOF'
{
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE"
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
}
}
EOF接著,請執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs?engine_config_id=ENGINE_CONFIG_ID"
PowerShell
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
@'
{
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE"
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
}
}
'@ | Out-File -FilePath request.json -Encoding utf8接著,請執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs?engine_config_id=ENGINE_CONFIG_ID" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata",
"createTime": CREATE_TIME,
"target": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"verb": "create",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
查看結果
使用 projects.locations.operations.get 方法檢查是否已建立引擎設定。如果回應包含 "done": false,請重複執行指令,直到回應包含 "done": true 為止。這些作業可能需要幾分鐘到幾小時才能完成。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用其中一個 支援的區域顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
OPERATION_ID:作業的 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID"
PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata",
"createTime": "2023-03-14T15:52:55.358979323Z",
"endTime": "2023-03-14T16:52:55.358979323Z",
"target": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"verb": "create",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": true,
"response": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.EngineConfig",
"name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"createTime": CREATE_TIME,
"updateTime": UPDATE_TIME,
"state": "ACTIVE",
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE",
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
},
"lineOfBusiness": "RETAIL",
"billingUuid": "BILLING_UUID"
}
}
匯出中繼資料
如要從引擎設定匯出中繼資料,請使用 projects.locations.instances.engineConfigs.exportMetadata 方法。
詳情請參閱「AML 輸出資料模型中匯出的中繼資料」。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用其中一個 支援的區域顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 IDENGINE_CONFIG_ID:引擎設定的使用者定義 IDBQ_OUTPUT_DATASET_NAME:要匯出資料表的 BigQuery 資料集,該資料表會說明引擎設定的結構化中繼資料STRUCTURED_METADATA_TABLE:要寫入結構化中繼資料的資料表WRITE_DISPOSITION:如果目標資料表已存在,則會執行的動作;請使用下列其中一個值:-
WRITE_EMPTY:只有在 BigQuery 資料表為空時,才能匯出資料。 -
WRITE_TRUNCATE:先清除 BigQuery 資料表中的所有現有資料,再寫入資料表。
-
JSON 要求主體:
{
"structuredMetadataDestination": {
"tableUri": "bq://PROJECT_ID.BQ_OUTPUT_DATASET_NAME.STRUCTURED_METADATA_TABLE",
"writeDisposition": "WRITE_DISPOSITION"
}
}
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
cat > request.json << 'EOF'
{
"structuredMetadataDestination": {
"tableUri": "bq://PROJECT_ID.BQ_OUTPUT_DATASET_NAME.STRUCTURED_METADATA_TABLE",
"writeDisposition": "WRITE_DISPOSITION"
}
}
EOF接著,請執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID:exportMetadata"
PowerShell
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
@'
{
"structuredMetadataDestination": {
"tableUri": "bq://PROJECT_ID.BQ_OUTPUT_DATASET_NAME.STRUCTURED_METADATA_TABLE",
"writeDisposition": "WRITE_DISPOSITION"
}
}
'@ | Out-File -FilePath request.json -Encoding utf8接著,請執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID:exportMetadata" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata",
"createTime": CREATE_TIME,
"target": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"verb": "exportMetadata",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
如要進一步瞭解如何取得長時間執行的作業 (LRO) 結果,請參閱「檢查結果」。
建立會繼承超參數的引擎設定
為避免每次採用新版模型引擎時都需重新調整,您可以選擇從現有引擎設定檔繼承超參數。詳情請參閱「設定引擎」。
如要建立引擎設定,請使用 projects.locations.instances.engineConfigs.create 方法。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用支援的區域之一。顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 IDENGINE_CONFIG_ID:引擎設定的使用者定義 IDENGINE_VERSION_ID:引擎版本,用於引擎設定的初始設定;引擎版本的業務線必須與您要從中繼承的來源引擎設定中的業務線相符SOURCE_ENGINE_CONFIG_ID:使用者定義的來源引擎設定 ID;輸出內容和超參數會從這個來源引擎設定繼承
JSON 要求主體:
{
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"hyperparameterSourceType": "INHERITED",
"hyperparameterSource": {
"sourceEngineConfig": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/SOURCE_ENGINE_CONFIG_ID"
}
}
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
cat > request.json << 'EOF'
{
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"hyperparameterSourceType": "INHERITED",
"hyperparameterSource": {
"sourceEngineConfig": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/SOURCE_ENGINE_CONFIG_ID"
}
}
EOF接著,請執行下列指令來傳送 REST 要求:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs?engine_config_id=ENGINE_CONFIG_ID"
PowerShell
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
@'
{
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"hyperparameterSourceType": "INHERITED",
"hyperparameterSource": {
"sourceEngineConfig": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/SOURCE_ENGINE_CONFIG_ID"
}
}
'@ | Out-File -FilePath request.json -Encoding utf8接著,請執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs?engine_config_id=ENGINE_CONFIG_ID" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata",
"createTime": CREATE_TIME,
"target": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"verb": "create",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
如要進一步瞭解如何取得長時間執行的作業 (LRO) 結果,請參閱「檢查結果」。
取得引擎設定
如要取得引擎設定,請使用 projects.locations.instances.engineConfigs.get 方法。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用其中一個 支援的區域顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 IDENGINE_CONFIG_ID:引擎設定的使用者定義 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID"
PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"createTime": CREATE_TIME,
"updateTime": UPDATE_TIME,
"state": "ACTIVE",
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE",
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
},
"lineOfBusiness": "RETAIL"
}
更新引擎設定
如要更新引擎設定,請使用 projects.locations.instances.engineConfigs.patch 方法。
只有引擎設定中的標籤欄位可以更新。以下範例會更新與引擎設定相關聯的這些鍵/值組合使用者標籤。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用其中一個 支援的區域顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 IDENGINE_CONFIG_ID:引擎設定的使用者定義 IDKEY:用於整理引擎設定的鍵/值組合中的鍵。詳情請參閱labels。VALUE:鍵/值組合中的值,用於整理引擎設定。詳情請參閱labels。
JSON 要求主體:
{
"labels": {
"KEY": "VALUE"
}
}
如要傳送要求,請選擇以下其中一個選項:
curl
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
cat > request.json << 'EOF'
{
"labels": {
"KEY": "VALUE"
}
}
EOF接著,請執行下列指令來傳送 REST 要求:
curl -X PATCH \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID?updateMask=labels"
PowerShell
將要求主體儲存在名為 request.json 的檔案中。
在終端機中執行下列指令,在目前目錄中建立或覆寫這個檔案:
@'
{
"labels": {
"KEY": "VALUE"
}
}
'@ | Out-File -FilePath request.json -Encoding utf8接著,請執行下列指令來傳送 REST 要求:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID?updateMask=labels" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata",
"createTime": CREATE_TIME,
"target": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"verb": "update",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
如要進一步瞭解如何取得長時間執行的作業 (LRO) 結果,請參閱「檢查結果」。
列出引擎設定
如要列出特定位置的引擎設定,請使用 projects.locations.instances.engineConfigs.list 方法。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用其中一個 支援的區域顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs"
PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"engineConfigs": [
{
"name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"createTime": CREATE_TIME,
"updateTime": UPDATE_TIME,
"state": "ACTIVE",
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE",
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
},
"lineOfBusiness": "RETAIL"
},
{
"name": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/my-other-engine-config",
"createTime": CREATE_TIME,
"updateTime": UPDATE_TIME,
"state": "ACTIVE",
"engineVersion": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineVersions/ENGINE_VERSION_ID",
"tuning": {
"primaryDataset": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/datasets/DATASET_ID",
"endTime": "TUNING_END_DATE",
},
"performanceTarget": {
"partyInvestigationsPerPeriodHint": "PARTY_INVESTIGATIONS_PER_PERIOD_HINT"
},
"lineOfBusiness": "RETAIL"
}
]
}
刪除引擎設定
如要刪除引擎設定,請使用 projects.locations.instances.engineConfigs.delete 方法。
使用任何要求資料之前,請先替換以下項目:
PROJECT_ID: Google Cloud 「身分與存取權管理設定」中列出的專案 IDLOCATION:執行個體的位置;請使用其中一個 支援的區域顯示地區us-central1us-east1asia-south1europe-west1europe-west2europe-west4northamerica-northeast1southamerica-east1australia-southeast1
INSTANCE_ID:使用者定義的執行個體 IDENGINE_CONFIG_ID:引擎設定的使用者定義 ID
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID"
PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://financialservices.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{
"name": "projects/PROJECT_ID/locations/LOCATION/operations/OPERATION_ID",
"metadata": {
"@type": "type.googleapis.com/google.cloud.financialservices.v1.OperationMetadata",
"createTime": CREATE_TIME,
"target": "projects/PROJECT_ID/locations/LOCATION/instances/INSTANCE_ID/engineConfigs/ENGINE_CONFIG_ID",
"verb": "delete",
"requestedCancellation": false,
"apiVersion": "v1"
},
"done": false
}
如要進一步瞭解如何取得長時間執行的作業 (LRO) 結果,請參閱「檢查結果」。