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

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

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

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

import com.pulumi.awsnative.wafv2.inputs.WebAclRegexPatternSetReferenceStatementArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property arn The Amazon Resource Name (ARN) of the `RegexPatternSet` that this statement references.
 * @property fieldToMatch The part of the web request that you want AWS WAF to inspect.
 * @property textTransformations Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
 */
public data class WebAclRegexPatternSetReferenceStatementArgs(
    public val arn: Output,
    public val fieldToMatch: Output,
    public val textTransformations: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.wafv2.inputs.WebAclRegexPatternSetReferenceStatementArgs =
        com.pulumi.awsnative.wafv2.inputs.WebAclRegexPatternSetReferenceStatementArgs.builder()
            .arn(arn.applyValue({ args0 -> args0 }))
            .fieldToMatch(fieldToMatch.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .textTransformations(
                textTransformations.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [WebAclRegexPatternSetReferenceStatementArgs].
 */
@PulumiTagMarker
public class WebAclRegexPatternSetReferenceStatementArgsBuilder internal constructor() {
    private var arn: Output? = null

    private var fieldToMatch: Output? = null

    private var textTransformations: Output>? = null

    /**
     * @param value The Amazon Resource Name (ARN) of the `RegexPatternSet` that this statement references.
     */
    @JvmName("fmkjwdkupnqjvqgu")
    public suspend fun arn(`value`: Output) {
        this.arn = value
    }

    /**
     * @param value The part of the web request that you want AWS WAF to inspect.
     */
    @JvmName("mrxnkmsisvsttrdc")
    public suspend fun fieldToMatch(`value`: Output) {
        this.fieldToMatch = value
    }

    /**
     * @param value Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("owvugcjrfmsymrco")
    public suspend fun textTransformations(`value`: Output>) {
        this.textTransformations = value
    }

    @JvmName("eufmnilrmsimuuqg")
    public suspend fun textTransformations(vararg values: Output) {
        this.textTransformations = Output.all(values.asList())
    }

    /**
     * @param values Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("vjxaafnxmmptrdct")
    public suspend fun textTransformations(values: List>) {
        this.textTransformations = Output.all(values)
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the `RegexPatternSet` that this statement references.
     */
    @JvmName("hdywwokyirrsfqwj")
    public suspend fun arn(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.arn = mapped
    }

    /**
     * @param value The part of the web request that you want AWS WAF to inspect.
     */
    @JvmName("yxmqfkucgfbbfqjd")
    public suspend fun fieldToMatch(`value`: WebAclFieldToMatchArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.fieldToMatch = mapped
    }

    /**
     * @param argument The part of the web request that you want AWS WAF to inspect.
     */
    @JvmName("wupnhwgtwpvtjdvj")
    public suspend fun fieldToMatch(argument: suspend WebAclFieldToMatchArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclFieldToMatchArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.fieldToMatch = mapped
    }

    /**
     * @param value Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("iwglhiujkxijqupn")
    public suspend fun textTransformations(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.textTransformations = mapped
    }

    /**
     * @param argument Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("nigvblsfphtiqasb")
    public suspend fun textTransformations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            WebAclTextTransformationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.textTransformations = mapped
    }

    /**
     * @param argument Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("hpymawvsnuspextw")
    public suspend fun textTransformations(vararg argument: suspend WebAclTextTransformationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            WebAclTextTransformationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.textTransformations = mapped
    }

    /**
     * @param argument Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("nfrqiehsigtpklnm")
    public suspend fun textTransformations(argument: suspend WebAclTextTransformationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            WebAclTextTransformationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.textTransformations = mapped
    }

    /**
     * @param values Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass detection. If you specify one or more transformations in a rule statement, AWS WAF performs all transformations on the content of the request component identified by `FieldToMatch` , starting from the lowest priority setting, before inspecting the content for a match.
     */
    @JvmName("xuegptynfjftelen")
    public suspend fun textTransformations(vararg values: WebAclTextTransformationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.textTransformations = mapped
    }

    internal fun build(): WebAclRegexPatternSetReferenceStatementArgs =
        WebAclRegexPatternSetReferenceStatementArgs(
            arn = arn ?: throw PulumiNullFieldException("arn"),
            fieldToMatch = fieldToMatch ?: throw PulumiNullFieldException("fieldToMatch"),
            textTransformations = textTransformations ?: throw PulumiNullFieldException("textTransformations"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy