Virtual Machine Args
data class VirtualMachineArgs(val extendedLocation: Output<ExtendedLocationArgs>? = null, val firmwareType: Output<Either<String, FirmwareType>>? = null, val guestAgentProfile: Output<GuestAgentProfileArgs>? = null, val hardwareProfile: Output<HardwareProfileArgs>? = null, val identity: Output<IdentityArgs>? = null, val inventoryItemId: Output<String>? = null, val kind: Output<String>? = null, val location: Output<String>? = null, val moRefId: Output<String>? = null, val networkProfile: Output<NetworkProfileArgs>? = null, val osProfile: Output<OsProfileArgs>? = null, val placementProfile: Output<PlacementProfileArgs>? = null, val resourceGroupName: Output<String>? = null, val resourcePoolId: Output<String>? = null, val securityProfile: Output<SecurityProfileArgs>? = null, val smbiosUuid: Output<String>? = null, val storageProfile: Output<StorageProfileArgs>? = null, val tags: Output<Map<String, String>>? = null, val templateId: Output<String>? = null, val vCenterId: Output<String>? = null, val virtualMachineName: Output<String>? = null) : ConvertibleToJava<VirtualMachineArgs>
Define the virtualMachine. Azure REST API version: 2022-07-15-preview. Prior API version in Azure Native 1.x: 2020-10-01-preview. Other available API versions: 2023-03-01-preview.
Example Usage
CreateVirtualMachine
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var virtualMachine = new AzureNative.ConnectedVMwarevSphere.VirtualMachine("virtualMachine", new()
{
ExtendedLocation = new AzureNative.ConnectedVMwarevSphere.Inputs.ExtendedLocationArgs
{
Name = "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso",
Type = "customLocation",
},
HardwareProfile = new AzureNative.ConnectedVMwarevSphere.Inputs.HardwareProfileArgs
{
MemorySizeMB = 4196,
NumCPUs = 4,
},
Location = "East US",
ResourceGroupName = "testrg",
ResourcePoolId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool",
TemplateId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate",
VCenterId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter",
VirtualMachineName = "DemoVM",
});
});
Content copied to clipboard
package main
import (
"github.com/pulumi/pulumi-azure-native-sdk/connectedvmwarevsphere/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := connectedvmwarevsphere.NewVirtualMachine(ctx, "virtualMachine", &connectedvmwarevsphere.VirtualMachineArgs{
ExtendedLocation: &connectedvmwarevsphere.ExtendedLocationArgs{
Name: pulumi.String("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
Type: pulumi.String("customLocation"),
},
HardwareProfile: &connectedvmwarevsphere.HardwareProfileArgs{
MemorySizeMB: pulumi.Int(4196),
NumCPUs: pulumi.Int(4),
},
Location: pulumi.String("East US"),
ResourceGroupName: pulumi.String("testrg"),
ResourcePoolId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
TemplateId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate"),
VCenterId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
VirtualMachineName: pulumi.String("DemoVM"),
})
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.connectedvmwarevsphere.VirtualMachine;
import com.pulumi.azurenative.connectedvmwarevsphere.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()
.extendedLocation(Map.ofEntries(
Map.entry("name", "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
Map.entry("type", "customLocation")
))
.hardwareProfile(Map.ofEntries(
Map.entry("memorySizeMB", 4196),
Map.entry("numCPUs", 4)
))
.location("East US")
.resourceGroupName("testrg")
.resourcePoolId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool")
.templateId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VirtualMachineTemplates/WebFrontEndTemplate")
.vCenterId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter")
.virtualMachineName("DemoVM")
.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:connectedvmwarevsphere:VirtualMachine DemoVM /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachines/{virtualMachineName}
Content copied to clipboard
Constructors
Link copied to clipboard
fun VirtualMachineArgs(extendedLocation: Output<ExtendedLocationArgs>? = null, firmwareType: Output<Either<String, FirmwareType>>? = null, guestAgentProfile: Output<GuestAgentProfileArgs>? = null, hardwareProfile: Output<HardwareProfileArgs>? = null, identity: Output<IdentityArgs>? = null, inventoryItemId: Output<String>? = null, kind: Output<String>? = null, location: Output<String>? = null, moRefId: Output<String>? = null, networkProfile: Output<NetworkProfileArgs>? = null, osProfile: Output<OsProfileArgs>? = null, placementProfile: Output<PlacementProfileArgs>? = null, resourceGroupName: Output<String>? = null, resourcePoolId: Output<String>? = null, securityProfile: Output<SecurityProfileArgs>? = null, smbiosUuid: Output<String>? = null, storageProfile: Output<StorageProfileArgs>? = null, tags: Output<Map<String, String>>? = null, templateId: Output<String>? = null, vCenterId: Output<String>? = null, virtualMachineName: Output<String>? = null)
Functions
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard