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

com.pulumi.azurenative.devcenter.kotlin.PoolArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.devcenter.kotlin

import com.pulumi.azurenative.devcenter.PoolArgs.builder
import com.pulumi.azurenative.devcenter.kotlin.enums.LicenseType
import com.pulumi.azurenative.devcenter.kotlin.enums.LocalAdminStatus
import com.pulumi.azurenative.devcenter.kotlin.inputs.StopOnDisconnectConfigurationArgs
import com.pulumi.azurenative.devcenter.kotlin.inputs.StopOnDisconnectConfigurationArgsBuilder
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 pool of Virtual Machines.
 * Azure REST API version: 2023-04-01. Prior API version in Azure Native 1.x: 2022-09-01-preview.
 * Other available API versions: 2023-08-01-preview, 2023-10-01-preview, 2024-02-01, 2024-05-01-preview, 2024-06-01-preview, 2024-07-01-preview, 2024-08-01-preview.
 * ## Example Usage
 * ### Pools_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var pool = new AzureNative.DevCenter.Pool("pool", new()
 *     {
 *         DevBoxDefinitionName = "WebDevBox",
 *         LicenseType = AzureNative.DevCenter.LicenseType.Windows_Client,
 *         LocalAdministrator = AzureNative.DevCenter.LocalAdminStatus.Enabled,
 *         Location = "centralus",
 *         NetworkConnectionName = "Network1-westus2",
 *         PoolName = "DevPool",
 *         ProjectName = "DevProject",
 *         ResourceGroupName = "rg1",
 *         StopOnDisconnect = new AzureNative.DevCenter.Inputs.StopOnDisconnectConfigurationArgs
 *         {
 *             GracePeriodMinutes = 60,
 *             Status = AzureNative.DevCenter.StopOnDisconnectEnableStatus.Enabled,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	devcenter "github.com/pulumi/pulumi-azure-native-sdk/devcenter/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := devcenter.NewPool(ctx, "pool", &devcenter.PoolArgs{
 * 			DevBoxDefinitionName:  pulumi.String("WebDevBox"),
 * 			LicenseType:           pulumi.String(devcenter.LicenseType_Windows_Client),
 * 			LocalAdministrator:    pulumi.String(devcenter.LocalAdminStatusEnabled),
 * 			Location:              pulumi.String("centralus"),
 * 			NetworkConnectionName: pulumi.String("Network1-westus2"),
 * 			PoolName:              pulumi.String("DevPool"),
 * 			ProjectName:           pulumi.String("DevProject"),
 * 			ResourceGroupName:     pulumi.String("rg1"),
 * 			StopOnDisconnect: &devcenter.StopOnDisconnectConfigurationArgs{
 * 				GracePeriodMinutes: pulumi.Int(60),
 * 				Status:             pulumi.String(devcenter.StopOnDisconnectEnableStatusEnabled),
 * 			},
 * 		})
 * 		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.devcenter.Pool;
 * import com.pulumi.azurenative.devcenter.PoolArgs;
 * import com.pulumi.azurenative.devcenter.inputs.StopOnDisconnectConfigurationArgs;
 * 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 pool = new Pool("pool", PoolArgs.builder()
 *             .devBoxDefinitionName("WebDevBox")
 *             .licenseType("Windows_Client")
 *             .localAdministrator("Enabled")
 *             .location("centralus")
 *             .networkConnectionName("Network1-westus2")
 *             .poolName("DevPool")
 *             .projectName("DevProject")
 *             .resourceGroupName("rg1")
 *             .stopOnDisconnect(StopOnDisconnectConfigurationArgs.builder()
 *                 .gracePeriodMinutes(60)
 *                 .status("Enabled")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:devcenter:Pool DevPool /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DevCenter/projects/{projectName}/pools/{poolName}
 * ```
 * @property devBoxDefinitionName Name of a Dev Box definition in parent Project of this Pool
 * @property licenseType Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
 * @property localAdministrator Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
 * @property location The geo-location where the resource lives
 * @property networkConnectionName Name of a Network Connection in parent Project of this Pool
 * @property poolName Name of the pool.
 * @property projectName The name of the project.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property stopOnDisconnect Stop on disconnect configuration settings for Dev Boxes created in this pool.
 * @property tags Resource tags.
 */
public data class PoolArgs(
    public val devBoxDefinitionName: Output? = null,
    public val licenseType: Output>? = null,
    public val localAdministrator: Output>? = null,
    public val location: Output? = null,
    public val networkConnectionName: Output? = null,
    public val poolName: Output? = null,
    public val projectName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val stopOnDisconnect: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devcenter.PoolArgs =
        com.pulumi.azurenative.devcenter.PoolArgs.builder()
            .devBoxDefinitionName(devBoxDefinitionName?.applyValue({ args0 -> args0 }))
            .licenseType(
                licenseType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .localAdministrator(
                localAdministrator?.applyValue({ args0 ->
                    args0.transform(
                        { args0 -> args0 },
                        { args0 -> args0.let({ args0 -> args0.toJava() }) },
                    )
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .networkConnectionName(networkConnectionName?.applyValue({ args0 -> args0 }))
            .poolName(poolName?.applyValue({ args0 -> args0 }))
            .projectName(projectName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .stopOnDisconnect(stopOnDisconnect?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [PoolArgs].
 */
@PulumiTagMarker
public class PoolArgsBuilder internal constructor() {
    private var devBoxDefinitionName: Output? = null

    private var licenseType: Output>? = null

    private var localAdministrator: Output>? = null

    private var location: Output? = null

    private var networkConnectionName: Output? = null

    private var poolName: Output? = null

    private var projectName: Output? = null

    private var resourceGroupName: Output? = null

    private var stopOnDisconnect: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Name of a Dev Box definition in parent Project of this Pool
     */
    @JvmName("txatpvinpdqkeobp")
    public suspend fun devBoxDefinitionName(`value`: Output) {
        this.devBoxDefinitionName = value
    }

    /**
     * @param value Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
     */
    @JvmName("plthqpyrskxqbvij")
    public suspend fun licenseType(`value`: Output>) {
        this.licenseType = value
    }

    /**
     * @param value Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
     */
    @JvmName("muabdofmbpexbusm")
    public suspend fun localAdministrator(`value`: Output>) {
        this.localAdministrator = value
    }

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

    /**
     * @param value Name of a Network Connection in parent Project of this Pool
     */
    @JvmName("hsqwrcydwbkpryyq")
    public suspend fun networkConnectionName(`value`: Output) {
        this.networkConnectionName = value
    }

    /**
     * @param value Name of the pool.
     */
    @JvmName("jdweiorbyupewtry")
    public suspend fun poolName(`value`: Output) {
        this.poolName = value
    }

    /**
     * @param value The name of the project.
     */
    @JvmName("vwxnaqchuhryynhl")
    public suspend fun projectName(`value`: Output) {
        this.projectName = value
    }

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

    /**
     * @param value Stop on disconnect configuration settings for Dev Boxes created in this pool.
     */
    @JvmName("bdkkkwyiyiiptqjj")
    public suspend fun stopOnDisconnect(`value`: Output) {
        this.stopOnDisconnect = value
    }

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

    /**
     * @param value Name of a Dev Box definition in parent Project of this Pool
     */
    @JvmName("hfmudggndouphddv")
    public suspend fun devBoxDefinitionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.devBoxDefinitionName = mapped
    }

    /**
     * @param value Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
     */
    @JvmName("cxkudhxwgfnhafie")
    public suspend fun licenseType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.licenseType = mapped
    }

    /**
     * @param value Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
     */
    @JvmName("yeetovmsdavjngri")
    public fun licenseType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.licenseType = mapped
    }

    /**
     * @param value Specifies the license type indicating the caller has already acquired licenses for the Dev Boxes that will be created.
     */
    @JvmName("saudhgraydbxdomf")
    public fun licenseType(`value`: LicenseType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.licenseType = mapped
    }

    /**
     * @param value Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
     */
    @JvmName("smlfuhwtdqnnwhhd")
    public suspend fun localAdministrator(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.localAdministrator = mapped
    }

    /**
     * @param value Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
     */
    @JvmName("aetaaxovnbajftpx")
    public fun localAdministrator(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.localAdministrator = mapped
    }

    /**
     * @param value Indicates whether owners of Dev Boxes in this pool are added as local administrators on the Dev Box.
     */
    @JvmName("wijnwvbtsxwqkyig")
    public fun localAdministrator(`value`: LocalAdminStatus) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.localAdministrator = mapped
    }

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

    /**
     * @param value Name of a Network Connection in parent Project of this Pool
     */
    @JvmName("jyuvgrndvcbrugrf")
    public suspend fun networkConnectionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkConnectionName = mapped
    }

    /**
     * @param value Name of the pool.
     */
    @JvmName("deofxgispkxkiqng")
    public suspend fun poolName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.poolName = mapped
    }

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

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

    /**
     * @param value Stop on disconnect configuration settings for Dev Boxes created in this pool.
     */
    @JvmName("wucnsliltcxjojvg")
    public suspend fun stopOnDisconnect(`value`: StopOnDisconnectConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stopOnDisconnect = mapped
    }

    /**
     * @param argument Stop on disconnect configuration settings for Dev Boxes created in this pool.
     */
    @JvmName("igmruxxfkjidmbbi")
    public suspend fun stopOnDisconnect(argument: suspend StopOnDisconnectConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = StopOnDisconnectConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.stopOnDisconnect = mapped
    }

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

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

    internal fun build(): PoolArgs = PoolArgs(
        devBoxDefinitionName = devBoxDefinitionName,
        licenseType = licenseType,
        localAdministrator = localAdministrator,
        location = location,
        networkConnectionName = networkConnectionName,
        poolName = poolName,
        projectName = projectName,
        resourceGroupName = resourceGroupName,
        stopOnDisconnect = stopOnDisconnect,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy