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

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

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

package com.pulumi.azurenative.azurestackhci.kotlin

import com.pulumi.azurenative.azurestackhci.ClusterArgs.builder
import com.pulumi.azurenative.azurestackhci.kotlin.enums.ManagedServiceIdentityType
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.ClusterDesiredPropertiesArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.ClusterDesiredPropertiesArgsBuilder
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.SoftwareAssurancePropertiesArgs
import com.pulumi.azurenative.azurestackhci.kotlin.inputs.SoftwareAssurancePropertiesArgsBuilder
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.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Cluster details.
 * Azure REST API version: 2023-03-01. Prior API version in Azure Native 1.x: 2020-10-01.
 * Other available API versions: 2022-01-01, 2022-09-01, 2022-12-15-preview, 2023-06-01, 2023-08-01, 2023-08-01-preview, 2023-11-01-preview, 2024-01-01, 2024-02-15-preview, 2024-04-01.
 * ## Example Usage
 * ### Create cluster
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var cluster = new AzureNative.AzureStackHCI.Cluster("cluster", new()
 *     {
 *         AadClientId = "24a6e53d-04e5-44d2-b7cc-1b732a847dfc",
 *         AadTenantId = "7e589cc1-a8b6-4dff-91bd-5ec0fa18db94",
 *         CloudManagementEndpoint = "https://98294836-31be-4668-aeae-698667faf99b.waconazure.com",
 *         ClusterName = "myCluster",
 *         Location = "East US",
 *         ResourceGroupName = "test-rg",
 *         Type = AzureNative.AzureStackHCI.ManagedServiceIdentityType.SystemAssigned,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	azurestackhci "github.com/pulumi/pulumi-azure-native-sdk/azurestackhci/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := azurestackhci.NewCluster(ctx, "cluster", &azurestackhci.ClusterArgs{
 * 			AadClientId:             pulumi.String("24a6e53d-04e5-44d2-b7cc-1b732a847dfc"),
 * 			AadTenantId:             pulumi.String("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94"),
 * 			CloudManagementEndpoint: pulumi.String("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com"),
 * 			ClusterName:             pulumi.String("myCluster"),
 * 			Location:                pulumi.String("East US"),
 * 			ResourceGroupName:       pulumi.String("test-rg"),
 * 			Type:                    pulumi.String(azurestackhci.ManagedServiceIdentityTypeSystemAssigned),
 * 		})
 * 		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.azurestackhci.Cluster;
 * import com.pulumi.azurenative.azurestackhci.ClusterArgs;
 * 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()
 *             .aadClientId("24a6e53d-04e5-44d2-b7cc-1b732a847dfc")
 *             .aadTenantId("7e589cc1-a8b6-4dff-91bd-5ec0fa18db94")
 *             .cloudManagementEndpoint("https://98294836-31be-4668-aeae-698667faf99b.waconazure.com")
 *             .clusterName("myCluster")
 *             .location("East US")
 *             .resourceGroupName("test-rg")
 *             .type("SystemAssigned")
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:azurestackhci:Cluster myCluster /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AzureStackHCI/clusters/{clusterName}
 * ```
 * @property aadApplicationObjectId Object id of cluster AAD identity.
 * @property aadClientId App id of cluster AAD identity.
 * @property aadServicePrincipalObjectId Id of cluster identity service principal.
 * @property aadTenantId Tenant id of cluster AAD identity.
 * @property cloudManagementEndpoint Endpoint configured for management from the Azure portal.
 * @property clusterName The name of the cluster.
 * @property desiredProperties Desired properties of the cluster.
 * @property location The geo-location where the resource lives
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property softwareAssuranceProperties Software Assurance properties of the cluster.
 * @property tags Resource tags.
 * @property type Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
 * @property userAssignedIdentities The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
 */
public data class ClusterArgs(
    public val aadApplicationObjectId: Output? = null,
    public val aadClientId: Output? = null,
    public val aadServicePrincipalObjectId: Output? = null,
    public val aadTenantId: Output? = null,
    public val cloudManagementEndpoint: Output? = null,
    public val clusterName: Output? = null,
    public val desiredProperties: Output? = null,
    public val location: Output? = null,
    public val resourceGroupName: Output? = null,
    public val softwareAssuranceProperties: Output? = null,
    public val tags: Output>? = null,
    public val type: Output>? = null,
    public val userAssignedIdentities: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.azurestackhci.ClusterArgs =
        com.pulumi.azurenative.azurestackhci.ClusterArgs.builder()
            .aadApplicationObjectId(aadApplicationObjectId?.applyValue({ args0 -> args0 }))
            .aadClientId(aadClientId?.applyValue({ args0 -> args0 }))
            .aadServicePrincipalObjectId(aadServicePrincipalObjectId?.applyValue({ args0 -> args0 }))
            .aadTenantId(aadTenantId?.applyValue({ args0 -> args0 }))
            .cloudManagementEndpoint(cloudManagementEndpoint?.applyValue({ args0 -> args0 }))
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .desiredProperties(desiredProperties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .softwareAssuranceProperties(
                softwareAssuranceProperties?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .type(
                type?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .userAssignedIdentities(
                userAssignedIdentities?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0
                    })
                }),
            ).build()
}

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

    private var aadClientId: Output? = null

    private var aadServicePrincipalObjectId: Output? = null

    private var aadTenantId: Output? = null

    private var cloudManagementEndpoint: Output? = null

    private var clusterName: Output? = null

    private var desiredProperties: Output? = null

    private var location: Output? = null

    private var resourceGroupName: Output? = null

    private var softwareAssuranceProperties: Output? = null

    private var tags: Output>? = null

    private var type: Output>? = null

    private var userAssignedIdentities: Output>? = null

    /**
     * @param value Object id of cluster AAD identity.
     */
    @JvmName("tkjdvesgkkfvagbd")
    public suspend fun aadApplicationObjectId(`value`: Output) {
        this.aadApplicationObjectId = value
    }

    /**
     * @param value App id of cluster AAD identity.
     */
    @JvmName("utywrvyvairqavql")
    public suspend fun aadClientId(`value`: Output) {
        this.aadClientId = value
    }

    /**
     * @param value Id of cluster identity service principal.
     */
    @JvmName("qwaombqobqdsqogm")
    public suspend fun aadServicePrincipalObjectId(`value`: Output) {
        this.aadServicePrincipalObjectId = value
    }

    /**
     * @param value Tenant id of cluster AAD identity.
     */
    @JvmName("knufxcfpherpdhom")
    public suspend fun aadTenantId(`value`: Output) {
        this.aadTenantId = value
    }

    /**
     * @param value Endpoint configured for management from the Azure portal.
     */
    @JvmName("wgrhnimsuktwchae")
    public suspend fun cloudManagementEndpoint(`value`: Output) {
        this.cloudManagementEndpoint = value
    }

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

    /**
     * @param value Desired properties of the cluster.
     */
    @JvmName("beyhmfxdyqqlbduy")
    public suspend fun desiredProperties(`value`: Output) {
        this.desiredProperties = value
    }

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

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

    /**
     * @param value Software Assurance properties of the cluster.
     */
    @JvmName("eecywmnfsxchiykk")
    public suspend fun softwareAssuranceProperties(`value`: Output) {
        this.softwareAssuranceProperties = value
    }

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

    /**
     * @param value Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
     */
    @JvmName("kqivjxuxermdpcxx")
    public suspend fun type(`value`: Output>) {
        this.type = value
    }

    /**
     * @param value The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
     */
    @JvmName("viuiiunwqaulypym")
    public suspend fun userAssignedIdentities(`value`: Output>) {
        this.userAssignedIdentities = value
    }

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

    /**
     * @param values The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
     */
    @JvmName("sqclihncooufhvrd")
    public suspend fun userAssignedIdentities(values: List>) {
        this.userAssignedIdentities = Output.all(values)
    }

    /**
     * @param value Object id of cluster AAD identity.
     */
    @JvmName("kimotpdaunpjvoeq")
    public suspend fun aadApplicationObjectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aadApplicationObjectId = mapped
    }

    /**
     * @param value App id of cluster AAD identity.
     */
    @JvmName("whvtegaigiiljqsp")
    public suspend fun aadClientId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aadClientId = mapped
    }

    /**
     * @param value Id of cluster identity service principal.
     */
    @JvmName("unbwcllimnipviuq")
    public suspend fun aadServicePrincipalObjectId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aadServicePrincipalObjectId = mapped
    }

    /**
     * @param value Tenant id of cluster AAD identity.
     */
    @JvmName("tgxjnwyomvmxrhsi")
    public suspend fun aadTenantId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.aadTenantId = mapped
    }

    /**
     * @param value Endpoint configured for management from the Azure portal.
     */
    @JvmName("lradkvxoiqwgstvy")
    public suspend fun cloudManagementEndpoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudManagementEndpoint = mapped
    }

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

    /**
     * @param value Desired properties of the cluster.
     */
    @JvmName("pjxaauqknioxdecc")
    public suspend fun desiredProperties(`value`: ClusterDesiredPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.desiredProperties = mapped
    }

    /**
     * @param argument Desired properties of the cluster.
     */
    @JvmName("hvftwlqxdddoasxw")
    public suspend fun desiredProperties(argument: suspend ClusterDesiredPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterDesiredPropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.desiredProperties = mapped
    }

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

    /**
     * @param value Software Assurance properties of the cluster.
     */
    @JvmName("llmeqjicfkowahle")
    public suspend fun softwareAssuranceProperties(`value`: SoftwareAssurancePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.softwareAssuranceProperties = mapped
    }

    /**
     * @param argument Software Assurance properties of the cluster.
     */
    @JvmName("tjdkbiecnccnrpwa")
    public suspend fun softwareAssuranceProperties(argument: suspend SoftwareAssurancePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = SoftwareAssurancePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.softwareAssuranceProperties = mapped
    }

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

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

    /**
     * @param value Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
     */
    @JvmName("lxtajnrgqclfuoao")
    public suspend fun type(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
     */
    @JvmName("nftiuknaymujxeyx")
    public fun type(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).
     */
    @JvmName("juwhawegkdpvtunn")
    public fun type(`value`: ManagedServiceIdentityType) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
     */
    @JvmName("rpgdjmrqrlxrneqq")
    public suspend fun userAssignedIdentities(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userAssignedIdentities = mapped
    }

    /**
     * @param values The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.
     */
    @JvmName("cjjcklowupuycykd")
    public suspend fun userAssignedIdentities(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.userAssignedIdentities = mapped
    }

    internal fun build(): ClusterArgs = ClusterArgs(
        aadApplicationObjectId = aadApplicationObjectId,
        aadClientId = aadClientId,
        aadServicePrincipalObjectId = aadServicePrincipalObjectId,
        aadTenantId = aadTenantId,
        cloudManagementEndpoint = cloudManagementEndpoint,
        clusterName = clusterName,
        desiredProperties = desiredProperties,
        location = location,
        resourceGroupName = resourceGroupName,
        softwareAssuranceProperties = softwareAssuranceProperties,
        tags = tags,
        type = type,
        userAssignedIdentities = userAssignedIdentities,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy