Class PolicySettings

java.lang.Object
com.azure.resourcemanager.frontdoor.models.PolicySettings

public final class PolicySettings extends Object
Defines top-level WebApplicationFirewallPolicy configuration settings.
  • Constructor Details

    • PolicySettings

      public PolicySettings()
      Creates an instance of PolicySettings class.
  • Method Details

    • enabledState

      public PolicyEnabledState 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

      public PolicySettings withEnabledState(PolicyEnabledState enabledState)
      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

      public PolicyMode mode()
      Get the mode property: Describes if it is in detection mode or prevention mode at policy level.
      Returns:
      the mode value.
    • withMode

      public PolicySettings withMode(PolicyMode mode)
      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

      public String redirectUrl()
      Get the redirectUrl property: If action type is redirect, this field represents redirect URL for the client.
      Returns:
      the redirectUrl value.
    • withRedirectUrl

      public PolicySettings withRedirectUrl(String redirectUrl)
      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

      public Integer customBlockResponseStatusCode()
      Get the customBlockResponseStatusCode property: If the action type is block, customer can override the response status code.
      Returns:
      the customBlockResponseStatusCode value.
    • 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.
    • 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.
    • 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.
    • requestBodyCheck

      public PolicyRequestBodyCheck requestBodyCheck()
      Get the requestBodyCheck property: Describes if policy managed rules will inspect the request body content.
      Returns:
      the requestBodyCheck value.
    • withRequestBodyCheck

      public PolicySettings withRequestBodyCheck(PolicyRequestBodyCheck requestBodyCheck)
      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.