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

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

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

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

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

/**
 *
 * @property countryCodes An array of two-character country codes that you want to match against, for example, `[ "US", "CN" ]` , from the alpha-2 country ISO codes of the ISO 3166 international standard.
 * When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
 * @property forwardedIpConfig The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
 * > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
 */
public data class WebAclGeoMatchStatementArgs(
    public val countryCodes: Output>? = null,
    public val forwardedIpConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.wafv2.inputs.WebAclGeoMatchStatementArgs =
        com.pulumi.awsnative.wafv2.inputs.WebAclGeoMatchStatementArgs.builder()
            .countryCodes(countryCodes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .forwardedIpConfig(
                forwardedIpConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [WebAclGeoMatchStatementArgs].
 */
@PulumiTagMarker
public class WebAclGeoMatchStatementArgsBuilder internal constructor() {
    private var countryCodes: Output>? = null

    private var forwardedIpConfig: Output? = null

    /**
     * @param value An array of two-character country codes that you want to match against, for example, `[ "US", "CN" ]` , from the alpha-2 country ISO codes of the ISO 3166 international standard.
     * When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
     */
    @JvmName("teaorvovjweveesn")
    public suspend fun countryCodes(`value`: Output>) {
        this.countryCodes = value
    }

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

    /**
     * @param values An array of two-character country codes that you want to match against, for example, `[ "US", "CN" ]` , from the alpha-2 country ISO codes of the ISO 3166 international standard.
     * When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
     */
    @JvmName("uoxetgcrsaihltsc")
    public suspend fun countryCodes(values: List>) {
        this.countryCodes = Output.all(values)
    }

    /**
     * @param value The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
     * > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
     */
    @JvmName("yftwbkfsjeboxgjm")
    public suspend fun forwardedIpConfig(`value`: Output) {
        this.forwardedIpConfig = value
    }

    /**
     * @param value An array of two-character country codes that you want to match against, for example, `[ "US", "CN" ]` , from the alpha-2 country ISO codes of the ISO 3166 international standard.
     * When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
     */
    @JvmName("pnhdmgsgnbghqptt")
    public suspend fun countryCodes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.countryCodes = mapped
    }

    /**
     * @param values An array of two-character country codes that you want to match against, for example, `[ "US", "CN" ]` , from the alpha-2 country ISO codes of the ISO 3166 international standard.
     * When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.
     */
    @JvmName("xftsbiykvibxglbi")
    public suspend fun countryCodes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.countryCodes = mapped
    }

    /**
     * @param value The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
     * > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
     */
    @JvmName("pqehcfqtwuqqjyfu")
    public suspend fun forwardedIpConfig(`value`: WebAclForwardedIpConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forwardedIpConfig = mapped
    }

    /**
     * @param argument The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.
     * > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
     */
    @JvmName("lqslmajipqfmqqij")
    public suspend fun forwardedIpConfig(argument: suspend WebAclForwardedIpConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = WebAclForwardedIpConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.forwardedIpConfig = mapped
    }

    internal fun build(): WebAclGeoMatchStatementArgs = WebAclGeoMatchStatementArgs(
        countryCodes = countryCodes,
        forwardedIpConfig = forwardedIpConfig,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy