VirtualMachineArgs

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. Uses Azure REST API version 2023-03-01-preview. In version 2.x of the Azure Native provider, it used API version 2022-07-15-preview. Other available API versions: 2022-07-15-preview. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native connectedvmwarevsphere [ApiVersion]. See the ../../../version-guide/#accessing-any-api-version-via-local-packages for details.

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",
});
});
package main
import (
connectedvmwarevsphere "github.com/pulumi/pulumi-azure-native-sdk/connectedvmwarevsphere/v3"
"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
})
}
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 com.pulumi.azurenative.connectedvmwarevsphere.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.connectedvmwarevsphere.inputs.HardwareProfileArgs;
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(ExtendedLocationArgs.builder()
.name("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")
.type("customLocation")
.build())
.hardwareProfile(HardwareProfileArgs.builder()
.memorySizeMB(4196)
.numCPUs(4)
.build())
.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());
}
}

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}

Constructors

Link copied to clipboard
constructor(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)

Properties

Link copied to clipboard

Gets or sets the extended location.

Link copied to clipboard
val firmwareType: Output<Either<String, FirmwareType>>? = null

Firmware type

Link copied to clipboard

Guest agent status properties.

Link copied to clipboard

Hardware properties.

Link copied to clipboard
val identity: Output<IdentityArgs>? = null

The identity of the resource.

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

Gets or sets the inventory Item ID for the virtual machine.

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

Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.

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

Gets or sets the location.

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

Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine.

Link copied to clipboard
val networkProfile: Output<NetworkProfileArgs>? = null

Network properties.

Link copied to clipboard
val osProfile: Output<OsProfileArgs>? = null

OS properties.

Link copied to clipboard

Placement properties.

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

The Resource Group Name.

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

Gets or sets the ARM Id of the resourcePool resource on which this virtual machine will deploy.

Link copied to clipboard

Gets the security profile.

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

Gets or sets the SMBIOS UUID of the vm.

Link copied to clipboard
val storageProfile: Output<StorageProfileArgs>? = null

Storage properties.

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

Gets or sets the Resource tags.

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

Gets or sets the ARM Id of the template resource to deploy the virtual machine.

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

Gets or sets the ARM Id of the vCenter resource in which this resource pool resides.

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

Name of the virtual machine resource.

Functions

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