Class WebApplicationFirewallCustomRule
java.lang.Object
com.azure.resourcemanager.network.models.WebApplicationFirewallCustomRule
- All Implemented Interfaces:
com.azure.json.JsonSerializable<WebApplicationFirewallCustomRule>
public final class WebApplicationFirewallCustomRule
extends Object
implements com.azure.json.JsonSerializable<WebApplicationFirewallCustomRule>
Defines contents of a web application rule.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of WebApplicationFirewallCustomRule class. -
Method Summary
Modifier and TypeMethodDescriptionaction()Get the action property: Type of Actions.etag()Get the etag property: A unique read-only string that changes whenever the resource is updated.fromJson(com.azure.json.JsonReader jsonReader) Reads an instance of WebApplicationFirewallCustomRule from the JsonReader.Get the groupByUserSession property: List of user session identifier group by clauses.Get the matchConditions property: List of match conditions.name()Get the name property: The name of the resource that is unique within a policy.intpriority()Get the priority property: Priority of the rule.Get the rateLimitDuration property: Duration over which Rate Limit policy will be applied.Get the rateLimitThreshold property: Rate Limit threshold to apply in case ruleType is RateLimitRule.ruleType()Get the ruleType property: The rule type.state()Get the state property: Describes if the custom rule is in enabled or disabled state.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the action property: Type of Actions.withGroupByUserSession(List<GroupByUserSession> groupByUserSession) Set the groupByUserSession property: List of user session identifier group by clauses.withMatchConditions(List<MatchCondition> matchConditions) Set the matchConditions property: List of match conditions.Set the name property: The name of the resource that is unique within a policy.withPriority(int priority) Set the priority property: Priority of the rule.withRateLimitDuration(ApplicationGatewayFirewallRateLimitDuration rateLimitDuration) Set the rateLimitDuration property: Duration over which Rate Limit policy will be applied.withRateLimitThreshold(Integer rateLimitThreshold) Set the rateLimitThreshold property: Rate Limit threshold to apply in case ruleType is RateLimitRule.withRuleType(WebApplicationFirewallRuleType ruleType) Set the ruleType property: The rule type.Set the state property: Describes if the custom rule is in enabled or disabled state.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
WebApplicationFirewallCustomRule
public WebApplicationFirewallCustomRule()Creates an instance of WebApplicationFirewallCustomRule class.
-
-
Method Details
-
name
Get the name property: The name of the resource that is unique within a policy. This name can be used to access the resource.- Returns:
- the name value.
-
withName
Set the name property: The name of the resource that is unique within a policy. This name can be used to access the resource.- Parameters:
name- the name value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
etag
Get the etag property: A unique read-only string that changes whenever the resource is updated.- Returns:
- the etag value.
-
priority
public int priority()Get the priority property: Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.- Returns:
- the priority value.
-
withPriority
Set the priority property: Priority of the rule. Rules with a lower value will be evaluated before rules with a higher value.- Parameters:
priority- the priority value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
state
Get the state property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.- Returns:
- the state value.
-
withState
Set the state property: Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not specified.- Parameters:
state- the state value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
rateLimitDuration
Get the rateLimitDuration property: Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule.- Returns:
- the rateLimitDuration value.
-
withRateLimitDuration
public WebApplicationFirewallCustomRule withRateLimitDuration(ApplicationGatewayFirewallRateLimitDuration rateLimitDuration) Set the rateLimitDuration property: Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule.- Parameters:
rateLimitDuration- the rateLimitDuration value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
rateLimitThreshold
Get the rateLimitThreshold property: Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1.- Returns:
- the rateLimitThreshold value.
-
withRateLimitThreshold
Set the rateLimitThreshold property: Rate Limit threshold to apply in case ruleType is RateLimitRule. Must be greater than or equal to 1.- Parameters:
rateLimitThreshold- the rateLimitThreshold value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
ruleType
Get the ruleType property: The rule type.- Returns:
- the ruleType value.
-
withRuleType
Set the ruleType property: The rule type.- Parameters:
ruleType- the ruleType value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
matchConditions
Get the matchConditions property: List of match conditions.- Returns:
- the matchConditions value.
-
withMatchConditions
Set the matchConditions property: List of match conditions.- Parameters:
matchConditions- the matchConditions value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
groupByUserSession
Get the groupByUserSession property: List of user session identifier group by clauses.- Returns:
- the groupByUserSession value.
-
withGroupByUserSession
public WebApplicationFirewallCustomRule withGroupByUserSession(List<GroupByUserSession> groupByUserSession) Set the groupByUserSession property: List of user session identifier group by clauses.- Parameters:
groupByUserSession- the groupByUserSession value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
action
Get the action property: Type of Actions.- Returns:
- the action value.
-
withAction
Set the action property: Type of Actions.- Parameters:
action- the action value to set.- Returns:
- the WebApplicationFirewallCustomRule object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<WebApplicationFirewallCustomRule>- Throws:
IOException
-
fromJson
public static WebApplicationFirewallCustomRule fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of WebApplicationFirewallCustomRule from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of WebApplicationFirewallCustomRule if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the WebApplicationFirewallCustomRule.
-