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

com.pulumi.aws.wafv2.kotlin.inputs.RuleGroupRuleStatementArgs.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.RuleGroupRuleStatementArgs.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 andStatement A logical rule statement used to combine other rule statements with AND logic. See AND Statement below for details.
 * @property byteMatchStatement A rule statement that defines a string match search for AWS WAF to apply to web requests. See Byte Match Statement below for details.
 * @property geoMatchStatement A rule statement used to identify web requests based on country of origin. See GEO Match Statement below for details.
 * @property ipSetReferenceStatement A rule statement used to detect web requests coming from particular IP addresses or address ranges. See IP Set Reference Statement below for details.
 * @property labelMatchStatement A rule statement that defines a string match search against labels that have been added to the web request by rules that have already run in the web ACL. See Label Match Statement below for details.
 * @property notStatement A logical rule statement used to negate the results of another rule statement. See NOT Statement below for details.
 * @property orStatement A logical rule statement used to combine other rule statements with OR logic. See OR Statement below for details.
 * @property rateBasedStatement A rate-based rule tracks the rate of requests for each originating `IP address`, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any `5-minute` time span. This statement can not be nested. See Rate Based Statement below for details.
 * @property regexMatchStatement A rule statement used to search web request components for a match against a single regular expression. See Regex Match Statement below for details.
 * @property regexPatternSetReferenceStatement A rule statement used to search web request components for matches with regular expressions. See Regex Pattern Set Reference Statement below for details.
 * @property sizeConstraintStatement A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). See Size Constraint Statement below for more details.
 * @property sqliMatchStatement An SQL injection match condition identifies the part of web requests, such as the URI or the query string, that you want AWS WAF to inspect. See SQL Injection Match Statement below for details.
 * @property xssMatchStatement A rule statement that defines a cross-site scripting (XSS) match search for AWS WAF to apply to web requests. See XSS Match Statement below for details.
 */
public data class RuleGroupRuleStatementArgs(
    public val andStatement: Output? = null,
    public val byteMatchStatement: Output? = null,
    public val geoMatchStatement: Output? = null,
    public val ipSetReferenceStatement: Output? =
        null,
    public val labelMatchStatement: Output? = null,
    public val notStatement: Output? = null,
    public val orStatement: Output? = null,
    public val rateBasedStatement: Output? = null,
    public val regexMatchStatement: Output? = null,
    public val regexPatternSetReferenceStatement: Output? = null,
    public val sizeConstraintStatement: Output? =
        null,
    public val sqliMatchStatement: Output? = null,
    public val xssMatchStatement: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.wafv2.inputs.RuleGroupRuleStatementArgs =
        com.pulumi.aws.wafv2.inputs.RuleGroupRuleStatementArgs.builder()
            .andStatement(andStatement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .byteMatchStatement(
                byteMatchStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .geoMatchStatement(geoMatchStatement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ipSetReferenceStatement(
                ipSetReferenceStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .labelMatchStatement(
                labelMatchStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .notStatement(notStatement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .orStatement(orStatement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .rateBasedStatement(
                rateBasedStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .regexMatchStatement(
                regexMatchStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .regexPatternSetReferenceStatement(
                regexPatternSetReferenceStatement?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .sizeConstraintStatement(
                sizeConstraintStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .sqliMatchStatement(
                sqliMatchStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .xssMatchStatement(
                xssMatchStatement?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [RuleGroupRuleStatementArgs].
 */
@PulumiTagMarker
public class RuleGroupRuleStatementArgsBuilder internal constructor() {
    private var andStatement: Output? = null

    private var byteMatchStatement: Output? = null

    private var geoMatchStatement: Output? = null

    private var ipSetReferenceStatement: Output? =
        null

    private var labelMatchStatement: Output? = null

    private var notStatement: Output? = null

    private var orStatement: Output? = null

    private var rateBasedStatement: Output? = null

    private var regexMatchStatement: Output? = null

    private var regexPatternSetReferenceStatement:
        Output? = null

    private var sizeConstraintStatement: Output? =
        null

    private var sqliMatchStatement: Output? = null

    private var xssMatchStatement: Output? = null

    /**
     * @param value A logical rule statement used to combine other rule statements with AND logic. See AND Statement below for details.
     */
    @JvmName("kwtanbgmxhqfaekb")
    public suspend fun andStatement(`value`: Output) {
        this.andStatement = value
    }

    /**
     * @param value A rule statement that defines a string match search for AWS WAF to apply to web requests. See Byte Match Statement below for details.
     */
    @JvmName("mdywwgxwprmhvbeg")
    public suspend fun byteMatchStatement(`value`: Output) {
        this.byteMatchStatement = value
    }

    /**
     * @param value A rule statement used to identify web requests based on country of origin. See GEO Match Statement below for details.
     */
    @JvmName("prrhqsyipxmwkhbr")
    public suspend fun geoMatchStatement(`value`: Output) {
        this.geoMatchStatement = value
    }

    /**
     * @param value A rule statement used to detect web requests coming from particular IP addresses or address ranges. See IP Set Reference Statement below for details.
     */
    @JvmName("tcawtodqufrsnctd")
    public suspend fun ipSetReferenceStatement(`value`: Output) {
        this.ipSetReferenceStatement = value
    }

    /**
     * @param value A rule statement that defines a string match search against labels that have been added to the web request by rules that have already run in the web ACL. See Label Match Statement below for details.
     */
    @JvmName("xadfmiyonbelicro")
    public suspend fun labelMatchStatement(`value`: Output) {
        this.labelMatchStatement = value
    }

    /**
     * @param value A logical rule statement used to negate the results of another rule statement. See NOT Statement below for details.
     */
    @JvmName("tupkgnvffoyfcaoo")
    public suspend fun notStatement(`value`: Output) {
        this.notStatement = value
    }

    /**
     * @param value A logical rule statement used to combine other rule statements with OR logic. See OR Statement below for details.
     */
    @JvmName("wfdbohvhyofrpwlt")
    public suspend fun orStatement(`value`: Output) {
        this.orStatement = value
    }

    /**
     * @param value A rate-based rule tracks the rate of requests for each originating `IP address`, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any `5-minute` time span. This statement can not be nested. See Rate Based Statement below for details.
     */
    @JvmName("xifiqxttqcjapegy")
    public suspend fun rateBasedStatement(`value`: Output) {
        this.rateBasedStatement = value
    }

    /**
     * @param value A rule statement used to search web request components for a match against a single regular expression. See Regex Match Statement below for details.
     */
    @JvmName("vigxiggedpscyhbj")
    public suspend fun regexMatchStatement(`value`: Output) {
        this.regexMatchStatement = value
    }

    /**
     * @param value A rule statement used to search web request components for matches with regular expressions. See Regex Pattern Set Reference Statement below for details.
     */
    @JvmName("xvdcddlubvirpkhw")
    public suspend fun regexPatternSetReferenceStatement(`value`: Output) {
        this.regexPatternSetReferenceStatement = value
    }

    /**
     * @param value A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). See Size Constraint Statement below for more details.
     */
    @JvmName("kgekddwhgbajpllp")
    public suspend fun sizeConstraintStatement(`value`: Output) {
        this.sizeConstraintStatement = value
    }

    /**
     * @param value An SQL injection match condition identifies the part of web requests, such as the URI or the query string, that you want AWS WAF to inspect. See SQL Injection Match Statement below for details.
     */
    @JvmName("uwagwstrjylpubij")
    public suspend fun sqliMatchStatement(`value`: Output) {
        this.sqliMatchStatement = value
    }

    /**
     * @param value A rule statement that defines a cross-site scripting (XSS) match search for AWS WAF to apply to web requests. See XSS Match Statement below for details.
     */
    @JvmName("awsjcveajbrifdlh")
    public suspend fun xssMatchStatement(`value`: Output) {
        this.xssMatchStatement = value
    }

    /**
     * @param value A logical rule statement used to combine other rule statements with AND logic. See AND Statement below for details.
     */
    @JvmName("xstbgijfoiyfmnun")
    public suspend fun andStatement(`value`: RuleGroupRuleStatementAndStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.andStatement = mapped
    }

    /**
     * @param argument A logical rule statement used to combine other rule statements with AND logic. See AND Statement below for details.
     */
    @JvmName("knjruhoslgnpsxck")
    public suspend fun andStatement(argument: suspend RuleGroupRuleStatementAndStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementAndStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.andStatement = mapped
    }

    /**
     * @param value A rule statement that defines a string match search for AWS WAF to apply to web requests. See Byte Match Statement below for details.
     */
    @JvmName("ldopjhqabxgqxidt")
    public suspend fun byteMatchStatement(`value`: RuleGroupRuleStatementByteMatchStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.byteMatchStatement = mapped
    }

    /**
     * @param argument A rule statement that defines a string match search for AWS WAF to apply to web requests. See Byte Match Statement below for details.
     */
    @JvmName("avneypoxwsflxqoc")
    public suspend fun byteMatchStatement(argument: suspend RuleGroupRuleStatementByteMatchStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementByteMatchStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.byteMatchStatement = mapped
    }

    /**
     * @param value A rule statement used to identify web requests based on country of origin. See GEO Match Statement below for details.
     */
    @JvmName("puaighlpuqmrpahg")
    public suspend fun geoMatchStatement(`value`: RuleGroupRuleStatementGeoMatchStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.geoMatchStatement = mapped
    }

    /**
     * @param argument A rule statement used to identify web requests based on country of origin. See GEO Match Statement below for details.
     */
    @JvmName("indckictkdoyrbaj")
    public suspend fun geoMatchStatement(argument: suspend RuleGroupRuleStatementGeoMatchStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementGeoMatchStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.geoMatchStatement = mapped
    }

    /**
     * @param value A rule statement used to detect web requests coming from particular IP addresses or address ranges. See IP Set Reference Statement below for details.
     */
    @JvmName("bbaoeudmubqlduls")
    public suspend fun ipSetReferenceStatement(`value`: RuleGroupRuleStatementIpSetReferenceStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ipSetReferenceStatement = mapped
    }

    /**
     * @param argument A rule statement used to detect web requests coming from particular IP addresses or address ranges. See IP Set Reference Statement below for details.
     */
    @JvmName("elfssxwecdnpwthb")
    public suspend fun ipSetReferenceStatement(argument: suspend RuleGroupRuleStatementIpSetReferenceStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementIpSetReferenceStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.ipSetReferenceStatement = mapped
    }

    /**
     * @param value A rule statement that defines a string match search against labels that have been added to the web request by rules that have already run in the web ACL. See Label Match Statement below for details.
     */
    @JvmName("fanmrciljeritqbu")
    public suspend fun labelMatchStatement(`value`: RuleGroupRuleStatementLabelMatchStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labelMatchStatement = mapped
    }

    /**
     * @param argument A rule statement that defines a string match search against labels that have been added to the web request by rules that have already run in the web ACL. See Label Match Statement below for details.
     */
    @JvmName("ufhkakhbbrmkdnko")
    public suspend fun labelMatchStatement(argument: suspend RuleGroupRuleStatementLabelMatchStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementLabelMatchStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.labelMatchStatement = mapped
    }

    /**
     * @param value A logical rule statement used to negate the results of another rule statement. See NOT Statement below for details.
     */
    @JvmName("bnnkjufciyiqgekr")
    public suspend fun notStatement(`value`: RuleGroupRuleStatementNotStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.notStatement = mapped
    }

    /**
     * @param argument A logical rule statement used to negate the results of another rule statement. See NOT Statement below for details.
     */
    @JvmName("pdldmwikmtcsoqmn")
    public suspend fun notStatement(argument: suspend RuleGroupRuleStatementNotStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementNotStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.notStatement = mapped
    }

    /**
     * @param value A logical rule statement used to combine other rule statements with OR logic. See OR Statement below for details.
     */
    @JvmName("xyfoqccnxtjdexvc")
    public suspend fun orStatement(`value`: RuleGroupRuleStatementOrStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.orStatement = mapped
    }

    /**
     * @param argument A logical rule statement used to combine other rule statements with OR logic. See OR Statement below for details.
     */
    @JvmName("umrqjlhumesjkqtr")
    public suspend fun orStatement(argument: suspend RuleGroupRuleStatementOrStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementOrStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.orStatement = mapped
    }

    /**
     * @param value A rate-based rule tracks the rate of requests for each originating `IP address`, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any `5-minute` time span. This statement can not be nested. See Rate Based Statement below for details.
     */
    @JvmName("owjsglifduuswjjs")
    public suspend fun rateBasedStatement(`value`: RuleGroupRuleStatementRateBasedStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rateBasedStatement = mapped
    }

    /**
     * @param argument A rate-based rule tracks the rate of requests for each originating `IP address`, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any `5-minute` time span. This statement can not be nested. See Rate Based Statement below for details.
     */
    @JvmName("bkyjgkjhhvwalrcg")
    public suspend fun rateBasedStatement(argument: suspend RuleGroupRuleStatementRateBasedStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementRateBasedStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.rateBasedStatement = mapped
    }

    /**
     * @param value A rule statement used to search web request components for a match against a single regular expression. See Regex Match Statement below for details.
     */
    @JvmName("pksquchgxryagpms")
    public suspend fun regexMatchStatement(`value`: RuleGroupRuleStatementRegexMatchStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regexMatchStatement = mapped
    }

    /**
     * @param argument A rule statement used to search web request components for a match against a single regular expression. See Regex Match Statement below for details.
     */
    @JvmName("cedauxqgchiachnb")
    public suspend fun regexMatchStatement(argument: suspend RuleGroupRuleStatementRegexMatchStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementRegexMatchStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.regexMatchStatement = mapped
    }

    /**
     * @param value A rule statement used to search web request components for matches with regular expressions. See Regex Pattern Set Reference Statement below for details.
     */
    @JvmName("cdnjikvipnlddrik")
    public suspend fun regexPatternSetReferenceStatement(`value`: RuleGroupRuleStatementRegexPatternSetReferenceStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.regexPatternSetReferenceStatement = mapped
    }

    /**
     * @param argument A rule statement used to search web request components for matches with regular expressions. See Regex Pattern Set Reference Statement below for details.
     */
    @JvmName("jhtsaxhwpfiuxawg")
    public suspend fun regexPatternSetReferenceStatement(argument: suspend RuleGroupRuleStatementRegexPatternSetReferenceStatementArgsBuilder.() -> Unit) {
        val toBeMapped =
            RuleGroupRuleStatementRegexPatternSetReferenceStatementArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.regexPatternSetReferenceStatement = mapped
    }

    /**
     * @param value A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). See Size Constraint Statement below for more details.
     */
    @JvmName("ulswdcgkhqcxrsdd")
    public suspend fun sizeConstraintStatement(`value`: RuleGroupRuleStatementSizeConstraintStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sizeConstraintStatement = mapped
    }

    /**
     * @param argument A rule statement that compares a number of bytes against the size of a request component, using a comparison operator, such as greater than (>) or less than (<). See Size Constraint Statement below for more details.
     */
    @JvmName("asufrxwsqkxkdrdp")
    public suspend fun sizeConstraintStatement(argument: suspend RuleGroupRuleStatementSizeConstraintStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementSizeConstraintStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sizeConstraintStatement = mapped
    }

    /**
     * @param value An SQL injection match condition identifies the part of web requests, such as the URI or the query string, that you want AWS WAF to inspect. See SQL Injection Match Statement below for details.
     */
    @JvmName("nifglnmxoxltewvi")
    public suspend fun sqliMatchStatement(`value`: RuleGroupRuleStatementSqliMatchStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sqliMatchStatement = mapped
    }

    /**
     * @param argument An SQL injection match condition identifies the part of web requests, such as the URI or the query string, that you want AWS WAF to inspect. See SQL Injection Match Statement below for details.
     */
    @JvmName("vabcgpjkhipqnejk")
    public suspend fun sqliMatchStatement(argument: suspend RuleGroupRuleStatementSqliMatchStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementSqliMatchStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sqliMatchStatement = mapped
    }

    /**
     * @param value A rule statement that defines a cross-site scripting (XSS) match search for AWS WAF to apply to web requests. See XSS Match Statement below for details.
     */
    @JvmName("pomtkpfuragtqlxb")
    public suspend fun xssMatchStatement(`value`: RuleGroupRuleStatementXssMatchStatementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.xssMatchStatement = mapped
    }

    /**
     * @param argument A rule statement that defines a cross-site scripting (XSS) match search for AWS WAF to apply to web requests. See XSS Match Statement below for details.
     */
    @JvmName("prfuyckguysxgvuu")
    public suspend fun xssMatchStatement(argument: suspend RuleGroupRuleStatementXssMatchStatementArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupRuleStatementXssMatchStatementArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.xssMatchStatement = mapped
    }

    internal fun build(): RuleGroupRuleStatementArgs = RuleGroupRuleStatementArgs(
        andStatement = andStatement,
        byteMatchStatement = byteMatchStatement,
        geoMatchStatement = geoMatchStatement,
        ipSetReferenceStatement = ipSetReferenceStatement,
        labelMatchStatement = labelMatchStatement,
        notStatement = notStatement,
        orStatement = orStatement,
        rateBasedStatement = rateBasedStatement,
        regexMatchStatement = regexMatchStatement,
        regexPatternSetReferenceStatement = regexPatternSetReferenceStatement,
        sizeConstraintStatement = sizeConstraintStatement,
        sqliMatchStatement = sqliMatchStatement,
        xssMatchStatement = xssMatchStatement,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy