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

com.pulumi.azure.mssql.kotlin.VirtualMachineGroupArgs.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: 6.21.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.mssql.kotlin

import com.pulumi.azure.mssql.VirtualMachineGroupArgs.builder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineGroupWsfcDomainProfileArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineGroupWsfcDomainProfileArgsBuilder
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

/**
 * Manages a Microsoft SQL Virtual Machine Group.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleVirtualMachineGroup = new azure.mssql.VirtualMachineGroup("example", {
 *     name: "examplegroup",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     sqlImageOffer: "SQL2017-WS2016",
 *     sqlImageSku: "Developer",
 *     wsfcDomainProfile: {
 *         fqdn: "testdomain.com",
 *         clusterSubnetType: "SingleSubnet",
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_virtual_machine_group = azure.mssql.VirtualMachineGroup("example",
 *     name="examplegroup",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     sql_image_offer="SQL2017-WS2016",
 *     sql_image_sku="Developer",
 *     wsfc_domain_profile=azure.mssql.VirtualMachineGroupWsfcDomainProfileArgs(
 *         fqdn="testdomain.com",
 *         cluster_subnet_type="SingleSubnet",
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleVirtualMachineGroup = new Azure.MSSql.VirtualMachineGroup("example", new()
 *     {
 *         Name = "examplegroup",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         SqlImageOffer = "SQL2017-WS2016",
 *         SqlImageSku = "Developer",
 *         WsfcDomainProfile = new Azure.MSSql.Inputs.VirtualMachineGroupWsfcDomainProfileArgs
 *         {
 *             Fqdn = "testdomain.com",
 *             ClusterSubnetType = "SingleSubnet",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/mssql"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = mssql.NewVirtualMachineGroup(ctx, "example", &mssql.VirtualMachineGroupArgs{
 * 			Name:              pulumi.String("examplegroup"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			SqlImageOffer:     pulumi.String("SQL2017-WS2016"),
 * 			SqlImageSku:       pulumi.String("Developer"),
 * 			WsfcDomainProfile: &mssql.VirtualMachineGroupWsfcDomainProfileArgs{
 * 				Fqdn:              pulumi.String("testdomain.com"),
 * 				ClusterSubnetType: pulumi.String("SingleSubnet"),
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.mssql.VirtualMachineGroup;
 * import com.pulumi.azure.mssql.VirtualMachineGroupArgs;
 * import com.pulumi.azure.mssql.inputs.VirtualMachineGroupWsfcDomainProfileArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleVirtualMachineGroup = new VirtualMachineGroup("exampleVirtualMachineGroup", VirtualMachineGroupArgs.builder()
 *             .name("examplegroup")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .sqlImageOffer("SQL2017-WS2016")
 *             .sqlImageSku("Developer")
 *             .wsfcDomainProfile(VirtualMachineGroupWsfcDomainProfileArgs.builder()
 *                 .fqdn("testdomain.com")
 *                 .clusterSubnetType("SingleSubnet")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleVirtualMachineGroup:
 *     type: azure:mssql:VirtualMachineGroup
 *     name: example
 *     properties:
 *       name: examplegroup
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       sqlImageOffer: SQL2017-WS2016
 *       sqlImageSku: Developer
 *       wsfcDomainProfile:
 *         fqdn: testdomain.com
 *         clusterSubnetType: SingleSubnet
 * ```
 * 
 * ## Import
 * Microsoft SQL Virtual Machine Groups can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:mssql/virtualMachineGroup:VirtualMachineGroup example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachineGroups/vmgroup1
 * ```
 * @property location The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
 * @property name The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
 * @property resourceGroupName The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
 * @property sqlImageOffer The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
 * @property sqlImageSku The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
 * @property tags A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
 * @property wsfcDomainProfile A `wsfc_domain_profile` block as defined below.
 */
public data class VirtualMachineGroupArgs(
    public val location: Output? = null,
    public val name: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sqlImageOffer: Output? = null,
    public val sqlImageSku: Output? = null,
    public val tags: Output>? = null,
    public val wsfcDomainProfile: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.mssql.VirtualMachineGroupArgs =
        com.pulumi.azure.mssql.VirtualMachineGroupArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sqlImageOffer(sqlImageOffer?.applyValue({ args0 -> args0 }))
            .sqlImageSku(sqlImageSku?.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 [VirtualMachineGroupArgs].
 */
@PulumiTagMarker
public class VirtualMachineGroupArgsBuilder internal constructor() {
    private var location: Output? = null

    private var name: Output? = null

    private var resourceGroupName: Output? = null

    private var sqlImageOffer: Output? = null

    private var sqlImageSku: Output? = null

    private var tags: Output>? = null

    private var wsfcDomainProfile: Output? = null

    /**
     * @param value The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
     */
    @JvmName("brmecgisdpoyblrs")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
     */
    @JvmName("lmgbuqjlcknfalxj")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
     */
    @JvmName("ekggvwtqpwlfipsk")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
     */
    @JvmName("egruxuiaftqeabqe")
    public suspend fun sqlImageOffer(`value`: Output) {
        this.sqlImageOffer = value
    }

    /**
     * @param value The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
     */
    @JvmName("bdhbeekuibjebidd")
    public suspend fun sqlImageSku(`value`: Output) {
        this.sqlImageSku = value
    }

    /**
     * @param value A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
     */
    @JvmName("rkrqulepmwtugoxm")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A `wsfc_domain_profile` block as defined below.
     */
    @JvmName("exnarnnyxweayljg")
    public suspend fun wsfcDomainProfile(`value`: Output) {
        this.wsfcDomainProfile = value
    }

    /**
     * @param value The Azure Region where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
     */
    @JvmName("dvvomvhltjwxidqx")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The name which should be used for the Microsoft SQL Virtual Machine Group. Changing this forces a new resource to be created.
     */
    @JvmName("cmiktrqhrjvewgyh")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The name of the Resource Group where the Microsoft SQL Virtual Machine Group should exist. Changing this forces a new resource to be created.
     */
    @JvmName("vhgxsxpmbystdeii")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The offer type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Changing this forces a new resource to be created.
     */
    @JvmName("utufkbodyfgfweut")
    public suspend fun sqlImageOffer(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlImageOffer = mapped
    }

    /**
     * @param value The sku type of the marketplace image cluster to be used by the SQL Virtual Machine Group. Possible values are `Developer` and `Enterprise`.
     */
    @JvmName("yqyswpknhvtqddnl")
    public suspend fun sqlImageSku(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlImageSku = mapped
    }

    /**
     * @param value A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
     */
    @JvmName("ofrfnqbmphbbmytx")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values A mapping of tags which should be assigned to the Microsoft SQL Virtual Machine Group.
     */
    @JvmName("khtvfslleseyiira")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A `wsfc_domain_profile` block as defined below.
     */
    @JvmName("fslxbiltdiwudsqg")
    public suspend fun wsfcDomainProfile(`value`: VirtualMachineGroupWsfcDomainProfileArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.wsfcDomainProfile = mapped
    }

    /**
     * @param argument A `wsfc_domain_profile` block as defined below.
     */
    @JvmName("kavbytmqvdwsqtdl")
    public suspend
    fun wsfcDomainProfile(argument: suspend VirtualMachineGroupWsfcDomainProfileArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineGroupWsfcDomainProfileArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.wsfcDomainProfile = mapped
    }

    internal fun build(): VirtualMachineGroupArgs = VirtualMachineGroupArgs(
        location = location,
        name = name,
        resourceGroupName = resourceGroupName,
        sqlImageOffer = sqlImageOffer,
        sqlImageSku = sqlImageSku,
        tags = tags,
        wsfcDomainProfile = wsfcDomainProfile,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy