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

com.pulumi.azurenative.scvmm.kotlin.VirtualMachineInstanceArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.scvmm.kotlin

import com.pulumi.azurenative.scvmm.VirtualMachineInstanceArgs.builder
import com.pulumi.azurenative.scvmm.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.ExtendedLocationArgsBuilder
import com.pulumi.azurenative.scvmm.kotlin.inputs.HardwareProfileArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.HardwareProfileArgsBuilder
import com.pulumi.azurenative.scvmm.kotlin.inputs.InfrastructureProfileArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.InfrastructureProfileArgsBuilder
import com.pulumi.azurenative.scvmm.kotlin.inputs.NetworkProfileArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.NetworkProfileArgsBuilder
import com.pulumi.azurenative.scvmm.kotlin.inputs.OsProfileForVMInstanceArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.OsProfileForVMInstanceArgsBuilder
import com.pulumi.azurenative.scvmm.kotlin.inputs.StorageProfileArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.StorageProfileArgsBuilder
import com.pulumi.azurenative.scvmm.kotlin.inputs.VirtualMachineInstancePropertiesAvailabilitySetsArgs
import com.pulumi.azurenative.scvmm.kotlin.inputs.VirtualMachineInstancePropertiesAvailabilitySetsArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Define the virtualMachineInstance.
 * Azure REST API version: 2023-04-01-preview.
 * Other available API versions: 2023-10-07, 2024-06-01.
 * ## Example Usage
 * ### CreateVirtualMachine
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachineInstance = new AzureNative.ScVmm.VirtualMachineInstance("virtualMachineInstance", new()
 *     {
 *         ExtendedLocation = new AzureNative.ScVmm.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso",
 *             Type = "customLocation",
 *         },
 *         HardwareProfile = new AzureNative.ScVmm.Inputs.HardwareProfileArgs
 *         {
 *             CpuCount = 4,
 *             MemoryMB = 4196,
 *         },
 *         InfrastructureProfile = new AzureNative.ScVmm.Inputs.InfrastructureProfileArgs
 *         {
 *             CloudId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/Clouds/HRCloud",
 *             TemplateId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VirtualMachineTemplates/HRVirtualMachineTemplate",
 *             VmmServerId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer",
 *         },
 *         ResourceUri = "subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	scvmm "github.com/pulumi/pulumi-azure-native-sdk/scvmm/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := scvmm.NewVirtualMachineInstance(ctx, "virtualMachineInstance", &scvmm.VirtualMachineInstanceArgs{
 * 			ExtendedLocation: &scvmm.ExtendedLocationArgs{
 * 				Name: pulumi.String("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
 * 				Type: pulumi.String("customLocation"),
 * 			},
 * 			HardwareProfile: &scvmm.HardwareProfileArgs{
 * 				CpuCount: pulumi.Int(4),
 * 				MemoryMB: pulumi.Int(4196),
 * 			},
 * 			InfrastructureProfile: &scvmm.InfrastructureProfileArgs{
 * 				CloudId:     pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/Clouds/HRCloud"),
 * 				TemplateId:  pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VirtualMachineTemplates/HRVirtualMachineTemplate"),
 * 				VmmServerId: pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer"),
 * 			},
 * 			ResourceUri: pulumi.String("subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.HybridCompute/machines/DemoVM"),
 * 		})
 * 		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.scvmm.VirtualMachineInstance;
 * import com.pulumi.azurenative.scvmm.VirtualMachineInstanceArgs;
 * import com.pulumi.azurenative.scvmm.inputs.ExtendedLocationArgs;
 * import com.pulumi.azurenative.scvmm.inputs.HardwareProfileArgs;
 * import com.pulumi.azurenative.scvmm.inputs.InfrastructureProfileArgs;
 * 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()
 *                 .cpuCount(4)
 *                 .memoryMB(4196)
 *                 .build())
 *             .infrastructureProfile(InfrastructureProfileArgs.builder()
 *                 .cloudId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/Clouds/HRCloud")
 *                 .templateId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VirtualMachineTemplates/HRVirtualMachineTemplate")
 *                 .vmmServerId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.SCVMM/VMMServers/ContosoVMMServer")
 *                 .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.
 * ```sh
 * $ pulumi import azure-native:scvmm:VirtualMachineInstance default /{resourceUri}/providers/Microsoft.ScVmm/virtualMachineInstances/default
 * ```
 * @property availabilitySets Availability Sets in vm.
 * @property extendedLocation Gets or sets the extended location.
 * @property hardwareProfile Hardware properties.
 * @property infrastructureProfile Gets the infrastructure profile.
 * @property networkProfile Network properties.
 * @property osProfile OS properties.
 * @property resourceUri The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
 * @property storageProfile Storage properties.
 */
public data class VirtualMachineInstanceArgs(
    public val availabilitySets: Output>? =
        null,
    public val extendedLocation: Output? = null,
    public val hardwareProfile: Output? = null,
    public val infrastructureProfile: Output? = null,
    public val networkProfile: Output? = null,
    public val osProfile: Output? = null,
    public val resourceUri: Output? = null,
    public val storageProfile: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.scvmm.VirtualMachineInstanceArgs =
        com.pulumi.azurenative.scvmm.VirtualMachineInstanceArgs.builder()
            .availabilitySets(
                availabilitySets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .hardwareProfile(hardwareProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .infrastructureProfile(
                infrastructureProfile?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .networkProfile(networkProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .osProfile(osProfile?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceUri(resourceUri?.applyValue({ args0 -> args0 }))
            .storageProfile(
                storageProfile?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [VirtualMachineInstanceArgs].
 */
@PulumiTagMarker
public class VirtualMachineInstanceArgsBuilder internal constructor() {
    private var availabilitySets: Output>? =
        null

    private var extendedLocation: Output? = null

    private var hardwareProfile: Output? = null

    private var infrastructureProfile: Output? = null

    private var networkProfile: Output? = null

    private var osProfile: Output? = null

    private var resourceUri: Output? = null

    private var storageProfile: Output? = null

    /**
     * @param value Availability Sets in vm.
     */
    @JvmName("hfeqxbfhxuunwder")
    public suspend fun availabilitySets(`value`: Output>) {
        this.availabilitySets = value
    }

    @JvmName("yjruymnlbfjfalxx")
    public suspend fun availabilitySets(vararg values: Output) {
        this.availabilitySets = Output.all(values.asList())
    }

    /**
     * @param values Availability Sets in vm.
     */
    @JvmName("iryauodbvcagcwnb")
    public suspend fun availabilitySets(values: List>) {
        this.availabilitySets = Output.all(values)
    }

    /**
     * @param value Gets or sets the extended location.
     */
    @JvmName("xxitjncsneqguqop")
    public suspend fun extendedLocation(`value`: Output) {
        this.extendedLocation = value
    }

    /**
     * @param value Hardware properties.
     */
    @JvmName("iolhjdccnjsxpuwk")
    public suspend fun hardwareProfile(`value`: Output) {
        this.hardwareProfile = value
    }

    /**
     * @param value Gets the infrastructure profile.
     */
    @JvmName("ftetqsrjibvmmlxm")
    public suspend fun infrastructureProfile(`value`: Output) {
        this.infrastructureProfile = value
    }

    /**
     * @param value Network properties.
     */
    @JvmName("oxptgcklijwxxwgw")
    public suspend fun networkProfile(`value`: Output) {
        this.networkProfile = value
    }

    /**
     * @param value OS properties.
     */
    @JvmName("tapyjuxmbjobnccl")
    public suspend fun osProfile(`value`: Output) {
        this.osProfile = value
    }

    /**
     * @param value The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
     */
    @JvmName("snelbtvqjkjswaoc")
    public suspend fun resourceUri(`value`: Output) {
        this.resourceUri = value
    }

    /**
     * @param value Storage properties.
     */
    @JvmName("vivekypyhkduknkg")
    public suspend fun storageProfile(`value`: Output) {
        this.storageProfile = value
    }

    /**
     * @param value Availability Sets in vm.
     */
    @JvmName("ggloqtwwxehswuxb")
    public suspend fun availabilitySets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availabilitySets = mapped
    }

    /**
     * @param argument Availability Sets in vm.
     */
    @JvmName("vovkmhsalvkevrtb")
    public suspend fun availabilitySets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            VirtualMachineInstancePropertiesAvailabilitySetsArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.availabilitySets = mapped
    }

    /**
     * @param argument Availability Sets in vm.
     */
    @JvmName("ohyajqihhimvyddr")
    public suspend fun availabilitySets(vararg argument: suspend VirtualMachineInstancePropertiesAvailabilitySetsArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            VirtualMachineInstancePropertiesAvailabilitySetsArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.availabilitySets = mapped
    }

    /**
     * @param argument Availability Sets in vm.
     */
    @JvmName("fxvynxmopngbnakq")
    public suspend fun availabilitySets(argument: suspend VirtualMachineInstancePropertiesAvailabilitySetsArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                VirtualMachineInstancePropertiesAvailabilitySetsArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.availabilitySets = mapped
    }

    /**
     * @param values Availability Sets in vm.
     */
    @JvmName("siwxyllnjclqvmnt")
    public suspend fun availabilitySets(vararg values: VirtualMachineInstancePropertiesAvailabilitySetsArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.availabilitySets = mapped
    }

    /**
     * @param value Gets or sets the extended location.
     */
    @JvmName("buwtmhligkvbiwov")
    public suspend fun extendedLocation(`value`: ExtendedLocationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.extendedLocation = mapped
    }

    /**
     * @param argument Gets or sets the extended location.
     */
    @JvmName("mixdwbrxghkbnmve")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value Hardware properties.
     */
    @JvmName("sekoqmiglikngveh")
    public suspend fun hardwareProfile(`value`: HardwareProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hardwareProfile = mapped
    }

    /**
     * @param argument Hardware properties.
     */
    @JvmName("vpsvalgnvbaecrsp")
    public suspend fun hardwareProfile(argument: suspend HardwareProfileArgsBuilder.() -> Unit) {
        val toBeMapped = HardwareProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.hardwareProfile = mapped
    }

    /**
     * @param value Gets the infrastructure profile.
     */
    @JvmName("domickmlnpwedgwi")
    public suspend fun infrastructureProfile(`value`: InfrastructureProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.infrastructureProfile = mapped
    }

    /**
     * @param argument Gets the infrastructure profile.
     */
    @JvmName("syydxuaxhwbvmytu")
    public suspend fun infrastructureProfile(argument: suspend InfrastructureProfileArgsBuilder.() -> Unit) {
        val toBeMapped = InfrastructureProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.infrastructureProfile = mapped
    }

    /**
     * @param value Network properties.
     */
    @JvmName("thxgdiktpsdtdvfr")
    public suspend fun networkProfile(`value`: NetworkProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkProfile = mapped
    }

    /**
     * @param argument Network properties.
     */
    @JvmName("jxwjneixemiuhfdb")
    public suspend fun networkProfile(argument: suspend NetworkProfileArgsBuilder.() -> Unit) {
        val toBeMapped = NetworkProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.networkProfile = mapped
    }

    /**
     * @param value OS properties.
     */
    @JvmName("xfwmintlqglotkiy")
    public suspend fun osProfile(`value`: OsProfileForVMInstanceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.osProfile = mapped
    }

    /**
     * @param argument OS properties.
     */
    @JvmName("dfbcomkuprtwbkpt")
    public suspend fun osProfile(argument: suspend OsProfileForVMInstanceArgsBuilder.() -> Unit) {
        val toBeMapped = OsProfileForVMInstanceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.osProfile = mapped
    }

    /**
     * @param value The fully qualified Azure Resource manager identifier of the Hybrid Compute machine resource to be extended.
     */
    @JvmName("cvabdxmkhuljevtk")
    public suspend fun resourceUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceUri = mapped
    }

    /**
     * @param value Storage properties.
     */
    @JvmName("hbruxdhfvkhjnnbp")
    public suspend fun storageProfile(`value`: StorageProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageProfile = mapped
    }

    /**
     * @param argument Storage properties.
     */
    @JvmName("mxcyonmvsgbaugeg")
    public suspend fun storageProfile(argument: suspend StorageProfileArgsBuilder.() -> Unit) {
        val toBeMapped = StorageProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.storageProfile = mapped
    }

    internal fun build(): VirtualMachineInstanceArgs = VirtualMachineInstanceArgs(
        availabilitySets = availabilitySets,
        extendedLocation = extendedLocation,
        hardwareProfile = hardwareProfile,
        infrastructureProfile = infrastructureProfile,
        networkProfile = networkProfile,
        osProfile = osProfile,
        resourceUri = resourceUri,
        storageProfile = storageProfile,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy