consul/website/content/commands/config/read.mdx

43 lines
896 B
Plaintext
Raw Normal View History

---
layout: commands
2020-04-07 18:55:19 +00:00
page_title: 'Commands: Config Read'
---
# Consul Config Read
Command: `consul config read`
The `config read` command reads the config entry specified by the given
kind and name and outputs its JSON representation. See the
[configuration entries docs](/docs/agent/config-entries) for more
details about configuration entries.
## Usage
Usage: `consul config read [options]`
#### API Options
2020-04-07 18:55:19 +00:00
@include 'http_api_options_client.mdx'
#### Enterprise Options
2020-04-07 18:55:19 +00:00
@include 'http_api_namespace_options.mdx'
#### Config Read Options
2020-04-07 18:55:19 +00:00
- `-kind` - Specifies the kind of the config entry to read.
2020-04-07 18:55:19 +00:00
- `-name` - Specifies the name of the config entry to read.
## Examples
$ consul config read -kind service-defaults -name web
{
"Kind": "service-defaults",
"Name": "web",
"Protocol": "http",
"CreateIndex": 13,
"ModifyIndex": 13
}