2018-08-17 16:17:11 +00:00
|
|
|
---
|
2020-01-18 00:18:09 +00:00
|
|
|
layout: docs
|
|
|
|
page_title: namespace - Command
|
|
|
|
description: The "namespace" command groups subcommands for interacting with namespaces.
|
2018-08-17 16:17:11 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
# namespace
|
|
|
|
|
|
|
|
The `namespace` command groups subcommands for interacting with namespaces.
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
List all namespaces:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2018-08-17 16:17:11 +00:00
|
|
|
$ vault namespace list
|
|
|
|
```
|
|
|
|
|
|
|
|
Create a namespace at the path `ns1/`:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2018-08-17 16:17:11 +00:00
|
|
|
$ vault namespace create ns1/
|
|
|
|
```
|
|
|
|
|
|
|
|
Delete the namespace at path `ns1/`:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2018-08-17 16:17:11 +00:00
|
|
|
$ vault namespace delete ns1/
|
|
|
|
```
|
|
|
|
|
|
|
|
Lookup the namespace information at path `ns1/`:
|
|
|
|
|
2020-05-21 17:18:17 +00:00
|
|
|
```shell-session
|
2018-08-17 16:17:11 +00:00
|
|
|
$ vault namespace lookup ns1/
|
|
|
|
```
|
|
|
|
|
2021-11-09 22:43:17 +00:00
|
|
|
Lock the API for the current namespace:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ vault namespace lock
|
|
|
|
```
|
|
|
|
|
|
|
|
Lock the API for a descendant namespace at path `current/namespace/ns1/`:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ vault namespace lock ns1/
|
|
|
|
```
|
|
|
|
|
|
|
|
Unlock the API for the current namespace:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ vault namespace unlock -unlock-key <unlock key>
|
|
|
|
```
|
|
|
|
|
|
|
|
Unlock the API for a descendant namespace at path `current/namespacens1/`:
|
|
|
|
|
|
|
|
```shell-session
|
|
|
|
$ vault namespace unlock -unlock-key <unlock key> ns1/
|
|
|
|
```
|
|
|
|
|
2018-08-17 16:17:11 +00:00
|
|
|
## Usage
|
|
|
|
|
|
|
|
```text
|
|
|
|
Usage: vault namespace <subcommand> [options] [args]
|
|
|
|
|
|
|
|
This command groups subcommands for interacting with Vault namespaces.
|
|
|
|
These set of subcommands operate on the context of the namespace that the
|
|
|
|
current logged in token belongs to.
|
|
|
|
|
|
|
|
Subcommands:
|
2021-11-09 22:43:17 +00:00
|
|
|
create Create a new namespace
|
|
|
|
delete Delete an existing namespace
|
|
|
|
list List child namespaces
|
|
|
|
lookup Look up an existing namespace
|
|
|
|
lock Lock the API for a namespace
|
|
|
|
unlock Unlock the API for a namespace
|
2018-08-17 16:17:11 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
For more information, examples, and usage about a subcommand, click on the name
|
|
|
|
of the subcommand in the sidebar.
|