PolicySettings Class
- java.
lang. Object - com.
azure. resourcemanager. network. models. PolicySettings
- com.
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 Policy |
Method Summary
Modifier and Type | Method and Description |
---|---|
String |
customBlockResponseBody()
Get the custom |
Integer |
customBlockResponseStatusCode()
Get the custom |
Boolean |
fileUploadEnforcement()
Get the file |
Integer |
fileUploadLimitInMb()
Get the file |
static
Policy |
fromJson(JsonReader jsonReader)
Reads an instance of Policy |
Integer |
jsChallengeCookieExpirationInMins()
Get the js |
Policy |
logScrubbing()
Get the log |
Integer |
maxRequestBodySizeInKb()
Get the max |
Web |
mode()
Get the mode property: The mode of the policy. |
Boolean |
requestBodyCheck()
Get the request |
Boolean |
requestBodyEnforcement()
Get the request |
Integer |
requestBodyInspectLimitInKB()
Get the request |
Web |
state()
Get the state property: The state of the policy. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Policy |
withCustomBlockResponseBody(String customBlockResponseBody)
Set the custom |
Policy |
withCustomBlockResponseStatusCode(Integer customBlockResponseStatusCode)
Set the custom |
Policy |
withFileUploadEnforcement(Boolean fileUploadEnforcement)
Set the file |
Policy |
withFileUploadLimitInMb(Integer fileUploadLimitInMb)
Set the file |
Policy |
withJsChallengeCookieExpirationInMins(Integer jsChallengeCookieExpirationInMins)
Set the js |
Policy |
withLogScrubbing(PolicySettingsLogScrubbing logScrubbing)
Set the log |
Policy |
withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb)
Set the max |
Policy |
withMode(WebApplicationFirewallMode mode)
Set the mode property: The mode of the policy. |
Policy |
withRequestBodyCheck(Boolean requestBodyCheck)
Set the request |
Policy |
withRequestBodyEnforcement(Boolean requestBodyEnforcement)
Set the request |
Policy |
withRequestBodyInspectLimitInKB(Integer requestBodyInspectLimitInKB)
Set the request |
Policy |
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:
customBlockResponseStatusCode
public Integer customBlockResponseStatusCode()
Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.
Returns:
fileUploadEnforcement
public Boolean fileUploadEnforcement()
Get the fileUploadEnforcement property: Whether allow WAF to enforce file upload limits.
Returns:
fileUploadLimitInMb
public Integer fileUploadLimitInMb()
Get the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.
Returns:
fromJson
public static PolicySettings fromJson(JsonReader jsonReader)
Reads an instance of PolicySettings from the JsonReader.
Parameters:
Returns:
Throws:
jsChallengeCookieExpirationInMins
public Integer jsChallengeCookieExpirationInMins()
Get the jsChallengeCookieExpirationInMins property: Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.
Returns:
logScrubbing
public PolicySettingsLogScrubbing logScrubbing()
Get the logScrubbing property: To scrub sensitive log fields.
Returns:
maxRequestBodySizeInKb
public Integer maxRequestBodySizeInKb()
Get the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.
Returns:
mode
public WebApplicationFirewallMode mode()
Get the mode property: The mode of the policy.
Returns:
requestBodyCheck
public Boolean requestBodyCheck()
Get the requestBodyCheck property: Whether to allow WAF to check request Body.
Returns:
requestBodyEnforcement
public Boolean requestBodyEnforcement()
Get the requestBodyEnforcement property: Whether allow WAF to enforce request body limits.
Returns:
requestBodyInspectLimitInKB
public Integer requestBodyInspectLimitInKB()
Get the requestBodyInspectLimitInKB property: Max inspection limit in KB for request body inspection for WAF.
Returns:
state
public WebApplicationFirewallEnabledState state()
Get the state property: The state of the policy.
Returns:
toJson
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:
Returns:
withCustomBlockResponseStatusCode
public PolicySettings withCustomBlockResponseStatusCode(Integer customBlockResponseStatusCode)
Set the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.
Parameters:
Returns:
withFileUploadEnforcement
public PolicySettings withFileUploadEnforcement(Boolean fileUploadEnforcement)
Set the fileUploadEnforcement property: Whether allow WAF to enforce file upload limits.
Parameters:
Returns:
withFileUploadLimitInMb
public PolicySettings withFileUploadLimitInMb(Integer fileUploadLimitInMb)
Set the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.
Parameters:
Returns:
withJsChallengeCookieExpirationInMins
public PolicySettings withJsChallengeCookieExpirationInMins(Integer jsChallengeCookieExpirationInMins)
Set the jsChallengeCookieExpirationInMins property: Web Application Firewall JavaScript Challenge Cookie Expiration time in minutes.
Parameters:
Returns:
withLogScrubbing
public PolicySettings withLogScrubbing(PolicySettingsLogScrubbing logScrubbing)
Set the logScrubbing property: To scrub sensitive log fields.
Parameters:
Returns:
withMaxRequestBodySizeInKb
public PolicySettings withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb)
Set the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.
Parameters:
Returns:
withMode
public PolicySettings withMode(WebApplicationFirewallMode mode)
Set the mode property: The mode of the policy.
Parameters:
Returns:
withRequestBodyCheck
public PolicySettings withRequestBodyCheck(Boolean requestBodyCheck)
Set the requestBodyCheck property: Whether to allow WAF to check request Body.
Parameters:
Returns:
withRequestBodyEnforcement
public PolicySettings withRequestBodyEnforcement(Boolean requestBodyEnforcement)
Set the requestBodyEnforcement property: Whether allow WAF to enforce request body limits.
Parameters:
Returns:
withRequestBodyInspectLimitInKB
public PolicySettings withRequestBodyInspectLimitInKB(Integer requestBodyInspectLimitInKB)
Set the requestBodyInspectLimitInKB property: Max inspection limit in KB for request body inspection for WAF.
Parameters:
Returns:
withState
public PolicySettings withState(WebApplicationFirewallEnabledState state)
Set the state property: The state of the policy.
Parameters:
Returns:
Applies to
Azure SDK for Java