Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azurenative.sql.kotlin.InstancePoolArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.sql.kotlin
import com.pulumi.azurenative.sql.InstancePoolArgs.builder
import com.pulumi.azurenative.sql.kotlin.enums.InstancePoolLicenseType
import com.pulumi.azurenative.sql.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.sql.kotlin.inputs.SkuArgsBuilder
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
* An Azure SQL instance pool.
* Azure REST API version: 2021-11-01. Prior API version in Azure Native 1.x: 2020-11-01-preview.
* Other available API versions: 2022-11-01-preview, 2023-02-01-preview, 2023-05-01-preview, 2023-08-01-preview.
* ## Example Usage
* ### Create an instance pool with all properties.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var instancePool = new AzureNative.Sql.InstancePool("instancePool", new()
* {
* InstancePoolName = "testIP",
* LicenseType = AzureNative.Sql.InstancePoolLicenseType.LicenseIncluded,
* Location = "japaneast",
* ResourceGroupName = "group1",
* Sku = new AzureNative.Sql.Inputs.SkuArgs
* {
* Family = "Gen5",
* Name = "GP_Gen5",
* Tier = "GeneralPurpose",
* },
* SubnetId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1",
* Tags =
* {
* { "a", "b" },
* },
* VCores = 8,
* });
* });
* ```
* ```go
* package main
* import (
* sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := sql.NewInstancePool(ctx, "instancePool", &sql.InstancePoolArgs{
* InstancePoolName: pulumi.String("testIP"),
* LicenseType: pulumi.String(sql.InstancePoolLicenseTypeLicenseIncluded),
* Location: pulumi.String("japaneast"),
* ResourceGroupName: pulumi.String("group1"),
* Sku: &sql.SkuArgs{
* Family: pulumi.String("Gen5"),
* Name: pulumi.String("GP_Gen5"),
* Tier: pulumi.String("GeneralPurpose"),
* },
* SubnetId: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1"),
* Tags: pulumi.StringMap{
* "a": pulumi.String("b"),
* },
* VCores: pulumi.Int(8),
* })
* 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.sql.InstancePool;
* import com.pulumi.azurenative.sql.InstancePoolArgs;
* import com.pulumi.azurenative.sql.inputs.SkuArgs;
* 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 instancePool = new InstancePool("instancePool", InstancePoolArgs.builder()
* .instancePoolName("testIP")
* .licenseType("LicenseIncluded")
* .location("japaneast")
* .resourceGroupName("group1")
* .sku(SkuArgs.builder()
* .family("Gen5")
* .name("GP_Gen5")
* .tier("GeneralPurpose")
* .build())
* .subnetId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1")
* .tags(Map.of("a", "b"))
* .vCores(8)
* .build());
* }
* }
* ```
* ### Create an instance pool with min properties.
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using AzureNative = Pulumi.AzureNative;
* return await Deployment.RunAsync(() =>
* {
* var instancePool = new AzureNative.Sql.InstancePool("instancePool", new()
* {
* InstancePoolName = "testIP",
* LicenseType = AzureNative.Sql.InstancePoolLicenseType.LicenseIncluded,
* Location = "japaneast",
* ResourceGroupName = "group1",
* Sku = new AzureNative.Sql.Inputs.SkuArgs
* {
* Family = "Gen5",
* Name = "GP_Gen5",
* Tier = "GeneralPurpose",
* },
* SubnetId = "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1",
* VCores = 8,
* });
* });
* ```
* ```go
* package main
* import (
* sql "github.com/pulumi/pulumi-azure-native-sdk/sql/v2"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* _, err := sql.NewInstancePool(ctx, "instancePool", &sql.InstancePoolArgs{
* InstancePoolName: pulumi.String("testIP"),
* LicenseType: pulumi.String(sql.InstancePoolLicenseTypeLicenseIncluded),
* Location: pulumi.String("japaneast"),
* ResourceGroupName: pulumi.String("group1"),
* Sku: &sql.SkuArgs{
* Family: pulumi.String("Gen5"),
* Name: pulumi.String("GP_Gen5"),
* Tier: pulumi.String("GeneralPurpose"),
* },
* SubnetId: pulumi.String("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1"),
* VCores: pulumi.Int(8),
* })
* 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.sql.InstancePool;
* import com.pulumi.azurenative.sql.InstancePoolArgs;
* import com.pulumi.azurenative.sql.inputs.SkuArgs;
* 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 instancePool = new InstancePool("instancePool", InstancePoolArgs.builder()
* .instancePoolName("testIP")
* .licenseType("LicenseIncluded")
* .location("japaneast")
* .resourceGroupName("group1")
* .sku(SkuArgs.builder()
* .family("Gen5")
* .name("GP_Gen5")
* .tier("GeneralPurpose")
* .build())
* .subnetId("/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/group1/providers/Microsoft.Network/virtualNetworks/myvnet/subnets/mysubnet1")
* .vCores(8)
* .build());
* }
* }
* ```
* ## Import
* An existing resource can be imported using its type token, name, and identifier, e.g.
* ```sh
* $ pulumi import azure-native:sql:InstancePool testIP /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/instancePools/{instancePoolName}
* ```
* @property instancePoolName The name of the instance pool to be created or updated.
* @property licenseType The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).
* @property location Resource location.
* @property resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
* @property sku The name and tier of the SKU.
* @property subnetId Resource ID of the subnet to place this instance pool in.
* @property tags Resource tags.
* @property vCores Count of vCores belonging to this instance pool.
*/
public data class InstancePoolArgs(
public val instancePoolName: Output? = null,
public val licenseType: Output>? = null,
public val location: Output? = null,
public val resourceGroupName: Output? = null,
public val sku: Output? = null,
public val subnetId: Output? = null,
public val tags: Output>? = null,
public val vCores: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.sql.InstancePoolArgs =
com.pulumi.azurenative.sql.InstancePoolArgs.builder()
.instancePoolName(instancePoolName?.applyValue({ args0 -> args0 }))
.licenseType(
licenseType?.applyValue({ args0 ->
args0.transform({ args0 -> args0 }, { args0 ->
args0.let({ args0 -> args0.toJava() })
})
}),
)
.location(location?.applyValue({ args0 -> args0 }))
.resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
.sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.subnetId(subnetId?.applyValue({ args0 -> args0 }))
.tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
.vCores(vCores?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [InstancePoolArgs].
*/
@PulumiTagMarker
public class InstancePoolArgsBuilder internal constructor() {
private var instancePoolName: Output? = null
private var licenseType: Output>? = null
private var location: Output? = null
private var resourceGroupName: Output? = null
private var sku: Output? = null
private var subnetId: Output? = null
private var tags: Output>? = null
private var vCores: Output? = null
/**
* @param value The name of the instance pool to be created or updated.
*/
@JvmName("wrjsqsnhrnbwujpp")
public suspend fun instancePoolName(`value`: Output) {
this.instancePoolName = value
}
/**
* @param value The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).
*/
@JvmName("tpdwxmrqpyhiivlc")
public suspend fun licenseType(`value`: Output>) {
this.licenseType = value
}
/**
* @param value Resource location.
*/
@JvmName("qmeqdsyyjjiknorq")
public suspend fun location(`value`: Output) {
this.location = value
}
/**
* @param value The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
@JvmName("ofjgwnyoesauqihl")
public suspend fun resourceGroupName(`value`: Output) {
this.resourceGroupName = value
}
/**
* @param value The name and tier of the SKU.
*/
@JvmName("usafuvsryrowaret")
public suspend fun sku(`value`: Output) {
this.sku = value
}
/**
* @param value Resource ID of the subnet to place this instance pool in.
*/
@JvmName("jbrwkptrlaxysoul")
public suspend fun subnetId(`value`: Output) {
this.subnetId = value
}
/**
* @param value Resource tags.
*/
@JvmName("egewlmpivnpswsvu")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Count of vCores belonging to this instance pool.
*/
@JvmName("vrqjidbreqdbxduo")
public suspend fun vCores(`value`: Output) {
this.vCores = value
}
/**
* @param value The name of the instance pool to be created or updated.
*/
@JvmName("qcqyfgwkxauqqkjr")
public suspend fun instancePoolName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instancePoolName = mapped
}
/**
* @param value The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).
*/
@JvmName("ytraorgmqlalvurg")
public suspend fun licenseType(`value`: Either?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.licenseType = mapped
}
/**
* @param value The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).
*/
@JvmName("qbldrgtuxeyoymmt")
public fun licenseType(`value`: String) {
val toBeMapped = Either.ofLeft(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.licenseType = mapped
}
/**
* @param value The license type. Possible values are 'LicenseIncluded' (price for SQL license is included) and 'BasePrice' (without SQL license price).
*/
@JvmName("aatqtbukgkcpaxdn")
public fun licenseType(`value`: InstancePoolLicenseType) {
val toBeMapped = Either.ofRight(value)
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.licenseType = mapped
}
/**
* @param value Resource location.
*/
@JvmName("gslqinqkxfocjqkl")
public suspend fun location(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.location = mapped
}
/**
* @param value The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.
*/
@JvmName("yyltrcqjgqewddkh")
public suspend fun resourceGroupName(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceGroupName = mapped
}
/**
* @param value The name and tier of the SKU.
*/
@JvmName("mvkycewldrknsspl")
public suspend fun sku(`value`: SkuArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sku = mapped
}
/**
* @param argument The name and tier of the SKU.
*/
@JvmName("kflwkbewrogvubyb")
public suspend fun sku(argument: suspend SkuArgsBuilder.() -> Unit) {
val toBeMapped = SkuArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sku = mapped
}
/**
* @param value Resource ID of the subnet to place this instance pool in.
*/
@JvmName("mtkdqgphxhaqofur")
public suspend fun subnetId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetId = mapped
}
/**
* @param value Resource tags.
*/
@JvmName("tkutkilmwsafwtrn")
public suspend fun tags(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param values Resource tags.
*/
@JvmName("gkbgfbvhawkinjjj")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Count of vCores belonging to this instance pool.
*/
@JvmName("syqqsjvxujimwhvq")
public suspend fun vCores(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.vCores = mapped
}
internal fun build(): InstancePoolArgs = InstancePoolArgs(
instancePoolName = instancePoolName,
licenseType = licenseType,
location = location,
resourceGroupName = resourceGroupName,
sku = sku,
subnetId = subnetId,
tags = tags,
vCores = vCores,
)
}