Share via


WafPolicySettings Class

Definition

Defines contents of a web application firewall global configuration.

public class WafPolicySettings : System.ClientModel.Primitives.IJsonModel<Azure.ResourceManager.Cdn.Models.WafPolicySettings>, System.ClientModel.Primitives.IPersistableModel<Azure.ResourceManager.Cdn.Models.WafPolicySettings>
public class WafPolicySettings
type WafPolicySettings = class
    interface IJsonModel<WafPolicySettings>
    interface IPersistableModel<WafPolicySettings>
type WafPolicySettings = class
Public Class WafPolicySettings
Implements IJsonModel(Of WafPolicySettings), IPersistableModel(Of WafPolicySettings)
Public Class WafPolicySettings
Inheritance
WafPolicySettings
Implements

Constructors

WafPolicySettings()

Initializes a new instance of WafPolicySettings.

Properties

DefaultCustomBlockResponseBody

If the action type is block, customer can override the response body. The body must be specified in base64 encoding.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

Examples:

  • BinaryData.FromObjectAsJson("foo"): Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""): Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }): Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"): Creates a payload of { "key": "value" }.

DefaultCustomBlockResponseStatusCode

If the action type is block, this field defines the default customer overridable http response status code.

DefaultRedirectUri

If action type is redirect, this field represents the default redirect URL for the client.

EnabledState

describes if the policy is in enabled state or disabled state.

Mode

Describes if it is in detection mode or prevention mode at policy level.

Explicit Interface Implementations

IJsonModel<WafPolicySettings>.Create(Utf8JsonReader, ModelReaderWriterOptions)

Reads one JSON value (including objects or arrays) from the provided reader and converts it to a model.

IJsonModel<WafPolicySettings>.Write(Utf8JsonWriter, ModelReaderWriterOptions)

Writes the model to the provided Utf8JsonWriter.

IPersistableModel<WafPolicySettings>.Create(BinaryData, ModelReaderWriterOptions)

Converts the provided BinaryData into a model.

IPersistableModel<WafPolicySettings>.GetFormatFromOptions(ModelReaderWriterOptions)

Gets the data interchange format (JSON, Xml, etc) that the model uses when communicating with the service.

IPersistableModel<WafPolicySettings>.Write(ModelReaderWriterOptions)

Writes the model into a BinaryData.

Applies to