Virtual Machine Args
data class VirtualMachineArgs(val amountOfRam: Output<Int>? = null, val customization: Output<GuestOSCustomizationArgs>? = null, val disks: Output<List<VirtualDiskArgs>>? = null, val exposeToGuestVM: Output<Boolean>? = null, val location: Output<String>? = null, val nics: Output<List<VirtualNicArgs>>? = null, val numberOfCores: Output<Int>? = null, val password: Output<String>? = null, val privateCloudId: Output<String>? = null, val resourceGroupName: Output<String>? = null, val resourcePool: Output<ResourcePoolArgs>? = null, val tags: Output<Map<String, String>>? = null, val templateId: Output<String>? = null, val username: Output<String>? = null, val vSphereNetworks: Output<List<String>>? = null, val virtualMachineName: Output<String>? = null) : ConvertibleToJava<VirtualMachineArgs>
Virtual machine model Azure REST API version: 2019-04-01. Prior API version in Azure Native 1.x: 2019-04-01.
Example Usage
CreateVirtualMachine
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachine = new AzureNative.VMwareCloudSimple.VirtualMachine("virtualMachine", new()
{
AmountOfRam = 4096,
Disks = new[]
{
new AzureNative.VMwareCloudSimple.Inputs.VirtualDiskArgs
{
ControllerId = "1000",
IndependenceMode = AzureNative.VMwareCloudSimple.DiskIndependenceMode.Persistent,
TotalSize = 10485760,
VirtualDiskId = "2000",
},
},
Location = "westus2",
Nics = new[]
{
new AzureNative.VMwareCloudSimple.Inputs.VirtualNicArgs
{
Network = new AzureNative.VMwareCloudSimple.Inputs.VirtualNetworkArgs
{
Id = "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19",
},
NicType = AzureNative.VMwareCloudSimple.NICType.E1000,
PowerOnBoot = true,
VirtualNicId = "4000",
},
},
NumberOfCores = 2,
PrivateCloudId = "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud",
ResourceGroupName = "myResourceGroup",
ResourcePool = new AzureNative.VMwareCloudSimple.Inputs.ResourcePoolArgs
{
Id = "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26",
},
TemplateId = "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34",
VirtualMachineName = "myVirtualMachine",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/vmwarecloudsimple/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vmwarecloudsimple.NewVirtualMachine(ctx, "virtualMachine", &vmwarecloudsimple.VirtualMachineArgs{
AmountOfRam: pulumi.Int(4096),
Disks: []vmwarecloudsimple.VirtualDiskArgs{
{
ControllerId: pulumi.String("1000"),
IndependenceMode: vmwarecloudsimple.DiskIndependenceModePersistent,
TotalSize: pulumi.Int(10485760),
VirtualDiskId: pulumi.String("2000"),
},
},
Location: pulumi.String("westus2"),
Nics: []vmwarecloudsimple.VirtualNicArgs{
{
Network: {
Id: pulumi.String("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19"),
},
NicType: vmwarecloudsimple.NICTypeE1000,
PowerOnBoot: pulumi.Bool(true),
VirtualNicId: pulumi.String("4000"),
},
},
NumberOfCores: pulumi.Int(2),
PrivateCloudId: pulumi.String("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud"),
ResourceGroupName: pulumi.String("myResourceGroup"),
ResourcePool: &vmwarecloudsimple.ResourcePoolArgs{
Id: pulumi.String("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"),
},
TemplateId: pulumi.String("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34"),
VirtualMachineName: pulumi.String("myVirtualMachine"),
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.vmwarecloudsimple.VirtualMachine;
import com.pulumi.azurenative.vmwarecloudsimple.VirtualMachineArgs;
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()
.amountOfRam(4096)
.disks(Map.ofEntries(
Map.entry("controllerId", "1000"),
Map.entry("independenceMode", "persistent"),
Map.entry("totalSize", 10485760),
Map.entry("virtualDiskId", "2000")
))
.location("westus2")
.nics(Map.ofEntries(
Map.entry("network", Map.of("id", "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualNetworks/dvportgroup-19")),
Map.entry("nicType", "E1000"),
Map.entry("powerOnBoot", true),
Map.entry("virtualNicId", "4000")
))
.numberOfCores(2)
.privateCloudId("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud")
.resourceGroupName("myResourceGroup")
.resourcePool(Map.of("id", "/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/resourcePools/resgroup-26"))
.templateId("/subscriptions/{subscription-id}/providers/Microsoft.VMwareCloudSimple/locations/westus2/privateClouds/myPrivateCloud/virtualMachineTemplates/vm-34")
.virtualMachineName("myVirtualMachine")
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:vmwarecloudsimple:VirtualMachine myVirtualMachine /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.VMwareCloudSimple/virtualMachines/{virtualMachineName}
Content copied to clipboard
Constructors
Link copied to clipboard
fun VirtualMachineArgs(amountOfRam: Output<Int>? = null, customization: Output<GuestOSCustomizationArgs>? = null, disks: Output<List<VirtualDiskArgs>>? = null, exposeToGuestVM: Output<Boolean>? = null, location: Output<String>? = null, nics: Output<List<VirtualNicArgs>>? = null, numberOfCores: Output<Int>? = null, password: Output<String>? = null, privateCloudId: Output<String>? = null, resourceGroupName: Output<String>? = null, resourcePool: Output<ResourcePoolArgs>? = null, tags: Output<Map<String, String>>? = null, templateId: Output<String>? = null, username: Output<String>? = null, vSphereNetworks: Output<List<String>>? = null, virtualMachineName: Output<String>? = null)