Class PolicySettings
java.lang.Object
com.azure.resourcemanager.frontdoor.models.PolicySettings
Defines top-level WebApplicationFirewallPolicy configuration settings.
-
Constructor Summary
-
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 enabledState property: Describes if the policy is in enabled or disabled state.mode()
Get the mode property: Describes if it is in detection mode or prevention mode at policy level.Get the redirectUrl property: If action type is redirect, this field represents redirect URL for the client.Get the requestBodyCheck property: Describes if policy managed rules will inspect the request body content.void
validate()
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.withEnabledState
(PolicyEnabledState enabledState) Set the enabledState property: Describes if the policy is in enabled or disabled state.withMode
(PolicyMode mode) Set the mode property: Describes if it is in detection mode or prevention mode at policy level.withRedirectUrl
(String redirectUrl) Set the redirectUrl property: If action type is redirect, this field represents redirect URL for the client.withRequestBodyCheck
(PolicyRequestBodyCheck requestBodyCheck) Set the requestBodyCheck property: Describes if policy managed rules will inspect the request body content.
-
Constructor Details
-
PolicySettings
public PolicySettings()Creates an instance of PolicySettings class.
-
-
Method Details
-
enabledState
Get the enabledState property: Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified.- Returns:
- the enabledState value.
-
withEnabledState
Set the enabledState property: Describes if the policy is in enabled or disabled state. Defaults to Enabled if not specified.- Parameters:
enabledState
- the enabledState value to set.- Returns:
- the PolicySettings object itself.
-
mode
Get the mode property: Describes if it is in detection mode or prevention mode at policy level.- Returns:
- the mode value.
-
withMode
Set the mode property: Describes if it is in detection mode or prevention mode at policy level.- Parameters:
mode
- the mode value to set.- Returns:
- the PolicySettings object itself.
-
redirectUrl
Get the redirectUrl property: If action type is redirect, this field represents redirect URL for the client.- Returns:
- the redirectUrl value.
-
withRedirectUrl
Set the redirectUrl property: If action type is redirect, this field represents redirect URL for the client.- Parameters:
redirectUrl
- the redirectUrl 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.
-
requestBodyCheck
Get the requestBodyCheck property: Describes if policy managed rules will inspect the request body content.- Returns:
- the requestBodyCheck value.
-
withRequestBodyCheck
Set the requestBodyCheck property: Describes if policy managed rules will inspect the request body content.- Parameters:
requestBodyCheck
- the requestBodyCheck value to set.- Returns:
- the PolicySettings object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-