
com.pulumi.cloudflare.kotlin.inputs.RateLimitActionArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.cloudflare.kotlin.inputs
import com.pulumi.cloudflare.inputs.RateLimitActionArgs.builder
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 com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @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 RateLimitActionArgs(
public val mode: Output,
public val response: Output? = null,
public val timeout: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.cloudflare.inputs.RateLimitActionArgs =
com.pulumi.cloudflare.inputs.RateLimitActionArgs.builder()
.mode(mode.applyValue({ args0 -> args0 }))
.response(response?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.timeout(timeout?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RateLimitActionArgs].
*/
@PulumiTagMarker
public class RateLimitActionArgsBuilder internal constructor() {
private var mode: Output? = null
private var response: Output? = null
private var timeout: Output? = null
/**
* @param value The type of action to perform. Available values: `simulate`, `ban`, `challenge`, `js_challenge`, `managed_challenge`.
*/
@JvmName("gqnsglbkhpyjytpi")
public suspend fun mode(`value`: Output) {
this.mode = value
}
/**
* @param value 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.
*/
@JvmName("ollglrafcmxrgxri")
public suspend fun response(`value`: Output) {
this.response = value
}
/**
* @param value 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.
*/
@JvmName("tokhnmtgtqnvieeu")
public suspend fun timeout(`value`: Output) {
this.timeout = value
}
/**
* @param value The type of action to perform. Available values: `simulate`, `ban`, `challenge`, `js_challenge`, `managed_challenge`.
*/
@JvmName("beljkmjwsckhuplq")
public suspend fun mode(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.mode = mapped
}
/**
* @param value 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.
*/
@JvmName("pxubwxbxigeoqarq")
public suspend fun response(`value`: RateLimitActionResponseArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.response = mapped
}
/**
* @param argument 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.
*/
@JvmName("xtxydrlncsquxcpg")
public suspend fun response(argument: suspend RateLimitActionResponseArgsBuilder.() -> Unit) {
val toBeMapped = RateLimitActionResponseArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.response = mapped
}
/**
* @param value 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.
*/
@JvmName("eliwsnnbyiiboatn")
public suspend fun timeout(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.timeout = mapped
}
internal fun build(): RateLimitActionArgs = RateLimitActionArgs(
mode = mode ?: throw PulumiNullFieldException("mode"),
response = response,
timeout = timeout,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy