GetWorkspace

Use this data source to access information about an existing Machine Learning Workspace.

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const existing = azure.machinelearning.getWorkspace({
    name: "example-workspace",
    resourceGroupName: "example-resources",
});
export const id = azurerm_machine_learning_workspace.existing.id;
import pulumi
import pulumi_azure as azure

existing = azure.machinelearning.get_workspace(name="example-workspace",
    resource_group_name="example-resources")
pulumi.export("id", azurerm_machine_learning_workspace["existing"]["id"])
using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var existing = Output.Create(Azure.MachineLearning.GetWorkspace.InvokeAsync(new Azure.MachineLearning.GetWorkspaceArgs
        {
            Name = "example-workspace",
            ResourceGroupName = "example-resources",
        }));
        this.Id = azurerm_machine_learning_workspace.Existing.Id;
    }

    [Output("id")]
    public Output<string> Id { get; set; }
}
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/machinelearning"
	"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := machinelearning.LookupWorkspace(ctx, &machinelearning.LookupWorkspaceArgs{
			Name:              "example-workspace",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("id", azurerm_machine_learning_workspace.Existing.Id)
		return nil
	})
}

Using GetWorkspace

function getWorkspace(args: GetWorkspaceArgs, opts?: InvokeOptions): Promise<GetWorkspaceResult>
function  get_workspace(name=None, resource_group_name=None, opts=None)
func LookupWorkspace(ctx *Context, args *LookupWorkspaceArgs, opts ...InvokeOption) (*LookupWorkspaceResult, error)

Note: This function is named LookupWorkspace in the Go SDK.

public static class GetWorkspace {
    public static Task<GetWorkspaceResult> InvokeAsync(GetWorkspaceArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Name string

The name of the Machine Learning Workspace exists.

ResourceGroupName string

The name of the Resource Group where the Machine Learning Workspace exists.

Name string

The name of the Machine Learning Workspace exists.

ResourceGroupName string

The name of the Resource Group where the Machine Learning Workspace exists.

name string

The name of the Machine Learning Workspace exists.

resourceGroupName string

The name of the Resource Group where the Machine Learning Workspace exists.

name str

The name of the Machine Learning Workspace exists.

resource_group_name str

The name of the Resource Group where the Machine Learning Workspace exists.

GetWorkspace Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Location string

The location where the Machine Learning Workspace exists.

Name string
ResourceGroupName string
Tags Dictionary<string, string>

A mapping of tags assigned to the Machine Learning Workspace.

Id string

The provider-assigned unique ID for this managed resource.

Location string

The location where the Machine Learning Workspace exists.

Name string
ResourceGroupName string
Tags map[string]string

A mapping of tags assigned to the Machine Learning Workspace.

id string

The provider-assigned unique ID for this managed resource.

location string

The location where the Machine Learning Workspace exists.

name string
resourceGroupName string
tags {[key: string]: string}

A mapping of tags assigned to the Machine Learning Workspace.

id str

The provider-assigned unique ID for this managed resource.

location str

The location where the Machine Learning Workspace exists.

name str
resource_group_name str
tags Dict[str, str]

A mapping of tags assigned to the Machine Learning Workspace.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.