com.pulumi.aws.wafv2.kotlin.outputs.WebAclRuleStatementRateBasedStatement.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-kotlin Show documentation
Show all versions of pulumi-aws-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.aws.wafv2.kotlin.outputs
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property aggregateKeyType Setting that indicates how to aggregate the request counts. Valid values include: `CONSTANT`, `CUSTOM_KEYS`, `FORWARDED_IP`, or `IP`. Default: `IP`.
* @property customKeys Aggregate the request counts using one or more web request components as the aggregate keys. See `custom_key` below for details.
* @property evaluationWindowSec The amount of time, in seconds, that AWS WAF should include in its request counts, looking back from the current time. Valid values are `60`, `120`, `300`, and `600`. Defaults to `300` (5 minutes).
* **NOTE:** This setting doesn't determine how often AWS WAF checks the rate, but how far back it looks each time it checks. AWS WAF checks the rate about every 10 seconds.
* @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. If `aggregate_key_type` is set to `FORWARDED_IP`, this block is required. See `forwarded_ip_config` below for details.
* @property limit Limit on requests per 5-minute period for a single originating IP address.
* @property scopeDownStatement Optional nested statement that narrows the scope of the rate-based statement to matching web requests. This can be any nestable statement, and you can nest statements at any level below this scope-down statement. See `statement` above for details. If `aggregate_key_type` is set to `CONSTANT`, this block is required.
*/
public data class WebAclRuleStatementRateBasedStatement(
public val aggregateKeyType: String? = null,
public val customKeys: List? = null,
public val evaluationWindowSec: Int? = null,
public val forwardedIpConfig: WebAclRuleStatementRateBasedStatementForwardedIpConfig? = null,
public val limit: Int,
public val scopeDownStatement: WebAclRuleStatementRateBasedStatementScopeDownStatement? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.aws.wafv2.outputs.WebAclRuleStatementRateBasedStatement): WebAclRuleStatementRateBasedStatement = WebAclRuleStatementRateBasedStatement(
aggregateKeyType = javaType.aggregateKeyType().map({ args0 -> args0 }).orElse(null),
customKeys = javaType.customKeys().map({ args0 ->
args0.let({ args0 ->
com.pulumi.aws.wafv2.kotlin.outputs.WebAclRuleStatementRateBasedStatementCustomKey.Companion.toKotlin(args0)
})
}),
evaluationWindowSec = javaType.evaluationWindowSec().map({ args0 -> args0 }).orElse(null),
forwardedIpConfig = javaType.forwardedIpConfig().map({ args0 ->
args0.let({ args0 ->
com.pulumi.aws.wafv2.kotlin.outputs.WebAclRuleStatementRateBasedStatementForwardedIpConfig.Companion.toKotlin(args0)
})
}).orElse(null),
limit = javaType.limit(),
scopeDownStatement = javaType.scopeDownStatement().map({ args0 ->
args0.let({ args0 ->
com.pulumi.aws.wafv2.kotlin.outputs.WebAclRuleStatementRateBasedStatementScopeDownStatement.Companion.toKotlin(args0)
})
}).orElse(null),
)
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy