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

com.pulumi.azurenative.sqlvirtualmachine.kotlin.SqlVirtualMachineGroupArgs.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.sqlvirtualmachine.kotlin

import com.pulumi.azurenative.sqlvirtualmachine.SqlVirtualMachineGroupArgs.builder
import com.pulumi.azurenative.sqlvirtualmachine.kotlin.enums.SqlVmGroupImageSku
import com.pulumi.azurenative.sqlvirtualmachine.kotlin.inputs.WsfcDomainProfileArgs
import com.pulumi.azurenative.sqlvirtualmachine.kotlin.inputs.WsfcDomainProfileArgsBuilder
import com.pulumi.core.Either
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

/**
 * A SQL virtual machine group.
 * Azure REST API version: 2022-02-01. Prior API version in Azure Native 1.x: 2017-03-01-preview.
 * Other available API versions: 2023-01-01-preview, 2023-10-01.
 * ## Example Usage
 * ### Creates or updates a SQL virtual machine group.
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var sqlVirtualMachineGroup = new AzureNative.SqlVirtualMachine.SqlVirtualMachineGroup("sqlVirtualMachineGroup", new()
 *     {
 *         Location = "northeurope",
 *         ResourceGroupName = "testrg",
 *         SqlImageOffer = "SQL2016-WS2016",
 *         SqlImageSku = AzureNative.SqlVirtualMachine.SqlVmGroupImageSku.Enterprise,
 *         SqlVirtualMachineGroupName = "testvmgroup",
 *         Tags =
 *         {
 *             { "mytag", "myval" },
 *         },
 *         WsfcDomainProfile = new AzureNative.SqlVirtualMachine.Inputs.WsfcDomainProfileArgs
 *         {
 *             ClusterBootstrapAccount = "testrpadmin",
 *             ClusterOperatorAccount = "[email protected]",
 *             ClusterSubnetType = AzureNative.SqlVirtualMachine.ClusterSubnetType.MultiSubnet,
 *             DomainFqdn = "testdomain.com",
 *             OuPath = "OU=WSCluster,DC=testdomain,DC=com",
 *             SqlServiceAccount = "[email protected]",
 *             StorageAccountPrimaryKey = "",
 *             StorageAccountUrl = "https://storgact.blob.core.windows.net/",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	sqlvirtualmachine "github.com/pulumi/pulumi-azure-native-sdk/sqlvirtualmachine/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := sqlvirtualmachine.NewSqlVirtualMachineGroup(ctx, "sqlVirtualMachineGroup", &sqlvirtualmachine.SqlVirtualMachineGroupArgs{
 * 			Location:                   pulumi.String("northeurope"),
 * 			ResourceGroupName:          pulumi.String("testrg"),
 * 			SqlImageOffer:              pulumi.String("SQL2016-WS2016"),
 * 			SqlImageSku:                pulumi.String(sqlvirtualmachine.SqlVmGroupImageSkuEnterprise),
 * 			SqlVirtualMachineGroupName: pulumi.String("testvmgroup"),
 * 			Tags: pulumi.StringMap{
 * 				"mytag": pulumi.String("myval"),
 * 			},
 * 			WsfcDomainProfile: &sqlvirtualmachine.WsfcDomainProfileArgs{
 * 				ClusterBootstrapAccount:  pulumi.String("testrpadmin"),
 * 				ClusterOperatorAccount:   pulumi.String("[email protected]"),
 * 				ClusterSubnetType:        pulumi.String(sqlvirtualmachine.ClusterSubnetTypeMultiSubnet),
 * 				DomainFqdn:               pulumi.String("testdomain.com"),
 * 				OuPath:                   pulumi.String("OU=WSCluster,DC=testdomain,DC=com"),
 * 				SqlServiceAccount:        pulumi.String("[email protected]"),
 * 				StorageAccountPrimaryKey: pulumi.String(""),
 * 				StorageAccountUrl:        pulumi.String("https://storgact.blob.core.windows.net/"),
 * 			},
 * 		})
 * 		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.sqlvirtualmachine.SqlVirtualMachineGroup;
 * import com.pulumi.azurenative.sqlvirtualmachine.SqlVirtualMachineGroupArgs;
 * import com.pulumi.azurenative.sqlvirtualmachine.inputs.WsfcDomainProfileArgs;
 * 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 sqlVirtualMachineGroup = new SqlVirtualMachineGroup("sqlVirtualMachineGroup", SqlVirtualMachineGroupArgs.builder()
 *             .location("northeurope")
 *             .resourceGroupName("testrg")
 *             .sqlImageOffer("SQL2016-WS2016")
 *             .sqlImageSku("Enterprise")
 *             .sqlVirtualMachineGroupName("testvmgroup")
 *             .tags(Map.of("mytag", "myval"))
 *             .wsfcDomainProfile(WsfcDomainProfileArgs.builder()
 *                 .clusterBootstrapAccount("testrpadmin")
 *                 .clusterOperatorAccount("[email protected]")
 *                 .clusterSubnetType("MultiSubnet")
 *                 .domainFqdn("testdomain.com")
 *                 .ouPath("OU=WSCluster,DC=testdomain,DC=com")
 *                 .sqlServiceAccount("[email protected]")
 *                 .storageAccountPrimaryKey("")
 *                 .storageAccountUrl("https://storgact.blob.core.windows.net/")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:sqlvirtualmachine:SqlVirtualMachineGroup testvmgroup /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/{sqlVirtualMachineGroupName}
 * ```
 * @property location Resource location.
 * @property resourceGroupName Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
 * @property sqlImageOffer SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
 * @property sqlImageSku SQL image sku.
 * @property sqlVirtualMachineGroupName Name of the SQL virtual machine group.
 * @property tags Resource tags.
 * @property wsfcDomainProfile Cluster Active Directory domain profile.
 */
public data class SqlVirtualMachineGroupArgs(
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sqlImageOffer: Output? = null,
    public val sqlImageSku: Output>? = null,
    public val sqlVirtualMachineGroupName: Output? = null,
    public val tags: Output>? = null,
    public val wsfcDomainProfile: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.sqlvirtualmachine.SqlVirtualMachineGroupArgs =
        com.pulumi.azurenative.sqlvirtualmachine.SqlVirtualMachineGroupArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sqlImageOffer(sqlImageOffer?.applyValue({ args0 -> args0 }))
            .sqlImageSku(
                sqlImageSku?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .sqlVirtualMachineGroupName(sqlVirtualMachineGroupName?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .wsfcDomainProfile(
                wsfcDomainProfile?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [SqlVirtualMachineGroupArgs].
 */
@PulumiTagMarker
public class SqlVirtualMachineGroupArgsBuilder internal constructor() {
    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var sqlImageOffer: Output? = null

    private var sqlImageSku: Output>? = null

    private var sqlVirtualMachineGroupName: Output? = null

    private var tags: Output>? = null

    private var wsfcDomainProfile: Output? = null

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

    /**
     * @param value Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     */
    @JvmName("fvkixxrysnovcbgu")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
     */
    @JvmName("qdxtkcafmbnkxybk")
    public suspend fun sqlImageOffer(`value`: Output) {
        this.sqlImageOffer = value
    }

    /**
     * @param value SQL image sku.
     */
    @JvmName("gymecbmdckqnrukw")
    public suspend fun sqlImageSku(`value`: Output>) {
        this.sqlImageSku = value
    }

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

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

    /**
     * @param value Cluster Active Directory domain profile.
     */
    @JvmName("flcrrguoojpihqdw")
    public suspend fun wsfcDomainProfile(`value`: Output) {
        this.wsfcDomainProfile = value
    }

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

    /**
     * @param value Name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
     */
    @JvmName("jplejlwfjymxhutq")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value SQL image offer. Examples may include SQL2016-WS2016, SQL2017-WS2016.
     */
    @JvmName("yvwhlycmkuuvcxib")
    public suspend fun sqlImageOffer(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlImageOffer = mapped
    }

    /**
     * @param value SQL image sku.
     */
    @JvmName("xsxtjesacuecgdyh")
    public suspend fun sqlImageSku(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlImageSku = mapped
    }

    /**
     * @param value SQL image sku.
     */
    @JvmName("pxjcxrldvofjkuhg")
    public fun sqlImageSku(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sqlImageSku = mapped
    }

    /**
     * @param value SQL image sku.
     */
    @JvmName("lmunerailvpnxfmd")
    public fun sqlImageSku(`value`: SqlVmGroupImageSku) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.sqlImageSku = mapped
    }

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

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

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

    /**
     * @param value Cluster Active Directory domain profile.
     */
    @JvmName("mxdjgodxhogcvysw")
    public suspend fun wsfcDomainProfile(`value`: WsfcDomainProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.wsfcDomainProfile = mapped
    }

    /**
     * @param argument Cluster Active Directory domain profile.
     */
    @JvmName("gtatuifptjidupcb")
    public suspend fun wsfcDomainProfile(argument: suspend WsfcDomainProfileArgsBuilder.() -> Unit) {
        val toBeMapped = WsfcDomainProfileArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.wsfcDomainProfile = mapped
    }

    internal fun build(): SqlVirtualMachineGroupArgs = SqlVirtualMachineGroupArgs(
        location = location,
        resourceGroupName = resourceGroupName,
        sqlImageOffer = sqlImageOffer,
        sqlImageSku = sqlImageSku,
        sqlVirtualMachineGroupName = sqlVirtualMachineGroupName,
        tags = tags,
        wsfcDomainProfile = wsfcDomainProfile,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy