com.pulumi.cloudflare.kotlin.outputs.RulesetRule.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.String
import kotlin.Suppress
/**
*
* @property action Action to perform in the ruleset rule. Available values: `block`, `challenge`, `compress_response`, `ddos_dynamic`, `ddos_mitigation`, `execute`, `force_connection_close`, `js_challenge`, `log`, `log_custom_field`, `managed_challenge`, `redirect`, `rewrite`, `route`, `score`, `serve_error`, `set_cache_settings`, `set_config`, `skip`.
* @property actionParameters List of parameters that configure the behavior of the ruleset rule action.
* @property description Brief summary of the ruleset rule and its intended use.
* @property enabled Whether the rule is active.
* @property exposedCredentialCheck List of parameters that configure exposed credential checks.
* @property expression Criteria for an HTTP request to trigger the ruleset rule 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 id Unique rule identifier.
* @property lastUpdated The most recent update to this rule.
* @property logging List parameters to configure how the rule generates logs. Only valid for skip action.
* @property ratelimit List of parameters that configure HTTP rate limiting behaviour.
* @property ref Rule reference.
* @property version Version of the ruleset to deploy.
*/
public data class RulesetRule(
public val action: String? = null,
public val actionParameters: RulesetRuleActionParameters? = null,
public val description: String? = null,
public val enabled: Boolean? = null,
public val exposedCredentialCheck: RulesetRuleExposedCredentialCheck? = null,
public val expression: String,
public val id: String? = null,
public val lastUpdated: String? = null,
public val logging: RulesetRuleLogging? = null,
public val ratelimit: RulesetRuleRatelimit? = null,
public val ref: String? = null,
public val version: String? = null,
) {
public companion object {
public fun toKotlin(javaType: com.pulumi.cloudflare.outputs.RulesetRule): RulesetRule =
RulesetRule(
action = javaType.action().map({ args0 -> args0 }).orElse(null),
actionParameters = javaType.actionParameters().map({ args0 ->
args0.let({ args0 ->
com.pulumi.cloudflare.kotlin.outputs.RulesetRuleActionParameters.Companion.toKotlin(args0)
})
}).orElse(null),
description = javaType.description().map({ args0 -> args0 }).orElse(null),
enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
exposedCredentialCheck = javaType.exposedCredentialCheck().map({ args0 ->
args0.let({ args0 ->
com.pulumi.cloudflare.kotlin.outputs.RulesetRuleExposedCredentialCheck.Companion.toKotlin(args0)
})
}).orElse(null),
expression = javaType.expression(),
id = javaType.id().map({ args0 -> args0 }).orElse(null),
lastUpdated = javaType.lastUpdated().map({ args0 -> args0 }).orElse(null),
logging = javaType.logging().map({ args0 ->
args0.let({ args0 ->
com.pulumi.cloudflare.kotlin.outputs.RulesetRuleLogging.Companion.toKotlin(args0)
})
}).orElse(null),
ratelimit = javaType.ratelimit().map({ args0 ->
args0.let({ args0 ->
com.pulumi.cloudflare.kotlin.outputs.RulesetRuleRatelimit.Companion.toKotlin(args0)
})
}).orElse(null),
ref = javaType.ref().map({ args0 -> args0 }).orElse(null),
version = javaType.version().map({ args0 -> args0 }).orElse(null),
)
}
}