LabArgs

data class LabArgs(val autoShutdownProfile: Output<AutoShutdownProfileArgs>? = null, val connectionProfile: Output<ConnectionProfileArgs>? = null, val description: Output<String>? = null, val labName: Output<String>? = null, val labPlanId: Output<String>? = null, val location: Output<String>? = null, val networkProfile: Output<LabNetworkProfileArgs>? = null, val resourceGroupName: Output<String>? = null, val rosterProfile: Output<RosterProfileArgs>? = null, val securityProfile: Output<SecurityProfileArgs>? = null, val tags: Output<Map<String, String>>? = null, val title: Output<String>? = null, val virtualMachineProfile: Output<VirtualMachineProfileArgs>? = null) : ConvertibleToJava<LabArgs>

The lab resource. Uses Azure REST API version 2023-06-07. In version 2.x of the Azure Native provider, it used API version 2022-08-01. Other available API versions: 2021-10-01-preview, 2021-11-15-preview, 2022-08-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native labservices [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

Example Usage

putLab

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var lab = new AzureNative.LabServices.Lab("lab", new()
{
AutoShutdownProfile = new AzureNative.LabServices.Inputs.AutoShutdownProfileArgs
{
DisconnectDelay = "PT5M",
IdleDelay = "PT5M",
NoConnectDelay = "PT5M",
ShutdownOnDisconnect = AzureNative.LabServices.EnableState.Enabled,
ShutdownOnIdle = AzureNative.LabServices.ShutdownOnIdleMode.UserAbsence,
ShutdownWhenNotConnected = AzureNative.LabServices.EnableState.Enabled,
},
ConnectionProfile = new AzureNative.LabServices.Inputs.ConnectionProfileArgs
{
ClientRdpAccess = AzureNative.LabServices.ConnectionType.Public,
ClientSshAccess = AzureNative.LabServices.ConnectionType.Public,
WebRdpAccess = AzureNative.LabServices.ConnectionType.None,
WebSshAccess = AzureNative.LabServices.ConnectionType.None,
},
Description = "This is a test lab.",
LabName = "testlab",
LabPlanId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan",
Location = "westus",
NetworkProfile = new AzureNative.LabServices.Inputs.LabNetworkProfileArgs
{
SubnetId = "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default",
},
ResourceGroupName = "testrg123",
SecurityProfile = new AzureNative.LabServices.Inputs.SecurityProfileArgs
{
OpenAccess = AzureNative.LabServices.EnableState.Disabled,
},
Title = "Test Lab",
VirtualMachineProfile = new AzureNative.LabServices.Inputs.VirtualMachineProfileArgs
{
AdditionalCapabilities = new AzureNative.LabServices.Inputs.VirtualMachineAdditionalCapabilitiesArgs
{
InstallGpuDrivers = AzureNative.LabServices.EnableState.Disabled,
},
AdminUser = new AzureNative.LabServices.Inputs.CredentialsArgs
{
Username = "test-user",
},
CreateOption = AzureNative.LabServices.CreateOption.TemplateVM,
ImageReference = new AzureNative.LabServices.Inputs.ImageReferenceArgs
{
Offer = "WindowsServer",
Publisher = "Microsoft",
Sku = "2019-Datacenter",
Version = "2019.0.20190410",
},
Sku = new AzureNative.LabServices.Inputs.SkuArgs
{
Name = "Medium",
},
UsageQuota = "PT10H",
UseSharedPassword = AzureNative.LabServices.EnableState.Disabled,
},
});
});
package main
import (
labservices "github.com/pulumi/pulumi-azure-native-sdk/labservices/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := labservices.NewLab(ctx, "lab", &labservices.LabArgs{
AutoShutdownProfile: &labservices.AutoShutdownProfileArgs{
DisconnectDelay: pulumi.String("PT5M"),
IdleDelay: pulumi.String("PT5M"),
NoConnectDelay: pulumi.String("PT5M"),
ShutdownOnDisconnect: labservices.EnableStateEnabled,
ShutdownOnIdle: labservices.ShutdownOnIdleModeUserAbsence,
ShutdownWhenNotConnected: labservices.EnableStateEnabled,
},
ConnectionProfile: &labservices.ConnectionProfileArgs{
ClientRdpAccess: labservices.ConnectionTypePublic,
ClientSshAccess: labservices.ConnectionTypePublic,
WebRdpAccess: labservices.ConnectionTypeNone,
WebSshAccess: labservices.ConnectionTypeNone,
},
Description: pulumi.String("This is a test lab."),
LabName: pulumi.String("testlab"),
LabPlanId: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan"),
Location: pulumi.String("westus"),
NetworkProfile: &labservices.LabNetworkProfileArgs{
SubnetId: pulumi.String("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default"),
},
ResourceGroupName: pulumi.String("testrg123"),
SecurityProfile: &labservices.SecurityProfileArgs{
OpenAccess: labservices.EnableStateDisabled,
},
Title: pulumi.String("Test Lab"),
VirtualMachineProfile: &labservices.VirtualMachineProfileArgs{
AdditionalCapabilities: &labservices.VirtualMachineAdditionalCapabilitiesArgs{
InstallGpuDrivers: labservices.EnableStateDisabled,
},
AdminUser: &labservices.CredentialsArgs{
Username: pulumi.String("test-user"),
},
CreateOption: labservices.CreateOptionTemplateVM,
ImageReference: &labservices.ImageReferenceArgs{
Offer: pulumi.String("WindowsServer"),
Publisher: pulumi.String("Microsoft"),
Sku: pulumi.String("2019-Datacenter"),
Version: pulumi.String("2019.0.20190410"),
},
Sku: &labservices.SkuArgs{
Name: pulumi.String("Medium"),
},
UsageQuota: pulumi.String("PT10H"),
UseSharedPassword: labservices.EnableStateDisabled,
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.labservices.Lab;
import com.pulumi.azurenative.labservices.LabArgs;
import com.pulumi.azurenative.labservices.inputs.AutoShutdownProfileArgs;
import com.pulumi.azurenative.labservices.inputs.ConnectionProfileArgs;
import com.pulumi.azurenative.labservices.inputs.LabNetworkProfileArgs;
import com.pulumi.azurenative.labservices.inputs.SecurityProfileArgs;
import com.pulumi.azurenative.labservices.inputs.VirtualMachineProfileArgs;
import com.pulumi.azurenative.labservices.inputs.VirtualMachineAdditionalCapabilitiesArgs;
import com.pulumi.azurenative.labservices.inputs.CredentialsArgs;
import com.pulumi.azurenative.labservices.inputs.ImageReferenceArgs;
import com.pulumi.azurenative.labservices.inputs.SkuArgs;
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 lab = new Lab("lab", LabArgs.builder()
.autoShutdownProfile(AutoShutdownProfileArgs.builder()
.disconnectDelay("PT5M")
.idleDelay("PT5M")
.noConnectDelay("PT5M")
.shutdownOnDisconnect("Enabled")
.shutdownOnIdle("UserAbsence")
.shutdownWhenNotConnected("Enabled")
.build())
.connectionProfile(ConnectionProfileArgs.builder()
.clientRdpAccess("Public")
.clientSshAccess("Public")
.webRdpAccess("None")
.webSshAccess("None")
.build())
.description("This is a test lab.")
.labName("testlab")
.labPlanId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.LabServices/labPlans/testlabplan")
.location("westus")
.networkProfile(LabNetworkProfileArgs.builder()
.subnetId("/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/default")
.build())
.resourceGroupName("testrg123")
.securityProfile(SecurityProfileArgs.builder()
.openAccess("Disabled")
.build())
.title("Test Lab")
.virtualMachineProfile(VirtualMachineProfileArgs.builder()
.additionalCapabilities(VirtualMachineAdditionalCapabilitiesArgs.builder()
.installGpuDrivers("Disabled")
.build())
.adminUser(CredentialsArgs.builder()
.username("test-user")
.build())
.createOption("TemplateVM")
.imageReference(ImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("Microsoft")
.sku("2019-Datacenter")
.version("2019.0.20190410")
.build())
.sku(SkuArgs.builder()
.name("Medium")
.build())
.usageQuota("PT10H")
.useSharedPassword("Disabled")
.build())
.build());
}
}

Import

An existing resource can be imported using its type token, name, and identifier, e.g.

$ pulumi import azure-native:labservices:Lab testlabplan /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.LabServices/labs/{labName}

Constructors

Link copied to clipboard
constructor(autoShutdownProfile: Output<AutoShutdownProfileArgs>? = null, connectionProfile: Output<ConnectionProfileArgs>? = null, description: Output<String>? = null, labName: Output<String>? = null, labPlanId: Output<String>? = null, location: Output<String>? = null, networkProfile: Output<LabNetworkProfileArgs>? = null, resourceGroupName: Output<String>? = null, rosterProfile: Output<RosterProfileArgs>? = null, securityProfile: Output<SecurityProfileArgs>? = null, tags: Output<Map<String, String>>? = null, title: Output<String>? = null, virtualMachineProfile: Output<VirtualMachineProfileArgs>? = null)

Properties

Link copied to clipboard

The resource auto shutdown configuration for the lab. This controls whether actions are taken on resources that are sitting idle.

Link copied to clipboard

The connection profile for the lab. This controls settings such as web access to lab resources or whether RDP or SSH ports are open.

Link copied to clipboard
val description: Output<String>? = null

The description of the lab.

Link copied to clipboard
val labName: Output<String>? = null

The name of the lab that uniquely identifies it within containing lab plan. Used in resource URIs.

Link copied to clipboard
val labPlanId: Output<String>? = null

The ID of the lab plan. Used during resource creation to provide defaults and acts as a permission container when creating a lab via labs.azure.com. Setting a labPlanId on an existing lab provides organization..

Link copied to clipboard
val location: Output<String>? = null

The geo-location where the resource lives

Link copied to clipboard

The network profile for the lab, typically applied via a lab plan. This profile cannot be modified once a lab has been created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group. The name is case insensitive.

Link copied to clipboard
val rosterProfile: Output<RosterProfileArgs>? = null

The lab user list management profile.

Link copied to clipboard

The lab security profile.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

Resource tags.

Link copied to clipboard
val title: Output<String>? = null

The title of the lab.

Link copied to clipboard

The profile used for creating lab virtual machines.

Functions

Link copied to clipboard
open override fun toJava(): LabArgs