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

com.pulumi.azurenative.documentdb.kotlin.CassandraClusterArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.documentdb.kotlin

import com.pulumi.azurenative.documentdb.CassandraClusterArgs.builder
import com.pulumi.azurenative.documentdb.kotlin.inputs.ClusterResourcePropertiesArgs
import com.pulumi.azurenative.documentdb.kotlin.inputs.ClusterResourcePropertiesArgsBuilder
import com.pulumi.azurenative.documentdb.kotlin.inputs.ManagedCassandraManagedServiceIdentityArgs
import com.pulumi.azurenative.documentdb.kotlin.inputs.ManagedCassandraManagedServiceIdentityArgsBuilder
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

/**
 * Representation of a managed Cassandra cluster.
 * Azure REST API version: 2023-04-15. Prior API version in Azure Native 1.x: 2021-03-01-preview.
 * Other available API versions: 2021-07-01-preview, 2023-09-15, 2023-09-15-preview, 2023-11-15, 2023-11-15-preview, 2024-02-15-preview, 2024-05-15, 2024-05-15-preview.
 * ## Example Usage
 * ### CosmosDBManagedCassandraClusterCreate
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using AzureNative = Pulumi.AzureNative;
 * return await Deployment.RunAsync(() =>
 * {
 *     var cassandraCluster = new AzureNative.DocumentDB.CassandraCluster("cassandraCluster", new()
 *     {
 *         ClusterName = "cassandra-prod",
 *         Location = "West US",
 *         Properties = new AzureNative.DocumentDB.Inputs.ClusterResourcePropertiesArgs
 *         {
 *             AuthenticationMethod = AzureNative.DocumentDB.AuthenticationMethod.Cassandra,
 *             CassandraVersion = "3.11",
 *             ClientCertificates = new[]
 *             {
 *                 new AzureNative.DocumentDB.Inputs.CertificateArgs
 *                 {
 *                     Pem = @"-----BEGIN CERTIFICATE-----
 * ...Base64 encoded certificate...
 * -----END CERTIFICATE-----",
 *                 },
 *             },
 *             ClusterNameOverride = "ClusterNameIllegalForAzureResource",
 *             DelegatedManagementSubnetId = "/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management",
 *             ExternalGossipCertificates = new[]
 *             {
 *                 new AzureNative.DocumentDB.Inputs.CertificateArgs
 *                 {
 *                     Pem = @"-----BEGIN CERTIFICATE-----
 * ...Base64 encoded certificate...
 * -----END CERTIFICATE-----",
 *                 },
 *             },
 *             ExternalSeedNodes = new[]
 *             {
 *                 new AzureNative.DocumentDB.Inputs.SeedNodeArgs
 *                 {
 *                     IpAddress = "10.52.221.2",
 *                 },
 *                 new AzureNative.DocumentDB.Inputs.SeedNodeArgs
 *                 {
 *                     IpAddress = "10.52.221.3",
 *                 },
 *                 new AzureNative.DocumentDB.Inputs.SeedNodeArgs
 *                 {
 *                     IpAddress = "10.52.221.4",
 *                 },
 *             },
 *             HoursBetweenBackups = 24,
 *             InitialCassandraAdminPassword = "mypassword",
 *         },
 *         ResourceGroupName = "cassandra-prod-rg",
 *         Tags = null,
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	documentdb "github.com/pulumi/pulumi-azure-native-sdk/documentdb/v2"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		_, err := documentdb.NewCassandraCluster(ctx, "cassandraCluster", &documentdb.CassandraClusterArgs{
 * 			ClusterName: pulumi.String("cassandra-prod"),
 * 			Location:    pulumi.String("West US"),
 * 			Properties: &documentdb.ClusterResourcePropertiesArgs{
 * 				AuthenticationMethod: pulumi.String(documentdb.AuthenticationMethodCassandra),
 * 				CassandraVersion:     pulumi.String("3.11"),
 * 				ClientCertificates: documentdb.CertificateArray{
 * 					&documentdb.CertificateArgs{
 * 						Pem: pulumi.String("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"),
 * 					},
 * 				},
 * 				ClusterNameOverride:         pulumi.String("ClusterNameIllegalForAzureResource"),
 * 				DelegatedManagementSubnetId: pulumi.String("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management"),
 * 				ExternalGossipCertificates: documentdb.CertificateArray{
 * 					&documentdb.CertificateArgs{
 * 						Pem: pulumi.String("-----BEGIN CERTIFICATE-----\n...Base64 encoded certificate...\n-----END CERTIFICATE-----"),
 * 					},
 * 				},
 * 				ExternalSeedNodes: documentdb.SeedNodeArray{
 * 					&documentdb.SeedNodeArgs{
 * 						IpAddress: pulumi.String("10.52.221.2"),
 * 					},
 * 					&documentdb.SeedNodeArgs{
 * 						IpAddress: pulumi.String("10.52.221.3"),
 * 					},
 * 					&documentdb.SeedNodeArgs{
 * 						IpAddress: pulumi.String("10.52.221.4"),
 * 					},
 * 				},
 * 				HoursBetweenBackups:           pulumi.Int(24),
 * 				InitialCassandraAdminPassword: pulumi.String("mypassword"),
 * 			},
 * 			ResourceGroupName: pulumi.String("cassandra-prod-rg"),
 * 			Tags:              nil,
 * 		})
 * 		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.documentdb.CassandraCluster;
 * import com.pulumi.azurenative.documentdb.CassandraClusterArgs;
 * import com.pulumi.azurenative.documentdb.inputs.ClusterResourcePropertiesArgs;
 * 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 cassandraCluster = new CassandraCluster("cassandraCluster", CassandraClusterArgs.builder()
 *             .clusterName("cassandra-prod")
 *             .location("West US")
 *             .properties(ClusterResourcePropertiesArgs.builder()
 *                 .authenticationMethod("Cassandra")
 *                 .cassandraVersion("3.11")
 *                 .clientCertificates(CertificateArgs.builder()
 *                     .pem("""
 * -----BEGIN CERTIFICATE-----
 * ...Base64 encoded certificate...
 * -----END CERTIFICATE-----                    """)
 *                     .build())
 *                 .clusterNameOverride("ClusterNameIllegalForAzureResource")
 *                 .delegatedManagementSubnetId("/subscriptions/536e130b-d7d6-4ac7-98a5-de20d69588d2/resourceGroups/customer-vnet-rg/providers/Microsoft.Network/virtualNetworks/customer-vnet/subnets/management")
 *                 .externalGossipCertificates(CertificateArgs.builder()
 *                     .pem("""
 * -----BEGIN CERTIFICATE-----
 * ...Base64 encoded certificate...
 * -----END CERTIFICATE-----                    """)
 *                     .build())
 *                 .externalSeedNodes(
 *                     SeedNodeArgs.builder()
 *                         .ipAddress("10.52.221.2")
 *                         .build(),
 *                     SeedNodeArgs.builder()
 *                         .ipAddress("10.52.221.3")
 *                         .build(),
 *                     SeedNodeArgs.builder()
 *                         .ipAddress("10.52.221.4")
 *                         .build())
 *                 .hoursBetweenBackups(24)
 *                 .initialCassandraAdminPassword("mypassword")
 *                 .build())
 *             .resourceGroupName("cassandra-prod-rg")
 *             .tags()
 *             .build());
 *     }
 * }
 * ```
 * ## Import
 * An existing resource can be imported using its type token, name, and identifier, e.g.
 * ```sh
 * $ pulumi import azure-native:documentdb:CassandraCluster cassandra-prod /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DocumentDB/cassandraClusters/{clusterName}
 * ```
 * @property clusterName Managed Cassandra cluster name.
 * @property identity Identity for the resource.
 * @property location The location of the resource group to which the resource belongs.
 * @property properties Properties of a managed Cassandra cluster.
 * @property resourceGroupName The name of the resource group. The name is case insensitive.
 * @property tags Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
 */
public data class CassandraClusterArgs(
    public val clusterName: Output? = null,
    public val identity: Output? = null,
    public val location: Output? = null,
    public val properties: Output? = null,
    public val resourceGroupName: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.documentdb.CassandraClusterArgs =
        com.pulumi.azurenative.documentdb.CassandraClusterArgs.builder()
            .clusterName(clusterName?.applyValue({ args0 -> args0 }))
            .identity(identity?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .location(location?.applyValue({ args0 -> args0 }))
            .properties(properties?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resourceGroupName(resourceGroupName?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    private var identity: Output? = null

    private var location: Output? = null

    private var properties: Output? = null

    private var resourceGroupName: Output? = null

    private var tags: Output>? = null

    /**
     * @param value Managed Cassandra cluster name.
     */
    @JvmName("qcvtobeibqwwtegj")
    public suspend fun clusterName(`value`: Output) {
        this.clusterName = value
    }

    /**
     * @param value Identity for the resource.
     */
    @JvmName("odbbsrratplbkyhi")
    public suspend fun identity(`value`: Output) {
        this.identity = value
    }

    /**
     * @param value The location of the resource group to which the resource belongs.
     */
    @JvmName("mhqjpsugwlmafkvx")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value Properties of a managed Cassandra cluster.
     */
    @JvmName("tkyycetixjlaxnyy")
    public suspend fun properties(`value`: Output) {
        this.properties = value
    }

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

    /**
     * @param value Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
     */
    @JvmName("wmbtmivwuuqnurhj")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param value Identity for the resource.
     */
    @JvmName("jcfulegomaddscsl")
    public suspend fun identity(`value`: ManagedCassandraManagedServiceIdentityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.identity = mapped
    }

    /**
     * @param argument Identity for the resource.
     */
    @JvmName("evylcjkallyijawk")
    public suspend fun identity(argument: suspend ManagedCassandraManagedServiceIdentityArgsBuilder.() -> Unit) {
        val toBeMapped = ManagedCassandraManagedServiceIdentityArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.identity = mapped
    }

    /**
     * @param value The location of the resource group to which the resource belongs.
     */
    @JvmName("jfdcdlphwdccyuou")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value Properties of a managed Cassandra cluster.
     */
    @JvmName("mtvhsummynfisqln")
    public suspend fun properties(`value`: ClusterResourcePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.properties = mapped
    }

    /**
     * @param argument Properties of a managed Cassandra cluster.
     */
    @JvmName("nlrokxrtbidlmqgr")
    public suspend fun properties(argument: suspend ClusterResourcePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = ClusterResourcePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.properties = mapped
    }

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

    /**
     * @param value Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
     */
    @JvmName("qjbjpujluotqkgom")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Tags are a list of key-value pairs that describe the resource. These tags can be used in viewing and grouping this resource (across resource groups). A maximum of 15 tags can be provided for a resource. Each tag must have a key no greater than 128 characters and value no greater than 256 characters. For example, the default experience for a template type is set with "defaultExperience": "Cassandra". Current "defaultExperience" values also include "Table", "Graph", "DocumentDB", and "MongoDB".
     */
    @JvmName("slgqdksnetwbamls")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): CassandraClusterArgs = CassandraClusterArgs(
        clusterName = clusterName,
        identity = identity,
        location = location,
        properties = properties,
        resourceGroupName = resourceGroupName,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy