Microsoft.MachineLearningServices workspaces/datastores

The workspaces/datastores resource type can be deployed to: Resource groups.

To learn about resource group deployments, see Bicep or ARM template.

Template format

To create a Microsoft.MachineLearningServices/workspaces/datastores resource, add the following Bicep or JSON to your template.

resource symbolicname 'Microsoft.MachineLearningServices/workspaces/datastores@2021-03-01-preview' = {
  name: 'string'
  parent: parentSymbolicName
  properties: {
    contents: {
      contentsType: 'string'
      // For remaining properties, see DatastoreContents objects
    }
    description: 'string'
    isDefault: bool
    linkedInfo: {
      linkedId: 'string'
      linkedResourceName: 'string'
      origin: 'Synapse'
    }
    properties: {
    tags: {
      tagName1: 'tagValue1'
      tagName2: 'tagValue2'
    }
  }
}

DatastoreContents objects

Set the contentsType property to specify the type of object.

For AzureBlob, use:

  contentsType: 'AzureBlob'
  accountName: 'string'
  containerName: 'string'
  credentials: {
    credentialsType: 'string'
    // For remaining properties, see DatastoreCredentials objects
  }
  endpoint: 'string'
  protocol: 'string'

For AzureDataLakeGen1, use:

  contentsType: 'AzureDataLakeGen1'
  credentials: {
    credentialsType: 'string'
    // For remaining properties, see DatastoreCredentials objects
  }
  storeName: 'string'

For AzureDataLakeGen2, use:

  contentsType: 'AzureDataLakeGen2'
  accountName: 'string'
  containerName: 'string'
  credentials: {
    credentialsType: 'string'
    // For remaining properties, see DatastoreCredentials objects
  }
  endpoint: 'string'
  protocol: 'string'

For AzureFile, use:

  contentsType: 'AzureFile'
  accountName: 'string'
  containerName: 'string'
  credentials: {
    credentialsType: 'string'
    // For remaining properties, see DatastoreCredentials objects
  }
  endpoint: 'string'
  protocol: 'string'

For AzurePostgreSql, use:

  contentsType: 'AzurePostgreSql'
  credentials: {
    credentialsType: 'string'
    // For remaining properties, see DatastoreCredentials objects
  }
  databaseName: 'string'
  enableSSL: bool
  endpoint: 'string'
  portNumber: int
  serverName: 'string'

For AzureSqlDatabase, use:

  contentsType: 'AzureSqlDatabase'
  credentials: {
    credentialsType: 'string'
    // For remaining properties, see DatastoreCredentials objects
  }
  databaseName: 'string'
  endpoint: 'string'
  portNumber: int
  serverName: 'string'

For GlusterFs, use:

  contentsType: 'GlusterFs'
  serverAddress: 'string'
  volumeName: 'string'

DatastoreCredentials objects

Set the credentialsType property to specify the type of object.

For AccountKey, use:

  credentialsType: 'AccountKey'
  secrets: {
    key: 'string'
    secretsType: 'string'
  }

For Certificate, use:

  credentialsType: 'Certificate'
  authorityUrl: 'string'
  clientId: 'string'
  resourceUri: 'string'
  secrets: {
    certificate: 'string'
    secretsType: 'string'
  }
  tenantId: 'string'
  thumbprint: 'string'

For None, use:

  credentialsType: 'None'
  secrets: {
    secretsType: 'string'
  }

For Sas, use:

  credentialsType: 'Sas'
  secrets: {
    sasToken: 'string'
    secretsType: 'string'
  }

For ServicePrincipal, use:

  credentialsType: 'ServicePrincipal'
  authorityUrl: 'string'
  clientId: 'string'
  resourceUri: 'string'
  secrets: {
    clientSecret: 'string'
    secretsType: 'string'
  }
  tenantId: 'string'

For SqlAdmin, use:

  credentialsType: 'SqlAdmin'
  secrets: {
    password: 'string'
    secretsType: 'string'
  }
  userId: 'string'

Property values

workspaces/datastores

Name Description Value
type The resource type

For Bicep, set this value in the resource declaration.
'Microsoft.MachineLearningServices/workspaces/datastores'
apiVersion The resource api version

For Bicep, set this value in the resource declaration.
'2021-03-01-preview'
name The resource name

See how to set names and types for child resources in Bicep or JSON ARM templates.
string (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
parentSymbolicName
properties Datastore definition. DatastoreProperties (required)

DatastoreProperties

Name Description Value
contents Base definition for datastore contents configuration. DatastoreContents (required)
description The asset description text. string
isDefault Whether this datastore is the default for the workspace. bool
linkedInfo Information about a datastore origin, if linked. LinkedInfo
properties The asset property dictionary. DatastoreProperties
tags Tag dictionary. Tags can be added, removed, and updated. Dictionary of tag names and values. See Tags in templates

DatastoreContents

Name Description Value
contentsType Set the object type AzureBlob
AzureDataLakeGen1
AzureDataLakeGen2
AzureFile
AzurePostgreSql
AzureSqlDatabase
GlusterFs

AzureBlobContents

Name Description Value
contentsType Storage type backing the datastore. 'AzureBlob'
accountName Storage account name. string (required)
containerName Storage account container name. string (required)
credentials Base definition for datastore credentials. DatastoreCredentials (required)
endpoint Azure cloud endpoint for the storage account. string (required)
protocol Protocol used to communicate with the storage account. string (required)

DatastoreCredentials

Name Description Value
credentialsType Set the object type AccountKey
Certificate
None
Sas
ServicePrincipal
SqlAdmin

AccountKeyDatastoreCredentials

Name Description Value
credentialsType Credential type used to authentication with storage. 'AccountKey'
secrets Datastore account key secrets. AccountKeyDatastoreSecrets

AccountKeyDatastoreSecrets

Name Description Value
key Storage account key. string
secretsType Enum to determine the datastore secrets type. 'AccountKey'
'Certificate'
'None'
'Sas'
'ServicePrincipal'
'SqlAdmin'

CertificateDatastoreCredentials

Name Description Value
credentialsType Credential type used to authentication with storage. 'Certificate'
authorityUrl Authority URL used for authentication. string
clientId Service principal client ID. string (required)
resourceUri Resource the service principal has access to. string
secrets Datastore certificate secrets. CertificateDatastoreSecrets
tenantId ID of the tenant to which the service principal belongs. string (required)
thumbprint Thumbprint of the certificate used for authentication. string (required)

CertificateDatastoreSecrets

Name Description Value
certificate Service principal certificate. string
secretsType Enum to determine the datastore secrets type. 'AccountKey'
'Certificate'
'None'
'Sas'
'ServicePrincipal'
'SqlAdmin'

NoneDatastoreCredentials

Name Description Value
credentialsType Credential type used to authentication with storage. 'None'
secrets Empty/none datastore secret. NoneDatastoreSecrets

NoneDatastoreSecrets

Name Description Value
secretsType Enum to determine the datastore secrets type. 'AccountKey'
'Certificate'
'None'
'Sas'
'ServicePrincipal'
'SqlAdmin'

SasDatastoreCredentials

Name Description Value
credentialsType Credential type used to authentication with storage. 'Sas'
secrets Datastore SAS secrets. SasDatastoreSecrets

SasDatastoreSecrets

Name Description Value
sasToken Storage container SAS token. string
secretsType Enum to determine the datastore secrets type. 'AccountKey'
'Certificate'
'None'
'Sas'
'ServicePrincipal'
'SqlAdmin'

ServicePrincipalDatastoreCredentials

Name Description Value
credentialsType Credential type used to authentication with storage. 'ServicePrincipal'
authorityUrl Authority URL used for authentication. string
clientId Service principal client ID. string (required)
resourceUri Resource the service principal has access to. string
secrets Datastore Service Principal secrets. ServicePrincipalDatastoreSecrets
tenantId ID of the tenant to which the service principal belongs. string (required)

ServicePrincipalDatastoreSecrets

Name Description Value
clientSecret Service principal secret. string
secretsType Enum to determine the datastore secrets type. 'AccountKey'
'Certificate'
'None'
'Sas'
'ServicePrincipal'
'SqlAdmin'

SqlAdminDatastoreCredentials

Name Description Value
credentialsType Credential type used to authentication with storage. 'SqlAdmin'
secrets Datastore SQL Admin secrets. SqlAdminDatastoreSecrets
userId SQL database user name. string (required)

SqlAdminDatastoreSecrets

Name Description Value
password SQL database password. string
secretsType Enum to determine the datastore secrets type. 'AccountKey'
'Certificate'
'None'
'Sas'
'ServicePrincipal'
'SqlAdmin'

AzureDataLakeGen1Contents

Name Description Value
contentsType Storage type backing the datastore. 'AzureDataLakeGen1'
credentials Base definition for datastore credentials. DatastoreCredentials (required)
storeName Azure Data Lake store name. string (required)

AzureDataLakeGen2Contents

Name Description Value
contentsType Storage type backing the datastore. 'AzureDataLakeGen2'
accountName Storage account name. string (required)
containerName Storage account container name. string (required)
credentials Base definition for datastore credentials. DatastoreCredentials (required)
endpoint Azure cloud endpoint for the storage account. string (required)
protocol Protocol used to communicate with the storage account. string (required)

AzureFileContents

Name Description Value
contentsType Storage type backing the datastore. 'AzureFile'
accountName Storage account name. string (required)
containerName Storage account container name. string (required)
credentials Base definition for datastore credentials. DatastoreCredentials (required)
endpoint Azure cloud endpoint for the storage account. string (required)
protocol Protocol used to communicate with the storage account. string (required)

AzurePostgreSqlContents

Name Description Value
contentsType Storage type backing the datastore. 'AzurePostgreSql'
credentials Base definition for datastore credentials. DatastoreCredentials (required)
databaseName Azure SQL database name. string (required)
enableSSL Whether the Azure PostgreSQL server requires SSL. bool
endpoint Azure cloud endpoint for the database. string (required)
portNumber Azure SQL server port. int (required)
serverName Azure SQL server name. string (required)

AzureSqlDatabaseContents

Name Description Value
contentsType Storage type backing the datastore. 'AzureSqlDatabase'
credentials Base definition for datastore credentials. DatastoreCredentials (required)
databaseName Azure SQL database name. string (required)
endpoint Azure cloud endpoint for the database. string (required)
portNumber Azure SQL server port. int (required)
serverName Azure SQL server name. string (required)

GlusterFsContents

Name Description Value
contentsType Storage type backing the datastore. 'GlusterFs'
serverAddress GlusterFS server address (can be the IP address or server name). string (required)
volumeName GlusterFS volume name. string (required)

LinkedInfo

Name Description Value
linkedId Linked service ID. string
linkedResourceName Linked service resource name. string
origin Enum to determine the type of linked service. 'Synapse'

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Create AML workspace with multiple Datasets & Datastores

Deploy to Azure
This template creates Azure Machine Learning workspace with multiple datasets & datastores.
Create an Azure ADLS Datastore

Deploy to Azure
This template creates a ADLS datastore in Azure Machine Learning workspace.
Create an Azure ADLS Gen2 Datastore

Deploy to Azure
This template creates a ADLS Gen2 datastore in Azure Machine Learning workspace.
Create a Blob Storage Datastore

Deploy to Azure
This template creates a blob storage datastore in Azure Machine Learning workspace.
Create a Databricks File System Datastore

Deploy to Azure
This template creates a Databricks File System datastore in Azure Machine Learning workspace.
Create a File Share Datastore

Deploy to Azure
This template creates a file share datastore in Azure Machine Learning workspace.
Create an Azure MySQL Datastore

Deploy to Azure
This template creates a MySQL datastore in Azure Machine Learning workspace.
Create an Azure PostgreSQL Datastore

Deploy to Azure
This template creates a PostgreSQL datastore in Azure Machine Learning workspace.
Create an Azure SQL Datastore

Deploy to Azure
This template creates a SQL datastore in Azure Machine Learning workspace.