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

com.pulumi.aws.wafv2.kotlin.inputs.WebAclRuleStatementGeoMatchStatementArgs.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.WebAclRuleStatementGeoMatchStatementArgs.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 countryCodes Array of two-character country codes, for example, [ "US", "CN" ], from the alpha-2 country ISO codes of the `ISO 3166` international standard. See the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchStatement.html) for valid values.
 * @property forwardedIpConfig 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. See `forwarded_ip_config` below for details.
 */
public data class WebAclRuleStatementGeoMatchStatementArgs(
    public val countryCodes: Output>,
    public val forwardedIpConfig: Output? =
        null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.wafv2.inputs.WebAclRuleStatementGeoMatchStatementArgs =
        com.pulumi.aws.wafv2.inputs.WebAclRuleStatementGeoMatchStatementArgs.builder()
            .countryCodes(countryCodes.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .forwardedIpConfig(
                forwardedIpConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

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

    private var forwardedIpConfig: Output? =
        null

    /**
     * @param value Array of two-character country codes, for example, [ "US", "CN" ], from the alpha-2 country ISO codes of the `ISO 3166` international standard. See the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchStatement.html) for valid values.
     */
    @JvmName("rkprxqtxjnhlpmlq")
    public suspend fun countryCodes(`value`: Output>) {
        this.countryCodes = value
    }

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

    /**
     * @param values Array of two-character country codes, for example, [ "US", "CN" ], from the alpha-2 country ISO codes of the `ISO 3166` international standard. See the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchStatement.html) for valid values.
     */
    @JvmName("qelgvclvvnbfgpao")
    public suspend fun countryCodes(values: List>) {
        this.countryCodes = Output.all(values)
    }

    /**
     * @param value 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. See `forwarded_ip_config` below for details.
     */
    @JvmName("tjoffkkylyillqrf")
    public suspend fun forwardedIpConfig(`value`: Output) {
        this.forwardedIpConfig = value
    }

    /**
     * @param value Array of two-character country codes, for example, [ "US", "CN" ], from the alpha-2 country ISO codes of the `ISO 3166` international standard. See the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchStatement.html) for valid values.
     */
    @JvmName("iypdaccxbfxptgeg")
    public suspend fun countryCodes(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.countryCodes = mapped
    }

    /**
     * @param values Array of two-character country codes, for example, [ "US", "CN" ], from the alpha-2 country ISO codes of the `ISO 3166` international standard. See the [documentation](https://docs.aws.amazon.com/waf/latest/APIReference/API_GeoMatchStatement.html) for valid values.
     */
    @JvmName("suoleuxjkmaiegha")
    public suspend fun countryCodes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.countryCodes = mapped
    }

    /**
     * @param value 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. See `forwarded_ip_config` below for details.
     */
    @JvmName("nvbdnltkxhloflnk")
    public suspend fun forwardedIpConfig(`value`: WebAclRuleStatementGeoMatchStatementForwardedIpConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.forwardedIpConfig = mapped
    }

    /**
     * @param argument 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. See `forwarded_ip_config` below for details.
     */
    @JvmName("whnsitwboxyvojdo")
    public suspend fun forwardedIpConfig(argument: suspend WebAclRuleStatementGeoMatchStatementForwardedIpConfigArgsBuilder.() -> Unit) {
        val toBeMapped =
            WebAclRuleStatementGeoMatchStatementForwardedIpConfigArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.forwardedIpConfig = mapped
    }

    internal fun build(): WebAclRuleStatementGeoMatchStatementArgs =
        WebAclRuleStatementGeoMatchStatementArgs(
            countryCodes = countryCodes ?: throw PulumiNullFieldException("countryCodes"),
            forwardedIpConfig = forwardedIpConfig,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy