PolicySettings Class

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

Implements

public final class PolicySettings
implements JsonSerializable<PolicySettings>

Defines contents of a web application firewall global configuration.

Constructor Summary

Constructor Description
PolicySettings()

Creates an instance of PolicySettings class.

Method Summary

Modifier and Type Method and Description
String customBlockResponseBody()

Get the customBlockResponseBody property: If the action type is block, customer can override the response body.

Integer customBlockResponseStatusCode()

Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.

Boolean fileUploadEnforcement()

Get the fileUploadEnforcement property: Whether allow WAF to enforce file upload limits.

Integer fileUploadLimitInMb()

Get the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.

static PolicySettings fromJson(JsonReader jsonReader)

Reads an instance of PolicySettings from the JsonReader.

Integer jsChallengeCookieExpirationInMins()

Get the jsChallengeCookieExpirationInMins property: Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.

PolicySettingsLogScrubbing logScrubbing()

Get the logScrubbing property: To scrub sensitive log fields.

Integer maxRequestBodySizeInKb()

Get the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.

WebApplicationFirewallMode mode()

Get the mode property: The mode of the policy.

Boolean requestBodyCheck()

Get the requestBodyCheck property: Whether to allow WAF to check request Body.

Boolean requestBodyEnforcement()

Get the requestBodyEnforcement property: Whether allow WAF to enforce request body limits.

Integer requestBodyInspectLimitInKB()

Get the requestBodyInspectLimitInKB property: Max inspection limit in KB for request body inspection for WAF.

WebApplicationFirewallEnabledState state()

Get the state property: The state of the policy.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

PolicySettings withCustomBlockResponseBody(String customBlockResponseBody)

Set the customBlockResponseBody property: If the action type is block, customer can override the response body.

PolicySettings withCustomBlockResponseStatusCode(Integer customBlockResponseStatusCode)

Set the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.

PolicySettings withFileUploadEnforcement(Boolean fileUploadEnforcement)

Set the fileUploadEnforcement property: Whether allow WAF to enforce file upload limits.

PolicySettings withFileUploadLimitInMb(Integer fileUploadLimitInMb)

Set the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.

PolicySettings withJsChallengeCookieExpirationInMins(Integer jsChallengeCookieExpirationInMins)

Set the jsChallengeCookieExpirationInMins property: Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.

PolicySettings withLogScrubbing(PolicySettingsLogScrubbing logScrubbing)

Set the logScrubbing property: To scrub sensitive log fields.

PolicySettings withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb)

Set the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.

PolicySettings withMode(WebApplicationFirewallMode mode)

Set the mode property: The mode of the policy.

PolicySettings withRequestBodyCheck(Boolean requestBodyCheck)

Set the requestBodyCheck property: Whether to allow WAF to check request Body.

PolicySettings withRequestBodyEnforcement(Boolean requestBodyEnforcement)

Set the requestBodyEnforcement property: Whether allow WAF to enforce request body limits.

PolicySettings withRequestBodyInspectLimitInKB(Integer requestBodyInspectLimitInKB)

Set the requestBodyInspectLimitInKB property: Max inspection limit in KB for request body inspection for WAF.

PolicySettings withState(WebApplicationFirewallEnabledState state)

Set the state property: The state of the policy.

Methods inherited from java.lang.Object

Constructor Details

PolicySettings

public PolicySettings()

Creates an instance of PolicySettings class.

Method Details

customBlockResponseBody

public String customBlockResponseBody()

Get the customBlockResponseBody property: If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

Returns:

the customBlockResponseBody value.

customBlockResponseStatusCode

public Integer customBlockResponseStatusCode()

Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.

Returns:

the customBlockResponseStatusCode value.

fileUploadEnforcement

public Boolean fileUploadEnforcement()

Get the fileUploadEnforcement property: Whether allow WAF to enforce file upload limits.

Returns:

the fileUploadEnforcement value.

fileUploadLimitInMb

public Integer fileUploadLimitInMb()

Get the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.

Returns:

the fileUploadLimitInMb value.

fromJson

public static PolicySettings fromJson(JsonReader jsonReader)

Reads an instance of PolicySettings from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of PolicySettings if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the PolicySettings.

jsChallengeCookieExpirationInMins

public Integer jsChallengeCookieExpirationInMins()

Get the jsChallengeCookieExpirationInMins property: Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.

Returns:

the jsChallengeCookieExpirationInMins value.

logScrubbing

public PolicySettingsLogScrubbing logScrubbing()

Get the logScrubbing property: To scrub sensitive log fields.

Returns:

the logScrubbing value.

maxRequestBodySizeInKb

public Integer maxRequestBodySizeInKb()

Get the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.

Returns:

the maxRequestBodySizeInKb value.

mode

public WebApplicationFirewallMode mode()

Get the mode property: The mode of the policy.

Returns:

the mode value.

requestBodyCheck

public Boolean requestBodyCheck()

Get the requestBodyCheck property: Whether to allow WAF to check request Body.

Returns:

the requestBodyCheck value.

requestBodyEnforcement

public Boolean requestBodyEnforcement()

Get the requestBodyEnforcement property: Whether allow WAF to enforce request body limits.

Returns:

the requestBodyEnforcement value.

requestBodyInspectLimitInKB

public Integer requestBodyInspectLimitInKB()

Get the requestBodyInspectLimitInKB property: Max inspection limit in KB for request body inspection for WAF.

Returns:

the requestBodyInspectLimitInKB value.

state

public WebApplicationFirewallEnabledState state()

Get the state property: The state of the policy.

Returns:

the state value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withCustomBlockResponseBody

public PolicySettings withCustomBlockResponseBody(String customBlockResponseBody)

Set the customBlockResponseBody property: If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

Parameters:

customBlockResponseBody - the customBlockResponseBody value to set.

Returns:

the PolicySettings object itself.

withCustomBlockResponseStatusCode

public PolicySettings withCustomBlockResponseStatusCode(Integer customBlockResponseStatusCode)

Set the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.

Parameters:

customBlockResponseStatusCode - the customBlockResponseStatusCode value to set.

Returns:

the PolicySettings object itself.

withFileUploadEnforcement

public PolicySettings withFileUploadEnforcement(Boolean fileUploadEnforcement)

Set the fileUploadEnforcement property: Whether allow WAF to enforce file upload limits.

Parameters:

fileUploadEnforcement - the fileUploadEnforcement value to set.

Returns:

the PolicySettings object itself.

withFileUploadLimitInMb

public PolicySettings withFileUploadLimitInMb(Integer fileUploadLimitInMb)

Set the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.

Parameters:

fileUploadLimitInMb - the fileUploadLimitInMb value to set.

Returns:

the PolicySettings object itself.

withJsChallengeCookieExpirationInMins

public PolicySettings withJsChallengeCookieExpirationInMins(Integer jsChallengeCookieExpirationInMins)

Set the jsChallengeCookieExpirationInMins property: Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.

Parameters:

jsChallengeCookieExpirationInMins - the jsChallengeCookieExpirationInMins value to set.

Returns:

the PolicySettings object itself.

withLogScrubbing

public PolicySettings withLogScrubbing(PolicySettingsLogScrubbing logScrubbing)

Set the logScrubbing property: To scrub sensitive log fields.

Parameters:

logScrubbing - the logScrubbing value to set.

Returns:

the PolicySettings object itself.

withMaxRequestBodySizeInKb

public PolicySettings withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb)

Set the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.

Parameters:

maxRequestBodySizeInKb - the maxRequestBodySizeInKb value to set.

Returns:

the PolicySettings object itself.

withMode

public PolicySettings withMode(WebApplicationFirewallMode mode)

Set the mode property: The mode of the policy.

Parameters:

mode - the mode value to set.

Returns:

the PolicySettings object itself.

withRequestBodyCheck

public PolicySettings withRequestBodyCheck(Boolean requestBodyCheck)

Set the requestBodyCheck property: Whether to allow WAF to check request Body.

Parameters:

requestBodyCheck - the requestBodyCheck value to set.

Returns:

the PolicySettings object itself.

withRequestBodyEnforcement

public PolicySettings withRequestBodyEnforcement(Boolean requestBodyEnforcement)

Set the requestBodyEnforcement property: Whether allow WAF to enforce request body limits.

Parameters:

requestBodyEnforcement - the requestBodyEnforcement value to set.

Returns:

the PolicySettings object itself.

withRequestBodyInspectLimitInKB

public PolicySettings withRequestBodyInspectLimitInKB(Integer requestBodyInspectLimitInKB)

Set the requestBodyInspectLimitInKB property: Max inspection limit in KB for request body inspection for WAF.

Parameters:

requestBodyInspectLimitInKB - the requestBodyInspectLimitInKB value to set.

Returns:

the PolicySettings object itself.

withState

public PolicySettings withState(WebApplicationFirewallEnabledState state)

Set the state property: The state of the policy.

Parameters:

state - the state value to set.

Returns:

the PolicySettings object itself.

Applies to