All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupRule.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.wafv2.kotlin.outputs

import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List

/**
 * 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 RuleGroupRule(
    public val action: RuleGroupRuleAction? = null,
    public val captchaConfig: RuleGroupCaptchaConfig? = null,
    public val challengeConfig: RuleGroupChallengeConfig? = null,
    public val name: String,
    public val priority: Int,
    public val ruleLabels: List? = null,
    public val statement: RuleGroupStatement,
    public val visibilityConfig: RuleGroupVisibilityConfig,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.wafv2.outputs.RuleGroupRule): RuleGroupRule =
            RuleGroupRule(
                action = javaType.action().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupRuleAction.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                captchaConfig = javaType.captchaConfig().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupCaptchaConfig.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                challengeConfig = javaType.challengeConfig().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupChallengeConfig.Companion.toKotlin(args0)
                    })
                }).orElse(null),
                name = javaType.name(),
                priority = javaType.priority(),
                ruleLabels = javaType.ruleLabels().map({ args0 ->
                    args0.let({ args0 ->
                        com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupLabel.Companion.toKotlin(args0)
                    })
                }),
                statement = javaType.statement().let({ args0 ->
                    com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupStatement.Companion.toKotlin(args0)
                }),
                visibilityConfig = javaType.visibilityConfig().let({ args0 ->
                    com.pulumi.awsnative.wafv2.kotlin.outputs.RuleGroupVisibilityConfig.Companion.toKotlin(args0)
                }),
            )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy