Class PolicySettings
java.lang.Object
com.azure.resourcemanager.network.models.PolicySettings
Defines contents of a web application firewall global configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the customBlockResponseBody property: If the action type is block, customer can override the response body.Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.Get the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.Get the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.mode()Get the mode property: The mode of the policy.Get the requestBodyCheck property: Whether to allow WAF to check request Body.state()Get the state property: The state of the policy.voidvalidate()Validates the instance.withCustomBlockResponseBody(String customBlockResponseBody) Set the customBlockResponseBody property: If the action type is block, customer can override the response body.withCustomBlockResponseStatusCode(Integer customBlockResponseStatusCode) Set the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.withFileUploadLimitInMb(Integer fileUploadLimitInMb) Set the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.withMaxRequestBodySizeInKb(Integer maxRequestBodySizeInKb) Set the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.Set the mode property: The mode of the policy.withRequestBodyCheck(Boolean requestBodyCheck) Set the requestBodyCheck property: Whether to allow WAF to check request Body.Set the state property: The state of the policy.
-
Constructor Details
-
PolicySettings
public PolicySettings()Creates an instance of PolicySettings class.
-
-
Method Details
-
state
Get the state property: The state of the policy.- Returns:
- the state value.
-
withState
Set the state property: The state of the policy.- Parameters:
state- the state value to set.- Returns:
- the PolicySettings object itself.
-
mode
Get the mode property: The mode of the policy.- Returns:
- the mode value.
-
withMode
Set the mode property: The mode of the policy.- Parameters:
mode- the mode value to set.- Returns:
- the PolicySettings object itself.
-
requestBodyCheck
Get the requestBodyCheck property: Whether to allow WAF to check request Body.- Returns:
- the requestBodyCheck value.
-
withRequestBodyCheck
Set the requestBodyCheck property: Whether to allow WAF to check request Body.- Parameters:
requestBodyCheck- the requestBodyCheck value to set.- Returns:
- the PolicySettings object itself.
-
maxRequestBodySizeInKb
Get the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.- Returns:
- the maxRequestBodySizeInKb value.
-
withMaxRequestBodySizeInKb
Set the maxRequestBodySizeInKb property: Maximum request body size in Kb for WAF.- Parameters:
maxRequestBodySizeInKb- the maxRequestBodySizeInKb value to set.- Returns:
- the PolicySettings object itself.
-
fileUploadLimitInMb
Get the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.- Returns:
- the fileUploadLimitInMb value.
-
withFileUploadLimitInMb
Set the fileUploadLimitInMb property: Maximum file upload size in Mb for WAF.- Parameters:
fileUploadLimitInMb- the fileUploadLimitInMb value to set.- Returns:
- the PolicySettings object itself.
-
customBlockResponseStatusCode
Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.- Returns:
- the customBlockResponseStatusCode value.
-
withCustomBlockResponseStatusCode
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.
-
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.
-
withCustomBlockResponseBody
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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-