[SDK reference](../../index.md) / [Models](../index.md) / [Network](index.md)

# WafPolicy

**Kind:** class  
**Namespace:** `Egulu.Sdk.Models.Network`  

A web application firewall policy (founder, 22 Nov 2026; NET-14; proposed ADR-0685): Coraza with the OWASP Core Rule Set on the platform's edge. InDETECTION mode matched rules are logged and nothing is blocked; in PREVENTION mode a request that reaches the anomaly threshold, or matches a BLOCK rule,gets a 403. `paranoiaLevel` and `excludedRuleIds` tune the Core Rule Set (the rule set's own blocking rules cannot be excluded); custom rules matchaddresses, countries, paths, headers and query text and allow, block, log or rate-limit. A policy protects an application load balancer (whose`wafPolicy` names it) and the custom domains in `customDomains`. Matched rules are written to the project's logs under `logName`. Metered by themillion requests it inspects (`waf-requests`). Bot rules are only those the Core Rule Set offers. The policy is rendered to Coraza's directives with everyvalue checked and escaped, applied by the edge router as a whole and kept as last-known-good.

## Properties

| Name | Type | JSON name | Description |
|---|---|---|---|
| `Annotations` | `Models.Network.WafPolicy_annotations?` | `annotations` | At most 256 KiB in all; never policy input. |
| `AnomalyThreshold` | `int?` | `anomalyThreshold` | The inbound anomaly score at which a request is blocked, 1 to 100; 5 (the rule set's default) when omitted. |
| `AttachedTo` | `List<string>?` | `attachedTo` | What the policy protects now: `applicationLoadBalancers/{id}` and `customDomains/{id}`. |
| `ConfigHash` | `string?` | `configHash` | SHA-256 of the configuration the edge router serves now. |
| `CreateTime` | `DateTimeOffset?` | `createTime` | The createTime property |
| `CustomDomains` | `List<string>?` | `customDomains` | Custom domains of the project (their IDs) the policy protects, at most 20. |
| `CustomRules` | `List<Models.Network.WafCustomRule>?` | `customRules` | Custom rules, at most 50. |
| `DeleteTime` | `DateTimeOffset?` | `deleteTime` | The deleteTime property |
| `DisplayName` | `string?` | `displayName` | Up to 63 characters. |
| `Etag` | `string?` | `etag` | "{generation}"; send it back in If-Match. |
| `ExcludedRuleIds` | `List<int?>?` | `excludedRuleIds` | Core Rule Set rules turned off, at most 20, each in 911000 to 948999 or 950000 to 958999. |
| `Labels` | `Models.Network.WafPolicy_labels?` | `labels` | At most 64. |
| `LogMatches` | `bool?` | `logMatches` | Whether matched rules are written to the project's logs; true when omitted. |
| `LogName` | `string?` | `logName` | The log they are written to; `waf` when omitted. |
| `Mode` | `string?` | `mode` | DETECTION (default) or PREVENTION. |
| `Name` | `string?` | `name` | The resource name, for example projects/p/locations/l/instances/i. |
| `ParanoiaLevel` | `int?` | `paranoiaLevel` | The Core Rule Set's paranoia level, 1 to 4; 1 when omitted. |
| `PurgeTime` | `DateTimeOffset?` | `purgeTime` | The purgeTime property |
| `Reconciling` | `bool?` | `reconciling` | True while the platform works toward the spec. |
| `State` | `Models.Network.NetworkState?` | `state` | Current lifecycle state. |
| `StateDetails` | `string?` | `stateDetails` | What is not carried out yet, or what the edge refused, when something is not. |
| `Uid` | `string?` | `uid` | UUIDv7, never reused. |
| `UpdateTime` | `DateTimeOffset?` | `updateTime` | The updateTime property |
