Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.waf.kotlin.inputs
import com.pulumi.azure.waf.inputs.PolicyCustomRuleArgs.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.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
*
* @property action Type of action. Possible values are `Allow`, `Block` and `Log`.
* @property enabled Describes if the policy is in enabled state or disabled state. Defaults to `true`.
* @property groupRateLimitBy Specifies what grouping the rate limit will count requests by. Possible values are `GeoLocation`, `ClientAddr` and `None`.
* @property matchConditions One or more `match_conditions` blocks as defined below.
* @property name Gets name of the resource that is unique within a policy. This name can be used to access the resource.
* @property priority Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.
* @property rateLimitDuration Specifies the duration at which the rate limit policy will be applied. Should be used with `RateLimitRule` rule type. Possible values are `FiveMins` and `OneMin`.
* @property rateLimitThreshold Specifies the threshold value for the rate limit policy. Must be greater than or equal to 1 if provided.
* @property ruleType Describes the type of rule. Possible values are `MatchRule`, `RateLimitRule` and `Invalid`.
*/
public data class PolicyCustomRuleArgs(
public val action: Output,
public val enabled: Output? = null,
public val groupRateLimitBy: Output? = null,
public val matchConditions: Output>,
public val name: Output? = null,
public val priority: Output,
public val rateLimitDuration: Output? = null,
public val rateLimitThreshold: Output? = null,
public val ruleType: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.waf.inputs.PolicyCustomRuleArgs =
com.pulumi.azure.waf.inputs.PolicyCustomRuleArgs.builder()
.action(action.applyValue({ args0 -> args0 }))
.enabled(enabled?.applyValue({ args0 -> args0 }))
.groupRateLimitBy(groupRateLimitBy?.applyValue({ args0 -> args0 }))
.matchConditions(
matchConditions.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.priority(priority.applyValue({ args0 -> args0 }))
.rateLimitDuration(rateLimitDuration?.applyValue({ args0 -> args0 }))
.rateLimitThreshold(rateLimitThreshold?.applyValue({ args0 -> args0 }))
.ruleType(ruleType.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PolicyCustomRuleArgs].
*/
@PulumiTagMarker
public class PolicyCustomRuleArgsBuilder internal constructor() {
private var action: Output? = null
private var enabled: Output? = null
private var groupRateLimitBy: Output? = null
private var matchConditions: Output>? = null
private var name: Output? = null
private var priority: Output? = null
private var rateLimitDuration: Output? = null
private var rateLimitThreshold: Output? = null
private var ruleType: Output? = null
/**
* @param value Type of action. Possible values are `Allow`, `Block` and `Log`.
*/
@JvmName("jutklqlcpmxgdfwj")
public suspend fun action(`value`: Output) {
this.action = value
}
/**
* @param value Describes if the policy is in enabled state or disabled state. Defaults to `true`.
*/
@JvmName("fanbwiiifdtjwqrf")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value Specifies what grouping the rate limit will count requests by. Possible values are `GeoLocation`, `ClientAddr` and `None`.
*/
@JvmName("jhhhjfyireykxnyn")
public suspend fun groupRateLimitBy(`value`: Output) {
this.groupRateLimitBy = value
}
/**
* @param value One or more `match_conditions` blocks as defined below.
*/
@JvmName("psodduepyhwfweby")
public suspend fun matchConditions(`value`: Output>) {
this.matchConditions = value
}
@JvmName("xkgylppnohvrsegg")
public suspend fun matchConditions(vararg values: Output) {
this.matchConditions = Output.all(values.asList())
}
/**
* @param values One or more `match_conditions` blocks as defined below.
*/
@JvmName("badqkjnmliisjadf")
public suspend fun matchConditions(values: List