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

com.pulumi.azurenative.azurearcdata.kotlin.SqlServerInstanceArgs.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.azurearcdata.kotlin

import com.pulumi.azurenative.azurearcdata.SqlServerInstanceArgs.builder
import com.pulumi.azurenative.azurearcdata.kotlin.inputs.SqlServerInstancePropertiesArgs
import com.pulumi.azurenative.azurearcdata.kotlin.inputs.SqlServerInstancePropertiesArgsBuilder
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 SqlServerInstance.
 * Azure REST API version: 2023-01-15-preview. Prior API version in Azure Native 1.x: 2021-06-01-preview.
 * Other available API versions: 2024-01-01.
 * ## Example Usage
 * ### Updates a SQL Server Instance tags.
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var sqlServerInstance = new AzureNative.AzureArcData.SqlServerInstance("sqlServerInstance", new()
 *     {
 *         Location = "northeurope",
 *         Properties = new AzureNative.AzureArcData.Inputs.SqlServerInstancePropertiesArgs
 *         {
 *             AzureDefenderStatus = AzureNative.AzureArcData.DefenderStatus.Protected,
 *             AzureDefenderStatusLastUpdated = "2020-01-02T17:18:19.1234567Z",
 *             Collation = "collation",
 *             ContainerResourceId = "Resource id of hosting Arc Machine",
 *             Cores = "4",
 *             CurrentVersion = "2012",
 *             Edition = AzureNative.AzureArcData.EditionType.Developer,
 *             HostType = AzureNative.AzureArcData.HostType.Physical_Server,
 *             InstanceName = "name of instance",
 *             LicenseType = AzureNative.AzureArcData.ArcSqlServerLicenseType.Free,
 *             PatchLevel = "patchlevel",
 *             ProductId = "sql id",
 *             Status = AzureNative.AzureArcData.ConnectionStatus.Registered,
 *             TcpDynamicPorts = "1433",
 *             TcpStaticPorts = "1433",
 *             VCore = "4",
 *             Version = AzureNative.AzureArcData.SqlVersion.SQL_Server_2012,
 *         },
 *         ResourceGroupName = "testrg",
 *         SqlServerInstanceName = "testsqlServerInstance",
 *         Tags =
 *         {
 *             { "mytag", "myval" },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurearcdata "github.com/pulumi/pulumi-azure-native-sdk/azurearcdata/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurearcdata.NewSqlServerInstance(ctx, "sqlServerInstance", &azurearcdata.SqlServerInstanceArgs{
 * 			Location: pulumi.String("northeurope"),
 * 			Properties: &azurearcdata.SqlServerInstancePropertiesArgs{
 * 				AzureDefenderStatus:            pulumi.String(azurearcdata.DefenderStatusProtected),
 * 				AzureDefenderStatusLastUpdated: pulumi.String("2020-01-02T17:18:19.1234567Z"),
 * 				Collation:                      pulumi.String("collation"),
 * 				ContainerResourceId:            pulumi.String("Resource id of hosting Arc Machine"),
 * 				Cores:                          pulumi.String("4"),
 * 				CurrentVersion:                 pulumi.String("2012"),
 * 				Edition:                        pulumi.String(azurearcdata.EditionTypeDeveloper),
 * 				HostType:                       pulumi.String(azurearcdata.HostType_Physical_Server),
 * 				InstanceName:                   pulumi.String("name of instance"),
 * 				LicenseType:                    pulumi.String(azurearcdata.ArcSqlServerLicenseTypeFree),
 * 				PatchLevel:                     pulumi.String("patchlevel"),
 * 				ProductId:                      pulumi.String("sql id"),
 * 				Status:                         pulumi.String(azurearcdata.ConnectionStatusRegistered),
 * 				TcpDynamicPorts:                pulumi.String("1433"),
 * 				TcpStaticPorts:                 pulumi.String("1433"),
 * 				VCore:                          pulumi.String("4"),
 * 				Version:                        pulumi.String(azurearcdata.SqlVersion_SQL_Server_2012),
 * 			},
 * 			ResourceGroupName:     pulumi.String("testrg"),
 * 			SqlServerInstanceName: pulumi.String("testsqlServerInstance"),
 * 			Tags: pulumi.StringMap{
 * 				"mytag": pulumi.String("myval"),
 * 			},
 * 		})
 * 		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.azurearcdata.SqlServerInstance;
 * import com.pulumi.azurenative.azurearcdata.SqlServerInstanceArgs;
 * import com.pulumi.azurenative.azurearcdata.inputs.SqlServerInstancePropertiesArgs;
 * 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 sqlServerInstance = new SqlServerInstance("sqlServerInstance", SqlServerInstanceArgs.builder()
 *             .location("northeurope")
 *             .properties(SqlServerInstancePropertiesArgs.builder()
 *                 .azureDefenderStatus("Protected")
 *                 .azureDefenderStatusLastUpdated("2020-01-02T17:18:19.1234567Z")
 *                 .collation("collation")
 *                 .containerResourceId("Resource id of hosting Arc Machine")
 *                 .cores("4")
 *                 .currentVersion("2012")
 *                 .edition("Developer")
 *                 .hostType("Physical Server")
 *                 .instanceName("name of instance")
 *                 .licenseType("Free")
 *                 .patchLevel("patchlevel")
 *                 .productId("sql id")
 *                 .status("Registered")
 *                 .tcpDynamicPorts("1433")
 *                 .tcpStaticPorts("1433")
 *                 .vCore("4")
 *                 .version("SQL Server 2012")
 *                 .build())
 *             .resourceGroupName("testrg")
 *             .sqlServerInstanceName("testsqlServerInstance")
 *             .tags(Map.of("mytag", "myval"))
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:azurearcdata:SqlServerInstance testsqlServerInstance /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureArcData/sqlServerInstances/{sqlServerInstanceName}
 * ```
 * @property location The geo-location where the resource lives
 * @property properties null
 * @property resourceGroupName The name of the Azure resource group
 * @property sqlServerInstanceName Name of SQL Server Instance
 * @property tags Resource tags.
 */
public data class SqlServerInstanceArgs(
    public val location: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sqlServerInstanceName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.azurearcdata.SqlServerInstanceArgs =
        com.pulumi.azurenative.azurearcdata.SqlServerInstanceArgs.builder()
            .location(location?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sqlServerInstanceName(sqlServerInstanceName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var sqlServerInstanceName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("ndxlcoobejmgmsso")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

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

    /**
     * @param value The name of the Azure resource group
     */
    @JvmName("xdaquxjdgsonmsfo")
    public suspend fun resourceGroupName(`value`: Output) {
        this.resourceGroupName = value
    }

    /**
     * @param value Name of SQL Server Instance
     */
    @JvmName("deupujqujpshmwdf")
    public suspend fun sqlServerInstanceName(`value`: Output) {
        this.sqlServerInstanceName = value
    }

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

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("qvedrffukotstavb")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

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

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

    /**
     * @param value The name of the Azure resource group
     */
    @JvmName("dgncaghevrsaqxeq")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value Name of SQL Server Instance
     */
    @JvmName("fyeyptfdeawyeaxi")
    public suspend fun sqlServerInstanceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqlServerInstanceName = mapped
    }

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

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

    internal fun build(): SqlServerInstanceArgs = SqlServerInstanceArgs(
        location = location,
        properties = properties,
        resourceGroupName = resourceGroupName,
        sqlServerInstanceName = sqlServerInstanceName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy