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

com.pulumi.azure.frontdoor.kotlin.outputs.FirewallPolicyCustomRule.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.frontdoor.kotlin.outputs

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

/**
 *
 * @property action The action to perform when the rule is matched. Possible values are `Allow`, `Block`, `Log`, or `Redirect`.
 * @property enabled Is the rule is enabled or disabled? Defaults to `true`.
 * @property matchConditions One or more `match_condition` block defined below. Can support up to `10` `match_condition` blocks.
 * @property name Gets name of the resource that is unique within a policy. This name can be used to access the resource.
 * @property priority The priority of the rule. Rules with a lower value will be evaluated before rules with a higher value. Defaults to `1`.
 * @property rateLimitDurationInMinutes The rate limit duration in minutes. Defaults to `1`.
 * @property rateLimitThreshold The rate limit threshold. Defaults to `10`.
 * @property type The type of rule. Possible values are `MatchRule` or `RateLimitRule`.
 */
public data class FirewallPolicyCustomRule(
    public val action: String,
    public val enabled: Boolean? = null,
    public val matchConditions: List? = null,
    public val name: String,
    public val priority: Int? = null,
    public val rateLimitDurationInMinutes: Int? = null,
    public val rateLimitThreshold: Int? = null,
    public val type: String,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.azure.frontdoor.outputs.FirewallPolicyCustomRule): FirewallPolicyCustomRule = FirewallPolicyCustomRule(
            action = javaType.action(),
            enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
            matchConditions = javaType.matchConditions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.azure.frontdoor.kotlin.outputs.FirewallPolicyCustomRuleMatchCondition.Companion.toKotlin(args0)
                })
            }),
            name = javaType.name(),
            priority = javaType.priority().map({ args0 -> args0 }).orElse(null),
            rateLimitDurationInMinutes = javaType.rateLimitDurationInMinutes().map({ args0 ->
                args0
            }).orElse(null),
            rateLimitThreshold = javaType.rateLimitThreshold().map({ args0 -> args0 }).orElse(null),
            type = javaType.type(),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy