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

com.pulumi.azurenative.avs.kotlin.ClusterArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.avs.kotlin

import com.pulumi.azurenative.avs.ClusterArgs.builder
import com.pulumi.azurenative.avs.kotlin.inputs.SkuArgs
import com.pulumi.azurenative.avs.kotlin.inputs.SkuArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * A cluster resource
 * Azure REST API version: 2022-05-01. Prior API version in Azure Native 1.x: 2020-03-20.
 * Other available API versions: 2020-03-20, 2021-06-01, 2023-03-01, 2023-09-01.
 * ## Example Usage
 * ### Clusters_CreateOrUpdate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var cluster = new AzureNative.AVS.Cluster("cluster", new()
 *     {
 *         ClusterName = "cluster1",
 *         ClusterSize = 3,
 *         PrivateCloudName = "cloud1",
 *         ResourceGroupName = "group1",
 *         Sku = new AzureNative.AVS.Inputs.SkuArgs
 *         {
 *             Name = "AV20",
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	avs "github.com/pulumi/pulumi-azure-native-sdk/avs/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := avs.NewCluster(ctx, "cluster", &avs.ClusterArgs{
 * 			ClusterName:       pulumi.String("cluster1"),
 * 			ClusterSize:       pulumi.Int(3),
 * 			PrivateCloudName:  pulumi.String("cloud1"),
 * 			ResourceGroupName: pulumi.String("group1"),
 * 			Sku: &avs.SkuArgs{
 * 				Name: pulumi.String("AV20"),
 * 			},
 * 		})
 * 		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.avs.Cluster;
 * import com.pulumi.azurenative.avs.ClusterArgs;
 * import com.pulumi.azurenative.avs.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 cluster = new Cluster("cluster", ClusterArgs.builder()
 *             .clusterName("cluster1")
 *             .clusterSize(3)
 *             .privateCloudName("cloud1")
 *             .resourceGroupName("group1")
 *             .sku(SkuArgs.builder()
 *                 .name("AV20")
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:avs:Cluster cluster1 /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AVS/privateClouds/{privateCloudName}/clusters/{clusterName}
 * ```
 * @property clusterName Name of the cluster in the private cloud
 * @property clusterSize The cluster size
 * @property hosts The hosts
 * @property privateCloudName The name of the private cloud.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property sku The cluster SKU
 */
public data class ClusterArgs(
    public val clusterName: Output? = null,
    public val clusterSize: Output? = null,
    public val hosts: Output>? = null,
    public val privateCloudName: Output? = null,
    public val resourceGroupName: Output? = null,
    public val sku: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.avs.ClusterArgs =
        com.pulumi.azurenative.avs.ClusterArgs.builder()
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .clusterSize(clusterSize?.applyValue({ args0 -> args0 }))
            .hosts(hosts?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .privateCloudName(privateCloudName?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .sku(sku?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ClusterArgs].
 */
@PulumiTagMarker
public class ClusterArgsBuilder internal constructor() {
    private var clusterName: Output? = null

    private var clusterSize: Output? = null

    private var hosts: Output>? = null

    private var privateCloudName: Output? = null

    private var resourceGroupName: Output? = null

    private var sku: Output? = null

    /**
     * @param value Name of the cluster in the private cloud
     */
    @JvmName("qwgilcfpvblhdljc")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value The cluster size
     */
    @JvmName("cggqovwcmhsjyvfv")
    public suspend fun clusterSize(`value`: Output) {
        this.clusterSize = value
    }

    /**
     * @param value The hosts
     */
    @JvmName("fmarfrudengaiwsa")
    public suspend fun hosts(`value`: Output>) {
        this.hosts = value
    }

    @JvmName("mwrxgenhwuinlujp")
    public suspend fun hosts(vararg values: Output) {
        this.hosts = Output.all(values.asList())
    }

    /**
     * @param values The hosts
     */
    @JvmName("scxxbiaxkoiyssmn")
    public suspend fun hosts(values: List>) {
        this.hosts = Output.all(values)
    }

    /**
     * @param value The name of the private cloud.
     */
    @JvmName("sojnbfqhlgliksha")
    public suspend fun privateCloudName(`value`: Output) {
        this.privateCloudName = value
    }

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

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

    /**
     * @param value Name of the cluster in the private cloud
     */
    @JvmName("lnmotvjcvdjpgfqx")
    public suspend fun clusterName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterName = mapped
    }

    /**
     * @param value The cluster size
     */
    @JvmName("gvuqbruqusaoqamc")
    public suspend fun clusterSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clusterSize = mapped
    }

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

    /**
     * @param values The hosts
     */
    @JvmName("bomhwrbljmcwhmkw")
    public suspend fun hosts(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.hosts = mapped
    }

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

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

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

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

    internal fun build(): ClusterArgs = ClusterArgs(
        clusterName = clusterName,
        clusterSize = clusterSize,
        hosts = hosts,
        privateCloudName = privateCloudName,
        resourceGroupName = resourceGroupName,
        sku = sku,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy