---
title: "ezgh hosted-queues policies update"
description: "Change a policy."
---

> 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 hosted-queues policies 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 hosted-queues policies update <cluster> <policy> [--pattern re] [--definition json] [--apply-to t] [--priority n] [--vhost v] [--wait] [flags]
```

Change a policy's pattern, what it applies to, its priority or its definition (which it replaces).

Part of [`ezgh hosted-queues policies`](/cli/reference/hosted-queues-policies).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--apply-to` | string |  | all, queues, exchanges, classic_queues, quorum_queues or streams |
| `--definition` | string |  | a JSON object, such as &#123;"max-length": 10000&#125; |
| `--pattern` | string |  | the regular expression of the names it applies to |
| `--priority` | int |  | 0 to 999; the highest matching policy applies |
| `--vhost` | string | `/` | the vhost it's in (/ is the default vhost) |
| `--wait` | boolean |  | wait until it's done |
| `--wait-timeout` | duration | `10m0s` | how long `--wait` waits |

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

Source: https://docs.ezghcloud.com/cli/reference/hosted-queues-policies-update/index.mdx
