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

We recommend using Azure Native.

Azure Classic v5.43.0 published on Saturday, May 6, 2023 by Pulumi

azure.devtest.WindowsVirtualMachine

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.43.0 published on Saturday, May 6, 2023 by Pulumi

    Manages a Windows Virtual Machine within a Dev Test Lab.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var exampleResourceGroup = new Azure.Core.ResourceGroup("exampleResourceGroup", new()
        {
            Location = "West Europe",
        });
    
        var exampleLab = new Azure.DevTest.Lab("exampleLab", new()
        {
            Location = exampleResourceGroup.Location,
            ResourceGroupName = exampleResourceGroup.Name,
            Tags = 
            {
                { "Sydney", "Australia" },
            },
        });
    
        var exampleVirtualNetwork = new Azure.DevTest.VirtualNetwork("exampleVirtualNetwork", new()
        {
            LabName = exampleLab.Name,
            ResourceGroupName = exampleResourceGroup.Name,
            Subnet = new Azure.DevTest.Inputs.VirtualNetworkSubnetArgs
            {
                UsePublicIpAddress = "Allow",
                UseInVirtualMachineCreation = "Allow",
            },
        });
    
        var exampleWindowsVirtualMachine = new Azure.DevTest.WindowsVirtualMachine("exampleWindowsVirtualMachine", new()
        {
            LabName = exampleLab.Name,
            ResourceGroupName = exampleResourceGroup.Name,
            Location = exampleResourceGroup.Location,
            Size = "Standard_DS2",
            Username = "exampleuser99",
            Password = "Pa$w0rd1234!",
            LabVirtualNetworkId = exampleVirtualNetwork.Id,
            LabSubnetName = exampleVirtualNetwork.Subnet.Apply(subnet => subnet.Name),
            StorageType = "Premium",
            Notes = "Some notes about this Virtual Machine.",
            GalleryImageReference = new Azure.DevTest.Inputs.WindowsVirtualMachineGalleryImageReferenceArgs
            {
                Offer = "WindowsServer",
                Publisher = "MicrosoftWindowsServer",
                Sku = "2019-Datacenter",
                Version = "latest",
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/devtest"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		exampleResourceGroup, err := core.NewResourceGroup(ctx, "exampleResourceGroup", &core.ResourceGroupArgs{
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleLab, err := devtest.NewLab(ctx, "exampleLab", &devtest.LabArgs{
    			Location:          exampleResourceGroup.Location,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Tags: pulumi.StringMap{
    				"Sydney": pulumi.String("Australia"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		exampleVirtualNetwork, err := devtest.NewVirtualNetwork(ctx, "exampleVirtualNetwork", &devtest.VirtualNetworkArgs{
    			LabName:           exampleLab.Name,
    			ResourceGroupName: exampleResourceGroup.Name,
    			Subnet: &devtest.VirtualNetworkSubnetArgs{
    				UsePublicIpAddress:          pulumi.String("Allow"),
    				UseInVirtualMachineCreation: pulumi.String("Allow"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = devtest.NewWindowsVirtualMachine(ctx, "exampleWindowsVirtualMachine", &devtest.WindowsVirtualMachineArgs{
    			LabName:             exampleLab.Name,
    			ResourceGroupName:   exampleResourceGroup.Name,
    			Location:            exampleResourceGroup.Location,
    			Size:                pulumi.String("Standard_DS2"),
    			Username:            pulumi.String("exampleuser99"),
    			Password:            pulumi.String("Pa$w0rd1234!"),
    			LabVirtualNetworkId: exampleVirtualNetwork.ID(),
    			LabSubnetName: exampleVirtualNetwork.Subnet.ApplyT(func(subnet devtest.VirtualNetworkSubnet) (*string, error) {
    				return &subnet.Name, nil
    			}).(pulumi.StringPtrOutput),
    			StorageType: pulumi.String("Premium"),
    			Notes:       pulumi.String("Some notes about this Virtual Machine."),
    			GalleryImageReference: &devtest.WindowsVirtualMachineGalleryImageReferenceArgs{
    				Offer:     pulumi.String("WindowsServer"),
    				Publisher: pulumi.String("MicrosoftWindowsServer"),
    				Sku:       pulumi.String("2019-Datacenter"),
    				Version:   pulumi.String("latest"),
    			},
    		})
    		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.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 pulumi
    import pulumi_azure as azure
    
    example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe")
    example_lab = azure.devtest.Lab("exampleLab",
        location=example_resource_group.location,
        resource_group_name=example_resource_group.name,
        tags={
            "Sydney": "Australia",
        })
    example_virtual_network = azure.devtest.VirtualNetwork("exampleVirtualNetwork",
        lab_name=example_lab.name,
        resource_group_name=example_resource_group.name,
        subnet=azure.devtest.VirtualNetworkSubnetArgs(
            use_public_ip_address="Allow",
            use_in_virtual_machine_creation="Allow",
        ))
    example_windows_virtual_machine = azure.devtest.WindowsVirtualMachine("exampleWindowsVirtualMachine",
        lab_name=example_lab.name,
        resource_group_name=example_resource_group.name,
        location=example_resource_group.location,
        size="Standard_DS2",
        username="exampleuser99",
        password="Pa$w0rd1234!",
        lab_virtual_network_id=example_virtual_network.id,
        lab_subnet_name=example_virtual_network.subnet.name,
        storage_type="Premium",
        notes="Some notes about this Virtual Machine.",
        gallery_image_reference=azure.devtest.WindowsVirtualMachineGalleryImageReferenceArgs(
            offer="WindowsServer",
            publisher="MicrosoftWindowsServer",
            sku="2019-Datacenter",
            version="latest",
        ))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const exampleResourceGroup = new azure.core.ResourceGroup("exampleResourceGroup", {location: "West Europe"});
    const exampleLab = new azure.devtest.Lab("exampleLab", {
        location: exampleResourceGroup.location,
        resourceGroupName: exampleResourceGroup.name,
        tags: {
            Sydney: "Australia",
        },
    });
    const exampleVirtualNetwork = new azure.devtest.VirtualNetwork("exampleVirtualNetwork", {
        labName: exampleLab.name,
        resourceGroupName: exampleResourceGroup.name,
        subnet: {
            usePublicIpAddress: "Allow",
            useInVirtualMachineCreation: "Allow",
        },
    });
    const exampleWindowsVirtualMachine = new azure.devtest.WindowsVirtualMachine("exampleWindowsVirtualMachine", {
        labName: exampleLab.name,
        resourceGroupName: exampleResourceGroup.name,
        location: exampleResourceGroup.location,
        size: "Standard_DS2",
        username: "exampleuser99",
        password: "Pa$w0rd1234!",
        labVirtualNetworkId: exampleVirtualNetwork.id,
        labSubnetName: exampleVirtualNetwork.subnet.apply(subnet => subnet.name),
        storageType: "Premium",
        notes: "Some notes about this Virtual Machine.",
        galleryImageReference: {
            offer: "WindowsServer",
            publisher: "MicrosoftWindowsServer",
            sku: "2019-Datacenter",
            version: "latest",
        },
    });
    
    resources:
      exampleResourceGroup:
        type: azure:core:ResourceGroup
        properties:
          location: West Europe
      exampleLab:
        type: azure:devtest:Lab
        properties:
          location: ${exampleResourceGroup.location}
          resourceGroupName: ${exampleResourceGroup.name}
          tags:
            Sydney: Australia
      exampleVirtualNetwork:
        type: azure:devtest:VirtualNetwork
        properties:
          labName: ${exampleLab.name}
          resourceGroupName: ${exampleResourceGroup.name}
          subnet:
            usePublicIpAddress: Allow
            useInVirtualMachineCreation: Allow
      exampleWindowsVirtualMachine:
        type: azure:devtest:WindowsVirtualMachine
        properties:
          labName: ${exampleLab.name}
          resourceGroupName: ${exampleResourceGroup.name}
          location: ${exampleResourceGroup.location}
          size: Standard_DS2
          username: exampleuser99
          password: Pa$w0rd1234!
          labVirtualNetworkId: ${exampleVirtualNetwork.id}
          labSubnetName: ${exampleVirtualNetwork.subnet.name}
          storageType: Premium
          notes: Some notes about this Virtual Machine.
          galleryImageReference:
            offer: WindowsServer
            publisher: MicrosoftWindowsServer
            sku: 2019-Datacenter
            version: latest
    

    Create WindowsVirtualMachine Resource

    new WindowsVirtualMachine(name: string, args: WindowsVirtualMachineArgs, opts?: CustomResourceOptions);
    @overload
    def WindowsVirtualMachine(resource_name: str,
                              opts: Optional[ResourceOptions] = None,
                              allow_claim: Optional[bool] = None,
                              disallow_public_ip_address: Optional[bool] = None,
                              gallery_image_reference: Optional[WindowsVirtualMachineGalleryImageReferenceArgs] = None,
                              inbound_nat_rules: Optional[Sequence[WindowsVirtualMachineInboundNatRuleArgs]] = None,
                              lab_name: Optional[str] = None,
                              lab_subnet_name: Optional[str] = None,
                              lab_virtual_network_id: Optional[str] = None,
                              location: Optional[str] = None,
                              name: Optional[str] = None,
                              notes: Optional[str] = None,
                              password: Optional[str] = None,
                              resource_group_name: Optional[str] = None,
                              size: Optional[str] = None,
                              storage_type: Optional[str] = None,
                              tags: Optional[Mapping[str, str]] = None,
                              username: Optional[str] = None)
    @overload
    def WindowsVirtualMachine(resource_name: str,
                              args: WindowsVirtualMachineArgs,
                              opts: Optional[ResourceOptions] = None)
    func NewWindowsVirtualMachine(ctx *Context, name string, args WindowsVirtualMachineArgs, opts ...ResourceOption) (*WindowsVirtualMachine, error)
    public WindowsVirtualMachine(string name, WindowsVirtualMachineArgs args, CustomResourceOptions? opts = null)
    public WindowsVirtualMachine(String name, WindowsVirtualMachineArgs args)
    public WindowsVirtualMachine(String name, WindowsVirtualMachineArgs args, CustomResourceOptions options)
    
    type: azure:devtest:WindowsVirtualMachine
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args WindowsVirtualMachineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args WindowsVirtualMachineArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args WindowsVirtualMachineArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WindowsVirtualMachineArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WindowsVirtualMachineArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    WindowsVirtualMachine Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The WindowsVirtualMachine resource accepts the following input properties:

    GalleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    LabName string

    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.

    LabSubnetName string

    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.

    LabVirtualNetworkId string

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

    Password string

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

    ResourceGroupName string

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

    Size string

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

    StorageType string

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

    Username string

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

    AllowClaim bool

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

    DisallowPublicIpAddress bool

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

    InboundNatRules List<WindowsVirtualMachineInboundNatRuleArgs>

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

    Location string

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

    Name string

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

    Notes string

    Any notes about the Virtual Machine.

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    GalleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    LabName string

    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.

    LabSubnetName string

    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.

    LabVirtualNetworkId string

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

    Password string

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

    ResourceGroupName string

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

    Size string

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

    StorageType string

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

    Username string

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

    AllowClaim bool

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

    DisallowPublicIpAddress bool

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

    InboundNatRules []WindowsVirtualMachineInboundNatRuleArgs

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

    Location string

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

    Name string

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

    Notes string

    Any notes about the Virtual Machine.

    Tags map[string]string

    A mapping of tags to assign to the resource.

    galleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    labName String

    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.

    labSubnetName String

    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.

    labVirtualNetworkId String

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

    password String

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

    resourceGroupName String

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

    size String

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

    storageType String

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

    username String

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

    allowClaim Boolean

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

    disallowPublicIpAddress Boolean

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

    inboundNatRules List<WindowsVirtualMachineInboundNatRuleArgs>

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

    location String

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

    name String

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

    notes String

    Any notes about the Virtual Machine.

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    galleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    labName string

    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.

    labSubnetName string

    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.

    labVirtualNetworkId string

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

    password string

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

    resourceGroupName string

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

    size string

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

    storageType string

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

    username string

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

    allowClaim boolean

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

    disallowPublicIpAddress boolean

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

    inboundNatRules WindowsVirtualMachineInboundNatRuleArgs[]

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

    location string

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

    name string

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

    notes string

    Any notes about the Virtual Machine.

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    gallery_image_reference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    lab_name str

    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.

    lab_subnet_name str

    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.

    lab_virtual_network_id str

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

    password str

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

    resource_group_name str

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

    size str

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

    storage_type str

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

    username str

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

    allow_claim bool

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

    disallow_public_ip_address bool

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

    inbound_nat_rules Sequence[WindowsVirtualMachineInboundNatRuleArgs]

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

    location str

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

    name str

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

    notes str

    Any notes about the Virtual Machine.

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    galleryImageReference Property Map

    A gallery_image_reference block as defined below.

    labName String

    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.

    labSubnetName String

    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.

    labVirtualNetworkId String

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

    password String

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

    resourceGroupName String

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

    size String

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

    storageType String

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

    username String

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

    allowClaim Boolean

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

    disallowPublicIpAddress Boolean

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

    inboundNatRules List<Property Map>

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

    location String

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

    name String

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

    notes String

    Any notes about the Virtual Machine.

    tags Map<String>

    A mapping of tags to assign to the resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the WindowsVirtualMachine resource produces the following output properties:

    Fqdn string

    The FQDN of the Virtual Machine.

    Id string

    The provider-assigned unique ID for this managed resource.

    UniqueIdentifier string

    The unique immutable identifier of the Virtual Machine.

    Fqdn string

    The FQDN of the Virtual Machine.

    Id string

    The provider-assigned unique ID for this managed resource.

    UniqueIdentifier string

    The unique immutable identifier of the Virtual Machine.

    fqdn String

    The FQDN of the Virtual Machine.

    id String

    The provider-assigned unique ID for this managed resource.

    uniqueIdentifier String

    The unique immutable identifier of the Virtual Machine.

    fqdn string

    The FQDN of the Virtual Machine.

    id string

    The provider-assigned unique ID for this managed resource.

    uniqueIdentifier string

    The unique immutable identifier of the Virtual Machine.

    fqdn str

    The FQDN of the Virtual Machine.

    id str

    The provider-assigned unique ID for this managed resource.

    unique_identifier str

    The unique immutable identifier of the Virtual Machine.

    fqdn String

    The FQDN of the Virtual Machine.

    id String

    The provider-assigned unique ID for this managed resource.

    uniqueIdentifier String

    The unique immutable identifier of the Virtual Machine.

    Look up Existing WindowsVirtualMachine Resource

    Get an existing WindowsVirtualMachine resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: WindowsVirtualMachineState, opts?: CustomResourceOptions): WindowsVirtualMachine
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allow_claim: Optional[bool] = None,
            disallow_public_ip_address: Optional[bool] = None,
            fqdn: Optional[str] = None,
            gallery_image_reference: Optional[WindowsVirtualMachineGalleryImageReferenceArgs] = None,
            inbound_nat_rules: Optional[Sequence[WindowsVirtualMachineInboundNatRuleArgs]] = None,
            lab_name: Optional[str] = None,
            lab_subnet_name: Optional[str] = None,
            lab_virtual_network_id: Optional[str] = None,
            location: Optional[str] = None,
            name: Optional[str] = None,
            notes: Optional[str] = None,
            password: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            size: Optional[str] = None,
            storage_type: Optional[str] = None,
            tags: Optional[Mapping[str, str]] = None,
            unique_identifier: Optional[str] = None,
            username: Optional[str] = None) -> WindowsVirtualMachine
    func GetWindowsVirtualMachine(ctx *Context, name string, id IDInput, state *WindowsVirtualMachineState, opts ...ResourceOption) (*WindowsVirtualMachine, error)
    public static WindowsVirtualMachine Get(string name, Input<string> id, WindowsVirtualMachineState? state, CustomResourceOptions? opts = null)
    public static WindowsVirtualMachine get(String name, Output<String> id, WindowsVirtualMachineState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AllowClaim bool

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

    DisallowPublicIpAddress bool

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

    Fqdn string

    The FQDN of the Virtual Machine.

    GalleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    InboundNatRules List<WindowsVirtualMachineInboundNatRuleArgs>

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

    LabName string

    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.

    LabSubnetName string

    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.

    LabVirtualNetworkId string

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

    Location string

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

    Name string

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

    Notes string

    Any notes about the Virtual Machine.

    Password string

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

    ResourceGroupName string

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

    Size string

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

    StorageType string

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

    Tags Dictionary<string, string>

    A mapping of tags to assign to the resource.

    UniqueIdentifier string

    The unique immutable identifier of the Virtual Machine.

    Username string

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

    AllowClaim bool

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

    DisallowPublicIpAddress bool

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

    Fqdn string

    The FQDN of the Virtual Machine.

    GalleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    InboundNatRules []WindowsVirtualMachineInboundNatRuleArgs

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

    LabName string

    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.

    LabSubnetName string

    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.

    LabVirtualNetworkId string

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

    Location string

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

    Name string

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

    Notes string

    Any notes about the Virtual Machine.

    Password string

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

    ResourceGroupName string

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

    Size string

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

    StorageType string

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

    Tags map[string]string

    A mapping of tags to assign to the resource.

    UniqueIdentifier string

    The unique immutable identifier of the Virtual Machine.

    Username string

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

    allowClaim Boolean

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

    disallowPublicIpAddress Boolean

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

    fqdn String

    The FQDN of the Virtual Machine.

    galleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    inboundNatRules List<WindowsVirtualMachineInboundNatRuleArgs>

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

    labName String

    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.

    labSubnetName String

    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.

    labVirtualNetworkId String

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

    location String

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

    name String

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

    notes String

    Any notes about the Virtual Machine.

    password String

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

    resourceGroupName String

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

    size String

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

    storageType String

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

    tags Map<String,String>

    A mapping of tags to assign to the resource.

    uniqueIdentifier String

    The unique immutable identifier of the Virtual Machine.

    username String

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

    allowClaim boolean

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

    disallowPublicIpAddress boolean

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

    fqdn string

    The FQDN of the Virtual Machine.

    galleryImageReference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    inboundNatRules WindowsVirtualMachineInboundNatRuleArgs[]

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

    labName string

    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.

    labSubnetName string

    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.

    labVirtualNetworkId string

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

    location string

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

    name string

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

    notes string

    Any notes about the Virtual Machine.

    password string

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

    resourceGroupName string

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

    size string

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

    storageType string

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

    tags {[key: string]: string}

    A mapping of tags to assign to the resource.

    uniqueIdentifier string

    The unique immutable identifier of the Virtual Machine.

    username string

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

    allow_claim bool

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

    disallow_public_ip_address bool

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

    fqdn str

    The FQDN of the Virtual Machine.

    gallery_image_reference WindowsVirtualMachineGalleryImageReferenceArgs

    A gallery_image_reference block as defined below.

    inbound_nat_rules Sequence[WindowsVirtualMachineInboundNatRuleArgs]

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

    lab_name str

    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.

    lab_subnet_name str

    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.

    lab_virtual_network_id str

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

    location str

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

    name str

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

    notes str

    Any notes about the Virtual Machine.

    password str

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

    resource_group_name str

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

    size str

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

    storage_type str

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

    tags Mapping[str, str]

    A mapping of tags to assign to the resource.

    unique_identifier str

    The unique immutable identifier of the Virtual Machine.

    username str

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

    allowClaim Boolean

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

    disallowPublicIpAddress Boolean

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

    fqdn String

    The FQDN of the Virtual Machine.

    galleryImageReference Property Map

    A gallery_image_reference block as defined below.

    inboundNatRules List<Property Map>

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

    labName String

    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.

    labSubnetName String

    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.

    labVirtualNetworkId String

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

    location String

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

    name String

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

    notes String

    Any notes about the Virtual Machine.

    password String

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

    resourceGroupName String

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

    size String

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

    storageType String

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

    tags Map<String>

    A mapping of tags to assign to the resource.

    uniqueIdentifier String

    The unique immutable identifier of the Virtual Machine.

    username String

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

    Supporting Types

    WindowsVirtualMachineGalleryImageReference

    Offer string

    The Offer of the Gallery Image. Changing this forces a new resource to be created.

    Publisher string

    The Publisher of the Gallery Image. Changing this forces a new resource to be created.

    Sku string

    The SKU of the Gallery Image. Changing this forces a new resource to be created.

    Version string

    The Version of the Gallery Image. Changing this forces a new resource to be created.

    Offer string

    The Offer of the Gallery Image. Changing this forces a new resource to be created.

    Publisher string

    The Publisher of the Gallery Image. Changing this forces a new resource to be created.

    Sku string

    The SKU of the Gallery Image. Changing this forces a new resource to be created.

    Version string

    The Version of the Gallery Image. Changing this forces a new resource to be created.

    offer String

    The Offer of the Gallery Image. Changing this forces a new resource to be created.

    publisher String

    The Publisher of the Gallery Image. Changing this forces a new resource to be created.

    sku String

    The SKU of the Gallery Image. Changing this forces a new resource to be created.

    version String

    The Version of the Gallery Image. Changing this forces a new resource to be created.

    offer string

    The Offer of the Gallery Image. Changing this forces a new resource to be created.

    publisher string

    The Publisher of the Gallery Image. Changing this forces a new resource to be created.

    sku string

    The SKU of the Gallery Image. Changing this forces a new resource to be created.

    version string

    The Version of the Gallery Image. Changing this forces a new resource to be created.

    offer str

    The Offer of the Gallery Image. Changing this forces a new resource to be created.

    publisher str

    The Publisher of the Gallery Image. Changing this forces a new resource to be created.

    sku str

    The SKU of the Gallery Image. Changing this forces a new resource to be created.

    version str

    The Version of the Gallery Image. Changing this forces a new resource to be created.

    offer String

    The Offer of the Gallery Image. Changing this forces a new resource to be created.

    publisher String

    The Publisher of the Gallery Image. Changing this forces a new resource to be created.

    sku String

    The SKU of the Gallery Image. Changing this forces a new resource to be created.

    version String

    The Version of the Gallery Image. Changing this forces a new resource to be created.

    WindowsVirtualMachineInboundNatRule

    BackendPort int

    The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.

    Protocol string

    The Protocol used for this NAT Rule. Possible values are Tcp and Udp.

    FrontendPort int

    The frontend port associated with this Inbound NAT Rule.

    BackendPort int

    The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.

    Protocol string

    The Protocol used for this NAT Rule. Possible values are Tcp and Udp.

    FrontendPort int

    The frontend port associated with this Inbound NAT Rule.

    backendPort Integer

    The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.

    protocol String

    The Protocol used for this NAT Rule. Possible values are Tcp and Udp.

    frontendPort Integer

    The frontend port associated with this Inbound NAT Rule.

    backendPort number

    The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.

    protocol string

    The Protocol used for this NAT Rule. Possible values are Tcp and Udp.

    frontendPort number

    The frontend port associated with this Inbound NAT Rule.

    backend_port int

    The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.

    protocol str

    The Protocol used for this NAT Rule. Possible values are Tcp and Udp.

    frontend_port int

    The frontend port associated with this Inbound NAT Rule.

    backendPort Number

    The Backend Port associated with this NAT Rule. Changing this forces a new resource to be created.

    protocol String

    The Protocol used for this NAT Rule. Possible values are Tcp and Udp.

    frontendPort Number

    The frontend port associated with this Inbound NAT Rule.

    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
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the azurerm Terraform Provider.

    azure logo

    We recommend using Azure Native.

    Azure Classic v5.43.0 published on Saturday, May 6, 2023 by Pulumi