Datastores - Create Or Update
Create or update datastore.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}?api-version=2023-10-01
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}?api-version=2023-10-01&skipValidation={skipValidation}
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
name
|
path | True |
string |
Datastore name. Regex pattern: |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
path | True |
string |
The ID of the target subscription. |
workspace
|
path | True |
string |
Name of Azure Machine Learning workspace. Regex pattern: |
api-version
|
query | True |
string |
The API version to use for this operation. |
skip
|
query |
boolean |
Flag to skip validation. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
properties | True | Datastore: |
[Required] Additional attributes of the entity. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Create or update request is successful. |
|
201 Created |
Created |
|
Other Status Codes |
Error |
Examples
CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal).
Sample Request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/my-aml-workspace/datastores/string?api-version=2023-10-01&skipValidation=False
{
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "ServicePrincipal",
"authorityUrl": "string",
"resourceUrl": "string",
"tenantId": "00000000-1111-2222-3333-444444444444",
"clientId": "00000000-1111-2222-3333-444444444444",
"secrets": {
"secretsType": "ServicePrincipal",
"clientSecret": "string"
}
},
"datastoreType": "AzureDataLakeGen1",
"storeName": "string"
}
}
Sample Response
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "ServicePrincipal",
"authorityUrl": "string",
"resourceUrl": "string",
"tenantId": "00000000-1111-2222-3333-444444444444",
"clientId": "00000000-1111-2222-3333-444444444444",
"secrets": {
"secretsType": "ServicePrincipal"
}
},
"datastoreType": "AzureDataLakeGen1",
"storeName": "string"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "ServicePrincipal",
"authorityUrl": "string",
"resourceUrl": "string",
"tenantId": "00000000-1111-2222-3333-444444444444",
"clientId": "00000000-1111-2222-3333-444444444444",
"secrets": {
"secretsType": "ServicePrincipal"
}
},
"datastoreType": "AzureDataLakeGen1",
"storeName": "string"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal).
Sample Request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/my-aml-workspace/datastores/string?api-version=2023-10-01&skipValidation=False
{
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "ServicePrincipal",
"authorityUrl": "string",
"resourceUrl": "string",
"tenantId": "00000000-1111-2222-3333-444444444444",
"clientId": "00000000-1111-2222-3333-444444444444",
"secrets": {
"secretsType": "ServicePrincipal",
"clientSecret": "string"
}
},
"datastoreType": "AzureDataLakeGen2",
"filesystem": "string",
"accountName": "string",
"endpoint": "string",
"protocol": "string"
}
}
Sample Response
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "ServicePrincipal",
"authorityUrl": "string",
"resourceUrl": "string",
"tenantId": "00000000-1111-2222-3333-444444444444",
"clientId": "00000000-1111-2222-3333-444444444444",
"secrets": {
"secretsType": "ServicePrincipal"
}
},
"datastoreType": "AzureDataLakeGen2",
"filesystem": "string",
"accountName": "string",
"endpoint": "string",
"protocol": "string"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "ServicePrincipal",
"authorityUrl": "string",
"resourceUrl": "string",
"tenantId": "00000000-1111-2222-3333-444444444444",
"clientId": "00000000-1111-2222-3333-444444444444",
"secrets": {
"secretsType": "ServicePrincipal"
}
},
"datastoreType": "AzureDataLakeGen2",
"filesystem": "string",
"accountName": "string",
"endpoint": "string",
"protocol": "string"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
CreateOrUpdate datastore (Azure File store w/ AccountKey).
Sample Request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/my-aml-workspace/datastores/string?api-version=2023-10-01&skipValidation=False
{
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "AccountKey",
"secrets": {
"secretsType": "AccountKey",
"key": "string"
}
},
"datastoreType": "AzureFile",
"accountName": "string",
"fileShareName": "string",
"endpoint": "string",
"protocol": "string"
}
}
Sample Response
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "AccountKey",
"secrets": {
"secretsType": "AccountKey"
}
},
"datastoreType": "AzureFile",
"accountName": "string",
"fileShareName": "string",
"endpoint": "string",
"protocol": "string"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "AccountKey",
"secrets": {
"secretsType": "AccountKey"
}
},
"datastoreType": "AzureFile",
"accountName": "string",
"fileShareName": "string",
"endpoint": "string",
"protocol": "string"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
CreateOrUpdate datastore (AzureBlob w/ AccountKey).
Sample Request
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/test-rg/providers/Microsoft.MachineLearningServices/workspaces/my-aml-workspace/datastores/string?api-version=2023-10-01&skipValidation=False
{
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"properties": null,
"credentials": {
"credentialsType": "AccountKey",
"secrets": {
"secretsType": "AccountKey",
"key": "string"
}
},
"datastoreType": "AzureBlob",
"accountName": "string",
"containerName": "string",
"endpoint": "core.windows.net",
"protocol": "https"
}
}
Sample Response
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"isDefault": false,
"properties": null,
"credentials": {
"credentialsType": "AccountKey",
"secrets": {
"secretsType": "AccountKey"
}
},
"datastoreType": "AzureBlob",
"accountName": "string",
"containerName": "string",
"endpoint": "core.windows.net",
"protocol": "https"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
{
"id": "string",
"name": "string",
"type": "string",
"properties": {
"description": "string",
"tags": {
"string": "string"
},
"isDefault": false,
"properties": null,
"credentials": {
"credentialsType": "AccountKey",
"secrets": {
"secretsType": "AccountKey"
}
},
"datastoreType": "AzureBlob",
"accountName": "string",
"containerName": "string",
"endpoint": "core.windows.net",
"protocol": "https"
},
"systemData": {
"createdAt": "2020-01-01T12:34:56.999Z",
"createdBy": "string",
"createdByType": "User",
"lastModifiedAt": "2020-01-01T12:34:56.999Z",
"lastModifiedBy": "string",
"lastModifiedByType": "User"
}
}
Definitions
Name | Description |
---|---|
Account |
Account key datastore credentials configuration. |
Account |
Datastore account key secrets. |
Azure |
Azure Blob datastore configuration. |
Azure |
Azure Data Lake Gen1 datastore configuration. |
Azure |
Azure Data Lake Gen2 datastore configuration. |
Azure |
Azure File datastore configuration. |
Certificate |
Certificate datastore credentials configuration. |
Certificate |
Datastore certificate secrets. |
created |
The type of identity that created the resource. |
Credentials |
Enum to determine the datastore credentials type. |
Datastore |
Azure Resource Manager resource envelope. |
Datastore |
Enum to determine the datastore contents type. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Error |
Error response |
None |
Empty/none datastore credentials. |
Sas |
SAS datastore credentials configuration. |
Sas |
Datastore SAS secrets. |
Secrets |
Enum to determine the datastore secrets type. |
Service |
|
Service |
Service Principal datastore credentials configuration. |
Service |
Datastore Service Principal secrets. |
system |
Metadata pertaining to creation and last modification of the resource. |
AccountKeyDatastoreCredentials
Account key datastore credentials configuration.
Name | Type | Description |
---|---|---|
credentialsType |
string:
Account |
[Required] Credential type used to authentication with storage. |
secrets |
[Required] Storage account secrets. |
AccountKeyDatastoreSecrets
Datastore account key secrets.
Name | Type | Description |
---|---|---|
key |
string |
Storage account key. |
secretsType |
string:
Account |
[Required] Credential type used to authentication with storage. |
AzureBlobDatastore
Azure Blob datastore configuration.
Name | Type | Default Value | Description |
---|---|---|---|
accountName |
string |
Storage account name. |
|
containerName |
string |
Storage account container name. |
|
credentials | DatastoreCredentials: |
[Required] Account credentials. |
|
datastoreType |
string:
Azure |
[Required] Storage type backing the datastore. |
|
description |
string |
The asset description text. |
|
endpoint |
string |
Azure cloud endpoint for the storage account. |
|
isDefault |
boolean |
Readonly property to indicate if datastore is the workspace default datastore |
|
properties |
object |
The asset property dictionary. |
|
protocol |
string |
Protocol used to communicate with the storage account. |
|
resourceGroup |
string |
Azure Resource Group name |
|
serviceDataAccessAuthIdentity | None |
Indicates which identity to use to authenticate service data access to customer's storage. |
|
subscriptionId |
string |
Azure Subscription Id |
|
tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
AzureDataLakeGen1Datastore
Azure Data Lake Gen1 datastore configuration.
Name | Type | Default Value | Description |
---|---|---|---|
credentials | DatastoreCredentials: |
[Required] Account credentials. |
|
datastoreType |
string:
Azure |
[Required] Storage type backing the datastore. |
|
description |
string |
The asset description text. |
|
isDefault |
boolean |
Readonly property to indicate if datastore is the workspace default datastore |
|
properties |
object |
The asset property dictionary. |
|
resourceGroup |
string |
Azure Resource Group name |
|
serviceDataAccessAuthIdentity | None |
Indicates which identity to use to authenticate service data access to customer's storage. |
|
storeName |
string |
[Required] Azure Data Lake store name. |
|
subscriptionId |
string |
Azure Subscription Id |
|
tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
AzureDataLakeGen2Datastore
Azure Data Lake Gen2 datastore configuration.
Name | Type | Default Value | Description |
---|---|---|---|
accountName |
string |
[Required] Storage account name. |
|
credentials | DatastoreCredentials: |
[Required] Account credentials. |
|
datastoreType |
string:
Azure |
[Required] Storage type backing the datastore. |
|
description |
string |
The asset description text. |
|
endpoint |
string |
Azure cloud endpoint for the storage account. |
|
filesystem |
string |
[Required] The name of the Data Lake Gen2 filesystem. |
|
isDefault |
boolean |
Readonly property to indicate if datastore is the workspace default datastore |
|
properties |
object |
The asset property dictionary. |
|
protocol |
string |
Protocol used to communicate with the storage account. |
|
resourceGroup |
string |
Azure Resource Group name |
|
serviceDataAccessAuthIdentity | None |
Indicates which identity to use to authenticate service data access to customer's storage. |
|
subscriptionId |
string |
Azure Subscription Id |
|
tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
AzureFileDatastore
Azure File datastore configuration.
Name | Type | Default Value | Description |
---|---|---|---|
accountName |
string |
[Required] Storage account name. |
|
credentials | DatastoreCredentials: |
[Required] Account credentials. |
|
datastoreType |
string:
Azure |
[Required] Storage type backing the datastore. |
|
description |
string |
The asset description text. |
|
endpoint |
string |
Azure cloud endpoint for the storage account. |
|
fileShareName |
string |
[Required] The name of the Azure file share that the datastore points to. |
|
isDefault |
boolean |
Readonly property to indicate if datastore is the workspace default datastore |
|
properties |
object |
The asset property dictionary. |
|
protocol |
string |
Protocol used to communicate with the storage account. |
|
resourceGroup |
string |
Azure Resource Group name |
|
serviceDataAccessAuthIdentity | None |
Indicates which identity to use to authenticate service data access to customer's storage. |
|
subscriptionId |
string |
Azure Subscription Id |
|
tags |
object |
Tag dictionary. Tags can be added, removed, and updated. |
CertificateDatastoreCredentials
Certificate datastore credentials configuration.
Name | Type | Description |
---|---|---|
authorityUrl |
string |
Authority URL used for authentication. |
clientId |
string |
[Required] Service principal client ID. |
credentialsType |
string:
Certificate |
[Required] Credential type used to authentication with storage. |
resourceUrl |
string |
Resource the service principal has access to. |
secrets |
[Required] Service principal secrets. |
|
tenantId |
string |
[Required] ID of the tenant to which the service principal belongs. |
thumbprint |
string |
[Required] Thumbprint of the certificate used for authentication. |
CertificateDatastoreSecrets
Datastore certificate secrets.
Name | Type | Description |
---|---|---|
certificate |
string |
Service principal certificate. |
secretsType |
string:
Certificate |
[Required] Credential type used to authentication with storage. |
createdByType
The type of identity that created the resource.
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
CredentialsType
Enum to determine the datastore credentials type.
Name | Type | Description |
---|---|---|
AccountKey |
string |
|
Certificate |
string |
|
None |
string |
|
Sas |
string |
|
ServicePrincipal |
string |
DatastoreResource
Azure Resource Manager resource envelope.
Name | Type | Description |
---|---|---|
id |
string |
Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name |
string |
The name of the resource |
properties | Datastore: |
[Required] Additional attributes of the entity. |
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
DatastoreType
Enum to determine the datastore contents type.
Name | Type | Description |
---|---|---|
AzureBlob |
string |
|
AzureDataLakeGen1 |
string |
|
AzureDataLakeGen2 |
string |
|
AzureFile |
string |
ErrorAdditionalInfo
The resource management error additional info.
Name | Type | Description |
---|---|---|
info |
object |
The additional info. |
type |
string |
The additional info type. |
ErrorDetail
The error detail.
Name | Type | Description |
---|---|---|
additionalInfo |
The error additional info. |
|
code |
string |
The error code. |
details |
The error details. |
|
message |
string |
The error message. |
target |
string |
The error target. |
ErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
NoneDatastoreCredentials
Empty/none datastore credentials.
Name | Type | Description |
---|---|---|
credentialsType |
string:
None |
[Required] Credential type used to authentication with storage. |
SasDatastoreCredentials
SAS datastore credentials configuration.
Name | Type | Description |
---|---|---|
credentialsType |
string:
Sas |
[Required] Credential type used to authentication with storage. |
secrets |
[Required] Storage container secrets. |
SasDatastoreSecrets
Datastore SAS secrets.
Name | Type | Description |
---|---|---|
sasToken |
string |
Storage container SAS token. |
secretsType |
string:
Sas |
[Required] Credential type used to authentication with storage. |
SecretsType
Enum to determine the datastore secrets type.
Name | Type | Description |
---|---|---|
AccountKey |
string |
|
Certificate |
string |
|
Sas |
string |
|
ServicePrincipal |
string |
ServiceDataAccessAuthIdentity
Name | Type | Description |
---|---|---|
None |
string |
Do not use any identity for service data access. |
WorkspaceSystemAssignedIdentity |
string |
Use the system assigned managed identity of the Workspace to authenticate service data access. |
WorkspaceUserAssignedIdentity |
string |
Use the user assigned managed identity of the Workspace to authenticate service data access. |
ServicePrincipalDatastoreCredentials
Service Principal datastore credentials configuration.
Name | Type | Description |
---|---|---|
authorityUrl |
string |
Authority URL used for authentication. |
clientId |
string |
[Required] Service principal client ID. |
credentialsType |
string:
Service |
[Required] Credential type used to authentication with storage. |
resourceUrl |
string |
Resource the service principal has access to. |
secrets |
[Required] Service principal secrets. |
|
tenantId |
string |
[Required] ID of the tenant to which the service principal belongs. |
ServicePrincipalDatastoreSecrets
Datastore Service Principal secrets.
Name | Type | Description |
---|---|---|
clientSecret |
string |
Service principal secret. |
secretsType |
string:
Service |
[Required] Credential type used to authentication with storage. |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |