PolicyCustomRule

data class PolicyCustomRule(val action: String, val enabled: Boolean? = null, val groupRateLimitBy: String? = null, val matchConditions: List<PolicyCustomRuleMatchCondition>, val name: String? = null, val priority: Int, val rateLimitDuration: String? = null, val rateLimitThreshold: Int? = null, val ruleType: String)

Constructors

Link copied to clipboard
constructor(action: String, enabled: Boolean? = null, groupRateLimitBy: String? = null, matchConditions: List<PolicyCustomRuleMatchCondition>, name: String? = null, priority: Int, rateLimitDuration: String? = null, rateLimitThreshold: Int? = null, ruleType: String)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Type of action. Possible values are Allow, Block and Log.

Link copied to clipboard
val enabled: Boolean? = null

Describes if the policy is in enabled state or disabled state. Defaults to true.

Link copied to clipboard

Specifies what grouping the rate limit will count requests by. Possible values are GeoLocation, ClientAddr and None.

Link copied to clipboard

One or more match_conditions blocks as defined below.

Link copied to clipboard
val name: String? = null

Gets name of the resource that is unique within a policy. This name can be used to access the resource.

Link copied to clipboard

Describes priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.

Link copied to clipboard

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.

Link copied to clipboard
val rateLimitThreshold: Int? = null

Specifies the threshold value for the rate limit policy. Must be greater than or equal to 1 if provided.

Link copied to clipboard

Describes the type of rule. Possible values are MatchRule, RateLimitRule and Invalid.