Share via


CLI (v2) 登錄 YAML 架構

適用於:Azure CLI ML 延伸模組第 2 版 (目前)

您可以在 https://azuremlschemasprod.azureedge.net/latest/registry.schema.json 中找到來源 JSON 結構描述。

注意

此文件中詳述的 YAML 語法是以最新版 ML CLI v2 延伸模組的 JSON 結構描述為基礎。 此語法只保證能與最新版的 ML CLI v2 延伸模組搭配使用。 您可以在 https://azuremlschemasprod.azureedge.net/ 找到舊版延伸模組的結構描述。

YAML 語法

索引鍵 類型 描述 允許的值 預設值
$schema 字串 YAML 結構描述。 如果您使用 Azure Machine Learning VS Code 擴充功能來撰寫 YAML 檔案,在檔案頂端包含 $schema 可讓您叫用結構描述和資源完成。
name 字串 必要。 登錄的名稱。
tags object 登錄標記的字典。
location 字串 必要。 登錄的主要位置。
replication_locations object 必要。 將複寫登錄相關聯資源的位置清單。 此清單必須包含登錄的主要位置。
public_network_access 字串 如果登錄將使用 Private Link,是否允許公用端點存取。 enabled, disabled enabled

備註

命令 az ml registry 可用於管理 Azure Machine Learning 登錄。

範例

範例 GitHub 存放庫中有範例可用。 下列各節顯示數個。

YAML:基本

name: DemoRegistry
tags:
  foo: bar
  description: Basic registry with one primary region and to additional regions
location: eastus
replication_locations:
  - location: eastus
  - location: eastus2
  - location: westus
  - location: westus2

YAML:具有儲存體選項

name: DemoRegistry2
tags:
  foo: bar
  description: Registry with additional configuration for storage accounts
location: eastus
replication_locations:
  - location: eastus
    storage_config:
      storage_account_hns: False
      storage_account_type: Standard_LRS
  - location: eastus2
    storage_config:
      storage_account_hns: False
      storage_account_type: Standard_LRS
  - location: westus
    storage_config:
      storage_account_hns: False
      storage_account_type: Standard_LRS

後續步驟