com.pulumi.awsnative.wafv2.kotlin.inputs.RuleGroupIpSetForwardedIpConfigurationArgs.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.RuleGroupIpSetForwardedIpConfigurationArgs.builder
import com.pulumi.awsnative.wafv2.kotlin.enums.RuleGroupIpSetForwardedIpConfigurationFallbackBehavior
import com.pulumi.awsnative.wafv2.kotlin.enums.RuleGroupIpSetForwardedIpConfigurationPosition
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 RuleGroupIpSetForwardedIpConfigurationArgs(
public val fallbackBehavior: Output,
public val headerName: Output,
public val position: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.wafv2.inputs.RuleGroupIpSetForwardedIpConfigurationArgs =
com.pulumi.awsnative.wafv2.inputs.RuleGroupIpSetForwardedIpConfigurationArgs.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 [RuleGroupIpSetForwardedIpConfigurationArgs].
*/
@PulumiTagMarker
public class RuleGroupIpSetForwardedIpConfigurationArgsBuilder 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("lodhgjmntcmaqllq")
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("yastugxtpfmosrjo")
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("nqjyhavecthiyhfe")
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("ogcujfuyufwiblld")
public suspend fun fallbackBehavior(`value`: RuleGroupIpSetForwardedIpConfigurationFallbackBehavior) {
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("vmicgxwhodjjhxvr")
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("dcduqnsknghtgbpu")
public suspend fun position(`value`: RuleGroupIpSetForwardedIpConfigurationPosition) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.position = mapped
}
internal fun build(): RuleGroupIpSetForwardedIpConfigurationArgs =
RuleGroupIpSetForwardedIpConfigurationArgs(
fallbackBehavior = fallbackBehavior ?: throw PulumiNullFieldException("fallbackBehavior"),
headerName = headerName ?: throw PulumiNullFieldException("headerName"),
position = position ?: throw PulumiNullFieldException("position"),
)
}