All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azurenative.azurestackhci.kotlin.VirtualMachineArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.azurestackhci.kotlin

import com.pulumi.azurenative.azurestackhci.VirtualMachineArgs.builder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.IdentityArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.IdentityArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesHardwareProfileArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesHardwareProfileArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesNetworkProfileArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesNetworkProfileArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesOsProfileArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesOsProfileArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesSecurityProfileArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesSecurityProfileArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesStorageProfileArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.VirtualMachinePropertiesStorageProfileArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The virtual machine resource definition.
 * Azure REST API version: 2022-12-15-preview.
 * ## Example Usage
 * ### PutVirtualMachineWithGalleryImage
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachine = new AzureNative.AzureStackHCI.VirtualMachine("virtualMachine", new()
 *     {
 *         ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
 *             Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
 *         },
 *         HardwareProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesHardwareProfileArgs
 *         {
 *             VmSize = AzureNative.AzureStackHCI.VmSizeEnum.Default,
 *         },
 *         Location = "West US2",
 *         NetworkProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesNetworkProfileArgs
 *         {
 *             NetworkInterfaces = new[]
 *             {
 *                 new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesNetworkInterfacesArgs
 *                 {
 *                     Id = "test-nic",
 *                 },
 *             },
 *         },
 *         OsProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesOsProfileArgs
 *         {
 *             AdminPassword = "password",
 *             AdminUsername = "localadmin",
 *             ComputerName = "luamaster",
 *         },
 *         ResourceGroupName = "test-rg",
 *         SecurityProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesSecurityProfileArgs
 *         {
 *             EnableTPM = true,
 *             UefiSettings = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesUefiSettingsArgs
 *             {
 *                 SecureBootEnabled = true,
 *             },
 *         },
 *         StorageProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesStorageProfileArgs
 *         {
 *             ImageReference = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesImageReferenceArgs
 *             {
 *                 Id = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image",
 *             },
 *             VmConfigStoragePathId = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container",
 *         },
 *         VirtualMachineName = "test-vm",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurestackhci.NewVirtualMachine(ctx, "virtualMachine", &azurestackhci.VirtualMachineArgs{
 * 			ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
 * 				Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
 * 				Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
 * 			},
 * 			HardwareProfile: &azurestackhci.VirtualMachinePropertiesHardwareProfileArgs{
 * 				VmSize: pulumi.String(azurestackhci.VmSizeEnumDefault),
 * 			},
 * 			Location: pulumi.String("West US2"),
 * 			NetworkProfile: &azurestackhci.VirtualMachinePropertiesNetworkProfileArgs{
 * 				NetworkInterfaces: azurestackhci.VirtualMachinePropertiesNetworkInterfacesArray{
 * 					&azurestackhci.VirtualMachinePropertiesNetworkInterfacesArgs{
 * 						Id: pulumi.String("test-nic"),
 * 					},
 * 				},
 * 			},
 * 			OsProfile: &azurestackhci.VirtualMachinePropertiesOsProfileArgs{
 * 				AdminPassword: pulumi.String("password"),
 * 				AdminUsername: pulumi.String("localadmin"),
 * 				ComputerName:  pulumi.String("luamaster"),
 * 			},
 * 			ResourceGroupName: pulumi.String("test-rg"),
 * 			SecurityProfile: &azurestackhci.VirtualMachinePropertiesSecurityProfileArgs{
 * 				EnableTPM: pulumi.Bool(true),
 * 				UefiSettings: &azurestackhci.VirtualMachinePropertiesUefiSettingsArgs{
 * 					SecureBootEnabled: pulumi.Bool(true),
 * 				},
 * 			},
 * 			StorageProfile: &azurestackhci.VirtualMachinePropertiesStorageProfileArgs{
 * 				ImageReference: &azurestackhci.VirtualMachinePropertiesImageReferenceArgs{
 * 					Id: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image"),
 * 				},
 * 				VmConfigStoragePathId: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
 * 			},
 * 			VirtualMachineName: pulumi.String("test-vm"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.azurestackhci.VirtualMachine;
 * import com.pulumi.azurenative.azurestackhci.VirtualMachineArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesHardwareProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesNetworkProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesOsProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesSecurityProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesUefiSettingsArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesStorageProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesImageReferenceArgs;
 * 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/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
 *                 .type("CustomLocation")
 *                 .build())
 *             .hardwareProfile(VirtualMachinePropertiesHardwareProfileArgs.builder()
 *                 .vmSize("Default")
 *                 .build())
 *             .location("West US2")
 *             .networkProfile(VirtualMachinePropertiesNetworkProfileArgs.builder()
 *                 .networkInterfaces(VirtualMachinePropertiesNetworkInterfacesArgs.builder()
 *                     .id("test-nic")
 *                     .build())
 *                 .build())
 *             .osProfile(VirtualMachinePropertiesOsProfileArgs.builder()
 *                 .adminPassword("password")
 *                 .adminUsername("localadmin")
 *                 .computerName("luamaster")
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .securityProfile(VirtualMachinePropertiesSecurityProfileArgs.builder()
 *                 .enableTPM(true)
 *                 .uefiSettings(VirtualMachinePropertiesUefiSettingsArgs.builder()
 *                     .secureBootEnabled(true)
 *                     .build())
 *                 .build())
 *             .storageProfile(VirtualMachinePropertiesStorageProfileArgs.builder()
 *                 .imageReference(VirtualMachinePropertiesImageReferenceArgs.builder()
 *                     .id("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/galleryImages/test-gallery-image")
 *                     .build())
 *                 .vmConfigStoragePathId("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")
 *                 .build())
 *             .virtualMachineName("test-vm")
 *             .build());
 *     }
 * }
 * ```
 * ### PutVirtualMachineWithMarketplaceGalleryImage
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachine = new AzureNative.AzureStackHCI.VirtualMachine("virtualMachine", new()
 *     {
 *         ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
 *             Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
 *         },
 *         HardwareProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesHardwareProfileArgs
 *         {
 *             VmSize = AzureNative.AzureStackHCI.VmSizeEnum.Default,
 *         },
 *         Location = "West US2",
 *         NetworkProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesNetworkProfileArgs
 *         {
 *             NetworkInterfaces = new[]
 *             {
 *                 new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesNetworkInterfacesArgs
 *                 {
 *                     Id = "test-nic",
 *                 },
 *             },
 *         },
 *         OsProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesOsProfileArgs
 *         {
 *             AdminPassword = "password",
 *             AdminUsername = "localadmin",
 *             ComputerName = "luamaster",
 *         },
 *         ResourceGroupName = "test-rg",
 *         SecurityProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesSecurityProfileArgs
 *         {
 *             EnableTPM = true,
 *             UefiSettings = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesUefiSettingsArgs
 *             {
 *                 SecureBootEnabled = true,
 *             },
 *         },
 *         StorageProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesStorageProfileArgs
 *         {
 *             ImageReference = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesImageReferenceArgs
 *             {
 *                 Id = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image",
 *             },
 *             VmConfigStoragePathId = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container",
 *         },
 *         VirtualMachineName = "test-vm",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurestackhci.NewVirtualMachine(ctx, "virtualMachine", &azurestackhci.VirtualMachineArgs{
 * 			ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
 * 				Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
 * 				Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
 * 			},
 * 			HardwareProfile: &azurestackhci.VirtualMachinePropertiesHardwareProfileArgs{
 * 				VmSize: pulumi.String(azurestackhci.VmSizeEnumDefault),
 * 			},
 * 			Location: pulumi.String("West US2"),
 * 			NetworkProfile: &azurestackhci.VirtualMachinePropertiesNetworkProfileArgs{
 * 				NetworkInterfaces: azurestackhci.VirtualMachinePropertiesNetworkInterfacesArray{
 * 					&azurestackhci.VirtualMachinePropertiesNetworkInterfacesArgs{
 * 						Id: pulumi.String("test-nic"),
 * 					},
 * 				},
 * 			},
 * 			OsProfile: &azurestackhci.VirtualMachinePropertiesOsProfileArgs{
 * 				AdminPassword: pulumi.String("password"),
 * 				AdminUsername: pulumi.String("localadmin"),
 * 				ComputerName:  pulumi.String("luamaster"),
 * 			},
 * 			ResourceGroupName: pulumi.String("test-rg"),
 * 			SecurityProfile: &azurestackhci.VirtualMachinePropertiesSecurityProfileArgs{
 * 				EnableTPM: pulumi.Bool(true),
 * 				UefiSettings: &azurestackhci.VirtualMachinePropertiesUefiSettingsArgs{
 * 					SecureBootEnabled: pulumi.Bool(true),
 * 				},
 * 			},
 * 			StorageProfile: &azurestackhci.VirtualMachinePropertiesStorageProfileArgs{
 * 				ImageReference: &azurestackhci.VirtualMachinePropertiesImageReferenceArgs{
 * 					Id: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image"),
 * 				},
 * 				VmConfigStoragePathId: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
 * 			},
 * 			VirtualMachineName: pulumi.String("test-vm"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.azurestackhci.VirtualMachine;
 * import com.pulumi.azurenative.azurestackhci.VirtualMachineArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesHardwareProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesNetworkProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesOsProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesSecurityProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesUefiSettingsArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesStorageProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesImageReferenceArgs;
 * 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/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
 *                 .type("CustomLocation")
 *                 .build())
 *             .hardwareProfile(VirtualMachinePropertiesHardwareProfileArgs.builder()
 *                 .vmSize("Default")
 *                 .build())
 *             .location("West US2")
 *             .networkProfile(VirtualMachinePropertiesNetworkProfileArgs.builder()
 *                 .networkInterfaces(VirtualMachinePropertiesNetworkInterfacesArgs.builder()
 *                     .id("test-nic")
 *                     .build())
 *                 .build())
 *             .osProfile(VirtualMachinePropertiesOsProfileArgs.builder()
 *                 .adminPassword("password")
 *                 .adminUsername("localadmin")
 *                 .computerName("luamaster")
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .securityProfile(VirtualMachinePropertiesSecurityProfileArgs.builder()
 *                 .enableTPM(true)
 *                 .uefiSettings(VirtualMachinePropertiesUefiSettingsArgs.builder()
 *                     .secureBootEnabled(true)
 *                     .build())
 *                 .build())
 *             .storageProfile(VirtualMachinePropertiesStorageProfileArgs.builder()
 *                 .imageReference(VirtualMachinePropertiesImageReferenceArgs.builder()
 *                     .id("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/marketplaceGalleryImages/test-marketplace-gallery-image")
 *                     .build())
 *                 .vmConfigStoragePathId("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")
 *                 .build())
 *             .virtualMachineName("test-vm")
 *             .build());
 *     }
 * }
 * ```
 * ### PutVirtualMachineWithOsDisk
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachine = new AzureNative.AzureStackHCI.VirtualMachine("virtualMachine", new()
 *     {
 *         ExtendedLocation = new AzureNative.AzureStackHCI.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location",
 *             Type = AzureNative.AzureStackHCI.ExtendedLocationTypes.CustomLocation,
 *         },
 *         HardwareProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesHardwareProfileArgs
 *         {
 *             VmSize = AzureNative.AzureStackHCI.VmSizeEnum.Default,
 *         },
 *         Location = "West US2",
 *         NetworkProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesNetworkProfileArgs
 *         {
 *             NetworkInterfaces = new[]
 *             {
 *                 new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesNetworkInterfacesArgs
 *                 {
 *                     Id = "test-nic",
 *                 },
 *             },
 *         },
 *         ResourceGroupName = "test-rg",
 *         SecurityProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesSecurityProfileArgs
 *         {
 *             EnableTPM = true,
 *             UefiSettings = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesUefiSettingsArgs
 *             {
 *                 SecureBootEnabled = true,
 *             },
 *         },
 *         StorageProfile = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesStorageProfileArgs
 *         {
 *             OsDisk = new AzureNative.AzureStackHCI.Inputs.VirtualMachinePropertiesOsDiskArgs
 *             {
 *                 Id = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd",
 *             },
 *             VmConfigStoragePathId = "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container",
 *         },
 *         VirtualMachineName = "test-vm",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurestackhci.NewVirtualMachine(ctx, "virtualMachine", &azurestackhci.VirtualMachineArgs{
 * 			ExtendedLocation: &azurestackhci.ExtendedLocationArgs{
 * 				Name: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location"),
 * 				Type: pulumi.String(azurestackhci.ExtendedLocationTypesCustomLocation),
 * 			},
 * 			HardwareProfile: &azurestackhci.VirtualMachinePropertiesHardwareProfileArgs{
 * 				VmSize: pulumi.String(azurestackhci.VmSizeEnumDefault),
 * 			},
 * 			Location: pulumi.String("West US2"),
 * 			NetworkProfile: &azurestackhci.VirtualMachinePropertiesNetworkProfileArgs{
 * 				NetworkInterfaces: azurestackhci.VirtualMachinePropertiesNetworkInterfacesArray{
 * 					&azurestackhci.VirtualMachinePropertiesNetworkInterfacesArgs{
 * 						Id: pulumi.String("test-nic"),
 * 					},
 * 				},
 * 			},
 * 			ResourceGroupName: pulumi.String("test-rg"),
 * 			SecurityProfile: &azurestackhci.VirtualMachinePropertiesSecurityProfileArgs{
 * 				EnableTPM: pulumi.Bool(true),
 * 				UefiSettings: &azurestackhci.VirtualMachinePropertiesUefiSettingsArgs{
 * 					SecureBootEnabled: pulumi.Bool(true),
 * 				},
 * 			},
 * 			StorageProfile: &azurestackhci.VirtualMachinePropertiesStorageProfileArgs{
 * 				OsDisk: &azurestackhci.VirtualMachinePropertiesOsDiskArgs{
 * 					Id: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd"),
 * 				},
 * 				VmConfigStoragePathId: pulumi.String("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container"),
 * 			},
 * 			VirtualMachineName: pulumi.String("test-vm"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		return nil
 * 	})
 * }
 * ```
 * ```java
 * package generated_program;
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azurenative.azurestackhci.VirtualMachine;
 * import com.pulumi.azurenative.azurestackhci.VirtualMachineArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesHardwareProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesNetworkProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesSecurityProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesUefiSettingsArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesStorageProfileArgs;
 * import com.pulumi.azurenative.azurestackhci.inputs.VirtualMachinePropertiesOsDiskArgs;
 * 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/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location")
 *                 .type("CustomLocation")
 *                 .build())
 *             .hardwareProfile(VirtualMachinePropertiesHardwareProfileArgs.builder()
 *                 .vmSize("Default")
 *                 .build())
 *             .location("West US2")
 *             .networkProfile(VirtualMachinePropertiesNetworkProfileArgs.builder()
 *                 .networkInterfaces(VirtualMachinePropertiesNetworkInterfacesArgs.builder()
 *                     .id("test-nic")
 *                     .build())
 *                 .build())
 *             .resourceGroupName("test-rg")
 *             .securityProfile(VirtualMachinePropertiesSecurityProfileArgs.builder()
 *                 .enableTPM(true)
 *                 .uefiSettings(VirtualMachinePropertiesUefiSettingsArgs.builder()
 *                     .secureBootEnabled(true)
 *                     .build())
 *                 .build())
 *             .storageProfile(VirtualMachinePropertiesStorageProfileArgs.builder()
 *                 .osDisk(VirtualMachinePropertiesOsDiskArgs.builder()
 *                     .id("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/virtualHardDisks/test-vhd")
 *                     .build())
 *                 .vmConfigStoragePathId("/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storageContainers/test-container")
 *                 .build())
 *             .virtualMachineName("test-vm")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:azurestackhci:VirtualMachine myresource1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/virtualMachines/{virtualMachineName}
 * ```
 * @property extendedLocation The extendedLocation of the resource.
 * @property hardwareProfile HardwareProfile - Specifies the hardware settings for the virtual machine.
 * @property identity Identity for the resource.
 * @property location The geo-location where the resource lives
 * @property networkProfile NetworkProfile - describes the network configuration the virtual machine
 * @property osProfile OsProfile - describes the configuration of the operating system and sets login data
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property securityProfile SecurityProfile - Specifies the security settings for the virtual machine.
 * @property storageProfile StorageProfile - contains information about the disks and storage information for the virtual machine
 * @property tags Resource tags.
 * @property virtualMachineName Name of the virtual machine
 */
public data class VirtualMachineArgs(
    public val extendedLocation: Output? = null,
    public val hardwareProfile: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val networkProfile: Output? = null,
    public val osProfile: Output? = null,
    public val resourceGroupName: Output? = null,
    public val securityProfile: Output? = null,
    public val storageProfile: Output? = null,
    public val tags: Output>? = null,
    public val virtualMachineName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.azurestackhci.VirtualMachineArgs =
        com.pulumi.azurenative.azurestackhci.VirtualMachineArgs.builder()
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .hardwareProfile(hardwareProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .networkProfile(networkProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .osProfile(osProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .securityProfile(securityProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .storageProfile(storageProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualMachineName(virtualMachineName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [VirtualMachineArgs].
 */
@PulumiTagMarker
public class VirtualMachineArgsBuilder internal constructor() {
    private var extendedLocation: Output? = null

    private var hardwareProfile: Output? = null

    private var identity: Output? = null

    private var location: Output? = null

    private var networkProfile: Output? = null

    private var osProfile: Output? = null

    private var resourceGroupName: Output? = null

    private var securityProfile: Output? = null

    private var storageProfile: Output? = null

    private var tags: Output>? = null

    private var virtualMachineName: Output? = null

    /**
     * @param value The extendedLocation of the resource.
     */
    @JvmName("yqdujjaenxixkokh")
    public suspend fun extendedLocation(`value`: Output) {
        this.extendedLocation = value
    }

    /**
     * @param value HardwareProfile - Specifies the hardware settings for the virtual machine.
     */
    @JvmName("ryblircfdbttsxrh")
    public suspend fun hardwareProfile(`value`: Output) {
        this.hardwareProfile = value
    }

    /**
     * @param value Identity for the resource.
     */
    @JvmName("sfyymbcninhtxvyb")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("khxpjqbtmqywpfih")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value NetworkProfile - describes the network configuration the virtual machine
     */
    @JvmName("tboocotlbfcdxidu")
    public suspend fun networkProfile(`value`: Output) {
        this.networkProfile = value
    }

    /**
     * @param value OsProfile - describes the configuration of the operating system and sets login data
     */
    @JvmName("prtsqiakdhpdgvib")
    public suspend fun osProfile(`value`: Output) {
        this.osProfile = value
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("iuyfjeeelsorqdtp")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value SecurityProfile - Specifies the security settings for the virtual machine.
     */
    @JvmName("nycxoadxleqofijs")
    public suspend fun securityProfile(`value`: Output) {
        this.securityProfile = value
    }

    /**
     * @param value StorageProfile - contains information about the disks and storage information for the virtual machine
     */
    @JvmName("leueofsmauegiwen")
    public suspend fun storageProfile(`value`: Output) {
        this.storageProfile = value
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("vhrifvuvvrrpkyub")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Name of the virtual machine
     */
    @JvmName("uyafhdolptxvrvig")
    public suspend fun virtualMachineName(`value`: Output) {
        this.virtualMachineName = value
    }

    /**
     * @param value The extendedLocation of the resource.
     */
    @JvmName("roklrbqkfdgucmjv")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument The extendedLocation of the resource.
     */
    @JvmName("sxmpiwneagxuvtxv")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value HardwareProfile - Specifies the hardware settings for the virtual machine.
     */
    @JvmName("mjlrruflmnhisxqo")
    public suspend fun hardwareProfile(`value`: VirtualMachinePropertiesHardwareProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hardwareProfile = mapped
    }

    /**
     * @param argument HardwareProfile - Specifies the hardware settings for the virtual machine.
     */
    @JvmName("uspjddtnodhtydfl")
    public suspend fun hardwareProfile(argument: suspend VirtualMachinePropertiesHardwareProfileArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachinePropertiesHardwareProfileArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.hardwareProfile = mapped
    }

    /**
     * @param value Identity for the resource.
     */
    @JvmName("gwmpcdvfkttngyeb")
    public suspend fun identity(`value`: IdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument Identity for the resource.
     */
    @JvmName("ucqsmolgjxiwmtxq")
    public suspend fun identity(argument: suspend IdentityArgsBuilder.() -> Unit) {
        val toBeMapped = IdentityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("lcxhkxkcnhrbrrof")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value NetworkProfile - describes the network configuration the virtual machine
     */
    @JvmName("jxsrqxgtejjiuats")
    public suspend fun networkProfile(`value`: VirtualMachinePropertiesNetworkProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkProfile = mapped
    }

    /**
     * @param argument NetworkProfile - describes the network configuration the virtual machine
     */
    @JvmName("vorqsocookonxhce")
    public suspend fun networkProfile(argument: suspend VirtualMachinePropertiesNetworkProfileArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachinePropertiesNetworkProfileArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.networkProfile = mapped
    }

    /**
     * @param value OsProfile - describes the configuration of the operating system and sets login data
     */
    @JvmName("hbeipqekbikdcxqd")
    public suspend fun osProfile(`value`: VirtualMachinePropertiesOsProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osProfile = mapped
    }

    /**
     * @param argument OsProfile - describes the configuration of the operating system and sets login data
     */
    @JvmName("cbxaqxegjyagbgbs")
    public suspend fun osProfile(argument: suspend VirtualMachinePropertiesOsProfileArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachinePropertiesOsProfileArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.osProfile = mapped
    }

    /**
     * @param value The name of the resource group. The name is case insensitive.
     */
    @JvmName("lylbwtppiajwpjpe")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value SecurityProfile - Specifies the security settings for the virtual machine.
     */
    @JvmName("jtlxlmporkpssuon")
    public suspend fun securityProfile(`value`: VirtualMachinePropertiesSecurityProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityProfile = mapped
    }

    /**
     * @param argument SecurityProfile - Specifies the security settings for the virtual machine.
     */
    @JvmName("abvfbfgkjmovygxf")
    public suspend fun securityProfile(argument: suspend VirtualMachinePropertiesSecurityProfileArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachinePropertiesSecurityProfileArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.securityProfile = mapped
    }

    /**
     * @param value StorageProfile - contains information about the disks and storage information for the virtual machine
     */
    @JvmName("kbphcorcyediklvs")
    public suspend fun storageProfile(`value`: VirtualMachinePropertiesStorageProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageProfile = mapped
    }

    /**
     * @param argument StorageProfile - contains information about the disks and storage information for the virtual machine
     */
    @JvmName("hucabkkdplmqscwn")
    public suspend fun storageProfile(argument: suspend VirtualMachinePropertiesStorageProfileArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachinePropertiesStorageProfileArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.storageProfile = mapped
    }

    /**
     * @param value Resource tags.
     */
    @JvmName("hporrvthiqcurqiy")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Resource tags.
     */
    @JvmName("dbpioylwdrsbddvb")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Name of the virtual machine
     */
    @JvmName("fskggaqlcxekpllr")
    public suspend fun virtualMachineName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualMachineName = mapped
    }

    internal fun build(): VirtualMachineArgs = VirtualMachineArgs(
        extendedLocation = extendedLocation,
        hardwareProfile = hardwareProfile,
        identity = identity,
        location = location,
        networkProfile = networkProfile,
        osProfile = osProfile,
        resourceGroupName = resourceGroupName,
        securityProfile = securityProfile,
        storageProfile = storageProfile,
        tags = tags,
        virtualMachineName = virtualMachineName,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy