CLI (v2) Python feed connection YAML schema

APPLIES TO: Azure CLI ml extension v2 (current)

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.
name string Required. The connection name.
description string The connection description.
tags object The connection tag dictionary.
type string Required. The connection type. python_feed python_feed
is_shared boolean true if the connection is shared across other projects in the hub; otherwise, false. true
target string The URL of the endpoint.
credentials object Credential-based authentication to access the storage account. A personal access token or username and password can be used. Do not specify credentials when using a public Python feed.
credentials.type string The type of authentication to use. pat, username_password
credentials.pat string The personal access token to authenticate with.
credentials_username string The username to authenticate with.
credentials_password string The password to authenticate with.

Remarks

While the az ml connection commands can be used to manage both Azure Machine Learning and Azure AI Studio connections.

Examples

These examples would be in the form of YAML files and used from the CLI. For example, az ml connection create -f <file-name>.yaml.

YAML: Personal access token

#Connection.yml
name: test_ws_conn_python_pat
type: python_feed
target: https://test-feed.com
credentials:
  type: pat
  pat: dummy_pat

YAML: Username and password

name: test_ws_conn_python_user_pass
type: python_feed
target: https://test-feed.com
credentials:
  type: username_password
  username: john
  password: pass

YAML: No credentials

name: test_ws_conn_python_no_cred
type: python_feed
target: https://test-feed.com3

Next steps