Class PolicySettings

java.lang.Object
com.microsoft.azure.management.cdn.PolicySettings

public class PolicySettings extends Object
Defines contents of a web application firewall global configuration.
  • Constructor Details

    • PolicySettings

      public PolicySettings()
  • Method Details

    • enabledState

      public PolicyEnabledState enabledState()
      Get describes if the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'.
      Returns:
      the enabledState value
    • withEnabledState

      public PolicySettings withEnabledState(PolicyEnabledState enabledState)
      Set describes if the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'.
      Parameters:
      enabledState - the enabledState value to set
      Returns:
      the PolicySettings object itself.
    • mode

      public PolicyMode mode()
      Get describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection'.
      Returns:
      the mode value
    • withMode

      public PolicySettings withMode(PolicyMode mode)
      Set describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection'.
      Parameters:
      mode - the mode value to set
      Returns:
      the PolicySettings object itself.
    • defaultRedirectUrl

      public String defaultRedirectUrl()
      Get if action type is redirect, this field represents the default redirect URL for the client.
      Returns:
      the defaultRedirectUrl value
    • withDefaultRedirectUrl

      public PolicySettings withDefaultRedirectUrl(String defaultRedirectUrl)
      Set if action type is redirect, this field represents the default redirect URL for the client.
      Parameters:
      defaultRedirectUrl - the defaultRedirectUrl value to set
      Returns:
      the PolicySettings object itself.
    • defaultCustomBlockResponseStatusCode

      public Integer defaultCustomBlockResponseStatusCode()
      Get if the action type is block, this field defines the default customer overridable http response status code.
      Returns:
      the defaultCustomBlockResponseStatusCode value
    • withDefaultCustomBlockResponseStatusCode

      public PolicySettings withDefaultCustomBlockResponseStatusCode(Integer defaultCustomBlockResponseStatusCode)
      Set if the action type is block, this field defines the default customer overridable http response status code.
      Parameters:
      defaultCustomBlockResponseStatusCode - the defaultCustomBlockResponseStatusCode value to set
      Returns:
      the PolicySettings object itself.
    • defaultCustomBlockResponseBody

      public String defaultCustomBlockResponseBody()
      Get if the action type is block, customer can override the response body. The body must be specified in base64 encoding.
      Returns:
      the defaultCustomBlockResponseBody value
    • withDefaultCustomBlockResponseBody

      public PolicySettings withDefaultCustomBlockResponseBody(String defaultCustomBlockResponseBody)
      Set if the action type is block, customer can override the response body. The body must be specified in base64 encoding.
      Parameters:
      defaultCustomBlockResponseBody - the defaultCustomBlockResponseBody value to set
      Returns:
      the PolicySettings object itself.