VirtualMachineArgs

data class VirtualMachineArgs(val allowClaim: Output<Boolean>? = null, val artifacts: Output<List<ArtifactInstallPropertiesArgs>>? = null, val createdDate: Output<String>? = null, val customImageId: Output<String>? = null, val dataDiskParameters: Output<List<DataDiskPropertiesArgs>>? = null, val disallowPublicIpAddress: Output<Boolean>? = null, val environmentId: Output<String>? = null, val expirationDate: Output<String>? = null, val galleryImageReference: Output<GalleryImageReferenceArgs>? = null, val isAuthenticationWithSshKey: Output<Boolean>? = 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 networkInterface: Output<NetworkInterfacePropertiesArgs>? = null, val notes: Output<String>? = null, val ownerObjectId: Output<String>? = null, val ownerUserPrincipalName: Output<String>? = null, val password: Output<String>? = null, val planId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val scheduleParameters: Output<List<ScheduleCreationParameterArgs>>? = null, val size: Output<String>? = null, val sshKey: Output<String>? = null, val storageType: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val userName: Output<String>? = null) : ConvertibleToJava<VirtualMachineArgs>

A virtual machine. Uses Azure REST API version 2018-09-15. In version 2.x of the Azure Native provider, it used API version 2018-09-15.

Example Usage

VirtualMachines_CreateOrUpdate

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachine = new AzureNative.DevTestLab.VirtualMachine("virtualMachine", new()
{
AllowClaim = true,
DisallowPublicIpAddress = true,
GalleryImageReference = new AzureNative.DevTestLab.Inputs.GalleryImageReferenceArgs
{
Offer = "UbuntuServer",
OsType = "Linux",
Publisher = "Canonical",
Sku = "16.04-LTS",
Version = "Latest",
},
LabName = "{labName}",
LabSubnetName = "{virtualNetworkName}Subnet",
LabVirtualNetworkId = "/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}",
Location = "{location}",
Name = "{vmName}",
Password = "{userPassword}",
ResourceGroupName = "resourceGroupName",
Size = "Standard_A2_v2",
StorageType = "Standard",
Tags =
{
{ "tagName1", "tagValue1" },
},
UserName = "{userName}",
});
});
package main
import (
devtestlab "github.com/pulumi/pulumi-azure-native-sdk/devtestlab/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := devtestlab.NewVirtualMachine(ctx, "virtualMachine", &devtestlab.VirtualMachineArgs{
AllowClaim: pulumi.Bool(true),
DisallowPublicIpAddress: pulumi.Bool(true),
GalleryImageReference: &devtestlab.GalleryImageReferenceArgs{
Offer: pulumi.String("UbuntuServer"),
OsType: pulumi.String("Linux"),
Publisher: pulumi.String("Canonical"),
Sku: pulumi.String("16.04-LTS"),
Version: pulumi.String("Latest"),
},
LabName: pulumi.String("{labName}"),
LabSubnetName: pulumi.String("{virtualNetworkName}Subnet"),
LabVirtualNetworkId: pulumi.String("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}"),
Location: pulumi.String("{location}"),
Name: pulumi.String("{vmName}"),
Password: pulumi.String("{userPassword}"),
ResourceGroupName: pulumi.String("resourceGroupName"),
Size: pulumi.String("Standard_A2_v2"),
StorageType: pulumi.String("Standard"),
Tags: pulumi.StringMap{
"tagName1": pulumi.String("tagValue1"),
},
UserName: pulumi.String("{userName}"),
})
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.devtestlab.VirtualMachine;
import com.pulumi.azurenative.devtestlab.VirtualMachineArgs;
import com.pulumi.azurenative.devtestlab.inputs.GalleryImageReferenceArgs;
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 virtualMachine = new VirtualMachine("virtualMachine", VirtualMachineArgs.builder()
.allowClaim(true)
.disallowPublicIpAddress(true)
.galleryImageReference(GalleryImageReferenceArgs.builder()
.offer("UbuntuServer")
.osType("Linux")
.publisher("Canonical")
.sku("16.04-LTS")
.version("Latest")
.build())
.labName("{labName}")
.labSubnetName("{virtualNetworkName}Subnet")
.labVirtualNetworkId("/subscriptions/{subscriptionId}/resourcegroups/resourceGroupName/providers/microsoft.devtestlab/labs/{labName}/virtualnetworks/{virtualNetworkName}")
.location("{location}")
.name("{vmName}")
.password("{userPassword}")
.resourceGroupName("resourceGroupName")
.size("Standard_A2_v2")
.storageType("Standard")
.tags(Map.of("tagName1", "tagValue1"))
.userName("{userName}")
.build());
}
}

Import

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

$ pulumi import azure-native:devtestlab:VirtualMachine {vmName} /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevTestLab/labs/{labName}/virtualmachines/{name}

Constructors

Link copied to clipboard
constructor(allowClaim: Output<Boolean>? = null, artifacts: Output<List<ArtifactInstallPropertiesArgs>>? = null, createdDate: Output<String>? = null, customImageId: Output<String>? = null, dataDiskParameters: Output<List<DataDiskPropertiesArgs>>? = null, disallowPublicIpAddress: Output<Boolean>? = null, environmentId: Output<String>? = null, expirationDate: Output<String>? = null, galleryImageReference: Output<GalleryImageReferenceArgs>? = null, isAuthenticationWithSshKey: Output<Boolean>? = null, labName: Output<String>? = null, labSubnetName: Output<String>? = null, labVirtualNetworkId: Output<String>? = null, location: Output<String>? = null, name: Output<String>? = null, networkInterface: Output<NetworkInterfacePropertiesArgs>? = null, notes: Output<String>? = null, ownerObjectId: Output<String>? = null, ownerUserPrincipalName: Output<String>? = null, password: Output<String>? = null, planId: Output<String>? = null, resourceGroupName: Output<String>? = null, scheduleParameters: Output<List<ScheduleCreationParameterArgs>>? = null, size: Output<String>? = null, sshKey: Output<String>? = null, storageType: Output<String>? = null, tags: Output<Map<String, String>>? = null, userName: Output<String>? = null)

Properties

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

Indicates whether another user can take ownership of the virtual machine

Link copied to clipboard

The artifacts to be installed on the virtual machine.

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

The creation date of the virtual machine.

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

The custom image identifier of the virtual machine.

Link copied to clipboard

New or existing data disks to attach to the virtual machine after creation

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

Indicates whether the virtual machine is to be created without a public IP address.

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

The resource ID of the environment that contains this virtual machine, if any.

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

The expiration date for VM.

Link copied to clipboard

The Microsoft Azure Marketplace image reference of the virtual machine.

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

Indicates whether this virtual machine uses an SSH key for authentication.

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

The name of the lab.

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

The lab subnet name of the virtual machine.

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

The lab virtual network identifier of the virtual machine.

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

The location of the resource.

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

The name of the virtual machine.

Link copied to clipboard

The network interface properties.

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

The notes of the virtual machine.

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

The object identifier of the owner of the virtual machine.

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

The user principal name of the virtual machine owner.

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

The password of the virtual machine administrator.

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

The id of the plan associated with the virtual machine image

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

The name of the resource group.

Link copied to clipboard

Virtual Machine schedules to be created

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

The size of the virtual machine.

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

The SSH key of the virtual machine administrator.

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

Storage type to use for virtual machine (i.e. Standard, Premium).

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

The tags of the resource.

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

The user name of the virtual machine.

Functions

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