Share via


CLI (v2) ワークスペース YAML スキーマ

適用対象: Azure CLI ML 拡張機能 v2 (現行)

ソース JSON スキーマは https://azuremlschemas.azureedge.net/latest/workspace.schema.json にあります。

Note

このドキュメントで詳しく説明されている YAML 構文は、最新バージョンの ML CLI v2 拡張機能の JSON スキーマに基づいています。 この構文は、ML CLI v2 拡張機能の最新バージョンでのみ動作することが保証されています。 以前のバージョンの拡張機能のスキーマについては、https://azuremlschemasprod.azureedge.net/ でご確認いただけます。

YAML 構文

キー Type 説明 使用できる値 既定値
$schema string YAML スキーマ。 Azure Machine Learning 用 VS Code 拡張機能を使用して YAML ファイルを作成する場合は、ファイルの先頭に $schema を含めることで、スキーマとリソースの入力候補を呼び出すことができます。
name string 必須。 ワークスペースの名前。
display_name string Studio UI のワークスペースの表示名。 リソース グループ内で一意でないことがあります。
description string ワークスペースの説明。
tags object ワークスペースのタグの辞書。
location string ワークスペースの場所。 省略すると、既定でリソース グループの場所が設定されます。
resource_group string 必須。 ワークスペースを含むリソース グループ。 リソース グループが存在しない場合は、新規に作成されます。
hbi_workspace boolean お客様のデータが、機密性の高いビジネス情報を含む High Business Impact (HBI) であるかどうか。 詳細については、保存時のデータの暗号化に関するページを参照してください。 false
storage_account string ワークスペースの既定のストレージ アカウントとして使う、既存の Azure Storage アカウントの完全修飾リソース ID。 Premium ストレージまたは階層型名前空間を持つストレージ アカウントを既定のストレージ アカウントとして使うことはできません。 省略すると、新しいストレージ アカウントが作成されます。
container_registry string ワークスペースの既定のコンテナー レジストリとして使う、既存の Azure コンテナー レジストリの完全修飾リソース ID。 Azure Machine Learning には、トレーニングとデプロイに使われるコンテナー イメージの管理に、Azure Container Registry (ACR) が使われます。 省略すると、新しいコンテナー レジストリが作成されます。 作成は遅延読み込みなので、トレーニングまたはデプロイのいずれかの操作でコンテナー レジストリが初めて必要になったときに作成されます。
key_vault string ワークスペースの既定のキー コンテナーとして使う、既存の Azure キー コンテナーの完全修飾リソース ID。 省略すると、新しいキー コンテナーが作成されます。
application_insights string ワークスペースの既定のアプリケーション分析情報として使う、既存の Azure アプリケーション分析情報の完全修飾リソース ID。 省略すると、新しいアプリケーション分析情報が作成されます。
customer_managed_key object Azure Machine Learning では、メトリックとメタデータは Azure Cosmos DB インスタンスに格納されます。 既定では、データは Microsoft のマネージド キーを使って保存時に暗号化されます。 独自のカスタマー マネージド キーを暗号化に使うには、このセクションでカスタマー マネージド キーの情報を指定します。 詳細については、Azure Cosmos DB のデータ暗号化に関するページを参照してください。
customer_managed_key.key_vault string カスタマー マネージド キーを含むキー コンテナーの完全修飾リソース ID。 このキー コンテナーは、key_vault で指定した既定のワークスペースのキー コンテナーとは異なる場合があります。
customer_managed_key.key_uri string 保存データを暗号化するためのカスタマーマネージド キーのキー URI。 URI の形式は https://<keyvault-dns-name>/keys/<key-name>/<key-version> です。
image_build_compute string コンテナー レジストリが VNet の背後にある場合、環境 Docker イメージの構築に使うコンピューティング先の名前。 詳細については、VNet の背後にあるワークスペース リソースのセキュリティ保護に関するページを参照してください。
public_network_access string ワークスペースに Private Link を使う場合、パブリック エンドポイントへのアクセスを許可するかどうかを指定します。 詳細については、VNet の背後でパブリック アクセスを有効にする方法に関するページを参照してください。 enabled, disabled disabled
managed_network object Azure Machine Learning ワークスペース マネージド ネットワーク分離。 詳細については、「ワークスペース マネージド ネットワーク分離」を参照してください。

解説

az ml workspace コマンドは、Azure Machine Learning ワークスペースの管理に使用できます。

例は、GitHub リポジトリの例にあります。 以下にいくつか示します。

YAML: 基本

$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
name: mlw-basic-prod
location: eastus
display_name: Basic workspace-example
description: This example shows a YML configuration for a basic workspace. In case you use this configuration to deploy a new workspace, since no existing dependent resources are specified, these will be automatically created.
hbi_workspace: false
tags:
  purpose: demonstration

YAML: 既存のリソースで動作します。

$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
name: mlw-basicex-prod
location: eastus
display_name: Bring your own dependent resources-example
description: This configuration specifies a workspace configuration with existing dependent resources
storage_account: /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.Storage/storageAccounts/<STORAGE_ACCOUNT>
container_registry: /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.ContainerRegistry/registries/<CONTAINER_REGISTRY>
key_vault: /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.KeyVault/vaults/<KEY_VAULT>
application_insights: /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.insights/components/<APP_INSIGHTS>
tags:
  purpose: demonstration

YAML: カスタマー マネージド キー

$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
name: mlw-cmkexample-prod
location: eastus
display_name: Customer managed key encryption-example
description: This configurations shows how to create a workspace that uses customer-managed keys for encryption.
customer_managed_key: 
  key_vault: /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP>/providers/Microsoft.KeyVault/vaults/<KEY_VAULT>
  key_uri: https://<KEY_VAULT>.vault.azure.net/keys/<KEY_NAME>/<KEY_VERSION>
tags:
  purpose: demonstration
$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
name: mlw-privatelink-prod
location: eastus
display_name: Private Link endpoint workspace-example
description: When using private link, you must set the image_build_compute property to a cluster name to use for Docker image environment building. You can also specify whether the workspace should be accessible over the internet.
image_build_compute: cpu-compute
public_network_access: Disabled
tags:
  purpose: demonstration

YAML: High Business Impact

$schema: https://azuremlschemas.azureedge.net/latest/workspace.schema.json
name: mlw-hbiexample-prod
location: eastus
display_name: High business impact-example
description: This configuration shows how to configure a workspace with the hbi flag enabled. This flag specifies whether to reduce telemetry collection and enable additional encryption when high-business-impact data is used.
hbi_workspace: true
tags:
  purpose: demonstration

YAML: インターネット送信を許可するマネージド ネットワーク

name: myworkspace_aio
managed_network:
  isolation_mode: allow_internet_outbound
  outbound_rules:
  - name: added-perule
    type: private_endpoint
    destination:
      service_resource_id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/MyAccount1
      spark_enabled: true
      subresource_target: blob
  - name: added-perule2
    type: private_endpoint
    destination:
      service_resource_id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/MyAccount2
      spark_enabled: true
      subresource_target: file

YAML: 承認された送信のみを許可するマネージド ネットワーク

name: myworkspace_dep
managed_network:
  isolation_mode: allow_only_approved_outbound
  outbound_rules:
  - name: added-servicetagrule
    type: service_tag
    destination:
      port_ranges: 80, 8080
      protocol: TCP
      service_tag: DataFactory
  - name: added-perule
    type: private_endpoint
    destination:
      service_resource_id: /subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/MyGroup/providers/Microsoft.Storage/storageAccounts/MyAccount2
      spark_enabled: true
      subresource_target: blob
  - name: added-fqdnrule
    type: fqdn
    destination: 'test2.com'

次の手順