1--- 2layout: commands 3page_title: 'Commands: Namespace Update' 4--- 5 6# Consul Namespace Update 7 8Command: `consul namespace update` 9 10<EnterpriseAlert /> 11 12This `namespace update` command updates a namespaces using the CLI parameters provided. 13This was added in Consul Enterprise 1.7.2. 14 15## Usage 16 17Usage: `consul namespace update -name <namespace name> [options]` 18 19Request a namespace to be update. Construction of the namespace definition is handled by this command 20from the CLI arguments. Some parts of the Namespace such as ACL configurations and meta can be merged 21with the existing namespace definition. 22 23#### API Options 24 25@include 'http_api_options_client.mdx' 26 27@include 'http_api_options_server.mdx' 28 29#### Command Options 30 31- `-default-policy-id=<value>` - ID of a policy from the default namespace to inject for all tokens 32 in this namespace. May be specified multiple times. 33 34- `-default-policy-name=<value>` - Name of a policy from the default namespace to inject for all 35 tokens in this namespace. May be specified multiple times. 36 37- `-default-role-id=<value>` - ID of a role from the default namespace to inject for all tokens in 38 this namespace. May be specified multiple times. 39 40- `-default-role-name=<value>` - Name of a role from the default namespace to inject for all tokens 41 in this namespace. May be specified multiple times. 42 43- `-description=<string>` - A description of the namespace. 44 45- `-format=<string>` - How to output the results. The choices are: pretty or json 46 47- `-merge-acls` - Merge the new ACL policies and roles with the existing values. 48 49- `-merge-meta` - Merge new meta values with existing meta. 50 51- `-meta=<value>` - Metadata to set on the namespace, formatted as key=value. This flag 52 may be specified multiple times to set multiple meta fields 53 54- `-name=<string>` - The namespace's name. This flag is required. 55 56- `-show-meta` - Indicates that namespace metadata such as the raft indices should 57 be shown for the namespace 58 59## Examples 60 61Update a namespace with a new description: 62 63```shell-session 64$ consul namespace update -name "team-1" -description "example description" 65Name: team-1 66Description: 67 example description 68``` 69 70Showing Raft Metadata: 71 72```shell-session 73$ consul namespace update -name team-1 -show-meta -default-policy-id 1206bf1c-6239-46e8-b9f8-b426667cf428 74Name: team-1 75ACLs: 76 Default Policies: 77 1206bf1c-6239-46e8-b9f8-b426667cf428 / team1-universal-policy 78Create Index: 339 79Modify Index: 344 80``` 81 82JSON Format: 83 84```shell-session 85$ consul namespace update -name team2 -description "Example Namespace" -meta "external-source=kubernetes" -format=json 86{ 87 "Name": "team2", 88 "Description": "Example Namespace", 89 "Meta": { 90 "external-source": "kubernetes" 91 }, 92 "CreateIndex": 352, 93 "ModifyIndex": 352 94} 95``` 96