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

com.pulumi.awsnative.lex.kotlin.ResourcePolicyArgs.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: 1.11.0.0
Show newest version
@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("pnhfvxnxhdqbcwap")
    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("musruucjfgmwxesc")
    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("vexudcrvkbdjpykx")
    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("cetxfyynmxesowke")
    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("qrwgschqrubsblkw")
    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 - 2024 Weber Informatics LLC | Privacy Policy