![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.msk.kotlin.ClusterPolicy.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.Any
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
/**
* Builder for [ClusterPolicy].
*/
@PulumiTagMarker
public class ClusterPolicyResourceBuilder internal constructor() {
public var name: String? = null
public var args: ClusterPolicyArgs = ClusterPolicyArgs()
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 ClusterPolicyArgsBuilder.() -> Unit) {
val builder = ClusterPolicyArgsBuilder()
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(): ClusterPolicy {
val builtJavaResource = com.pulumi.awsnative.msk.ClusterPolicy(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return ClusterPolicy(builtJavaResource)
}
}
/**
* Resource Type definition for AWS::MSK::ClusterPolicy
*/
public class ClusterPolicy internal constructor(
override val javaResource: com.pulumi.awsnative.msk.ClusterPolicy,
) : KotlinCustomResource(javaResource, ClusterPolicyMapper) {
/**
* The arn of the cluster for the resource policy.
*/
public val clusterArn: Output
get() = javaResource.clusterArn().applyValue({ args0 -> args0 })
/**
* The current version of the policy attached to the specified cluster
*/
public val currentVersion: Output
get() = javaResource.currentVersion().applyValue({ args0 -> args0 })
/**
* A policy document containing permissions to add to the specified cluster.
* Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::MSK::ClusterPolicy` for more information about the expected schema for this property.
*/
public val policy: Output
get() = javaResource.policy().applyValue({ args0 -> args0 })
}
public object ClusterPolicyMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.msk.ClusterPolicy::class == javaResource::class
override fun map(javaResource: Resource): ClusterPolicy = ClusterPolicy(
javaResource as
com.pulumi.awsnative.msk.ClusterPolicy,
)
}
/**
* @see [ClusterPolicy].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [ClusterPolicy].
*/
public suspend fun clusterPolicy(
name: String,
block: suspend ClusterPolicyResourceBuilder.() -> Unit,
): ClusterPolicy {
val builder = ClusterPolicyResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [ClusterPolicy].
* @param name The _unique_ name of the resulting resource.
*/
public fun clusterPolicy(name: String): ClusterPolicy {
val builder = ClusterPolicyResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy