WindowsVirtualMachineArgs

data class WindowsVirtualMachineArgs(val allowClaim: Output<Boolean>? = null, val disallowPublicIpAddress: Output<Boolean>? = null, val galleryImageReference: Output<WindowsVirtualMachineGalleryImageReferenceArgs>? = null, val inboundNatRules: Output<List<WindowsVirtualMachineInboundNatRuleArgs>>? = null, val labName: Output<String>? = null, val labSubnetName: Output<String>? = null, val labVirtualNetworkId: Output<String>? = null, val location: Output<String>? = null, val name: Output<String>? = null, val notes: Output<String>? = null, val password: Output<String>? = null, val resourceGroupName: Output<String>? = null, val size: Output<String>? = null, val storageType: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val username: Output<String>? = null) : ConvertibleToJava<WindowsVirtualMachineArgs>

Manages a Windows Virtual Machine within a Dev Test Lab.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.devtest.Lab;
import com.pulumi.azure.devtest.LabArgs;
import com.pulumi.azure.devtest.VirtualNetwork;
import com.pulumi.azure.devtest.VirtualNetworkArgs;
import com.pulumi.azure.devtest.inputs.VirtualNetworkSubnetArgs;
import com.pulumi.azure.devtest.WindowsVirtualMachine;
import com.pulumi.azure.devtest.WindowsVirtualMachineArgs;
import com.pulumi.azure.devtest.inputs.WindowsVirtualMachineGalleryImageReferenceArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var exampleLab = new Lab("exampleLab", LabArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.tags(Map.of("Sydney", "Australia"))
.build());
var exampleVirtualNetwork = new VirtualNetwork("exampleVirtualNetwork", VirtualNetworkArgs.builder()
.labName(exampleLab.name())
.resourceGroupName(exampleResourceGroup.name())
.subnet(VirtualNetworkSubnetArgs.builder()
.usePublicIpAddress("Allow")
.useInVirtualMachineCreation("Allow")
.build())
.build());
var exampleWindowsVirtualMachine = new WindowsVirtualMachine("exampleWindowsVirtualMachine", WindowsVirtualMachineArgs.builder()
.labName(exampleLab.name())
.resourceGroupName(exampleResourceGroup.name())
.location(exampleResourceGroup.location())
.size("Standard_DS2")
.username("exampleuser99")
.password("Pa$w0rd1234!")
.labVirtualNetworkId(exampleVirtualNetwork.id())
.labSubnetName(exampleVirtualNetwork.subnet().applyValue(subnet -> subnet.name()))
.storageType("Premium")
.notes("Some notes about this Virtual Machine.")
.galleryImageReference(WindowsVirtualMachineGalleryImageReferenceArgs.builder()
.offer("WindowsServer")
.publisher("MicrosoftWindowsServer")
.sku("2019-Datacenter")
.version("latest")
.build())
.build());
}
}

Import

DevTest Windows Virtual Machines can be imported using the resource id, e.g.

$ pulumi import azure:devtest/windowsVirtualMachine:WindowsVirtualMachine machine1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DevTestLab/labs/lab1/virtualMachines/machine1

Constructors

Link copied to clipboard
fun WindowsVirtualMachineArgs(allowClaim: Output<Boolean>? = null, disallowPublicIpAddress: Output<Boolean>? = null, galleryImageReference: Output<WindowsVirtualMachineGalleryImageReferenceArgs>? = null, inboundNatRules: Output<List<WindowsVirtualMachineInboundNatRuleArgs>>? = null, labName: Output<String>? = null, labSubnetName: Output<String>? = null, labVirtualNetworkId: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, notes: Output<String>? = null, password: Output<String>? = null, resourceGroupName: Output<String>? = null, size: Output<String>? = null, storageType: Output<String>? = null, tags: Output<Map<String, String>>? = null, username: Output<String>? = null)

Functions

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

Properties

Link copied to clipboard
val allowClaim: Output<Boolean>? = null

Can this Virtual Machine be claimed by users? Defaults to true.

Link copied to clipboard
val disallowPublicIpAddress: Output<Boolean>? = null

Should the Virtual Machine be created without a Public IP Address? Changing this forces a new resource to be created.

Link copied to clipboard

A gallery_image_reference block as defined below.

Link copied to clipboard

One or more inbound_nat_rule blocks as defined below. Changing this forces a new resource to be created.

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

Specifies the name of the Dev Test Lab in which the Virtual Machine should be created. Changing this forces a new resource to be created.

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

The name of a Subnet within the Dev Test Virtual Network where this machine should exist. Changing this forces a new resource to be created.

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

The ID of the Dev Test Virtual Network where this Virtual Machine should be created. Changing this forces a new resource to be created.

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

Specifies the supported Azure location where the Dev Test Lab exists. Changing this forces a new resource to be created.

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

Specifies the name of the Dev Test Machine. Changing this forces a new resource to be created.

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

Any notes about the Virtual Machine.

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

The Password associated with the username used to login to this Virtual Machine. Changing this forces a new resource to be created.

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

The name of the resource group in which the Dev Test Lab resource exists. Changing this forces a new resource to be created.

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

The Machine Size to use for this Virtual Machine, such as Standard_F2. Changing this forces a new resource to be created.

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

The type of Storage to use on this Virtual Machine. Possible values are Standard and Premium.

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

A mapping of tags to assign to the resource.

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

The Username associated with the local administrator on this Virtual Machine. Changing this forces a new resource to be created.