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

com.pulumi.azure.mssql.kotlin.VirtualMachineArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azure.mssql.kotlin

import com.pulumi.azure.mssql.VirtualMachineArgs.builder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineAssessmentArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineAssessmentArgsBuilder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineAutoBackupArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineAutoBackupArgsBuilder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineAutoPatchingArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineAutoPatchingArgsBuilder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineKeyVaultCredentialArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineKeyVaultCredentialArgsBuilder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineSqlInstanceArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineSqlInstanceArgsBuilder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineStorageConfigurationArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineStorageConfigurationArgsBuilder
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineWsfcDomainCredentialArgs
import com.pulumi.azure.mssql.kotlin.inputs.VirtualMachineWsfcDomainCredentialArgsBuilder
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.Boolean
import kotlin.Int
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
 * ## Example Usage
 * This example provisions a brief Managed Microsoft SQL Virtual Machine.
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = azure.compute.getVirtualMachine({
 *     name: "example-vm",
 *     resourceGroupName: "example-resources",
 * });
 * const exampleVirtualMachine = new azure.mssql.VirtualMachine("example", {
 *     virtualMachineId: example.then(example => example.id),
 *     sqlLicenseType: "PAYG",
 *     rServicesEnabled: true,
 *     sqlConnectivityPort: 1433,
 *     sqlConnectivityType: "PRIVATE",
 *     sqlConnectivityUpdatePassword: "Password1234!",
 *     sqlConnectivityUpdateUsername: "sqllogin",
 *     autoPatching: {
 *         dayOfWeek: "Sunday",
 *         maintenanceWindowDurationInMinutes: 60,
 *         maintenanceWindowStartingHour: 2,
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.compute.get_virtual_machine(name="example-vm",
 *     resource_group_name="example-resources")
 * example_virtual_machine = azure.mssql.VirtualMachine("example",
 *     virtual_machine_id=example.id,
 *     sql_license_type="PAYG",
 *     r_services_enabled=True,
 *     sql_connectivity_port=1433,
 *     sql_connectivity_type="PRIVATE",
 *     sql_connectivity_update_password="Password1234!",
 *     sql_connectivity_update_username="sqllogin",
 *     auto_patching={
 *         "day_of_week": "Sunday",
 *         "maintenance_window_duration_in_minutes": 60,
 *         "maintenance_window_starting_hour": 2,
 *     })
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = Azure.Compute.GetVirtualMachine.Invoke(new()
 *     {
 *         Name = "example-vm",
 *         ResourceGroupName = "example-resources",
 *     });
 *     var exampleVirtualMachine = new Azure.MSSql.VirtualMachine("example", new()
 *     {
 *         VirtualMachineId = example.Apply(getVirtualMachineResult => getVirtualMachineResult.Id),
 *         SqlLicenseType = "PAYG",
 *         RServicesEnabled = true,
 *         SqlConnectivityPort = 1433,
 *         SqlConnectivityType = "PRIVATE",
 *         SqlConnectivityUpdatePassword = "Password1234!",
 *         SqlConnectivityUpdateUsername = "sqllogin",
 *         AutoPatching = new Azure.MSSql.Inputs.VirtualMachineAutoPatchingArgs
 *         {
 *             DayOfWeek = "Sunday",
 *             MaintenanceWindowDurationInMinutes = 60,
 *             MaintenanceWindowStartingHour = 2,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/compute"
 * 	"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 := compute.LookupVirtualMachine(ctx, &compute.LookupVirtualMachineArgs{
 * 			Name:              "example-vm",
 * 			ResourceGroupName: "example-resources",
 * 		}, nil)
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = mssql.NewVirtualMachine(ctx, "example", &mssql.VirtualMachineArgs{
 * 			VirtualMachineId:              pulumi.String(example.Id),
 * 			SqlLicenseType:                pulumi.String("PAYG"),
 * 			RServicesEnabled:              pulumi.Bool(true),
 * 			SqlConnectivityPort:           pulumi.Int(1433),
 * 			SqlConnectivityType:           pulumi.String("PRIVATE"),
 * 			SqlConnectivityUpdatePassword: pulumi.String("Password1234!"),
 * 			SqlConnectivityUpdateUsername: pulumi.String("sqllogin"),
 * 			AutoPatching: &mssql.VirtualMachineAutoPatchingArgs{
 * 				DayOfWeek:                          pulumi.String("Sunday"),
 * 				MaintenanceWindowDurationInMinutes: pulumi.Int(60),
 * 				MaintenanceWindowStartingHour:      pulumi.Int(2),
 * 			},
 * 		})
 * 		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.compute.ComputeFunctions;
 * import com.pulumi.azure.compute.inputs.GetVirtualMachineArgs;
 * import com.pulumi.azure.mssql.VirtualMachine;
 * import com.pulumi.azure.mssql.VirtualMachineArgs;
 * import com.pulumi.azure.mssql.inputs.VirtualMachineAutoPatchingArgs;
 * 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) {
 *         final var example = ComputeFunctions.getVirtualMachine(GetVirtualMachineArgs.builder()
 *             .name("example-vm")
 *             .resourceGroupName("example-resources")
 *             .build());
 *         var exampleVirtualMachine = new VirtualMachine("exampleVirtualMachine", VirtualMachineArgs.builder()
 *             .virtualMachineId(example.applyValue(getVirtualMachineResult -> getVirtualMachineResult.id()))
 *             .sqlLicenseType("PAYG")
 *             .rServicesEnabled(true)
 *             .sqlConnectivityPort(1433)
 *             .sqlConnectivityType("PRIVATE")
 *             .sqlConnectivityUpdatePassword("Password1234!")
 *             .sqlConnectivityUpdateUsername("sqllogin")
 *             .autoPatching(VirtualMachineAutoPatchingArgs.builder()
 *                 .dayOfWeek("Sunday")
 *                 .maintenanceWindowDurationInMinutes(60)
 *                 .maintenanceWindowStartingHour(2)
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   exampleVirtualMachine:
 *     type: azure:mssql:VirtualMachine
 *     name: example
 *     properties:
 *       virtualMachineId: ${example.id}
 *       sqlLicenseType: PAYG
 *       rServicesEnabled: true
 *       sqlConnectivityPort: 1433
 *       sqlConnectivityType: PRIVATE
 *       sqlConnectivityUpdatePassword: Password1234!
 *       sqlConnectivityUpdateUsername: sqllogin
 *       autoPatching:
 *         dayOfWeek: Sunday
 *         maintenanceWindowDurationInMinutes: 60
 *         maintenanceWindowStartingHour: 2
 * variables:
 *   example:
 *     fn::invoke:
 *       Function: azure:compute:getVirtualMachine
 *       Arguments:
 *         name: example-vm
 *         resourceGroupName: example-resources
 * ```
 * 
 * ## Import
 * Microsoft SQL Virtual Machines can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:mssql/virtualMachine:VirtualMachine example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/example1
 * ```
 * @property assessment An `assessment` block as defined below.
 * @property autoBackup An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
 * @property autoPatching An `auto_patching` block as defined below.
 * @property keyVaultCredential An `key_vault_credential` block as defined below.
 * @property rServicesEnabled Should R Services be enabled?
 * @property sqlConnectivityPort The SQL Server port. Defaults to `1433`.
 * @property sqlConnectivityType The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
 * @property sqlConnectivityUpdatePassword The SQL Server sysadmin login password.
 * @property sqlConnectivityUpdateUsername The SQL Server sysadmin login to create.
 * @property sqlInstance A `sql_instance` block as defined below.
 * @property sqlLicenseType The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
 * @property sqlVirtualMachineGroupId The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
 * @property storageConfiguration An `storage_configuration` block as defined below.
 * @property tags A mapping of tags to assign to the resource.
 * @property virtualMachineId The ID of the Virtual Machine. Changing this forces a new resource to be created.
 * @property wsfcDomainCredential A `wsfc_domain_credential` block as defined below
 */
public data class VirtualMachineArgs(
    public val assessment: Output? = null,
    public val autoBackup: Output? = null,
    public val autoPatching: Output? = null,
    public val keyVaultCredential: Output? = null,
    public val rServicesEnabled: Output? = null,
    public val sqlConnectivityPort: Output? = null,
    public val sqlConnectivityType: Output? = null,
    public val sqlConnectivityUpdatePassword: Output? = null,
    public val sqlConnectivityUpdateUsername: Output? = null,
    public val sqlInstance: Output? = null,
    public val sqlLicenseType: Output? = null,
    public val sqlVirtualMachineGroupId: Output? = null,
    public val storageConfiguration: Output? = null,
    public val tags: Output>? = null,
    public val virtualMachineId: Output? = null,
    public val wsfcDomainCredential: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.mssql.VirtualMachineArgs =
        com.pulumi.azure.mssql.VirtualMachineArgs.builder()
            .assessment(assessment?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .autoBackup(autoBackup?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .autoPatching(autoPatching?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .keyVaultCredential(
                keyVaultCredential?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .rServicesEnabled(rServicesEnabled?.applyValue({ args0 -> args0 }))
            .sqlConnectivityPort(sqlConnectivityPort?.applyValue({ args0 -> args0 }))
            .sqlConnectivityType(sqlConnectivityType?.applyValue({ args0 -> args0 }))
            .sqlConnectivityUpdatePassword(sqlConnectivityUpdatePassword?.applyValue({ args0 -> args0 }))
            .sqlConnectivityUpdateUsername(sqlConnectivityUpdateUsername?.applyValue({ args0 -> args0 }))
            .sqlInstance(sqlInstance?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .sqlLicenseType(sqlLicenseType?.applyValue({ args0 -> args0 }))
            .sqlVirtualMachineGroupId(sqlVirtualMachineGroupId?.applyValue({ args0 -> args0 }))
            .storageConfiguration(
                storageConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .virtualMachineId(virtualMachineId?.applyValue({ args0 -> args0 }))
            .wsfcDomainCredential(
                wsfcDomainCredential?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

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

    private var autoBackup: Output? = null

    private var autoPatching: Output? = null

    private var keyVaultCredential: Output? = null

    private var rServicesEnabled: Output? = null

    private var sqlConnectivityPort: Output? = null

    private var sqlConnectivityType: Output? = null

    private var sqlConnectivityUpdatePassword: Output? = null

    private var sqlConnectivityUpdateUsername: Output? = null

    private var sqlInstance: Output? = null

    private var sqlLicenseType: Output? = null

    private var sqlVirtualMachineGroupId: Output? = null

    private var storageConfiguration: Output? = null

    private var tags: Output>? = null

    private var virtualMachineId: Output? = null

    private var wsfcDomainCredential: Output? = null

    /**
     * @param value An `assessment` block as defined below.
     */
    @JvmName("ovofqddskatexefx")
    public suspend fun assessment(`value`: Output) {
        this.assessment = value
    }

    /**
     * @param value An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
     */
    @JvmName("klbqsryciqjmmbrb")
    public suspend fun autoBackup(`value`: Output) {
        this.autoBackup = value
    }

    /**
     * @param value An `auto_patching` block as defined below.
     */
    @JvmName("tnilvuhnmdwelooe")
    public suspend fun autoPatching(`value`: Output) {
        this.autoPatching = value
    }

    /**
     * @param value An `key_vault_credential` block as defined below.
     */
    @JvmName("gjiuwghqwpenwafk")
    public suspend fun keyVaultCredential(`value`: Output) {
        this.keyVaultCredential = value
    }

    /**
     * @param value Should R Services be enabled?
     */
    @JvmName("qcohbonjnxieqbix")
    public suspend fun rServicesEnabled(`value`: Output) {
        this.rServicesEnabled = value
    }

    /**
     * @param value The SQL Server port. Defaults to `1433`.
     */
    @JvmName("aprkpodhumtgjfnj")
    public suspend fun sqlConnectivityPort(`value`: Output) {
        this.sqlConnectivityPort = value
    }

    /**
     * @param value The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
     */
    @JvmName("yydqxrjwonbyhrdy")
    public suspend fun sqlConnectivityType(`value`: Output) {
        this.sqlConnectivityType = value
    }

    /**
     * @param value The SQL Server sysadmin login password.
     */
    @JvmName("axaubjmdxtbgdjvl")
    public suspend fun sqlConnectivityUpdatePassword(`value`: Output) {
        this.sqlConnectivityUpdatePassword = value
    }

    /**
     * @param value The SQL Server sysadmin login to create.
     */
    @JvmName("igvucbkrgqhwykom")
    public suspend fun sqlConnectivityUpdateUsername(`value`: Output) {
        this.sqlConnectivityUpdateUsername = value
    }

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

    /**
     * @param value The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
     */
    @JvmName("qvbmsjbeeartnkdx")
    public suspend fun sqlLicenseType(`value`: Output) {
        this.sqlLicenseType = value
    }

    /**
     * @param value The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
     */
    @JvmName("seqvuyemfvdmwohl")
    public suspend fun sqlVirtualMachineGroupId(`value`: Output) {
        this.sqlVirtualMachineGroupId = value
    }

    /**
     * @param value An `storage_configuration` block as defined below.
     */
    @JvmName("kopupjftaxewcqfm")
    public suspend fun storageConfiguration(`value`: Output) {
        this.storageConfiguration = value
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("pbuqkmclacatuocv")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The ID of the Virtual Machine. Changing this forces a new resource to be created.
     */
    @JvmName("arthouutktaanuqt")
    public suspend fun virtualMachineId(`value`: Output) {
        this.virtualMachineId = value
    }

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

    /**
     * @param value An `assessment` block as defined below.
     */
    @JvmName("xqjiesttkhnaegsu")
    public suspend fun assessment(`value`: VirtualMachineAssessmentArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.assessment = mapped
    }

    /**
     * @param argument An `assessment` block as defined below.
     */
    @JvmName("omjtpvmrfwjcbuxt")
    public suspend fun assessment(argument: suspend VirtualMachineAssessmentArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineAssessmentArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.assessment = mapped
    }

    /**
     * @param value An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
     */
    @JvmName("hlbywbnwnswkwcff")
    public suspend fun autoBackup(`value`: VirtualMachineAutoBackupArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoBackup = mapped
    }

    /**
     * @param argument An `auto_backup` block as defined below. This block can be added to an existing resource, but removing this block forces a new resource to be created.
     */
    @JvmName("doviqcxhgdcmifbi")
    public suspend fun autoBackup(argument: suspend VirtualMachineAutoBackupArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineAutoBackupArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoBackup = mapped
    }

    /**
     * @param value An `auto_patching` block as defined below.
     */
    @JvmName("rqxnedstgjbusgtv")
    public suspend fun autoPatching(`value`: VirtualMachineAutoPatchingArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoPatching = mapped
    }

    /**
     * @param argument An `auto_patching` block as defined below.
     */
    @JvmName("fghdpvmsddekacmp")
    public suspend fun autoPatching(argument: suspend VirtualMachineAutoPatchingArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineAutoPatchingArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.autoPatching = mapped
    }

    /**
     * @param value An `key_vault_credential` block as defined below.
     */
    @JvmName("rmnkqorltbicocdv")
    public suspend fun keyVaultCredential(`value`: VirtualMachineKeyVaultCredentialArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyVaultCredential = mapped
    }

    /**
     * @param argument An `key_vault_credential` block as defined below.
     */
    @JvmName("obgqplnefftynjyc")
    public suspend fun keyVaultCredential(argument: suspend VirtualMachineKeyVaultCredentialArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineKeyVaultCredentialArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.keyVaultCredential = mapped
    }

    /**
     * @param value Should R Services be enabled?
     */
    @JvmName("ftxbbfpbnhpmelok")
    public suspend fun rServicesEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rServicesEnabled = mapped
    }

    /**
     * @param value The SQL Server port. Defaults to `1433`.
     */
    @JvmName("ccvqhmpafvyodfth")
    public suspend fun sqlConnectivityPort(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlConnectivityPort = mapped
    }

    /**
     * @param value The connectivity type used for this SQL Server. Possible values are `LOCAL`, `PRIVATE` and `PUBLIC`. Defaults to `PRIVATE`.
     */
    @JvmName("ruqidvfjgfamtoby")
    public suspend fun sqlConnectivityType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlConnectivityType = mapped
    }

    /**
     * @param value The SQL Server sysadmin login password.
     */
    @JvmName("brdvhifigyesexul")
    public suspend fun sqlConnectivityUpdatePassword(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlConnectivityUpdatePassword = mapped
    }

    /**
     * @param value The SQL Server sysadmin login to create.
     */
    @JvmName("awlwdmrxcboylfen")
    public suspend fun sqlConnectivityUpdateUsername(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlConnectivityUpdateUsername = mapped
    }

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

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

    /**
     * @param value The SQL Server license type. Possible values are `AHUB` (Azure Hybrid Benefit), `DR` (Disaster Recovery), and `PAYG` (Pay-As-You-Go). Changing this forces a new resource to be created.
     */
    @JvmName("spmkmrwktdqoupwj")
    public suspend fun sqlLicenseType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlLicenseType = mapped
    }

    /**
     * @param value The ID of the SQL Virtual Machine Group that the SQL Virtual Machine belongs to.
     */
    @JvmName("rxrhqvaiwipjwjme")
    public suspend fun sqlVirtualMachineGroupId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlVirtualMachineGroupId = mapped
    }

    /**
     * @param value An `storage_configuration` block as defined below.
     */
    @JvmName("urudbgjbmxunewpr")
    public suspend fun storageConfiguration(`value`: VirtualMachineStorageConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.storageConfiguration = mapped
    }

    /**
     * @param argument An `storage_configuration` block as defined below.
     */
    @JvmName("dtylubrvestmsqah")
    public suspend fun storageConfiguration(argument: suspend VirtualMachineStorageConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = VirtualMachineStorageConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.storageConfiguration = mapped
    }

    /**
     * @param value A mapping of tags to assign to the resource.
     */
    @JvmName("niiedfghftwjtgvn")
    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 to assign to the resource.
     */
    @JvmName("ffpabjskdkfebgil")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The ID of the Virtual Machine. Changing this forces a new resource to be created.
     */
    @JvmName("fhfbunpyjrwxkcpl")
    public suspend fun virtualMachineId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualMachineId = mapped
    }

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

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

    internal fun build(): VirtualMachineArgs = VirtualMachineArgs(
        assessment = assessment,
        autoBackup = autoBackup,
        autoPatching = autoPatching,
        keyVaultCredential = keyVaultCredential,
        rServicesEnabled = rServicesEnabled,
        sqlConnectivityPort = sqlConnectivityPort,
        sqlConnectivityType = sqlConnectivityType,
        sqlConnectivityUpdatePassword = sqlConnectivityUpdatePassword,
        sqlConnectivityUpdateUsername = sqlConnectivityUpdateUsername,
        sqlInstance = sqlInstance,
        sqlLicenseType = sqlLicenseType,
        sqlVirtualMachineGroupId = sqlVirtualMachineGroupId,
        storageConfiguration = storageConfiguration,
        tags = tags,
        virtualMachineId = virtualMachineId,
        wsfcDomainCredential = wsfcDomainCredential,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy