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

com.pulumi.azure.hdinsight.kotlin.KafkaCluster.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: 6.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.hdinsight.kotlin

import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterComponentVersion
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterComputeIsolation
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterDiskEncryption
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterExtension
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterGateway
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterMetastores
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterMonitor
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterNetwork
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterPrivateLinkConfiguration
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterRestProxy
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterRoles
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterSecurityProfile
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterStorageAccount
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterStorageAccountGen2
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterComponentVersion.Companion.toKotlin as kafkaClusterComponentVersionToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterComputeIsolation.Companion.toKotlin as kafkaClusterComputeIsolationToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterDiskEncryption.Companion.toKotlin as kafkaClusterDiskEncryptionToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterExtension.Companion.toKotlin as kafkaClusterExtensionToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterGateway.Companion.toKotlin as kafkaClusterGatewayToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterMetastores.Companion.toKotlin as kafkaClusterMetastoresToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterMonitor.Companion.toKotlin as kafkaClusterMonitorToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterNetwork.Companion.toKotlin as kafkaClusterNetworkToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterPrivateLinkConfiguration.Companion.toKotlin as kafkaClusterPrivateLinkConfigurationToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterRestProxy.Companion.toKotlin as kafkaClusterRestProxyToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterRoles.Companion.toKotlin as kafkaClusterRolesToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterSecurityProfile.Companion.toKotlin as kafkaClusterSecurityProfileToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterStorageAccount.Companion.toKotlin as kafkaClusterStorageAccountToKotlin
import com.pulumi.azure.hdinsight.kotlin.outputs.KafkaClusterStorageAccountGen2.Companion.toKotlin as kafkaClusterStorageAccountGen2ToKotlin

/**
 * Builder for [KafkaCluster].
 */
@PulumiTagMarker
public class KafkaClusterResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: KafkaClusterArgs = KafkaClusterArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend KafkaClusterArgsBuilder.() -> Unit) {
        val builder = KafkaClusterArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): KafkaCluster {
        val builtJavaResource = com.pulumi.azure.hdinsight.KafkaCluster(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return KafkaCluster(builtJavaResource)
    }
}

/**
 * Manages a HDInsight Kafka Cluster.
 * ## Example Usage
 * 
 * ```typescript
 * import * as pulumi from "@pulumi/pulumi";
 * import * as azure from "@pulumi/azure";
 * const example = new azure.core.ResourceGroup("example", {
 *     name: "example-resources",
 *     location: "West Europe",
 * });
 * const exampleAccount = new azure.storage.Account("example", {
 *     name: "hdinsightstor",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     accountTier: "Standard",
 *     accountReplicationType: "LRS",
 * });
 * const exampleContainer = new azure.storage.Container("example", {
 *     name: "hdinsight",
 *     storageAccountName: exampleAccount.name,
 *     containerAccessType: "private",
 * });
 * const exampleKafkaCluster = new azure.hdinsight.KafkaCluster("example", {
 *     name: "example-hdicluster",
 *     resourceGroupName: example.name,
 *     location: example.location,
 *     clusterVersion: "4.0",
 *     tier: "Standard",
 *     componentVersion: {
 *         kafka: "2.1",
 *     },
 *     gateway: {
 *         username: "acctestusrgw",
 *         password: "Password123!",
 *     },
 *     storageAccounts: [{
 *         storageContainerId: exampleContainer.id,
 *         storageAccountKey: exampleAccount.primaryAccessKey,
 *         isDefault: true,
 *     }],
 *     roles: {
 *         headNode: {
 *             vmSize: "Standard_D3_V2",
 *             username: "acctestusrvm",
 *             password: "AccTestvdSC4daf986!",
 *         },
 *         workerNode: {
 *             vmSize: "Standard_D3_V2",
 *             username: "acctestusrvm",
 *             password: "AccTestvdSC4daf986!",
 *             numberOfDisksPerNode: 3,
 *             targetInstanceCount: 3,
 *         },
 *         zookeeperNode: {
 *             vmSize: "Standard_D3_V2",
 *             username: "acctestusrvm",
 *             password: "AccTestvdSC4daf986!",
 *         },
 *     },
 * });
 * ```
 * ```python
 * import pulumi
 * import pulumi_azure as azure
 * example = azure.core.ResourceGroup("example",
 *     name="example-resources",
 *     location="West Europe")
 * example_account = azure.storage.Account("example",
 *     name="hdinsightstor",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     account_tier="Standard",
 *     account_replication_type="LRS")
 * example_container = azure.storage.Container("example",
 *     name="hdinsight",
 *     storage_account_name=example_account.name,
 *     container_access_type="private")
 * example_kafka_cluster = azure.hdinsight.KafkaCluster("example",
 *     name="example-hdicluster",
 *     resource_group_name=example.name,
 *     location=example.location,
 *     cluster_version="4.0",
 *     tier="Standard",
 *     component_version=azure.hdinsight.KafkaClusterComponentVersionArgs(
 *         kafka="2.1",
 *     ),
 *     gateway=azure.hdinsight.KafkaClusterGatewayArgs(
 *         username="acctestusrgw",
 *         password="Password123!",
 *     ),
 *     storage_accounts=[azure.hdinsight.KafkaClusterStorageAccountArgs(
 *         storage_container_id=example_container.id,
 *         storage_account_key=example_account.primary_access_key,
 *         is_default=True,
 *     )],
 *     roles=azure.hdinsight.KafkaClusterRolesArgs(
 *         head_node=azure.hdinsight.KafkaClusterRolesHeadNodeArgs(
 *             vm_size="Standard_D3_V2",
 *             username="acctestusrvm",
 *             password="AccTestvdSC4daf986!",
 *         ),
 *         worker_node=azure.hdinsight.KafkaClusterRolesWorkerNodeArgs(
 *             vm_size="Standard_D3_V2",
 *             username="acctestusrvm",
 *             password="AccTestvdSC4daf986!",
 *             number_of_disks_per_node=3,
 *             target_instance_count=3,
 *         ),
 *         zookeeper_node=azure.hdinsight.KafkaClusterRolesZookeeperNodeArgs(
 *             vm_size="Standard_D3_V2",
 *             username="acctestusrvm",
 *             password="AccTestvdSC4daf986!",
 *         ),
 *     ))
 * ```
 * ```csharp
 * using System.Collections.Generic;
 * using System.Linq;
 * using Pulumi;
 * using Azure = Pulumi.Azure;
 * return await Deployment.RunAsync(() =>
 * {
 *     var example = new Azure.Core.ResourceGroup("example", new()
 *     {
 *         Name = "example-resources",
 *         Location = "West Europe",
 *     });
 *     var exampleAccount = new Azure.Storage.Account("example", new()
 *     {
 *         Name = "hdinsightstor",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         AccountTier = "Standard",
 *         AccountReplicationType = "LRS",
 *     });
 *     var exampleContainer = new Azure.Storage.Container("example", new()
 *     {
 *         Name = "hdinsight",
 *         StorageAccountName = exampleAccount.Name,
 *         ContainerAccessType = "private",
 *     });
 *     var exampleKafkaCluster = new Azure.HDInsight.KafkaCluster("example", new()
 *     {
 *         Name = "example-hdicluster",
 *         ResourceGroupName = example.Name,
 *         Location = example.Location,
 *         ClusterVersion = "4.0",
 *         Tier = "Standard",
 *         ComponentVersion = new Azure.HDInsight.Inputs.KafkaClusterComponentVersionArgs
 *         {
 *             Kafka = "2.1",
 *         },
 *         Gateway = new Azure.HDInsight.Inputs.KafkaClusterGatewayArgs
 *         {
 *             Username = "acctestusrgw",
 *             Password = "Password123!",
 *         },
 *         StorageAccounts = new[]
 *         {
 *             new Azure.HDInsight.Inputs.KafkaClusterStorageAccountArgs
 *             {
 *                 StorageContainerId = exampleContainer.Id,
 *                 StorageAccountKey = exampleAccount.PrimaryAccessKey,
 *                 IsDefault = true,
 *             },
 *         },
 *         Roles = new Azure.HDInsight.Inputs.KafkaClusterRolesArgs
 *         {
 *             HeadNode = new Azure.HDInsight.Inputs.KafkaClusterRolesHeadNodeArgs
 *             {
 *                 VmSize = "Standard_D3_V2",
 *                 Username = "acctestusrvm",
 *                 Password = "AccTestvdSC4daf986!",
 *             },
 *             WorkerNode = new Azure.HDInsight.Inputs.KafkaClusterRolesWorkerNodeArgs
 *             {
 *                 VmSize = "Standard_D3_V2",
 *                 Username = "acctestusrvm",
 *                 Password = "AccTestvdSC4daf986!",
 *                 NumberOfDisksPerNode = 3,
 *                 TargetInstanceCount = 3,
 *             },
 *             ZookeeperNode = new Azure.HDInsight.Inputs.KafkaClusterRolesZookeeperNodeArgs
 *             {
 *                 VmSize = "Standard_D3_V2",
 *                 Username = "acctestusrvm",
 *                 Password = "AccTestvdSC4daf986!",
 *             },
 *         },
 *     });
 * });
 * ```
 * ```go
 * package main
 * import (
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/hdinsight"
 * 	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/storage"
 * 	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
 * )
 * func main() {
 * 	pulumi.Run(func(ctx *pulumi.Context) error {
 * 		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
 * 			Name:     pulumi.String("example-resources"),
 * 			Location: pulumi.String("West Europe"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleAccount, err := storage.NewAccount(ctx, "example", &storage.AccountArgs{
 * 			Name:                   pulumi.String("hdinsightstor"),
 * 			ResourceGroupName:      example.Name,
 * 			Location:               example.Location,
 * 			AccountTier:            pulumi.String("Standard"),
 * 			AccountReplicationType: pulumi.String("LRS"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		exampleContainer, err := storage.NewContainer(ctx, "example", &storage.ContainerArgs{
 * 			Name:                pulumi.String("hdinsight"),
 * 			StorageAccountName:  exampleAccount.Name,
 * 			ContainerAccessType: pulumi.String("private"),
 * 		})
 * 		if err != nil {
 * 			return err
 * 		}
 * 		_, err = hdinsight.NewKafkaCluster(ctx, "example", &hdinsight.KafkaClusterArgs{
 * 			Name:              pulumi.String("example-hdicluster"),
 * 			ResourceGroupName: example.Name,
 * 			Location:          example.Location,
 * 			ClusterVersion:    pulumi.String("4.0"),
 * 			Tier:              pulumi.String("Standard"),
 * 			ComponentVersion: &hdinsight.KafkaClusterComponentVersionArgs{
 * 				Kafka: pulumi.String("2.1"),
 * 			},
 * 			Gateway: &hdinsight.KafkaClusterGatewayArgs{
 * 				Username: pulumi.String("acctestusrgw"),
 * 				Password: pulumi.String("Password123!"),
 * 			},
 * 			StorageAccounts: hdinsight.KafkaClusterStorageAccountArray{
 * 				&hdinsight.KafkaClusterStorageAccountArgs{
 * 					StorageContainerId: exampleContainer.ID(),
 * 					StorageAccountKey:  exampleAccount.PrimaryAccessKey,
 * 					IsDefault:          pulumi.Bool(true),
 * 				},
 * 			},
 * 			Roles: &hdinsight.KafkaClusterRolesArgs{
 * 				HeadNode: &hdinsight.KafkaClusterRolesHeadNodeArgs{
 * 					VmSize:   pulumi.String("Standard_D3_V2"),
 * 					Username: pulumi.String("acctestusrvm"),
 * 					Password: pulumi.String("AccTestvdSC4daf986!"),
 * 				},
 * 				WorkerNode: &hdinsight.KafkaClusterRolesWorkerNodeArgs{
 * 					VmSize:               pulumi.String("Standard_D3_V2"),
 * 					Username:             pulumi.String("acctestusrvm"),
 * 					Password:             pulumi.String("AccTestvdSC4daf986!"),
 * 					NumberOfDisksPerNode: pulumi.Int(3),
 * 					TargetInstanceCount:  pulumi.Int(3),
 * 				},
 * 				ZookeeperNode: &hdinsight.KafkaClusterRolesZookeeperNodeArgs{
 * 					VmSize:   pulumi.String("Standard_D3_V2"),
 * 					Username: pulumi.String("acctestusrvm"),
 * 					Password: pulumi.String("AccTestvdSC4daf986!"),
 * 				},
 * 			},
 * 		})
 * 		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.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.storage.Container;
 * import com.pulumi.azure.storage.ContainerArgs;
 * import com.pulumi.azure.hdinsight.KafkaCluster;
 * import com.pulumi.azure.hdinsight.KafkaClusterArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterComponentVersionArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterGatewayArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterStorageAccountArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterRolesArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterRolesHeadNodeArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterRolesWorkerNodeArgs;
 * import com.pulumi.azure.hdinsight.inputs.KafkaClusterRolesZookeeperNodeArgs;
 * 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 example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("example-resources")
 *             .location("West Europe")
 *             .build());
 *         var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
 *             .name("hdinsightstor")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 *         var exampleContainer = new Container("exampleContainer", ContainerArgs.builder()
 *             .name("hdinsight")
 *             .storageAccountName(exampleAccount.name())
 *             .containerAccessType("private")
 *             .build());
 *         var exampleKafkaCluster = new KafkaCluster("exampleKafkaCluster", KafkaClusterArgs.builder()
 *             .name("example-hdicluster")
 *             .resourceGroupName(example.name())
 *             .location(example.location())
 *             .clusterVersion("4.0")
 *             .tier("Standard")
 *             .componentVersion(KafkaClusterComponentVersionArgs.builder()
 *                 .kafka("2.1")
 *                 .build())
 *             .gateway(KafkaClusterGatewayArgs.builder()
 *                 .username("acctestusrgw")
 *                 .password("Password123!")
 *                 .build())
 *             .storageAccounts(KafkaClusterStorageAccountArgs.builder()
 *                 .storageContainerId(exampleContainer.id())
 *                 .storageAccountKey(exampleAccount.primaryAccessKey())
 *                 .isDefault(true)
 *                 .build())
 *             .roles(KafkaClusterRolesArgs.builder()
 *                 .headNode(KafkaClusterRolesHeadNodeArgs.builder()
 *                     .vmSize("Standard_D3_V2")
 *                     .username("acctestusrvm")
 *                     .password("AccTestvdSC4daf986!")
 *                     .build())
 *                 .workerNode(KafkaClusterRolesWorkerNodeArgs.builder()
 *                     .vmSize("Standard_D3_V2")
 *                     .username("acctestusrvm")
 *                     .password("AccTestvdSC4daf986!")
 *                     .numberOfDisksPerNode(3)
 *                     .targetInstanceCount(3)
 *                     .build())
 *                 .zookeeperNode(KafkaClusterRolesZookeeperNodeArgs.builder()
 *                     .vmSize("Standard_D3_V2")
 *                     .username("acctestusrvm")
 *                     .password("AccTestvdSC4daf986!")
 *                     .build())
 *                 .build())
 *             .build());
 *     }
 * }
 * ```
 * ```yaml
 * resources:
 *   example:
 *     type: azure:core:ResourceGroup
 *     properties:
 *       name: example-resources
 *       location: West Europe
 *   exampleAccount:
 *     type: azure:storage:Account
 *     name: example
 *     properties:
 *       name: hdinsightstor
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       accountTier: Standard
 *       accountReplicationType: LRS
 *   exampleContainer:
 *     type: azure:storage:Container
 *     name: example
 *     properties:
 *       name: hdinsight
 *       storageAccountName: ${exampleAccount.name}
 *       containerAccessType: private
 *   exampleKafkaCluster:
 *     type: azure:hdinsight:KafkaCluster
 *     name: example
 *     properties:
 *       name: example-hdicluster
 *       resourceGroupName: ${example.name}
 *       location: ${example.location}
 *       clusterVersion: '4.0'
 *       tier: Standard
 *       componentVersion:
 *         kafka: '2.1'
 *       gateway:
 *         username: acctestusrgw
 *         password: Password123!
 *       storageAccounts:
 *         - storageContainerId: ${exampleContainer.id}
 *           storageAccountKey: ${exampleAccount.primaryAccessKey}
 *           isDefault: true
 *       roles:
 *         headNode:
 *           vmSize: Standard_D3_V2
 *           username: acctestusrvm
 *           password: AccTestvdSC4daf986!
 *         workerNode:
 *           vmSize: Standard_D3_V2
 *           username: acctestusrvm
 *           password: AccTestvdSC4daf986!
 *           numberOfDisksPerNode: 3
 *           targetInstanceCount: 3
 *         zookeeperNode:
 *           vmSize: Standard_D3_V2
 *           username: acctestusrvm
 *           password: AccTestvdSC4daf986!
 * ```
 * 
 * ## Import
 * HDInsight Kafka Clusters can be imported using the `resource id`, e.g.
 * ```sh
 * $ pulumi import azure:hdinsight/kafkaCluster:KafkaCluster example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/mygroup1/providers/Microsoft.HDInsight/clusters/cluster1
 * ```
 */
public class KafkaCluster internal constructor(
    override val javaResource: com.pulumi.azure.hdinsight.KafkaCluster,
) : KotlinCustomResource(javaResource, KafkaClusterMapper) {
    /**
     * Specifies the Version of HDInsights which should be used for this Cluster. Changing this forces a new resource to be created.
     */
    public val clusterVersion: Output
        get() = javaResource.clusterVersion().applyValue({ args0 -> args0 })

    /**
     * A `component_version` block as defined below.
     */
    public val componentVersion: Output
        get() = javaResource.componentVersion().applyValue({ args0 ->
            args0.let({ args0 ->
                kafkaClusterComponentVersionToKotlin(args0)
            })
        })

    /**
     * A `compute_isolation` block as defined below.
     */
    public val computeIsolation: Output?
        get() = javaResource.computeIsolation().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> kafkaClusterComputeIsolationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * One or more `disk_encryption` block as defined below.
     * > **NOTE:** Starting on June 30, 2020, Azure HDInsight will enforce TLS 1.2 or later versions for all HTTPS connections. For more information, see [Azure HDInsight TLS 1.2 Enforcement](https://azure.microsoft.com/en-us/updates/azure-hdinsight-tls-12-enforcement/).
     */
    public val diskEncryptions: Output>?
        get() = javaResource.diskEncryptions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        kafkaClusterDiskEncryptionToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Whether encryption in transit is enabled for this HDInsight Kafka Cluster. Changing this forces a new resource to be created.
     */
    public val encryptionInTransitEnabled: Output?
        get() = javaResource.encryptionInTransitEnabled().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * An `extension` block as defined below.
     */
    public val extension: Output?
        get() = javaResource.extension().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    kafkaClusterExtensionToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * A `gateway` block as defined below.
     */
    public val gateway: Output
        get() = javaResource.gateway().applyValue({ args0 ->
            args0.let({ args0 ->
                kafkaClusterGatewayToKotlin(args0)
            })
        })

    /**
     * The HTTPS Connectivity Endpoint for this HDInsight Kafka Cluster.
     */
    public val httpsEndpoint: Output
        get() = javaResource.httpsEndpoint().applyValue({ args0 -> args0 })

    /**
     * The Kafka Rest Proxy Endpoint for this HDInsight Kafka Cluster.
     */
    public val kafkaRestProxyEndpoint: Output
        get() = javaResource.kafkaRestProxyEndpoint().applyValue({ args0 -> args0 })

    /**
     * Specifies the Azure Region which this HDInsight Kafka Cluster should exist. Changing this forces a new resource to be created.
     */
    public val location: Output
        get() = javaResource.location().applyValue({ args0 -> args0 })

    /**
     * A `metastores` block as defined below.
     */
    public val metastores: Output?
        get() = javaResource.metastores().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    kafkaClusterMetastoresToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * A `monitor` block as defined below.
     */
    public val monitor: Output?
        get() = javaResource.monitor().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    kafkaClusterMonitorToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * Specifies the name for this HDInsight Kafka Cluster. Changing this forces a new resource to be created.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * A `network` block as defined below.
     */
    public val network: Output?
        get() = javaResource.network().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    kafkaClusterNetworkToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * A `private_link_configuration` block as defined below.
     */
    public val privateLinkConfiguration: Output?
        get() = javaResource.privateLinkConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> kafkaClusterPrivateLinkConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Specifies the name of the Resource Group in which this HDInsight Kafka Cluster should exist. Changing this forces a new resource to be created.
     */
    public val resourceGroupName: Output
        get() = javaResource.resourceGroupName().applyValue({ args0 -> args0 })

    /**
     * A `rest_proxy` block as defined below.
     */
    public val restProxy: Output?
        get() = javaResource.restProxy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    kafkaClusterRestProxyToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * A `roles` block as defined below.
     */
    @Deprecated(
        message = """
  `kafka_management_node` will be removed in version 4.0 of the AzureRM Provider since it no longer
      support configurations from the user
  """,
    )
    public val roles: Output
        get() = javaResource.roles().applyValue({ args0 ->
            args0.let({ args0 ->
                kafkaClusterRolesToKotlin(args0)
            })
        })

    /**
     * A `security_profile` block as defined below. Changing this forces a new resource to be created.
     */
    public val securityProfile: Output?
        get() = javaResource.securityProfile().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> kafkaClusterSecurityProfileToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The SSH Connectivity Endpoint for this HDInsight Kafka Cluster.
     */
    public val sshEndpoint: Output
        get() = javaResource.sshEndpoint().applyValue({ args0 -> args0 })

    /**
     * A `storage_account_gen2` block as defined below.
     */
    public val storageAccountGen2: Output?
        get() = javaResource.storageAccountGen2().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> kafkaClusterStorageAccountGen2ToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * One or more `storage_account` block as defined below.
     */
    public val storageAccounts: Output>?
        get() = javaResource.storageAccounts().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        kafkaClusterStorageAccountToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * A map of Tags which should be assigned to this HDInsight Kafka Cluster.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * Specifies the Tier which should be used for this HDInsight Kafka Cluster. Possible values are `Standard` or `Premium`. Changing this forces a new resource to be created.
     */
    public val tier: Output
        get() = javaResource.tier().applyValue({ args0 -> args0 })

    /**
     * The minimal supported TLS version. Possible values are `1.0`, `1.1` or `1.2`. Changing this forces a new resource to be created.
     */
    public val tlsMinVersion: Output?
        get() = javaResource.tlsMinVersion().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object KafkaClusterMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.azure.hdinsight.KafkaCluster::class == javaResource::class

    override fun map(javaResource: Resource): KafkaCluster = KafkaCluster(
        javaResource as
            com.pulumi.azure.hdinsight.KafkaCluster,
    )
}

/**
 * @see [KafkaCluster].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [KafkaCluster].
 */
public suspend fun kafkaCluster(
    name: String,
    block: suspend KafkaClusterResourceBuilder.() -> Unit,
): KafkaCluster {
    val builder = KafkaClusterResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [KafkaCluster].
 * @param name The _unique_ name of the resulting resource.
 */
public fun kafkaCluster(name: String): KafkaCluster {
    val builder = KafkaClusterResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy