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

# nsc egress policy update

Update an egress policy from a JSON configuration file.

`nsc egress policy update` replaces the configuration of an existing tenant
egress policy, identified by its `<tag>`, with the contents of a JSON
configuration file. Use it to change which outbound network destinations
your instances are allowed to reach once a policy is already in place — you
can inspect the resulting allow/deny decisions with
[`nsc egress logs`](/docs/reference/cli/egress-logs).

Point `--spec_file` at a file containing the new policy definition. The tag
can be provided either as the positional argument or inside the file itself;
if the file also specifies a tag, the positional `<tag>` takes precedence
for identifying which policy to update.

## Usage

```bash theme={null}
nsc egress policy update <tag> [--spec_file <path>]
```

### Example

```bash theme={null}
nsc egress policy update default --spec_file egress-policy.json
```

## Options

<h3 id="--spec_file-path">
  \--spec\_file \<path>
</h3>

Path to a JSON file containing the egress policy configuration. The policy
tag may be omitted from the file since it's already provided as the `<tag>`
positional argument.

## Related Topics

* [nsc egress policy create](/docs/reference/cli/egress-policy-create) - Create a new egress policy
* [nsc egress policy list](/docs/reference/cli/egress-policy-list) - List available egress policies
