VirtualMachineInstanceArgs

data class VirtualMachineInstanceArgs(val extendedLocation: Output<ExtendedLocationArgs>? = null, val hardwareProfile: Output<HardwareProfileArgs>? = null, val infrastructureProfile: Output<InfrastructureProfileArgs>? = null, val networkProfile: Output<NetworkProfileArgs>? = null, val osProfile: Output<OsProfileForVMInstanceArgs>? = null, val placementProfile: Output<PlacementProfileArgs>? = null, val resourceUri: Output<String>? = null, val securityProfile: Output<SecurityProfileArgs>? = null, val storageProfile: Output<StorageProfileArgs>? = null) : ConvertibleToJava<VirtualMachineInstanceArgs>

Define the virtualMachineInstance. Uses Azure REST API version 2023-12-01. In version 2.x of the Azure Native provider, it used API version 2023-03-01-preview. Other available API versions: 2023-03-01-preview, 2023-10-01. 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 virtualMachineInstance = new AzureNative.ConnectedVMwarevSphere.VirtualMachineInstance("virtualMachineInstance", 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,
},
InfrastructureProfile = new AzureNative.ConnectedVMwarevSphere.Inputs.InfrastructureProfileArgs
{
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",
},
PlacementProfile = new AzureNative.ConnectedVMwarevSphere.Inputs.PlacementProfileArgs
{
ResourcePoolId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool",
},
ResourceUri = "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/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.NewVirtualMachineInstance(ctx, "virtualMachineInstance", &connectedvmwarevsphere.VirtualMachineInstanceArgs{
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),
},
InfrastructureProfile: &connectedvmwarevsphere.InfrastructureProfileArgs{
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"),
},
PlacementProfile: &connectedvmwarevsphere.PlacementProfileArgs{
ResourcePoolId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool"),
},
ResourceUri: pulumi.String("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/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.VirtualMachineInstance;
import com.pulumi.azurenative.connectedvmwarevsphere.VirtualMachineInstanceArgs;
import com.pulumi.azurenative.connectedvmwarevsphere.inputs.ExtendedLocationArgs;
import com.pulumi.azurenative.connectedvmwarevsphere.inputs.HardwareProfileArgs;
import com.pulumi.azurenative.connectedvmwarevsphere.inputs.InfrastructureProfileArgs;
import com.pulumi.azurenative.connectedvmwarevsphere.inputs.PlacementProfileArgs;
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 virtualMachineInstance = new VirtualMachineInstance("virtualMachineInstance", VirtualMachineInstanceArgs.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())
.infrastructureProfile(InfrastructureProfileArgs.builder()
.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")
.build())
.placementProfile(PlacementProfileArgs.builder()
.resourcePoolId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/ResourcePools/HRPool")
.build())
.resourceUri("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM")
.build());
}
}

Import

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

$ pulumi import azure-native:connectedvmwarevsphere:VirtualMachineInstance default /{resourceUri}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineInstances/default

Constructors

Link copied to clipboard
constructor(extendedLocation: Output<ExtendedLocationArgs>? = null, hardwareProfile: Output<HardwareProfileArgs>? = null, infrastructureProfile: Output<InfrastructureProfileArgs>? = null, networkProfile: Output<NetworkProfileArgs>? = null, osProfile: Output<OsProfileForVMInstanceArgs>? = null, placementProfile: Output<PlacementProfileArgs>? = null, resourceUri: Output<String>? = null, securityProfile: Output<SecurityProfileArgs>? = null, storageProfile: Output<StorageProfileArgs>? = null)

Properties

Link copied to clipboard

Gets or sets the extended location.

Link copied to clipboard

Hardware properties.

Link copied to clipboard

Gets the infrastructure profile.

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

Network properties.

Link copied to clipboard

OS properties.

Link copied to clipboard

Placement properties.

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

The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.

Link copied to clipboard

Gets the security profile.

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

Storage properties.

Functions

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