com.pulumi.awsnative.wafv2.kotlin.inputs.WebAclIpSetForwardedIpConfigurationArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.wafv2.kotlin.inputs
import com.pulumi.awsnative.wafv2.inputs.WebAclIpSetForwardedIpConfigurationArgs.builder
import com.pulumi.awsnative.wafv2.kotlin.enums.WebAclIpSetForwardedIpConfigurationFallbackBehavior
import com.pulumi.awsnative.wafv2.kotlin.enums.WebAclIpSetForwardedIpConfigurationPosition
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 kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property fallbackBehavior The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
* > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
* You can specify the following fallback behaviors:
* - `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.
* @property headerName The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to `X-Forwarded-For` .
* > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
* @property position The position in the header to search for the IP address. The header can contain IP addresses of the original client and also of proxies. For example, the header value could be `10.1.1.1, 127.0.0.0, 10.10.10.10` where the first IP address identifies the original client and the rest identify proxies that the request went through.
* The options for this setting are the following:
* - FIRST - Inspect the first IP address in the list of IP addresses in the header. This is usually the client's original IP.
* - LAST - Inspect the last IP address in the list of IP addresses in the header.
* - ANY - Inspect all IP addresses in the header for a match. If the header contains more than 10 IP addresses, AWS WAF inspects the last 10.
*/
public data class WebAclIpSetForwardedIpConfigurationArgs(
public val fallbackBehavior: Output,
public val headerName: Output,
public val position: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.wafv2.inputs.WebAclIpSetForwardedIpConfigurationArgs =
com.pulumi.awsnative.wafv2.inputs.WebAclIpSetForwardedIpConfigurationArgs.builder()
.fallbackBehavior(fallbackBehavior.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.headerName(headerName.applyValue({ args0 -> args0 }))
.position(position.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [WebAclIpSetForwardedIpConfigurationArgs].
*/
@PulumiTagMarker
public class WebAclIpSetForwardedIpConfigurationArgsBuilder internal constructor() {
private var fallbackBehavior: Output? = null
private var headerName: Output? = null
private var position: Output? = null
/**
* @param value The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
* > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
* You can specify the following fallback behaviors:
* - `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("uihghimgcoqonklo")
public suspend fun fallbackBehavior(`value`: Output) {
this.fallbackBehavior = value
}
/**
* @param value The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to `X-Forwarded-For` .
* > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
*/
@JvmName("qdebaobvqfmkwugw")
public suspend fun headerName(`value`: Output) {
this.headerName = value
}
/**
* @param value The position in the header to search for the IP address. The header can contain IP addresses of the original client and also of proxies. For example, the header value could be `10.1.1.1, 127.0.0.0, 10.10.10.10` where the first IP address identifies the original client and the rest identify proxies that the request went through.
* The options for this setting are the following:
* - FIRST - Inspect the first IP address in the list of IP addresses in the header. This is usually the client's original IP.
* - LAST - Inspect the last IP address in the list of IP addresses in the header.
* - ANY - Inspect all IP addresses in the header for a match. If the header contains more than 10 IP addresses, AWS WAF inspects the last 10.
*/
@JvmName("mcgyrfiaddwhnaqg")
public suspend fun position(`value`: Output) {
this.position = value
}
/**
* @param value The match status to assign to the web request if the request doesn't have a valid IP address in the specified position.
* > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
* You can specify the following fallback behaviors:
* - `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("oaoaqygrasodqbhg")
public suspend fun fallbackBehavior(`value`: WebAclIpSetForwardedIpConfigurationFallbackBehavior) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.fallbackBehavior = mapped
}
/**
* @param value The name of the HTTP header to use for the IP address. For example, to use the X-Forwarded-For (XFF) header, set this to `X-Forwarded-For` .
* > If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
*/
@JvmName("gnfpgjfyfjbmgljl")
public suspend fun headerName(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.headerName = mapped
}
/**
* @param value The position in the header to search for the IP address. The header can contain IP addresses of the original client and also of proxies. For example, the header value could be `10.1.1.1, 127.0.0.0, 10.10.10.10` where the first IP address identifies the original client and the rest identify proxies that the request went through.
* The options for this setting are the following:
* - FIRST - Inspect the first IP address in the list of IP addresses in the header. This is usually the client's original IP.
* - LAST - Inspect the last IP address in the list of IP addresses in the header.
* - ANY - Inspect all IP addresses in the header for a match. If the header contains more than 10 IP addresses, AWS WAF inspects the last 10.
*/
@JvmName("ixhpdryxaeriwhii")
public suspend fun position(`value`: WebAclIpSetForwardedIpConfigurationPosition) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.position = mapped
}
internal fun build(): WebAclIpSetForwardedIpConfigurationArgs =
WebAclIpSetForwardedIpConfigurationArgs(
fallbackBehavior = fallbackBehavior ?: throw PulumiNullFieldException("fallbackBehavior"),
headerName = headerName ?: throw PulumiNullFieldException("headerName"),
position = position ?: throw PulumiNullFieldException("position"),
)
}