com.pulumi.awsnative.wafv2.kotlin.inputs.RuleGroupRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-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.awsnative.wafv2.kotlin.inputs
import com.pulumi.awsnative.wafv2.inputs.RuleGroupRuleArgs.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.collections.List
import kotlin.jvm.JvmName
/**
* Rule of RuleGroup that contains condition and action.
* @property action The action that AWS WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.
* @property captchaConfig Specifies how AWS WAF should handle `CAPTCHA` evaluations. If you don't specify this, AWS WAF uses the `CAPTCHA` configuration that's defined for the web ACL.
* @property challengeConfig Specifies how AWS WAF should handle `Challenge` evaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.
* @property name The name of the rule.
* If you change the name of a `Rule` after you create it and you want the rule's metric name to reflect the change, update the metric name in the rule's `VisibilityConfig` settings. AWS WAF doesn't automatically update the metric name when you update the rule name.
* @property priority If you define more than one `Rule` in a `WebACL` , AWS WAF evaluates each request against the `Rules` in order based on the value of `Priority` . AWS WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.
* @property ruleLabels Collection of Rule Labels.
* @property statement The AWS WAF processing statement for the rule, for example `ByteMatchStatement` or `SizeConstraintStatement` .
* @property visibilityConfig Defines and enables Amazon CloudWatch metrics and web request sample collection.
* If you change the name of a `Rule` after you create it and you want the rule's metric name to reflect the change, update the metric name as well. AWS WAF doesn't automatically update the metric name.
*/
public data class RuleGroupRuleArgs(
public val action: Output? = null,
public val captchaConfig: Output? = null,
public val challengeConfig: Output? = null,
public val name: Output,
public val priority: Output,
public val ruleLabels: Output>? = null,
public val statement: Output,
public val visibilityConfig: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.wafv2.inputs.RuleGroupRuleArgs =
com.pulumi.awsnative.wafv2.inputs.RuleGroupRuleArgs.builder()
.action(action?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.captchaConfig(captchaConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.challengeConfig(challengeConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.name(name.applyValue({ args0 -> args0 }))
.priority(priority.applyValue({ args0 -> args0 }))
.ruleLabels(
ruleLabels?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.statement(statement.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.visibilityConfig(
visibilityConfig.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [RuleGroupRuleArgs].
*/
@PulumiTagMarker
public class RuleGroupRuleArgsBuilder internal constructor() {
private var action: Output? = null
private var captchaConfig: Output? = null
private var challengeConfig: Output? = null
private var name: Output? = null
private var priority: Output? = null
private var ruleLabels: Output>? = null
private var statement: Output? = null
private var visibilityConfig: Output? = null
/**
* @param value The action that AWS WAF should take on a web request when it matches the rule statement. Settings at the web ACL level can override the rule action setting.
*/
@JvmName("icgxptfirewgjkcx")
public suspend fun action(`value`: Output) {
this.action = value
}
/**
* @param value Specifies how AWS WAF should handle `CAPTCHA` evaluations. If you don't specify this, AWS WAF uses the `CAPTCHA` configuration that's defined for the web ACL.
*/
@JvmName("qbcmvufsudiakyih")
public suspend fun captchaConfig(`value`: Output) {
this.captchaConfig = value
}
/**
* @param value Specifies how AWS WAF should handle `Challenge` evaluations. If you don't specify this, AWS WAF uses the challenge configuration that's defined for the web ACL.
*/
@JvmName("rxkvotkmprvwhesh")
public suspend fun challengeConfig(`value`: Output) {
this.challengeConfig = value
}
/**
* @param value The name of the rule.
* If you change the name of a `Rule` after you create it and you want the rule's metric name to reflect the change, update the metric name in the rule's `VisibilityConfig` settings. AWS WAF doesn't automatically update the metric name when you update the rule name.
*/
@JvmName("fevxnfcnccvfvbvv")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value If you define more than one `Rule` in a `WebACL` , AWS WAF evaluates each request against the `Rules` in order based on the value of `Priority` . AWS WAF processes rules with lower priority first. The priorities don't need to be consecutive, but they must all be different.
*/
@JvmName("oyalvmpprnahiauk")
public suspend fun priority(`value`: Output) {
this.priority = value
}
/**
* @param value Collection of Rule Labels.
*/
@JvmName("hvhhprugebxuxaxg")
public suspend fun ruleLabels(`value`: Output>) {
this.ruleLabels = value
}
@JvmName("qphvcynpobqpbieo")
public suspend fun ruleLabels(vararg values: Output) {
this.ruleLabels = Output.all(values.asList())
}
/**
* @param values Collection of Rule Labels.
*/
@JvmName("idvwuvedjqpmigrd")
public suspend fun ruleLabels(values: List