# Update a config with cli

**URL:** <https://openziti.discourse.group/t/update-a-config-with-cli/3496>\
**Category:** Uncategorized\
**Created:** [November 26, 2024, 5:32pm UTC](https://openziti.discourse.group/t/update-a-config-with-cli/3496 "2024-11-26T17:32:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![colin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@colin](https://openziti.discourse.group/u/colin)\
**Post date:** [November 26, 2024, 5:32pm UTC](https://openziti.discourse.group/t/update-a-config-with-cli/3496/1 "2024-11-26T17:32:12Z")

</div>

Hi, how do you update a config from the CLI exactly ? For example if I run the command below:

> ziti edge show config hrm-intercept-config

```auto
{
    "addresses": [
        "hrm.uni"
    ],
    "portRanges": [
        {
            "high": 8200,
            "low": 8200
        }
    ],
    "protocols": [
        "tcp",
        "udp"
    ]
}

```

How do I update that output with the (im assuming) command

> ziti edge update identity-configs hrm-intercept-config

" to remove "udp" from above ?

---

<div class="post-metadata">

**Author:** ![TheLumberjack](https://yyz2.discourse-cdn.com/free1/user_avatar/openziti.discourse.group/thelumberjack/32/113_2.png) [@TheLumberjack](https://openziti.discourse.group/u/TheLumberjack)\
**Post date:** [November 26, 2024, 5:35pm UTC](https://openziti.discourse.group/t/update-a-config-with-cli/3496/2 "2024-11-26T17:35:50Z")

</div>

use `-d`. the cli output "should" help

```auto
ziti edge update config hrm-intercept-config -d '{"addresses":["hrm.uni"],"portRanges":[{"high":8200,"low":8200}],"protocols":["tcp"]}'

```

```auto
$ ziti edge update config --help
updates a config managed by the Ziti Edge Controller

Usage:
  ziti edge update config <idOrName> [flags]

Flags:
  -i, --cli-identity string Specify the saved identity you want the CLI to use when connect to the controller with
  -d, --data string Set the data of the config
  -h, --help help for config
  -f, --json-file string Read config JSON from a file instead of the command line
  -n, --name string Set the name of the config
  -j, --output-json Output the full JSON response from the Ziti Edge Controller
      --output-request-json Output the full JSON request to the Ziti Edge Controller
  -t, --tags stringToString Add tags to entity definition (default [])
      --tags-json string Add tags defined in JSON to entity definition
      --timeout int Timeout for REST operations (specified in seconds) (default 5)
      --verbose Enable verbose logging

```

---

<div class="post-metadata">

**Author:** ![colin](https://avatars.discourse-cdn.com/v4/letter/c/e19b73/32.png) [@colin](https://openziti.discourse.group/u/colin)\
**Post date:** [November 26, 2024, 5:41pm UTC](https://openziti.discourse.group/t/update-a-config-with-cli/3496/3 "2024-11-26T17:41:00Z")

</div>

Ah, i see, perfect, thanks
