com.pulumi.cloudflare.kotlin.outputs.RateLimitAction.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.Int
import kotlin.String
import kotlin.Suppress
/**
*
* @property mode The type of action to perform. Available values: `simulate`, `ban`, `challenge`, `js_challenge`, `managed_challenge`.
* @property response Custom content-type and body to return, this overrides the custom error for the zone. This field is not required. Omission will result in default HTML error page.
* @property timeout The time in seconds as an integer to perform the mitigation action. This field is required if the `mode` is either `simulate` or `ban`. Must be the same or greater than the period.
*/
public data class RateLimitAction(
public val mode: String,
public val response: RateLimitActionResponse? = null,
public val timeout: Int? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.cloudflare.outputs.RateLimitAction): RateLimitAction =
RateLimitAction(
mode = javaType.mode(),
response = javaType.response().map({ args0 ->
args0.let({ args0 ->
com.pulumi.cloudflare.kotlin.outputs.RateLimitActionResponse.Companion.toKotlin(args0)
})
}).orElse(null),
timeout = javaType.timeout().map({ args0 -> args0 }).orElse(null),
)
}
}