WebApplicationFirewallCustomRule Class

  • java.lang.Object
    • com.azure.resourcemanager.network.models.WebApplicationFirewallCustomRule

Implements

public final class WebApplicationFirewallCustomRule
implements JsonSerializable<WebApplicationFirewallCustomRule>

Defines contents of a web application rule.

Constructor Summary

Constructor Description
WebApplicationFirewallCustomRule()

Creates an instance of WebApplicationFirewallCustomRule class.

Method Summary

Modifier and Type Method and Description
WebApplicationFirewallAction action()

Get the action property: Type of Actions.

String etag()

Get the etag property: A unique read-only string that changes whenever the resource is updated.

static WebApplicationFirewallCustomRule fromJson(JsonReader jsonReader)

Reads an instance of WebApplicationFirewallCustomRule from the JsonReader.

List<GroupByUserSession> groupByUserSession()

Get the groupByUserSession property: List of user session identifier group by clauses.

List<MatchCondition> matchConditions()

Get the matchConditions property: List of match conditions.

String name()

Get the name property: The name of the resource that is unique within a policy.

int priority()

Get the priority property: Priority of the rule.

ApplicationGatewayFirewallRateLimitDuration rateLimitDuration()

Get the rateLimitDuration property: Duration over which Rate Limit policy will be applied.

Integer rateLimitThreshold()

Get the rateLimitThreshold property: Rate Limit threshold to apply in case ruleType is RateLimitRule.

WebApplicationFirewallRuleType ruleType()

Get the ruleType property: The rule type.

WebApplicationFirewallState state()

Get the state property: Describes if the custom rule is in enabled or disabled state.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

WebApplicationFirewallCustomRule withAction(WebApplicationFirewallAction action)

Set the action property: Type of Actions.

WebApplicationFirewallCustomRule withGroupByUserSession(List<GroupByUserSession> groupByUserSession)

Set the groupByUserSession property: List of user session identifier group by clauses.

WebApplicationFirewallCustomRule withMatchConditions(List<MatchCondition> matchConditions)

Set the matchConditions property: List of match conditions.

WebApplicationFirewallCustomRule withName(String name)

Set the name property: The name of the resource that is unique within a policy.

WebApplicationFirewallCustomRule withPriority(int priority)

Set the priority property: Priority of the rule.

WebApplicationFirewallCustomRule withRateLimitDuration(ApplicationGatewayFirewallRateLimitDuration rateLimitDuration)

Set the rateLimitDuration property: Duration over which Rate Limit policy will be applied.

WebApplicationFirewallCustomRule withRateLimitThreshold(Integer rateLimitThreshold)

Set the rateLimitThreshold property: Rate Limit threshold to apply in case ruleType is RateLimitRule.

WebApplicationFirewallCustomRule withRuleType(WebApplicationFirewallRuleType ruleType)

Set the ruleType property: The rule type.

WebApplicationFirewallCustomRule withState(WebApplicationFirewallState state)

Set the state property: Describes if the custom rule is in enabled or disabled state.

Methods inherited from java.lang.Object

Constructor Details

WebApplicationFirewallCustomRule

public WebApplicationFirewallCustomRule()

Creates an instance of WebApplicationFirewallCustomRule class.

Method Details

action

public WebApplicationFirewallAction action()

Get the action property: Type of Actions.

Returns:

the action value.

etag

public String etag()

Get the etag property: A unique read-only string that changes whenever the resource is updated.

Returns:

the etag value.

fromJson

public static WebApplicationFirewallCustomRule fromJson(JsonReader jsonReader)

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:

IOException

- If the deserialized JSON object was missing any required properties.

groupByUserSession

public List groupByUserSession()

Get the groupByUserSession property: List of user session identifier group by clauses.

Returns:

the groupByUserSession value.

matchConditions

public List matchConditions()

Get the matchConditions property: List of match conditions.

Returns:

the matchConditions value.

name

public String 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.

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.

rateLimitDuration

public ApplicationGatewayFirewallRateLimitDuration rateLimitDuration()

Get the rateLimitDuration property: Duration over which Rate Limit policy will be applied. Applies only when ruleType is RateLimitRule.

Returns:

the rateLimitDuration value.

rateLimitThreshold

public Integer 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.

ruleType

public WebApplicationFirewallRuleType ruleType()

Get the ruleType property: The rule type.

Returns:

the ruleType value.

state

public WebApplicationFirewallState 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.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withAction

public WebApplicationFirewallCustomRule withAction(WebApplicationFirewallAction action)

Set the action property: Type of Actions.

Parameters:

action - the action value to set.

Returns:

the WebApplicationFirewallCustomRule object itself.

withGroupByUserSession

public WebApplicationFirewallCustomRule withGroupByUserSession(List 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.

withMatchConditions

public WebApplicationFirewallCustomRule withMatchConditions(List matchConditions)

Set the matchConditions property: List of match conditions.

Parameters:

matchConditions - the matchConditions value to set.

Returns:

the WebApplicationFirewallCustomRule object itself.

withName

public WebApplicationFirewallCustomRule withName(String name)

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.

withPriority

public WebApplicationFirewallCustomRule withPriority(int priority)

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.

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.

withRateLimitThreshold

public WebApplicationFirewallCustomRule withRateLimitThreshold(Integer rateLimitThreshold)

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.

withRuleType

public WebApplicationFirewallCustomRule withRuleType(WebApplicationFirewallRuleType ruleType)

Set the ruleType property: The rule type.

Parameters:

ruleType - the ruleType value to set.

Returns:

the WebApplicationFirewallCustomRule object itself.

withState

public WebApplicationFirewallCustomRule withState(WebApplicationFirewallState state)

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.

Applies to