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

com.pulumi.awsnative.wafv2.kotlin.inputs.RuleGroupHeadersArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.wafv2.kotlin.inputs

import com.pulumi.awsnative.wafv2.inputs.RuleGroupHeadersArgs.builder
import com.pulumi.awsnative.wafv2.kotlin.enums.RuleGroupMapMatchScope
import com.pulumi.awsnative.wafv2.kotlin.enums.RuleGroupOversizeHandling
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Includes headers of a web request.
 * @property matchPattern The filter to use to identify the subset of headers to inspect in a web request.
 * You must specify exactly one setting: either `All` , `IncludedHeaders` , or `ExcludedHeaders` .
 * Example JSON: `"MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }`
 * @property matchScope The parts of the headers to match with the rule inspection criteria. If you specify `ALL` , AWS WAF inspects both keys and values.
 * `All` does not require a match to be found in the keys and a match to be found in the values. It requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, use a logical `AND` statement to combine two match rules, one that inspects the keys and another that inspects the values.
 * @property oversizeHandling What AWS WAF should do if the headers of the request are more numerous or larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to AWS WAF .
 * The options for oversize handling are the following:
 * - `CONTINUE` - Inspect the available headers normally, according to the rule inspection criteria.
 * - `MATCH` - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.
 * - `NO_MATCH` - Treat the web request as not matching the rule statement.
 */
public data class RuleGroupHeadersArgs(
    public val matchPattern: Output,
    public val matchScope: Output,
    public val oversizeHandling: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.wafv2.inputs.RuleGroupHeadersArgs =
        com.pulumi.awsnative.wafv2.inputs.RuleGroupHeadersArgs.builder()
            .matchPattern(matchPattern.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .matchScope(matchScope.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .oversizeHandling(
                oversizeHandling.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [RuleGroupHeadersArgs].
 */
@PulumiTagMarker
public class RuleGroupHeadersArgsBuilder internal constructor() {
    private var matchPattern: Output? = null

    private var matchScope: Output? = null

    private var oversizeHandling: Output? = null

    /**
     * @param value The filter to use to identify the subset of headers to inspect in a web request.
     * You must specify exactly one setting: either `All` , `IncludedHeaders` , or `ExcludedHeaders` .
     * Example JSON: `"MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }`
     */
    @JvmName("ksufjdquafiwyjhp")
    public suspend fun matchPattern(`value`: Output) {
        this.matchPattern = value
    }

    /**
     * @param value The parts of the headers to match with the rule inspection criteria. If you specify `ALL` , AWS WAF inspects both keys and values.
     * `All` does not require a match to be found in the keys and a match to be found in the values. It requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, use a logical `AND` statement to combine two match rules, one that inspects the keys and another that inspects the values.
     */
    @JvmName("twikdxirywqfcard")
    public suspend fun matchScope(`value`: Output) {
        this.matchScope = value
    }

    /**
     * @param value What AWS WAF should do if the headers of the request are more numerous or larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to AWS WAF .
     * The options for oversize handling are the following:
     * - `CONTINUE` - Inspect the available headers normally, according to the rule inspection criteria.
     * - `MATCH` - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.
     * - `NO_MATCH` - Treat the web request as not matching the rule statement.
     */
    @JvmName("uxhyuwbuhylowocy")
    public suspend fun oversizeHandling(`value`: Output) {
        this.oversizeHandling = value
    }

    /**
     * @param value The filter to use to identify the subset of headers to inspect in a web request.
     * You must specify exactly one setting: either `All` , `IncludedHeaders` , or `ExcludedHeaders` .
     * Example JSON: `"MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }`
     */
    @JvmName("bgwhkevrinuijnhr")
    public suspend fun matchPattern(`value`: RuleGroupHeaderMatchPatternArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchPattern = mapped
    }

    /**
     * @param argument The filter to use to identify the subset of headers to inspect in a web request.
     * You must specify exactly one setting: either `All` , `IncludedHeaders` , or `ExcludedHeaders` .
     * Example JSON: `"MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }`
     */
    @JvmName("fyebtnytqadcxlul")
    public suspend fun matchPattern(argument: suspend RuleGroupHeaderMatchPatternArgsBuilder.() -> Unit) {
        val toBeMapped = RuleGroupHeaderMatchPatternArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.matchPattern = mapped
    }

    /**
     * @param value The parts of the headers to match with the rule inspection criteria. If you specify `ALL` , AWS WAF inspects both keys and values.
     * `All` does not require a match to be found in the keys and a match to be found in the values. It requires a match to be found in the keys or the values or both. To require a match in the keys and in the values, use a logical `AND` statement to combine two match rules, one that inspects the keys and another that inspects the values.
     */
    @JvmName("lolxjstaaedjceee")
    public suspend fun matchScope(`value`: RuleGroupMapMatchScope) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchScope = mapped
    }

    /**
     * @param value What AWS WAF should do if the headers of the request are more numerous or larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of request headers when they exceed 8 KB (8192 bytes) or 200 total headers. The underlying host service forwards a maximum of 200 headers and at most 8 KB of header contents to AWS WAF .
     * The options for oversize handling are the following:
     * - `CONTINUE` - Inspect the available headers normally, according to the rule inspection criteria.
     * - `MATCH` - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.
     * - `NO_MATCH` - Treat the web request as not matching the rule statement.
     */
    @JvmName("aontngfcutuijebf")
    public suspend fun oversizeHandling(`value`: RuleGroupOversizeHandling) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.oversizeHandling = mapped
    }

    internal fun build(): RuleGroupHeadersArgs = RuleGroupHeadersArgs(
        matchPattern = matchPattern ?: throw PulumiNullFieldException("matchPattern"),
        matchScope = matchScope ?: throw PulumiNullFieldException("matchScope"),
        oversizeHandling = oversizeHandling ?: throw PulumiNullFieldException("oversizeHandling"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy