Class PolicySettings
java.lang.Object
com.azure.resourcemanager.cdn.models.PolicySettings
Defines contents of a web application firewall global configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the defaultCustomBlockResponseBody property: If the action type is block, customer can override the response body.Get the defaultCustomBlockResponseStatusCode property: If the action type is block, this field defines the default customer overridable http response status code.Get the defaultRedirectUrl property: If action type is redirect, this field represents the default redirect URL for the client.Get the enabledState property: describes if the policy is in enabled state or disabled state.mode()Get the mode property: Describes if it is in detection mode or prevention mode at policy level.voidvalidate()Validates the instance.withDefaultCustomBlockResponseBody(String defaultCustomBlockResponseBody) Set the defaultCustomBlockResponseBody property: If the action type is block, customer can override the response body.withDefaultCustomBlockResponseStatusCode(PolicySettingsDefaultCustomBlockResponseStatusCode defaultCustomBlockResponseStatusCode) Set the defaultCustomBlockResponseStatusCode property: If the action type is block, this field defines the default customer overridable http response status code.withDefaultRedirectUrl(String defaultRedirectUrl) Set the defaultRedirectUrl property: If action type is redirect, this field represents the default redirect URL for the client.withEnabledState(PolicyEnabledState enabledState) Set the enabledState property: describes if the policy is in enabled state or disabled state.withMode(PolicyMode mode) Set the mode property: Describes if it is in detection mode or prevention mode at policy level.
-
Constructor Details
-
PolicySettings
public PolicySettings()
-
-
Method Details
-
enabledState
Get the enabledState property: describes if the policy is in enabled state or disabled state.- Returns:
- the enabledState value.
-
withEnabledState
Set the enabledState property: describes if the policy is in enabled state or disabled state.- 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.
-
defaultRedirectUrl
Get the defaultRedirectUrl property: If action type is redirect, this field represents the default redirect URL for the client.- Returns:
- the defaultRedirectUrl value.
-
withDefaultRedirectUrl
Set the defaultRedirectUrl property: 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 the defaultCustomBlockResponseStatusCode property: 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(PolicySettingsDefaultCustomBlockResponseStatusCode defaultCustomBlockResponseStatusCode) Set the defaultCustomBlockResponseStatusCode property: 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 the defaultCustomBlockResponseBody property: 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 the defaultCustomBlockResponseBody property: 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.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-