Datastore
Azure Resource Manager resource envelope. Azure REST API version: 2023-04-01. Other available API versions: 2021-03-01-preview, 2022-02-01-preview, 2023-04-01-preview, 2023-06-01-preview, 2023-08-01-preview, 2023-10-01.
Example Usage
CreateOrUpdate datastore (Azure Data Lake Gen1 w/ ServicePrincipal).
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var datastore = new AzureNative.MachineLearningServices.Datastore("datastore", new()
{
DatastoreProperties = new AzureNative.MachineLearningServices.Inputs.AzureDataLakeGen1DatastoreArgs
{
Credentials = new AzureNative.MachineLearningServices.Inputs.ServicePrincipalDatastoreCredentialsArgs
{
AuthorityUrl = "string",
ClientId = "00000000-1111-2222-3333-444444444444",
CredentialsType = "ServicePrincipal",
ResourceUrl = "string",
Secrets = new AzureNative.MachineLearningServices.Inputs.ServicePrincipalDatastoreSecretsArgs
{
ClientSecret = "string",
SecretsType = "ServicePrincipal",
},
TenantId = "00000000-1111-2222-3333-444444444444",
},
DatastoreType = "AzureDataLakeGen1",
Description = "string",
StoreName = "string",
Tags =
{
{ "string", "string" },
},
},
Name = "string",
ResourceGroupName = "test-rg",
SkipValidation = false,
WorkspaceName = "my-aml-workspace",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := machinelearningservices.NewDatastore(ctx, "datastore", &machinelearningservices.DatastoreArgs{
DatastoreProperties: machinelearningservices.AzureDataLakeGen1Datastore{
Credentials: machinelearningservices.ServicePrincipalDatastoreCredentials{
AuthorityUrl: "string",
ClientId: "00000000-1111-2222-3333-444444444444",
CredentialsType: "ServicePrincipal",
ResourceUrl: "string",
Secrets: machinelearningservices.ServicePrincipalDatastoreSecrets{
ClientSecret: "string",
SecretsType: "ServicePrincipal",
},
TenantId: "00000000-1111-2222-3333-444444444444",
},
DatastoreType: "AzureDataLakeGen1",
Description: "string",
StoreName: "string",
Tags: map[string]interface{}{
"string": "string",
},
},
Name: pulumi.String("string"),
ResourceGroupName: pulumi.String("test-rg"),
SkipValidation: pulumi.Bool(false),
WorkspaceName: pulumi.String("my-aml-workspace"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.machinelearningservices.Datastore;
import com.pulumi.azurenative.machinelearningservices.DatastoreArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var datastore = new Datastore("datastore", DatastoreArgs.builder()
.datastoreProperties(Map.ofEntries(
Map.entry("credentials", Map.ofEntries(
Map.entry("authorityUrl", "string"),
Map.entry("clientId", "00000000-1111-2222-3333-444444444444"),
Map.entry("credentialsType", "ServicePrincipal"),
Map.entry("resourceUrl", "string"),
Map.entry("secrets", Map.ofEntries(
Map.entry("clientSecret", "string"),
Map.entry("secretsType", "ServicePrincipal")
)),
Map.entry("tenantId", "00000000-1111-2222-3333-444444444444")
)),
Map.entry("datastoreType", "AzureDataLakeGen1"),
Map.entry("description", "string"),
Map.entry("storeName", "string"),
Map.entry("tags", AzureBlobDatastoreArgs.builder()
.string("string")
.build())
))
.name("string")
.resourceGroupName("test-rg")
.skipValidation(false)
.workspaceName("my-aml-workspace")
.build());
}
}
Content copied to clipboard
CreateOrUpdate datastore (Azure Data Lake Gen2 w/ Service Principal).
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var datastore = new AzureNative.MachineLearningServices.Datastore("datastore", new()
{
DatastoreProperties = new AzureNative.MachineLearningServices.Inputs.AzureDataLakeGen2DatastoreArgs
{
AccountName = "string",
Credentials = new AzureNative.MachineLearningServices.Inputs.ServicePrincipalDatastoreCredentialsArgs
{
AuthorityUrl = "string",
ClientId = "00000000-1111-2222-3333-444444444444",
CredentialsType = "ServicePrincipal",
ResourceUrl = "string",
Secrets = new AzureNative.MachineLearningServices.Inputs.ServicePrincipalDatastoreSecretsArgs
{
ClientSecret = "string",
SecretsType = "ServicePrincipal",
},
TenantId = "00000000-1111-2222-3333-444444444444",
},
DatastoreType = "AzureDataLakeGen2",
Description = "string",
Endpoint = "string",
Filesystem = "string",
Protocol = "string",
Tags =
{
{ "string", "string" },
},
},
Name = "string",
ResourceGroupName = "test-rg",
SkipValidation = false,
WorkspaceName = "my-aml-workspace",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := machinelearningservices.NewDatastore(ctx, "datastore", &machinelearningservices.DatastoreArgs{
DatastoreProperties: machinelearningservices.AzureDataLakeGen2Datastore{
AccountName: "string",
Credentials: machinelearningservices.ServicePrincipalDatastoreCredentials{
AuthorityUrl: "string",
ClientId: "00000000-1111-2222-3333-444444444444",
CredentialsType: "ServicePrincipal",
ResourceUrl: "string",
Secrets: machinelearningservices.ServicePrincipalDatastoreSecrets{
ClientSecret: "string",
SecretsType: "ServicePrincipal",
},
TenantId: "00000000-1111-2222-3333-444444444444",
},
DatastoreType: "AzureDataLakeGen2",
Description: "string",
Endpoint: "string",
Filesystem: "string",
Protocol: "string",
Tags: map[string]interface{}{
"string": "string",
},
},
Name: pulumi.String("string"),
ResourceGroupName: pulumi.String("test-rg"),
SkipValidation: pulumi.Bool(false),
WorkspaceName: pulumi.String("my-aml-workspace"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.machinelearningservices.Datastore;
import com.pulumi.azurenative.machinelearningservices.DatastoreArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var datastore = new Datastore("datastore", DatastoreArgs.builder()
.datastoreProperties(Map.ofEntries(
Map.entry("accountName", "string"),
Map.entry("credentials", Map.ofEntries(
Map.entry("authorityUrl", "string"),
Map.entry("clientId", "00000000-1111-2222-3333-444444444444"),
Map.entry("credentialsType", "ServicePrincipal"),
Map.entry("resourceUrl", "string"),
Map.entry("secrets", Map.ofEntries(
Map.entry("clientSecret", "string"),
Map.entry("secretsType", "ServicePrincipal")
)),
Map.entry("tenantId", "00000000-1111-2222-3333-444444444444")
)),
Map.entry("datastoreType", "AzureDataLakeGen2"),
Map.entry("description", "string"),
Map.entry("endpoint", "string"),
Map.entry("filesystem", "string"),
Map.entry("protocol", "string"),
Map.entry("tags", AzureBlobDatastoreArgs.builder()
.string("string")
.build())
))
.name("string")
.resourceGroupName("test-rg")
.skipValidation(false)
.workspaceName("my-aml-workspace")
.build());
}
}
Content copied to clipboard
CreateOrUpdate datastore (Azure File store w/ AccountKey).
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var datastore = new AzureNative.MachineLearningServices.Datastore("datastore", new()
{
DatastoreProperties = new AzureNative.MachineLearningServices.Inputs.AzureFileDatastoreArgs
{
AccountName = "string",
Credentials = new AzureNative.MachineLearningServices.Inputs.AccountKeyDatastoreCredentialsArgs
{
CredentialsType = "AccountKey",
Secrets = new AzureNative.MachineLearningServices.Inputs.AccountKeyDatastoreSecretsArgs
{
Key = "string",
SecretsType = "AccountKey",
},
},
DatastoreType = "AzureFile",
Description = "string",
Endpoint = "string",
FileShareName = "string",
Protocol = "string",
Tags =
{
{ "string", "string" },
},
},
Name = "string",
ResourceGroupName = "test-rg",
SkipValidation = false,
WorkspaceName = "my-aml-workspace",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := machinelearningservices.NewDatastore(ctx, "datastore", &machinelearningservices.DatastoreArgs{
DatastoreProperties: machinelearningservices.AzureFileDatastore{
AccountName: "string",
Credentials: machinelearningservices.AccountKeyDatastoreCredentials{
CredentialsType: "AccountKey",
Secrets: machinelearningservices.AccountKeyDatastoreSecrets{
Key: "string",
SecretsType: "AccountKey",
},
},
DatastoreType: "AzureFile",
Description: "string",
Endpoint: "string",
FileShareName: "string",
Protocol: "string",
Tags: map[string]interface{}{
"string": "string",
},
},
Name: pulumi.String("string"),
ResourceGroupName: pulumi.String("test-rg"),
SkipValidation: pulumi.Bool(false),
WorkspaceName: pulumi.String("my-aml-workspace"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.machinelearningservices.Datastore;
import com.pulumi.azurenative.machinelearningservices.DatastoreArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var datastore = new Datastore("datastore", DatastoreArgs.builder()
.datastoreProperties(Map.ofEntries(
Map.entry("accountName", "string"),
Map.entry("credentials", Map.ofEntries(
Map.entry("credentialsType", "AccountKey"),
Map.entry("secrets", Map.ofEntries(
Map.entry("key", "string"),
Map.entry("secretsType", "AccountKey")
))
)),
Map.entry("datastoreType", "AzureFile"),
Map.entry("description", "string"),
Map.entry("endpoint", "string"),
Map.entry("fileShareName", "string"),
Map.entry("protocol", "string"),
Map.entry("tags", AzureBlobDatastoreArgs.builder()
.string("string")
.build())
))
.name("string")
.resourceGroupName("test-rg")
.skipValidation(false)
.workspaceName("my-aml-workspace")
.build());
}
}
Content copied to clipboard
CreateOrUpdate datastore (AzureBlob w/ AccountKey).
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var datastore = new AzureNative.MachineLearningServices.Datastore("datastore", new()
{
DatastoreProperties = new AzureNative.MachineLearningServices.Inputs.AzureBlobDatastoreArgs
{
AccountName = "string",
ContainerName = "string",
Credentials = new AzureNative.MachineLearningServices.Inputs.AccountKeyDatastoreCredentialsArgs
{
CredentialsType = "AccountKey",
Secrets = new AzureNative.MachineLearningServices.Inputs.AccountKeyDatastoreSecretsArgs
{
Key = "string",
SecretsType = "AccountKey",
},
},
DatastoreType = "AzureBlob",
Description = "string",
Endpoint = "core.windows.net",
Protocol = "https",
Tags =
{
{ "string", "string" },
},
},
Name = "string",
ResourceGroupName = "test-rg",
SkipValidation = false,
WorkspaceName = "my-aml-workspace",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/machinelearningservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := machinelearningservices.NewDatastore(ctx, "datastore", &machinelearningservices.DatastoreArgs{
DatastoreProperties: machinelearningservices.AzureBlobDatastore{
AccountName: "string",
ContainerName: "string",
Credentials: machinelearningservices.AccountKeyDatastoreCredentials{
CredentialsType: "AccountKey",
Secrets: machinelearningservices.AccountKeyDatastoreSecrets{
Key: "string",
SecretsType: "AccountKey",
},
},
DatastoreType: "AzureBlob",
Description: "string",
Endpoint: "core.windows.net",
Protocol: "https",
Tags: map[string]interface{}{
"string": "string",
},
},
Name: pulumi.String("string"),
ResourceGroupName: pulumi.String("test-rg"),
SkipValidation: pulumi.Bool(false),
WorkspaceName: pulumi.String("my-aml-workspace"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.machinelearningservices.Datastore;
import com.pulumi.azurenative.machinelearningservices.DatastoreArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var datastore = new Datastore("datastore", DatastoreArgs.builder()
.datastoreProperties(Map.ofEntries(
Map.entry("accountName", "string"),
Map.entry("containerName", "string"),
Map.entry("credentials", Map.ofEntries(
Map.entry("credentialsType", "AccountKey"),
Map.entry("secrets", Map.ofEntries(
Map.entry("key", "string"),
Map.entry("secretsType", "AccountKey")
))
)),
Map.entry("datastoreType", "AzureBlob"),
Map.entry("description", "string"),
Map.entry("endpoint", "core.windows.net"),
Map.entry("protocol", "https"),
Map.entry("tags", AzureBlobDatastoreArgs.builder()
.string("string")
.build())
))
.name("string")
.resourceGroupName("test-rg")
.skipValidation(false)
.workspaceName("my-aml-workspace")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:machinelearningservices:Datastore string /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.MachineLearningServices/workspaces/{workspaceName}/datastores/{name}
Content copied to clipboard