![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.lex.kotlin.ResourcePolicyArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.lex.kotlin
import com.pulumi.awsnative.lex.ResourcePolicyArgs.builder
import com.pulumi.awsnative.lex.kotlin.inputs.ResourcePolicyPolicyArgs
import com.pulumi.awsnative.lex.kotlin.inputs.ResourcePolicyPolicyArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A resource policy with specified policy statements that attaches to a Lex bot or bot alias.
* @property policy A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow IAM syntax. If the policy isn't valid, Amazon Lex returns a validation exception.
* @property resourceArn The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
*/
public data class ResourcePolicyArgs(
public val policy: Output? = null,
public val resourceArn: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.lex.ResourcePolicyArgs =
com.pulumi.awsnative.lex.ResourcePolicyArgs.builder()
.policy(policy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.resourceArn(resourceArn?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ResourcePolicyArgs].
*/
@PulumiTagMarker
public class ResourcePolicyArgsBuilder internal constructor() {
private var policy: Output? = null
private var resourceArn: Output? = null
/**
* @param value A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow IAM syntax. If the policy isn't valid, Amazon Lex returns a validation exception.
*/
@JvmName("rdremiobkysfaeis")
public suspend fun policy(`value`: Output) {
this.policy = value
}
/**
* @param value The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
*/
@JvmName("qnpyrqtesktlhiuo")
public suspend fun resourceArn(`value`: Output) {
this.resourceArn = value
}
/**
* @param value A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow IAM syntax. If the policy isn't valid, Amazon Lex returns a validation exception.
*/
@JvmName("vtvvdwclrgfwqpmn")
public suspend fun policy(`value`: ResourcePolicyPolicyArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.policy = mapped
}
/**
* @param argument A resource policy to add to the resource. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow IAM syntax. If the policy isn't valid, Amazon Lex returns a validation exception.
*/
@JvmName("vgfxyiuagmbglltj")
public suspend fun policy(argument: suspend ResourcePolicyPolicyArgsBuilder.() -> Unit) {
val toBeMapped = ResourcePolicyPolicyArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.policy = mapped
}
/**
* @param value The Amazon Resource Name (ARN) of the bot or bot alias that the resource policy is attached to.
*/
@JvmName("ypucfjicncscvjdv")
public suspend fun resourceArn(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceArn = mapped
}
internal fun build(): ResourcePolicyArgs = ResourcePolicyArgs(
policy = policy,
resourceArn = resourceArn,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy