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
LookupWorkspacein 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.
- Resource
Group stringName The name of the Resource Group where the Machine Learning Workspace exists.
- Name string
The name of the Machine Learning Workspace exists.
- Resource
Group stringName The name of the Resource Group where the Machine Learning Workspace exists.
- name string
The name of the Machine Learning Workspace exists.
- resource
Group stringName The name of the Resource Group where the Machine Learning Workspace exists.
- name str
The name of the Machine Learning Workspace exists.
- resource_
group_ strname The name of the Resource Group where the Machine Learning Workspace exists.
GetWorkspace Result
The following output properties are available:
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.