com.pulumi.cloudflare.kotlin.outputs.RulesetRuleRatelimit.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-cloudflare-kotlin Show documentation
Show all versions of pulumi-cloudflare-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin.outputs
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
/**
*
* @property characteristics List of parameters that define how Cloudflare tracks the request rate for this rule.
* @property countingExpression Criteria for counting HTTP requests to trigger the Rate Limiting action. Uses the Firewall Rules expression language based on Wireshark display filters. Refer to the [Firewall Rules language](https://developers.cloudflare.com/firewall/cf-firewall-language) documentation for all available fields, operators, and functions.
* @property mitigationTimeout Once the request rate is reached, the Rate Limiting rule blocks further requests for the period of time defined in this field.
* @property period The period of time to consider (in seconds) when evaluating the request rate.
* @property requestsPerPeriod The number of requests over the period of time that will trigger the Rate Limiting rule.
* @property requestsToOrigin Whether to include requests to origin within the Rate Limiting count.
* @property scorePerPeriod The maximum aggregate score over the period of time that will trigger Rate Limiting rule.
* @property scoreResponseHeaderName Name of HTTP header in the response, set by the origin server, with the score for the current request.
*/
public data class RulesetRuleRatelimit(
public val characteristics: List? = null,
public val countingExpression: String? = null,
public val mitigationTimeout: Int? = null,
public val period: Int? = null,
public val requestsPerPeriod: Int? = null,
public val requestsToOrigin: Boolean? = null,
public val scorePerPeriod: Int? = null,
public val scoreResponseHeaderName: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.cloudflare.outputs.RulesetRuleRatelimit): RulesetRuleRatelimit = RulesetRuleRatelimit(
characteristics = javaType.characteristics().map({ args0 -> args0 }),
countingExpression = javaType.countingExpression().map({ args0 -> args0 }).orElse(null),
mitigationTimeout = javaType.mitigationTimeout().map({ args0 -> args0 }).orElse(null),
period = javaType.period().map({ args0 -> args0 }).orElse(null),
requestsPerPeriod = javaType.requestsPerPeriod().map({ args0 -> args0 }).orElse(null),
requestsToOrigin = javaType.requestsToOrigin().map({ args0 -> args0 }).orElse(null),
scorePerPeriod = javaType.scorePerPeriod().map({ args0 -> args0 }).orElse(null),
scoreResponseHeaderName = javaType.scoreResponseHeaderName().map({ args0 -> args0 }).orElse(null),
)
}
}