Workspace
Manages a Azure Machine Learning Workspace
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var current = Output.Create(Azure.Core.GetClientConfig.InvokeAsync());
var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("exampleInsights", new Azure.AppInsights.InsightsArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
ApplicationType = "web",
});
var exampleKeyVault = new Azure.KeyVault.KeyVault("exampleKeyVault", new Azure.KeyVault.KeyVaultArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
TenantId = current.Apply(current => current.TenantId),
SkuName = "premium",
});
var exampleAccount = new Azure.Storage.Account("exampleAccount", new Azure.Storage.AccountArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
AccountTier = "Standard",
AccountReplicationType = "GRS",
});
var exampleWorkspace = new Azure.MachineLearning.Workspace("exampleWorkspace", new Azure.MachineLearning.WorkspaceArgs
{
Location = exampleResourceGroup.Location,
ResourceGroupName = exampleResourceGroup.Name,
ApplicationInsightsId = exampleInsights.Id,
KeyVaultId = exampleKeyVault.Id,
StorageAccountId = exampleAccount.Id,
Identity = new Azure.MachineLearning.Inputs.WorkspaceIdentityArgs
{
Type = "SystemAssigned",
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/keyvault"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/machinelearning"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
current, err := core.GetClientConfig(ctx, nil, nil)
if err != nil {
return err
}
exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "exampleInsights", &appinsights.InsightsArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
exampleKeyVault, err := keyvault.NewKeyVault(ctx, "exampleKeyVault", &keyvault.KeyVaultArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
TenantId: pulumi.String(current.TenantId),
SkuName: pulumi.String("premium"),
})
if err != nil {
return err
}
exampleAccount, err := storage.NewAccount(ctx, "exampleAccount", &storage.AccountArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("GRS"),
})
if err != nil {
return err
}
_, err = machinelearning.NewWorkspace(ctx, "exampleWorkspace", &machinelearning.WorkspaceArgs{
Location: exampleResourceGroup.Location,
ResourceGroupName: exampleResourceGroup.Name,
ApplicationInsightsId: exampleInsights.ID(),
KeyVaultId: exampleKeyVault.ID(),
StorageAccountId: exampleAccount.ID(),
Identity: &machinelearning.WorkspaceIdentityArgs{
Type: pulumi.String("SystemAssigned"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
current = azure.core.get_client_config()
example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
example_insights = azure.appinsights.Insights("exampleInsights",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
application_type="web")
example_key_vault = azure.keyvault.KeyVault("exampleKeyVault",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
tenant_id=current.tenant_id,
sku_name="premium")
example_account = azure.storage.Account("exampleAccount",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
account_tier="Standard",
account_replication_type="GRS")
example_workspace = azure.machinelearning.Workspace("exampleWorkspace",
location=example_resource_group.location,
resource_group_name=example_resource_group.name,
application_insights_id=example_insights.id,
key_vault_id=example_key_vault.id,
storage_account_id=example_account.id,
identity={
"type": "SystemAssigned",
})import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const current = azure.core.getClientConfig({});
const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
const exampleInsights = new azure.appinsights.Insights("exampleInsights", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
applicationType: "web",
});
const exampleKeyVault = new azure.keyvault.KeyVault("exampleKeyVault", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
tenantId: current.then(current => current.tenantId),
skuName: "premium",
});
const exampleAccount = new azure.storage.Account("exampleAccount", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
accountTier: "Standard",
accountReplicationType: "GRS",
});
const exampleWorkspace = new azure.machinelearning.Workspace("exampleWorkspace", {
location: exampleResourceGroup.location,
resourceGroupName: exampleResourceGroup.name,
applicationInsightsId: exampleInsights.id,
keyVaultId: exampleKeyVault.id,
storageAccountId: exampleAccount.id,
identity: {
type: "SystemAssigned",
},
});Create a Workspace Resource
new Workspace(name: string, args: WorkspaceArgs, opts?: CustomResourceOptions);def Workspace(resource_name, opts=None, application_insights_id=None, container_registry_id=None, description=None, friendly_name=None, identity=None, key_vault_id=None, location=None, name=None, resource_group_name=None, sku_name=None, storage_account_id=None, tags=None, __props__=None);func NewWorkspace(ctx *Context, name string, args WorkspaceArgs, opts ...ResourceOption) (*Workspace, error)public Workspace(string name, WorkspaceArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args WorkspaceArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Workspace Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Workspace resource accepts the following input properties:
- Application
Insights stringId The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Identity
Workspace
Identity Args An
identityblock defined below.- Key
Vault stringId The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Resource
Group stringName Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Storage
Account stringId The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Container
Registry stringId The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Description string
The description of this Machine Learning Workspace.
- Friendly
Name string Friendly name for this Machine Learning Workspace.
- Location string
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- Sku
Name string SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- Dictionary<string, string>
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
- Application
Insights stringId The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Identity
Workspace
Identity An
identityblock defined below.- Key
Vault stringId The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Resource
Group stringName Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Storage
Account stringId The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Container
Registry stringId The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Description string
The description of this Machine Learning Workspace.
- Friendly
Name string Friendly name for this Machine Learning Workspace.
- Location string
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- Sku
Name string SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- map[string]string
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
- application
Insights stringId The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- identity
Workspace
Identity An
identityblock defined below.- key
Vault stringId The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- resource
Group stringName Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- storage
Account stringId The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- container
Registry stringId The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- description string
The description of this Machine Learning Workspace.
- friendly
Name string Friendly name for this Machine Learning Workspace.
- location string
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- name string
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- sku
Name string SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- {[key: string]: string}
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
- application_
insights_ strid The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- identity
Dict[Workspace
Identity] An
identityblock defined below.- key_
vault_ strid The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- resource_
group_ strname Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- storage_
account_ strid The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- container_
registry_ strid The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- description str
The description of this Machine Learning Workspace.
- friendly_
name str Friendly name for this Machine Learning Workspace.
- location str
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- name str
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- sku_
name str SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- Dict[str, str]
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
Outputs
All input properties are implicitly available as output properties. Additionally, the Workspace resource produces the following output properties:
Look up an Existing Workspace Resource
Get an existing Workspace resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: WorkspaceState, opts?: CustomResourceOptions): Workspacestatic get(resource_name, id, opts=None, application_insights_id=None, container_registry_id=None, description=None, friendly_name=None, identity=None, key_vault_id=None, location=None, name=None, resource_group_name=None, sku_name=None, storage_account_id=None, tags=None, __props__=None);func GetWorkspace(ctx *Context, name string, id IDInput, state *WorkspaceState, opts ...ResourceOption) (*Workspace, error)public static Workspace Get(string name, Input<string> id, WorkspaceState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Application
Insights stringId The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Container
Registry stringId The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Description string
The description of this Machine Learning Workspace.
- Friendly
Name string Friendly name for this Machine Learning Workspace.
- Identity
Workspace
Identity Args An
identityblock defined below.- Key
Vault stringId The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Location string
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- Resource
Group stringName Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Sku
Name string SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- Storage
Account stringId The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Dictionary<string, string>
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
- Application
Insights stringId The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Container
Registry stringId The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Description string
The description of this Machine Learning Workspace.
- Friendly
Name string Friendly name for this Machine Learning Workspace.
- Identity
Workspace
Identity An
identityblock defined below.- Key
Vault stringId The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Location string
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Name string
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- Resource
Group stringName Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- Sku
Name string SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- Storage
Account stringId The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- map[string]string
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
- application
Insights stringId The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- container
Registry stringId The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- description string
The description of this Machine Learning Workspace.
- friendly
Name string Friendly name for this Machine Learning Workspace.
- identity
Workspace
Identity An
identityblock defined below.- key
Vault stringId The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- location string
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- name string
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- resource
Group stringName Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- sku
Name string SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- storage
Account stringId The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- {[key: string]: string}
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
- application_
insights_ strid The ID of the Application Insights associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- container_
registry_ strid The ID of the container registry associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- description str
The description of this Machine Learning Workspace.
- friendly_
name str Friendly name for this Machine Learning Workspace.
- identity
Dict[Workspace
Identity] An
identityblock defined below.- key_
vault_ strid The ID of key vault associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- location str
Specifies the supported Azure location where the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- name str
Specifies the name of the Machine Learning Workspace. Changing this forces a new resource to be created.
- resource_
group_ strname Specifies the name of the Resource Group in which the Machine Learning Workspace should exist. Changing this forces a new resource to be created.
- sku_
name str SKU/edition of the Machine Learning Workspace, possible values are
Basicfor a basic workspace orEnterprisefor a feature rich workspace. Defaults toBasic.- storage_
account_ strid The ID of the Storage Account associated with this Machine Learning Workspace. Changing this forces a new resource to be created.
- Dict[str, str]
A mapping of tags to assign to the resource. Changing this forces a new resource to be created.
Supporting Types
WorkspaceIdentity
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.