---
title: "ezgh compute route-tables routes replace"
description: "Replace a table's whole route set."
---

> 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 compute route-tables routes replace

{/* 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 compute route-tables routes replace <table> --file <routes.json> [flags]
```

Replace a table's routes with those in a JSON file: &#123;"routes": \[&#123;"destination", "target": &#123;"type", "id"&#125;&#125;…\]&#125;, or a table as get -o json prints it (local routes may be included as shown).

A get -o json document carries the table's updatedAt: if the table changed since then (a route written by someone else, or a rename), nothing is sent and it exits 1; read it again and redo the edit. A file without updatedAt replaces whatever the table holds now. Either way the write is refused (412) if the routes change between this command's read and its write.

Part of [`ezgh compute route-tables routes`](/cli/reference/compute-route-tables-routes).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--file` | string |  | the routes, as JSON (required) |

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

Source: https://docs.ezghcloud.com/cli/reference/compute-route-tables-routes-replace/index.mdx
