com.pulumi.awsnative.msk.kotlin.Cluster.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.msk.kotlin
import com.pulumi.awsnative.msk.kotlin.enums.ClusterEnhancedMonitoring
import com.pulumi.awsnative.msk.kotlin.enums.ClusterStorageMode
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterBrokerNodeGroupInfo
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterClientAuthentication
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterConfigurationInfo
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterEncryptionInfo
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterLoggingInfo
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterOpenMonitoring
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import com.pulumi.awsnative.msk.kotlin.enums.ClusterEnhancedMonitoring.Companion.toKotlin as clusterEnhancedMonitoringToKotlin
import com.pulumi.awsnative.msk.kotlin.enums.ClusterStorageMode.Companion.toKotlin as clusterStorageModeToKotlin
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterBrokerNodeGroupInfo.Companion.toKotlin as clusterBrokerNodeGroupInfoToKotlin
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterClientAuthentication.Companion.toKotlin as clusterClientAuthenticationToKotlin
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterConfigurationInfo.Companion.toKotlin as clusterConfigurationInfoToKotlin
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterEncryptionInfo.Companion.toKotlin as clusterEncryptionInfoToKotlin
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterLoggingInfo.Companion.toKotlin as clusterLoggingInfoToKotlin
import com.pulumi.awsnative.msk.kotlin.outputs.ClusterOpenMonitoring.Companion.toKotlin as clusterOpenMonitoringToKotlin
/**
* Builder for [Cluster].
*/
@PulumiTagMarker
public class ClusterResourceBuilder internal constructor() {
public var name: String? = null
public var args: ClusterArgs = ClusterArgs()
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 ClusterArgsBuilder.() -> Unit) {
val builder = ClusterArgsBuilder()
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(): Cluster {
val builtJavaResource = com.pulumi.awsnative.msk.Cluster(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Cluster(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::MSK::Cluster
*/
public class Cluster internal constructor(
override val javaResource: com.pulumi.awsnative.msk.Cluster,
) : KotlinCustomResource(javaResource, ClusterMapper) {
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Information about the broker nodes in the cluster.
*/
public val brokerNodeGroupInfo: Output
get() = javaResource.brokerNodeGroupInfo().applyValue({ args0 ->
args0.let({ args0 ->
clusterBrokerNodeGroupInfoToKotlin(args0)
})
})
/**
* Includes all client authentication related information.
*/
public val clientAuthentication: Output?
get() = javaResource.clientAuthentication().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterClientAuthenticationToKotlin(args0) })
}).orElse(null)
})
/**
* The name of the cluster.
*/
public val clusterName: Output
get() = javaResource.clusterName().applyValue({ args0 -> args0 })
/**
* Represents the configuration that you want MSK to use for the cluster.
*/
public val configurationInfo: Output?
get() = javaResource.configurationInfo().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterConfigurationInfoToKotlin(args0) })
}).orElse(null)
})
/**
* The current version of the MSK cluster
*/
public val currentVersion: Output?
get() = javaResource.currentVersion().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Includes all encryption-related information.
*/
public val encryptionInfo: Output?
get() = javaResource.encryptionInfo().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterEncryptionInfoToKotlin(args0) })
}).orElse(null)
})
/**
* Specifies the level of monitoring for the MSK cluster. The possible values are `DEFAULT` , `PER_BROKER` , and `PER_TOPIC_PER_BROKER` .
*/
public val enhancedMonitoring: Output?
get() = javaResource.enhancedMonitoring().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterEnhancedMonitoringToKotlin(args0) })
}).orElse(null)
})
/**
* The version of Apache Kafka. You can use Amazon MSK to create clusters that use Apache Kafka versions 1.1.1 and 2.2.1.
*/
public val kafkaVersion: Output
get() = javaResource.kafkaVersion().applyValue({ args0 -> args0 })
/**
* Logging Info details.
*/
public val loggingInfo: Output?
get() = javaResource.loggingInfo().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
clusterLoggingInfoToKotlin(args0)
})
}).orElse(null)
})
/**
* The number of broker nodes in the cluster.
*/
public val numberOfBrokerNodes: Output
get() = javaResource.numberOfBrokerNodes().applyValue({ args0 -> args0 })
/**
* The settings for open monitoring.
*/
public val openMonitoring: Output?
get() = javaResource.openMonitoring().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> clusterOpenMonitoringToKotlin(args0) })
}).orElse(null)
})
/**
* This controls storage mode for supported storage tiers.
*/
public val storageMode: Output?
get() = javaResource.storageMode().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
clusterStorageModeToKotlin(args0)
})
}).orElse(null)
})
/**
* A key-value pair to associate with a resource.
*/
public val tags: Output