Class PolicySettings
java.lang.Object
com.microsoft.azure.management.cdn.PolicySettings
Defines contents of a web application firewall global configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet if the action type is block, customer can override the response body.Get if the action type is block, this field defines the default customer overridable http response status code.Get if action type is redirect, this field represents the default redirect URL for the client.Get describes if the policy is in enabled state or disabled state.mode()
Get describes if it is in detection mode or prevention mode at policy level.withDefaultCustomBlockResponseBody
(String defaultCustomBlockResponseBody) Set if the action type is block, customer can override the response body.withDefaultCustomBlockResponseStatusCode
(Integer defaultCustomBlockResponseStatusCode) Set if the action type is block, this field defines the default customer overridable http response status code.withDefaultRedirectUrl
(String defaultRedirectUrl) Set if action type is redirect, this field represents the default redirect URL for the client.withEnabledState
(PolicyEnabledState enabledState) Set describes if the policy is in enabled state or disabled state.withMode
(PolicyMode mode) Set describes if it is in detection mode or prevention mode at policy level.
-
Constructor Details
-
PolicySettings
public PolicySettings()
-
-
Method Details
-
enabledState
Get describes if the policy is in enabled state or disabled state. Possible values include: 'Disabled', 'Enabled'.- Returns:
- the enabledState value
-
withEnabledState
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
Get describes if it is in detection mode or prevention mode at policy level. Possible values include: 'Prevention', 'Detection'.- Returns:
- the mode value
-
withMode
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
Get if action type is redirect, this field represents the default redirect URL for the client.- Returns:
- the defaultRedirectUrl value
-
withDefaultRedirectUrl
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
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
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
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.
-