---
title: "ezgh waf update"
description: "Change a WAF."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh waf update

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh waf update <waf> [--name n] [--description d] [--mode block|log] [--managed-rule-set name[=log]…] [--logging off|matched|all] [--from-file waf.json] [flags]
```

Change a WAF. Only what's given changes; `--tag` replaces all its tags, `--clear-tags` removes them, and `--managed-rule-set` replaces the list of managed rule sets (a set it already runs keeps its paranoia level and rule overrides). A change applies to every load balancer it's attached to.

`--from-file` replaces the whole WAF with a JSON document: edit what `ezgh waf get -o json` prints. If the WAF changed after that, nothing is changed.

Part of [`ezgh waf`](/cli/reference/waf).

## Examples

```sh
ezgh waf update waf_k2m9x0a7qpe4 --mode block
ezgh waf update waf_k2m9x0a7qpe4 --logging all --logging-environment prod
ezgh waf get waf_k2m9x0a7qpe4 -o json > waf.json && ezgh waf update waf_k2m9x0a7qpe4 --from-file waf.json
```

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--clear-tags` | boolean |  | remove its tags |
| `--description` | string |  | what it's for |
| `-f`, `--from-file` | string |  | the WAF as JSON (what `ezgh waf get -o json` prints), - for stdin; flags change it further |
| `--logging` | string |  | request logs to Obs: off, matched (the requests a rule matched) or all |
| `--logging-environment` | string |  | the Obs environment in the project request logs go to |
| `--managed-rule-set` | string, repeatable |  | a managed rule set to run, name or name=log (ezgh/core, ezgh/php, ezgh/node, ezgh/known-bad-inputs); repeat for more, in order, replacing the list |
| `--mode` | string |  | block, or log to record what it would block and block nothing |
| `--name` | string |  | a new name |
| `--tag` | string, repeatable |  | a tag, key=value; repeat for more |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/waf-update/index.mdx
