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

com.pulumi.aws.wafv2.kotlin.inputs.WebAclDefaultActionArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.wafv2.kotlin.inputs

import com.pulumi.aws.wafv2.inputs.WebAclDefaultActionArgs.builder
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.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property allow Specifies that AWS WAF should allow requests by default. See `allow` below for details.
 * @property block Specifies that AWS WAF should block requests by default. See `block` below for details.
 */
public data class WebAclDefaultActionArgs(
    public val allow: Output? = null,
    public val block: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.wafv2.inputs.WebAclDefaultActionArgs =
        com.pulumi.aws.wafv2.inputs.WebAclDefaultActionArgs.builder()
            .allow(allow?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .block(block?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [WebAclDefaultActionArgs].
 */
@PulumiTagMarker
public class WebAclDefaultActionArgsBuilder internal constructor() {
    private var allow: Output? = null

    private var block: Output? = null

    /**
     * @param value Specifies that AWS WAF should allow requests by default. See `allow` below for details.
     */
    @JvmName("wsnfsyrwyebnrrrh")
    public suspend fun allow(`value`: Output) {
        this.allow = value
    }

    /**
     * @param value Specifies that AWS WAF should block requests by default. See `block` below for details.
     */
    @JvmName("mxoifnqqjoginngr")
    public suspend fun block(`value`: Output) {
        this.block = value
    }

    /**
     * @param value Specifies that AWS WAF should allow requests by default. See `allow` below for details.
     */
    @JvmName("bwcmpmibwvmrsecm")
    public suspend fun allow(`value`: WebAclDefaultActionAllowArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allow = mapped
    }

    /**
     * @param argument Specifies that AWS WAF should allow requests by default. See `allow` below for details.
     */
    @JvmName("ryijlhfphdedhlua")
    public suspend fun allow(argument: suspend WebAclDefaultActionAllowArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclDefaultActionAllowArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.allow = mapped
    }

    /**
     * @param value Specifies that AWS WAF should block requests by default. See `block` below for details.
     */
    @JvmName("noqusbmcbmgvehpe")
    public suspend fun block(`value`: WebAclDefaultActionBlockArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.block = mapped
    }

    /**
     * @param argument Specifies that AWS WAF should block requests by default. See `block` below for details.
     */
    @JvmName("okvxbbqmvrgnjcyc")
    public suspend fun block(argument: suspend WebAclDefaultActionBlockArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclDefaultActionBlockArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.block = mapped
    }

    internal fun build(): WebAclDefaultActionArgs = WebAclDefaultActionArgs(
        allow = allow,
        block = block,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy