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

com.pulumi.azurenative.fabric.kotlin.FabricCapacityArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.fabric.kotlin

import com.pulumi.azurenative.fabric.FabricCapacityArgs.builder
import com.pulumi.azurenative.fabric.kotlin.inputs.CapacityAdministrationArgs
import com.pulumi.azurenative.fabric.kotlin.inputs.CapacityAdministrationArgsBuilder
import com.pulumi.azurenative.fabric.kotlin.inputs.RpSkuArgs
import com.pulumi.azurenative.fabric.kotlin.inputs.RpSkuArgsBuilder
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

/**
 * Fabric Capacity resource
 * Azure REST API version: 2023-11-01.
 * ## Example Usage
 * ### Create or update a capacity
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var fabricCapacity = new AzureNative.Fabric.FabricCapacity("fabricCapacity", new()
 *     {
 *         Administration = new AzureNative.Fabric.Inputs.CapacityAdministrationArgs
 *         {
 *             Members = new[]
 *             {
 *                 "[email protected]",
 *                 "[email protected]",
 *             },
 *         },
 *         CapacityName = "azsdktest",
 *         Location = "westcentralus",
 *         ResourceGroupName = "TestRG",
 *         Sku = new AzureNative.Fabric.Inputs.RpSkuArgs
 *         {
 *             Name = "F2",
 *             Tier = AzureNative.Fabric.RpSkuTier.Fabric,
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	fabric "github.com/pulumi/pulumi-azure-native-sdk/fabric/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := fabric.NewFabricCapacity(ctx, "fabricCapacity", &fabric.FabricCapacityArgs{
 * 			Administration: &fabric.CapacityAdministrationArgs{
 * 				Members: pulumi.StringArray{
 * 					pulumi.String("[email protected]"),
 * 					pulumi.String("[email protected]"),
 * 				},
 * 			},
 * 			CapacityName:      pulumi.String("azsdktest"),
 * 			Location:          pulumi.String("westcentralus"),
 * 			ResourceGroupName: pulumi.String("TestRG"),
 * 			Sku: &fabric.RpSkuArgs{
 * 				Name: pulumi.String("F2"),
 * 				Tier: pulumi.String(fabric.RpSkuTierFabric),
 * 			},
 * 		})
 * 		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.fabric.FabricCapacity;
 * import com.pulumi.azurenative.fabric.FabricCapacityArgs;
 * import com.pulumi.azurenative.fabric.inputs.CapacityAdministrationArgs;
 * import com.pulumi.azurenative.fabric.inputs.RpSkuArgs;
 * 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 fabricCapacity = new FabricCapacity("fabricCapacity", FabricCapacityArgs.builder()
 *             .administration(CapacityAdministrationArgs.builder()
 *                 .members(
 *                     "[email protected]",
 *                     "[email protected]")
 *                 .build())
 *             .capacityName("azsdktest")
 *             .location("westcentralus")
 *             .resourceGroupName("TestRG")
 *             .sku(RpSkuArgs.builder()
 *                 .name("F2")
 *                 .tier("Fabric")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:fabric:FabricCapacity azsdktest /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Fabric/capacities/{capacityName}
 * ```
 * @property administration The capacity administration
 * @property capacityName The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
 * @property location The geo-location where the resource lives
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property sku The SKU details
 * @property tags Resource tags.
 */
public data class FabricCapacityArgs(
    public val administration: Output? = null,
    public val capacityName: Output? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.fabric.FabricCapacityArgs =
        com.pulumi.azurenative.fabric.FabricCapacityArgs.builder()
            .administration(administration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .capacityName(capacityName?.applyValue({ args0 -> args0 }))
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [FabricCapacityArgs].
 */
@PulumiTagMarker
public class FabricCapacityArgsBuilder internal constructor() {
    private var administration: Output? = null

    private var capacityName: Output? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The capacity administration
     */
    @JvmName("alrqrhchyaepggsq")
    public suspend fun administration(`value`: Output) {
        this.administration = value
    }

    /**
     * @param value The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
     */
    @JvmName("teuqivteemtkkkxn")
    public suspend fun capacityName(`value`: Output) {
        this.capacityName = value
    }

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

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

    /**
     * @param value The SKU details
     */
    @JvmName("npojqiosuwikhuav")
    public suspend fun sku(`value`: Output) {
        this.sku = value
    }

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

    /**
     * @param value The capacity administration
     */
    @JvmName("tqfdnclbwmtmpmuf")
    public suspend fun administration(`value`: CapacityAdministrationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.administration = mapped
    }

    /**
     * @param argument The capacity administration
     */
    @JvmName("ukukeswdypqcdpbc")
    public suspend fun administration(argument: suspend CapacityAdministrationArgsBuilder.() -> Unit) {
        val toBeMapped = CapacityAdministrationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.administration = mapped
    }

    /**
     * @param value The name of the Microsoft Fabric capacity. It must be a minimum of 3 characters, and a maximum of 63.
     */
    @JvmName("bvgdedsfocvuiurc")
    public suspend fun capacityName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.capacityName = mapped
    }

    /**
     * @param value The geo-location where the resource lives
     */
    @JvmName("dfhimpnoujkrsbod")
    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. The name is case insensitive.
     */
    @JvmName("wcjagbolgbebbrft")
    public suspend fun resourceGroupName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceGroupName = mapped
    }

    /**
     * @param value The SKU details
     */
    @JvmName("ofvfjlxjpmmyratf")
    public suspend fun sku(`value`: RpSkuArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sku = mapped
    }

    /**
     * @param argument The SKU details
     */
    @JvmName("qrcmdhmowxucsshf")
    public suspend fun sku(argument: suspend RpSkuArgsBuilder.() -> Unit) {
        val toBeMapped = RpSkuArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.sku = mapped
    }

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

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

    internal fun build(): FabricCapacityArgs = FabricCapacityArgs(
        administration = administration,
        capacityName = capacityName,
        location = location,
        resourceGroupName = resourceGroupName,
        sku = sku,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy