com.pulumi.awsnative.msk.kotlin.BatchScramSecret.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.msk.kotlin
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [BatchScramSecret].
*/
@PulumiTagMarker
public class BatchScramSecretResourceBuilder internal constructor() {
public var name: String? = null
public var args: BatchScramSecretArgs = BatchScramSecretArgs()
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 BatchScramSecretArgsBuilder.() -> Unit) {
val builder = BatchScramSecretArgsBuilder()
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(): BatchScramSecret {
val builtJavaResource = com.pulumi.awsnative.msk.BatchScramSecret(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return BatchScramSecret(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::MSK::BatchScramSecret
*/
public class BatchScramSecret internal constructor(
override val javaResource: com.pulumi.awsnative.msk.BatchScramSecret,
) : KotlinCustomResource(javaResource, BatchScramSecretMapper) {
public val clusterArn: Output
get() = javaResource.clusterArn().applyValue({ args0 -> args0 })
public val secretArnList: Output>?
get() = javaResource.secretArnList().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
}
public object BatchScramSecretMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.msk.BatchScramSecret::class == javaResource::class
override fun map(javaResource: Resource): BatchScramSecret = BatchScramSecret(
javaResource as
com.pulumi.awsnative.msk.BatchScramSecret,
)
}
/**
* @see [BatchScramSecret].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [BatchScramSecret].
*/
public suspend fun batchScramSecret(
name: String,
block: suspend BatchScramSecretResourceBuilder.() -> Unit,
): BatchScramSecret {
val builder = BatchScramSecretResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [BatchScramSecret].
* @param name The _unique_ name of the resulting resource.
*/
public fun batchScramSecret(name: String): BatchScramSecret {
val builder = BatchScramSecretResourceBuilder()
builder.name(name)
return builder.build()
}