1. Packages
  2. Azure Classic
  3. API Docs
  4. devtest
  5. getLab

We recommend using Azure Native.

Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi

azure.devtest.getLab

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi

Use this data source to access information about an existing Dev Test Lab.

Example Usage

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

const example = azure.devtest.getLab({
    name: "example-lab",
    resourceGroupName: "example-resources",
});
export const uniqueIdentifier = example.then(example => example.uniqueIdentifier);
Copy
import pulumi
import pulumi_azure as azure

example = azure.devtest.get_lab(name="example-lab",
    resource_group_name="example-resources")
pulumi.export("uniqueIdentifier", example.unique_identifier)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/devtest"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := devtest.LookupLab(ctx, &devtest.LookupLabArgs{
			Name:              "example-lab",
			ResourceGroupName: "example-resources",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("uniqueIdentifier", example.UniqueIdentifier)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.DevTest.GetLab.Invoke(new()
    {
        Name = "example-lab",
        ResourceGroupName = "example-resources",
    });

    return new Dictionary<string, object?>
    {
        ["uniqueIdentifier"] = example.Apply(getLabResult => getLabResult.UniqueIdentifier),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.devtest.DevtestFunctions;
import com.pulumi.azure.devtest.inputs.GetLabArgs;
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) {
        final var example = DevtestFunctions.getLab(GetLabArgs.builder()
            .name("example-lab")
            .resourceGroupName("example-resources")
            .build());

        ctx.export("uniqueIdentifier", example.applyValue(getLabResult -> getLabResult.uniqueIdentifier()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:devtest:getLab
      arguments:
        name: example-lab
        resourceGroupName: example-resources
outputs:
  uniqueIdentifier: ${example.uniqueIdentifier}
Copy

Using getLab

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getLab(args: GetLabArgs, opts?: InvokeOptions): Promise<GetLabResult>
function getLabOutput(args: GetLabOutputArgs, opts?: InvokeOptions): Output<GetLabResult>
Copy
def get_lab(name: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            opts: Optional[InvokeOptions] = None) -> GetLabResult
def get_lab_output(name: Optional[pulumi.Input[str]] = None,
            resource_group_name: Optional[pulumi.Input[str]] = None,
            opts: Optional[InvokeOptions] = None) -> Output[GetLabResult]
Copy
func LookupLab(ctx *Context, args *LookupLabArgs, opts ...InvokeOption) (*LookupLabResult, error)
func LookupLabOutput(ctx *Context, args *LookupLabOutputArgs, opts ...InvokeOption) LookupLabResultOutput
Copy

> Note: This function is named LookupLab in the Go SDK.

public static class GetLab 
{
    public static Task<GetLabResult> InvokeAsync(GetLabArgs args, InvokeOptions? opts = null)
    public static Output<GetLabResult> Invoke(GetLabInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetLabResult> getLab(GetLabArgs args, InvokeOptions options)
public static Output<GetLabResult> getLab(GetLabArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:devtest/getLab:getLab
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the Dev Test Lab.
ResourceGroupName This property is required. string
The Name of the Resource Group where the Dev Test Lab exists.
Name This property is required. string
The name of the Dev Test Lab.
ResourceGroupName This property is required. string
The Name of the Resource Group where the Dev Test Lab exists.
name This property is required. String
The name of the Dev Test Lab.
resourceGroupName This property is required. String
The Name of the Resource Group where the Dev Test Lab exists.
name This property is required. string
The name of the Dev Test Lab.
resourceGroupName This property is required. string
The Name of the Resource Group where the Dev Test Lab exists.
name This property is required. str
The name of the Dev Test Lab.
resource_group_name This property is required. str
The Name of the Resource Group where the Dev Test Lab exists.
name This property is required. String
The name of the Dev Test Lab.
resourceGroupName This property is required. String
The Name of the Resource Group where the Dev Test Lab exists.

getLab Result

The following output properties are available:

ArtifactsStorageAccountId string
The ID of the Storage Account used for Artifact Storage.
DefaultPremiumStorageAccountId string
The ID of the Default Premium Storage Account for this Dev Test Lab.
DefaultStorageAccountId string
The ID of the Default Storage Account for this Dev Test Lab.
Id string
The provider-assigned unique ID for this managed resource.
KeyVaultId string
The ID of the Key used for this Dev Test Lab.
Location string
The Azure location where the Dev Test Lab exists.
Name string
PremiumDataDiskStorageAccountId string
The ID of the Storage Account used for Storage of Premium Data Disk.
ResourceGroupName string
StorageType string
The type of storage used by the Dev Test Lab.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
UniqueIdentifier string
The unique immutable identifier of the Dev Test Lab.
ArtifactsStorageAccountId string
The ID of the Storage Account used for Artifact Storage.
DefaultPremiumStorageAccountId string
The ID of the Default Premium Storage Account for this Dev Test Lab.
DefaultStorageAccountId string
The ID of the Default Storage Account for this Dev Test Lab.
Id string
The provider-assigned unique ID for this managed resource.
KeyVaultId string
The ID of the Key used for this Dev Test Lab.
Location string
The Azure location where the Dev Test Lab exists.
Name string
PremiumDataDiskStorageAccountId string
The ID of the Storage Account used for Storage of Premium Data Disk.
ResourceGroupName string
StorageType string
The type of storage used by the Dev Test Lab.
Tags map[string]string
A mapping of tags to assign to the resource.
UniqueIdentifier string
The unique immutable identifier of the Dev Test Lab.
artifactsStorageAccountId String
The ID of the Storage Account used for Artifact Storage.
defaultPremiumStorageAccountId String
The ID of the Default Premium Storage Account for this Dev Test Lab.
defaultStorageAccountId String
The ID of the Default Storage Account for this Dev Test Lab.
id String
The provider-assigned unique ID for this managed resource.
keyVaultId String
The ID of the Key used for this Dev Test Lab.
location String
The Azure location where the Dev Test Lab exists.
name String
premiumDataDiskStorageAccountId String
The ID of the Storage Account used for Storage of Premium Data Disk.
resourceGroupName String
storageType String
The type of storage used by the Dev Test Lab.
tags Map<String,String>
A mapping of tags to assign to the resource.
uniqueIdentifier String
The unique immutable identifier of the Dev Test Lab.
artifactsStorageAccountId string
The ID of the Storage Account used for Artifact Storage.
defaultPremiumStorageAccountId string
The ID of the Default Premium Storage Account for this Dev Test Lab.
defaultStorageAccountId string
The ID of the Default Storage Account for this Dev Test Lab.
id string
The provider-assigned unique ID for this managed resource.
keyVaultId string
The ID of the Key used for this Dev Test Lab.
location string
The Azure location where the Dev Test Lab exists.
name string
premiumDataDiskStorageAccountId string
The ID of the Storage Account used for Storage of Premium Data Disk.
resourceGroupName string
storageType string
The type of storage used by the Dev Test Lab.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
uniqueIdentifier string
The unique immutable identifier of the Dev Test Lab.
artifacts_storage_account_id str
The ID of the Storage Account used for Artifact Storage.
default_premium_storage_account_id str
The ID of the Default Premium Storage Account for this Dev Test Lab.
default_storage_account_id str
The ID of the Default Storage Account for this Dev Test Lab.
id str
The provider-assigned unique ID for this managed resource.
key_vault_id str
The ID of the Key used for this Dev Test Lab.
location str
The Azure location where the Dev Test Lab exists.
name str
premium_data_disk_storage_account_id str
The ID of the Storage Account used for Storage of Premium Data Disk.
resource_group_name str
storage_type str
The type of storage used by the Dev Test Lab.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
unique_identifier str
The unique immutable identifier of the Dev Test Lab.
artifactsStorageAccountId String
The ID of the Storage Account used for Artifact Storage.
defaultPremiumStorageAccountId String
The ID of the Default Premium Storage Account for this Dev Test Lab.
defaultStorageAccountId String
The ID of the Default Storage Account for this Dev Test Lab.
id String
The provider-assigned unique ID for this managed resource.
keyVaultId String
The ID of the Key used for this Dev Test Lab.
location String
The Azure location where the Dev Test Lab exists.
name String
premiumDataDiskStorageAccountId String
The ID of the Storage Account used for Storage of Premium Data Disk.
resourceGroupName String
storageType String
The type of storage used by the Dev Test Lab.
tags Map<String>
A mapping of tags to assign to the resource.
uniqueIdentifier String
The unique immutable identifier of the Dev Test Lab.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi