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

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

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

package com.pulumi.azurenative.netapp.kotlin

import com.pulumi.azurenative.netapp.PoolArgs.builder
import com.pulumi.azurenative.netapp.kotlin.enums.EncryptionType
import com.pulumi.azurenative.netapp.kotlin.enums.QosType
import com.pulumi.azurenative.netapp.kotlin.enums.ServiceLevel
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 kotlin.Boolean
import kotlin.Double
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Capacity pool resource
 * Azure REST API version: 2022-11-01. Prior API version in Azure Native 1.x: 2020-12-01.
 * Other available API versions: 2017-08-15, 2019-07-01, 2022-11-01-preview, 2023-05-01, 2023-05-01-preview, 2023-07-01, 2023-07-01-preview, 2023-11-01, 2023-11-01-preview, 2024-01-01, 2024-03-01, 2024-03-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.NetApp.Pool("pool", new()
 *     {
 *         AccountName = "account1",
 *         Location = "eastus",
 *         PoolName = "pool1",
 *         QosType = AzureNative.NetApp.QosType.Auto,
 *         ResourceGroupName = "myRG",
 *         ServiceLevel = AzureNative.NetApp.ServiceLevel.Premium,
 *         Size = 4398046511104,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	netapp "github.com/pulumi/pulumi-azure-native-sdk/netapp/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := netapp.NewPool(ctx, "pool", &netapp.PoolArgs{
 * 			AccountName:       pulumi.String("account1"),
 * 			Location:          pulumi.String("eastus"),
 * 			PoolName:          pulumi.String("pool1"),
 * 			QosType:           pulumi.String(netapp.QosTypeAuto),
 * 			ResourceGroupName: pulumi.String("myRG"),
 * 			ServiceLevel:      pulumi.String(netapp.ServiceLevelPremium),
 * 			Size:              pulumi.Float64(4398046511104),
 * 		})
 * 		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.netapp.Pool;
 * import com.pulumi.azurenative.netapp.PoolArgs;
 * 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()
 *             .accountName("account1")
 *             .location("eastus")
 *             .poolName("pool1")
 *             .qosType("Auto")
 *             .resourceGroupName("myRG")
 *             .serviceLevel("Premium")
 *             .size(4398046511104)
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:netapp:Pool account1/pool1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/capacityPools/{poolName}
 * ```
 * @property accountName The name of the NetApp account
 * @property coolAccess If enabled (true) the pool can contain cool Access enabled volumes.
 * @property encryptionType Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.
 * @property location The geo-location where the resource lives
 * @property poolName The name of the capacity pool
 * @property qosType The qos type of the pool
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property serviceLevel The service level of the file system
 * @property size Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104).
 * @property tags Resource tags.
 */
public data class PoolArgs(
    public val accountName: Output? = null,
    public val coolAccess: Output? = null,
    public val encryptionType: Output>? = null,
    public val location: Output? = null,
    public val poolName: Output? = null,
    public val qosType: Output>? = null,
    public val resourceGroupName: Output? = null,
    public val serviceLevel: Output>? = null,
    public val size: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.netapp.PoolArgs =
        com.pulumi.azurenative.netapp.PoolArgs.builder()
            .accountName(accountName?.applyValue({ args0 -> args0 }))
            .coolAccess(coolAccess?.applyValue({ args0 -> args0 }))
            .encryptionType(
                encryptionType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .location(location?.applyValue({ args0 -> args0 }))
            .poolName(poolName?.applyValue({ args0 -> args0 }))
            .qosType(
                qosType?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .serviceLevel(
                serviceLevel?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .size(size?.applyValue({ args0 -> args0 }))
            .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 accountName: Output? = null

    private var coolAccess: Output? = null

    private var encryptionType: Output>? = null

    private var location: Output? = null

    private var poolName: Output? = null

    private var qosType: Output>? = null

    private var resourceGroupName: Output? = null

    private var serviceLevel: Output>? = null

    private var size: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The name of the NetApp account
     */
    @JvmName("vfxqsephkxospbyf")
    public suspend fun accountName(`value`: Output) {
        this.accountName = value
    }

    /**
     * @param value If enabled (true) the pool can contain cool Access enabled volumes.
     */
    @JvmName("hjiivnnscuaeoqeu")
    public suspend fun coolAccess(`value`: Output) {
        this.coolAccess = value
    }

    /**
     * @param value Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.
     */
    @JvmName("rfmhvhycxpwllcwa")
    public suspend fun encryptionType(`value`: Output>) {
        this.encryptionType = value
    }

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

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

    /**
     * @param value The qos type of the pool
     */
    @JvmName("bpgtlherhgbcxeiy")
    public suspend fun qosType(`value`: Output>) {
        this.qosType = value
    }

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

    /**
     * @param value The service level of the file system
     */
    @JvmName("xpleocuulwmcnjyd")
    public suspend fun serviceLevel(`value`: Output>) {
        this.serviceLevel = value
    }

    /**
     * @param value Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104).
     */
    @JvmName("nfhjleyhotxdhego")
    public suspend fun size(`value`: Output) {
        this.size = value
    }

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

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

    /**
     * @param value If enabled (true) the pool can contain cool Access enabled volumes.
     */
    @JvmName("vrmksxobsoumxykn")
    public suspend fun coolAccess(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.coolAccess = mapped
    }

    /**
     * @param value Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.
     */
    @JvmName("mnyvekxeifrdiqin")
    public suspend fun encryptionType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionType = mapped
    }

    /**
     * @param value Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.
     */
    @JvmName("chfqfxipejypsjxr")
    public fun encryptionType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.encryptionType = mapped
    }

    /**
     * @param value Encryption type of the capacity pool, set encryption type for data at rest for this pool and all volumes in it. This value can only be set when creating new pool.
     */
    @JvmName("kxolbmxqricmxqka")
    public fun encryptionType(`value`: EncryptionType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.encryptionType = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("gvcuvysjunuslqkg")
    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 capacity pool
     */
    @JvmName("leuqwkvanpckppif")
    public suspend fun poolName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.poolName = mapped
    }

    /**
     * @param value The qos type of the pool
     */
    @JvmName("vjqiplnsectmdwny")
    public suspend fun qosType(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.qosType = mapped
    }

    /**
     * @param value The qos type of the pool
     */
    @JvmName("nimrrajotkhkijnh")
    public fun qosType(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.qosType = mapped
    }

    /**
     * @param value The qos type of the pool
     */
    @JvmName("vexqrmfywopkdywj")
    public fun qosType(`value`: QosType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.qosType = mapped
    }

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

    /**
     * @param value The service level of the file system
     */
    @JvmName("ecuqmorbuumsamoh")
    public suspend fun serviceLevel(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceLevel = mapped
    }

    /**
     * @param value The service level of the file system
     */
    @JvmName("vdfjpuienqdyegxm")
    public fun serviceLevel(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serviceLevel = mapped
    }

    /**
     * @param value The service level of the file system
     */
    @JvmName("hvbgxioxcjkxxfty")
    public fun serviceLevel(`value`: ServiceLevel) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serviceLevel = mapped
    }

    /**
     * @param value Provisioned size of the pool (in bytes). Allowed values are in 1TiB chunks (value must be multiply of 4398046511104).
     */
    @JvmName("uolvlorjdecgcoke")
    public suspend fun size(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.size = mapped
    }

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

    /**
     * @param values Resource tags.
     */
    @JvmName("qaniyolphrnslwtm")
    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(
        accountName = accountName,
        coolAccess = coolAccess,
        encryptionType = encryptionType,
        location = location,
        poolName = poolName,
        qosType = qosType,
        resourceGroupName = resourceGroupName,
        serviceLevel = serviceLevel,
        size = size,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy