mirror of https://github.com/status-im/consul.git
57 lines
1.5 KiB
Plaintext
57 lines
1.5 KiB
Plaintext
---
|
|
layout: commands
|
|
page_title: 'Commands: Config Read'
|
|
---
|
|
|
|
# Consul Config Read
|
|
|
|
Command: `consul config read`
|
|
|
|
Corresponding HTTP API Endpoint: [\[GET\] /v1/config/:kind/:name](/api-docs/config#get-configuration)
|
|
|
|
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.
|
|
|
|
The table below shows this command's [required ACLs](/api#authentication). Configuration of
|
|
[blocking queries](/api/features/blocking) and [agent caching](/api/features/caching)
|
|
are not supported from commands, but may be from the corresponding HTTP endpoint.
|
|
|
|
| ACL Required |
|
|
| -------------- |
|
|
| `service:read` |
|
|
|
|
## Usage
|
|
|
|
Usage: `consul config read [options]`
|
|
|
|
#### API Options
|
|
|
|
@include 'http_api_options_client.mdx'
|
|
|
|
#### Enterprise Options
|
|
|
|
@include 'http_api_namespace_options.mdx'
|
|
|
|
@include 'http_api_partition_options.mdx'
|
|
|
|
#### Config Read Options
|
|
|
|
- `-kind` - Specifies the kind of the config entry to read.
|
|
|
|
- `-name` - Specifies the name of the config entry to read. The name of the
|
|
`proxy-defaults` config entry must be `global`, and the name of the `mesh`
|
|
config entry must be `mesh`.
|
|
|
|
## Examples
|
|
|
|
$ consul config read -kind service-defaults -name web
|
|
{
|
|
"Kind": "service-defaults",
|
|
"Name": "web",
|
|
"Protocol": "http",
|
|
"CreateIndex": 13,
|
|
"ModifyIndex": 13
|
|
}
|