Microsoft.MachineLearningServices workspaces/datastores 2021-03-01-preview

Template format

To create a Microsoft.MachineLearningServices/workspaces/datastores resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.MachineLearningServices/workspaces/datastores",
  "apiVersion": "2021-03-01-preview",
  "properties": {
    "contents": {
      see-DatastoreContents-objects
    },
    "description": "string",
    "isDefault": "boolean",
    "linkedInfo": {
      "linkedId": "string",
      "linkedResourceName": "string",
      "origin": "Synapse"
    },
    "properties": {},
    "tags": {}
  }
}

DatastoreContents objects

For AzureBlobContents, use:

{
  "accountName": "string",
  "containerName": "string",
  "contentsType": "AzureBlob",
  "credentials": {
    see-DatastoreCredentials-objects
  },
  "endpoint": "string", 
  "protocol": "string"
}

For AzureDataLakeGen1Contents, use:

{
  "contentsType": "AzureDataLakeGen1",
  "credentials": {
    see-DatastoreCredentials-objects
  },
  "storeName": "string"
}

For AzureDataLakeGen2Contents, use:

{
  "accountName": "string",
  "containerName": "string",
  "contentsType": "AzureDataLakeGen2",
  "credentials": {
    see-DatastoreCredentials-objects
  },
  "endpoint": "string",
  "protocol": "string"
}

For AzureFileContents, use:

{
  "accountName": "string",
  "containerName": "string",
  "contentsType": "AzureFile",
  "credentials": {
    see-DatastoreCredentials-objects
  },
  "endpoint": "string",
  "protocol": "string"
}

For AzurePostgreSqlContents, use:

{
  "contentsType": "AzurePostgreSql",
  "credentials": {
    see-DatastoreCredentials-objects
  },
  "databaseName": "string",
  "enableSSL": "bool",
  "endpoint": "string",
  "portNumber": "int",
  "serverName": "string"
}

For AzureSqlDatabaseContents, use:

{
  "contentsType": "AzureSqlDatabase",
  "credentials": {
    see-DatastoreCredentials-objects
  },
  "databaseName": "string",
  "endpoint": "string",
  "portNumber": "int",
  "serverName": "string"
}

For GlusterFsContents, use:

{
  "contentsType": "GlusterFs",
  "serverAddress": "string",
  "volumeName": "string"
}

DatastoreCredentials objects

For AccountKeyDatastoreCredentials, use:

{
  "credentialsType": "AccountKey",
  "secrets": {
    "key": "string",
    "secretsType": "string"
  }
}

For CertificateDatastoreCredentials, use:

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

For NoneDatastoreCredentials, use:

{
  "credentialsType": "None",
  "secrets": {
    "secretsType": "string"
  }
}

For SasDatastoreCredentials, use:

{
  "credentialsType": "Sas",
  "secrets": {
    "sasToken": "string",
    "secretsType": "string" 
  }
}

For ServicePrincipalDatastoreCredentials, use:

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

For SqlAdminDatastoreCredentials, use:

{
  "credentialsType": "SqlAdmin",
  "secrets": {
    "password": "string",
    "secretsType": "string" 
  },
  "userId": "string" 
}

Property values

The following tables describe the values you need to set in the schema.

Microsoft.MachineLearningServices/workspaces/datastores object

Note

In Bicep, type and apiVersion are specified in the first line of the resource declaration. Use the format <type>@<apiVersion>. Don't set those properties in the resource body.

Name Type Required Value
name string Yes Datastore name.
type enum Yes For JSON -datastores
-or-
Microsoft.MachineLearningServices/workspaces/datastores

See Set name and type for child resources.
apiVersion enum Yes For JSON - 2021-03-01-preview
properties object Yes Additional attributes of the entity. - DatastoreProperties object

DatastoreProperties object

Name Type Required Value
contents object Yes Reference to the datastore storage contents. - AzureBlob object, AzureDataLakeGen1 object, AzureDataLakeGen2 object, AzureFile object, AzurePostgreSql object, AzureSqlDatabase object, GlusterFs object
description string No The asset description text.
isDefault boolean No Whether this datastore is the default for the workspace.
linkedInfo object No Information about the datastore origin, if linked. - LinkedInfo object
properties object No The asset property dictionary.
tags object No Tag dictionary. Tags can be added, removed, and updated.

AzureBlob object

Name Type Required Value
accountName string Yes Storage account name.
containerName string Yes Storage account container name.
contentsType string Yes 'AzureBlob'
credentials object Yes DatastoreCredentials - AccountKeyDatastoreCredentials object, CertificateDatastoreCredentials object, NoneDatastoreCredentials object, SasDatastoreCredentials object, ServicePrincipalDatastoreCredentials object, SqlAdminDatastoreCredentials object
endpoint string Yes Azure cloud endpoint for the storage account.
protocol string Yes Protocol used to communicate with the storage account.

AzureDataLakeGen1 object

Name Type Required Value
contentsType string Yes 'AzureDataLakeGen1'
credentials object Yes DatastoreCredentials - AccountKeyDatastoreCredentials object, CertificateDatastoreCredentials object, NoneDatastoreCredentials object, SasDatastoreCredentials object, ServicePrincipalDatastoreCredentials object, SqlAdminDatastoreCredentials object
storeName string Yes Azure Data Lake store name.

AzureDataLakeGen2 object

Name Type Required Value
accountName string Yes Storage account name.
containerName string Yes Storage account container name.
contentsType string Yes 'AzureDataLakeGen2'
credentials object Yes DatastoreCredentials - AccountKeyDatastoreCredentials object, CertificateDatastoreCredentials object, NoneDatastoreCredentials object, SasDatastoreCredentials object, ServicePrincipalDatastoreCredentials object, SqlAdminDatastoreCredentials object
endpoint string Yes Azure cloud endpoint for the storage account.
protocol string Yes Protocol used to communicate with the storage account.

AzureFile object

Name Type Required Value
accountName string Yes Storage account name.
containerName string Yes Storage account container name.
contentsType string Yes 'AzureFile'
credentials object Yes DatastoreCredentials - AccountKeyDatastoreCredentials object, CertificateDatastoreCredentials object, NoneDatastoreCredentials object, SasDatastoreCredentials object, ServicePrincipalDatastoreCredentials object, SqlAdminDatastoreCredentials object
endpoint string Yes Azure cloud endpoint for the storage account.
protocol string Yes Protocol used to communicate with the storage account.

AzurePostgreSql object

Name Type Required Value
contentsType string Yes 'AzurePostgreSql'
credentials object Yes DatastoreCredentials - AccountKeyDatastoreCredentials object, CertificateDatastoreCredentials object, NoneDatastoreCredentials object, SasDatastoreCredentials object, ServicePrincipalDatastoreCredentials object, SqlAdminDatastoreCredentials object
databaseName string Yes Azure SQL database name.
enableSSL bool No Whether the Azure PostgreSQL server requires SSL.
endpoint string Yes Azure cloud endpoint for the database.
portNumber int Yes Azure SQL server port.
serverName string Yes Azure SQL server name.

AzureSqlDatabase object

Name Type Required Value
contentsType string Yes 'AzureSqlDatabase'
credentials object Yes DatastoreCredentials - AccountKeyDatastoreCredentials object, CertificateDatastoreCredentials object, NoneDatastoreCredentials object, SasDatastoreCredentials object, ServicePrincipalDatastoreCredentials object, SqlAdminDatastoreCredentials object
databaseName string Yes Azure SQL database name.
endpoint string Yes Azure cloud endpoint for the database.
portNumber int Yes Azure SQL server port.
serverName string Yes Azure SQL server name.

GlusterFs object

Name Type Required Value
contentsType string Yes 'GlusterFs'
serverAddress string Yes GlusterFS server address (can be the IP address or server name).
volumeName string Yes GlusterFS volume name.

AccountKeyDatastoreCredentials object

Name Type Required Value
credentialsType string Yes 'AccountKey'
secrets object No Datastore account key secrets. - AccountKeyDatastoreSecrets object

AccountKeyDatastoreSecrets object

Name Type Required Value
key string No Storage account key.
secretsType string Yes Enum to determine the datastore secrets type. - AccountKey, Certificate, None, Sas, ServicePrincipal, SqlAdmin

CertificateDatastoreCredentials object

Name Type Required Value
authorityUrl string No Authority URL used for authentication.
clientId string Yes Service principal client ID.
credentialsType string Yes 'Certificate'
resourceUri string No Resource the service principal has access to.
secrets object No Datastore certificate secrets. - CertificateDatastoreSecrets object
tenantId string Yes ID of the tenant to which the service principal belongs.
thumbprint string Yes Thumbprint of the certificate used for authentication.

CertificateDatastoreSecrets object

Name Type Required Value
certificate string No Service principal certificate.
secretsType string Yes Enum to determine the datastore secrets type. - AccountKey, Certificate, None, Sas, ServicePrincipal, SqlAdmin

NoneDatastoreCredentials object

Name Type Required Value
credentialsType string Yes 'None'
secrets object No Empty/none datastore secret. - NoneDatastoreSecrets object

NoneDatastoreSecrets object

Name Type Required Value
secretsType string Yes Enum to determine the datastore secrets type. - AccountKey, Certificate, None, Sas, ServicePrincipal, SqlAdmin

SasDatastoreCredentials object

Name Type Required Value
credentialsType string Yes 'Sas'
secrets object No Datastore SAS secrets. - SasDatastoreSecrets object

SasDatastoreSecrets object

Name Type Required Value
sasToken string No Storage container SAS token.
secretsType string Yes Enum to determine the datastore secrets type. - AccountKey, Certificate, None, Sas, ServicePrincipal, SqlAdmin

ServicePrincipalDatastoreCredentials object

Name Type Required Value
authorityUrl string No Authority URL used for authentication.
clientId string Yes Service principal client ID.
credentialsType string Yes 'ServicePrincipal'
resourceUri string No Resource the service principal has access to.
secrets object No Datastore Service Principal secrets. - ServicePrincipalDatastoreSecrets object
tenantId string Yes ID of the tenant to which the service principal belongs.

ServicePrincipalDatastoreSecrets object

Name Type Required Value
sasToken string No Storage container SAS token.
secretsType string Yes Enum to determine the datastore secrets type. - AccountKey, Certificate, None, Sas, ServicePrincipal, SqlAdmin

SqlAdminDatastoreCredentials object

Name Type Required Value
credentialsType string Yes 'SqlAdmin'
secrets object No Datastore SQL Admin secrets. - SqlAdminDatastoreSecrets object
userId string Yes SQL database user name.

SqlAdminDatastoreSecrets object

Name Type Required Value
password string No SQL database password.
secretsType string Yes Enum to determine the datastore secrets type. - AccountKey, Certificate, None, Sas, ServicePrincipal, SqlAdmin

LinkedInfo object

Name Type Required Value
linkedId string No Linked service ID.
linkedResourceName string No Linked service resource name.
origin enum No Type of the 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.