CLI (v2) Azure Blob datastore YAML schema
APPLIES TO: Azure CLI ml extension v2 (current)
See the source JSON schema at https://azuremlschemas.azureedge.net/latest/azureBlob.schema.json.
Note
The YAML syntax detailed in this document is based on the JSON schema for the latest version of the ML CLI v2 extension. This syntax is guaranteed only to work with the latest version of the ML CLI v2 extension. You can find the schemas for older extension versions at https://azuremlschemasprod.azureedge.net/.
YAML syntax
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
$schema |
string | The YAML schema. If you use the Azure Machine Learning Visual Studio Code extension to author the YAML file, include $schema at the top of your file to invoke schema and resource completions. |
||
type |
string | Required. The datastore type. | azure_blob |
|
name |
string | Required. The datastore name. | ||
description |
string | The datastore description. | ||
tags |
object | The datastore tag dictionary. | ||
account_name |
string | Required. The Azure storage account name. | ||
container_name |
string | Required. The container name. | ||
endpoint |
string | The endpoint suffix of the storage service, used for creation of the storage account endpoint URL. It combines the storage account name and endpoint . Example storage account URL: https://<storage-account-name>.blob.core.chinacloudapi.cn . |
core.chinacloudapi.cn |
|
protocol |
string | Protocol for connection to the container. | https , wasbs |
https |
credentials |
object | Credential-based authentication credentials for connection to the Azure storage account. An account key or a shared access signature (SAS) token will work. The workspace key vault stores the credential secrets. | ||
credentials.account_key |
string | The account key used for storage account access. One of credentials.account_key or credentials.sas_token is required if credentials is specified. |
||
credentials.sas_token |
string | The SAS token for accessing the storage account. One of credentials.account_key or credentials.sas_token is required if credentials is specified. |
Remarks
You can use the az ml datastore
command to manage Azure Machine Learning datastores.
Examples
Visit this GitHub resource for examples. Several are shown here:
YAML: identity-based access
$schema: https://azuremlschemas.azureedge.net/latest/azureBlob.schema.json
name: blob_credless_example
type: azure_blob
description: Credential-less datastore pointing to a blob container.
account_name: mytestblobstore
container_name: data-container
YAML: account key
$schema: https://azuremlschemas.azureedge.net/latest/azureBlob.schema.json
name: blob_example
type: azure_blob
description: Datastore pointing to a blob container.
account_name: mytestblobstore
container_name: data-container
credentials:
account_key: XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxxXxXXXxXXXxXXxxxXXxxXXXxXxXXXxxXxxXXXXxxxxxXXxxxxxxXXXxXXX
YAML: wasbs protocol
$schema: https://azuremlschemas.azureedge.net/latest/azureBlob.schema.json
name: blob_protocol_example
type: azure_blob
description: Datastore pointing to a blob container using wasbs protocol.
account_name: mytestblobstore
protocol: wasbs
container_name: data-container
credentials:
account_key: XXXxxxXXXxXXXXxxXXXXXxXXXXXxXxxXxXXXxXXXxXXxxxXXxxXXXxXxXXXxxXxxXXXXxxxxxXXxxxxxxXXXxXXX
YAML: sas token
$schema: https://azuremlschemas.azureedge.net/latest/azureBlob.schema.json
name: blob_sas_example
type: azure_blob
description: Datastore pointing to a blob container using SAS token.
account_name: mytestblobstore
container_name: data-container
credentials:
sas_token: ?xx=XXXX-XX-XX&xx=xxxx&xxx=xxx&xx=xxxxxxxxxxx&xx=XXXX-XX-XXXXX:XX:XXX&xx=XXXX-XX-XXXXX:XX:XXX&xxx=xxxxx&xxx=XXxXXXxxxxxXXXXXXXxXxxxXXXXXxxXXXXXxXXXXxXXXxXXxXX