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

com.pulumi.azurenative.connectedvmwarevsphere.kotlin.VirtualMachineTemplateArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.connectedvmwarevsphere.kotlin

import com.pulumi.azurenative.connectedvmwarevsphere.VirtualMachineTemplateArgs.builder
import com.pulumi.azurenative.connectedvmwarevsphere.kotlin.inputs.ExtendedLocationArgs
import com.pulumi.azurenative.connectedvmwarevsphere.kotlin.inputs.ExtendedLocationArgsBuilder
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

/**
 * Define the virtualMachineTemplate.
 * 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, 2023-10-01, 2023-12-01.
 * ## Example Usage
 * ### CreateVirtualMachineTemplate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var virtualMachineTemplate = new AzureNative.ConnectedVMwarevSphere.VirtualMachineTemplate("virtualMachineTemplate", new()
 *     {
 *         ExtendedLocation = new AzureNative.ConnectedVMwarevSphere.Inputs.ExtendedLocationArgs
 *         {
 *             Name = "/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso",
 *             Type = "customLocation",
 *         },
 *         Location = "East US",
 *         MoRefId = "aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
 *         ResourceGroupName = "testrg",
 *         VCenterId = "/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter",
 *         VirtualMachineTemplateName = "WebFrontEndTemplate",
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	connectedvmwarevsphere "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.NewVirtualMachineTemplate(ctx, "virtualMachineTemplate", &connectedvmwarevsphere.VirtualMachineTemplateArgs{
 * 			ExtendedLocation: &connectedvmwarevsphere.ExtendedLocationArgs{
 * 				Name: pulumi.String("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso"),
 * 				Type: pulumi.String("customLocation"),
 * 			},
 * 			Location:                   pulumi.String("East US"),
 * 			MoRefId:                    pulumi.String("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"),
 * 			ResourceGroupName:          pulumi.String("testrg"),
 * 			VCenterId:                  pulumi.String("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter"),
 * 			VirtualMachineTemplateName: pulumi.String("WebFrontEndTemplate"),
 * 		})
 * 		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.connectedvmwarevsphere.VirtualMachineTemplate;
 * import com.pulumi.azurenative.connectedvmwarevsphere.VirtualMachineTemplateArgs;
 * import com.pulumi.azurenative.connectedvmwarevsphere.inputs.ExtendedLocationArgs;
 * 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 virtualMachineTemplate = new VirtualMachineTemplate("virtualMachineTemplate", VirtualMachineTemplateArgs.builder()
 *             .extendedLocation(ExtendedLocationArgs.builder()
 *                 .name("/subscriptions/a5015e1c-867f-4533-8541-85cd470d0cfb/resourceGroups/demoRG/providers/Microsoft.ExtendedLocation/customLocations/contoso")
 *                 .type("customLocation")
 *                 .build())
 *             .location("East US")
 *             .moRefId("aaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
 *             .resourceGroupName("testrg")
 *             .vCenterId("/subscriptions/fd3c3665-1729-4b7b-9a38-238e83b0f98b/resourceGroups/testrg/providers/Microsoft.ConnectedVMwarevSphere/VCenters/ContosoVCenter")
 *             .virtualMachineTemplateName("WebFrontEndTemplate")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:connectedvmwarevsphere:VirtualMachineTemplate WebFrontEndTemplate /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ConnectedVMwarevSphere/virtualMachineTemplates/{virtualMachineTemplateName}
 * ```
 * @property extendedLocation Gets or sets the extended location.
 * @property inventoryItemId Gets or sets the inventory Item ID for the virtual machine template.
 * @property kind 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.
 * @property location Gets or sets the location.
 * @property moRefId Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine
 * template.
 * @property resourceGroupName The Resource Group Name.
 * @property tags Gets or sets the Resource tags.
 * @property vCenterId Gets or sets the ARM Id of the vCenter resource in which this template resides.
 * @property virtualMachineTemplateName Name of the virtual machine template resource.
 */
public data class VirtualMachineTemplateArgs(
    public val extendedLocation: Output? = null,
    public val inventoryItemId: Output? = null,
    public val kind: Output? = null,
    public val location: Output? = null,
    public val moRefId: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
    public val vCenterId: Output? = null,
    public val virtualMachineTemplateName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.connectedvmwarevsphere.VirtualMachineTemplateArgs =
        com.pulumi.azurenative.connectedvmwarevsphere.VirtualMachineTemplateArgs.builder()
            .extendedLocation(extendedLocation?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .inventoryItemId(inventoryItemId?.applyValue({ args0 -> args0 }))
            .kind(kind?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .moRefId(moRefId?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .vCenterId(vCenterId?.applyValue({ args0 -> args0 }))
            .virtualMachineTemplateName(virtualMachineTemplateName?.applyValue({ args0 -> args0 })).build()
}

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

    private var inventoryItemId: Output? = null

    private var kind: Output? = null

    private var location: Output? = null

    private var moRefId: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    private var vCenterId: Output? = null

    private var virtualMachineTemplateName: Output? = null

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

    /**
     * @param value Gets or sets the inventory Item ID for the virtual machine template.
     */
    @JvmName("jgrvrnknnfdxkkna")
    public suspend fun inventoryItemId(`value`: Output) {
        this.inventoryItemId = value
    }

    /**
     * @param value 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.
     */
    @JvmName("tuhvppulyrhbtdbg")
    public suspend fun kind(`value`: Output) {
        this.kind = value
    }

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

    /**
     * @param value Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine
     * template.
     */
    @JvmName("yvtnhkvclnoakbcv")
    public suspend fun moRefId(`value`: Output) {
        this.moRefId = value
    }

    /**
     * @param value The Resource Group Name.
     */
    @JvmName("sdrolsmcsjaurmmx")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Gets or sets the Resource tags.
     */
    @JvmName("oramypmntpwwreuj")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Gets or sets the ARM Id of the vCenter resource in which this template resides.
     */
    @JvmName("yexwacnvkkxrjviu")
    public suspend fun vCenterId(`value`: Output) {
        this.vCenterId = value
    }

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

    /**
     * @param value Gets or sets the extended location.
     */
    @JvmName("lshskcpaacywlygi")
    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("pjxpaygdilvdgpbi")
    public suspend fun extendedLocation(argument: suspend ExtendedLocationArgsBuilder.() -> Unit) {
        val toBeMapped = ExtendedLocationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.extendedLocation = mapped
    }

    /**
     * @param value Gets or sets the inventory Item ID for the virtual machine template.
     */
    @JvmName("anemhrbdyyyhwqqp")
    public suspend fun inventoryItemId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inventoryItemId = mapped
    }

    /**
     * @param value 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.
     */
    @JvmName("dcctryvmkpqcmiar")
    public suspend fun kind(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kind = mapped
    }

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

    /**
     * @param value Gets or sets the vCenter MoRef (Managed Object Reference) ID for the virtual machine
     * template.
     */
    @JvmName("gufmgkhlfoieqakc")
    public suspend fun moRefId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.moRefId = mapped
    }

    /**
     * @param value The Resource Group Name.
     */
    @JvmName("pfraivhqiehdmddu")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

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

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

    /**
     * @param value Gets or sets the ARM Id of the vCenter resource in which this template resides.
     */
    @JvmName("mjywtwojticmlpeq")
    public suspend fun vCenterId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vCenterId = mapped
    }

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

    internal fun build(): VirtualMachineTemplateArgs = VirtualMachineTemplateArgs(
        extendedLocation = extendedLocation,
        inventoryItemId = inventoryItemId,
        kind = kind,
        location = location,
        moRefId = moRefId,
        resourceGroupName = resourceGroupName,
        tags = tags,
        vCenterId = vCenterId,
        virtualMachineTemplateName = virtualMachineTemplateName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy