diff --git a/website/content/commands/acl/auth-method/delete.mdx b/website/content/commands/acl/auth-method/delete.mdx index a0865825b..2c35172a5 100644 --- a/website/content/commands/acl/auth-method/delete.mdx +++ b/website/content/commands/acl/auth-method/delete.mdx @@ -23,21 +23,21 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl auth-method delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-name=` - The Name of the auth method to delete. #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/auth-method/list.mdx b/website/content/commands/acl/auth-method/list.mdx index 93387e588..2c173ce66 100644 --- a/website/content/commands/acl/auth-method/list.mdx +++ b/website/content/commands/acl/auth-method/list.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl auth-method list` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-meta` - Indicates that auth method metadata such as the raft indices should @@ -38,9 +32,15 @@ Usage: `consul acl auth-method list` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/auth-method/read.mdx b/website/content/commands/acl/auth-method/read.mdx index f9ec06619..adb5b4456 100644 --- a/website/content/commands/acl/auth-method/read.mdx +++ b/website/content/commands/acl/auth-method/read.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl auth-method read [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-meta` - Indicates that auth method metadata such as the raft @@ -40,9 +34,15 @@ Usage: `consul acl auth-method read [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/auth-method/update.mdx b/website/content/commands/acl/auth-method/update.mdx index a7fae8dc3..338a7a5ef 100644 --- a/website/content/commands/acl/auth-method/update.mdx +++ b/website/content/commands/acl/auth-method/update.mdx @@ -26,12 +26,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl auth-method update [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the auth method. @@ -76,6 +70,8 @@ Usage: `consul acl auth-method update [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' - `-namespace-rule-bind-namespace=` - Namespace to bind on match. Can @@ -85,7 +81,11 @@ Usage: `consul acl auth-method update [options] [args]` verified identity attributes returned from the auth method during login to determine if the namespace rule applies. Added in Consul 1.8.0. -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/binding-rule/create.mdx b/website/content/commands/acl/binding-rule/create.mdx index 9df0d2691..1e10d5da7 100644 --- a/website/content/commands/acl/binding-rule/create.mdx +++ b/website/content/commands/acl/binding-rule/create.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl binding-rule create [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-bind-name=` - Name to bind on match. Can use `${var}` @@ -51,9 +45,15 @@ Usage: `consul acl binding-rule create [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/binding-rule/delete.mdx b/website/content/commands/acl/binding-rule/delete.mdx index 0ef61278b..360742eab 100644 --- a/website/content/commands/acl/binding-rule/delete.mdx +++ b/website/content/commands/acl/binding-rule/delete.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl binding-rule delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the binding rule to delete. It may be specified as a @@ -36,9 +30,15 @@ Usage: `consul acl binding-rule delete [options]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/binding-rule/list.mdx b/website/content/commands/acl/binding-rule/list.mdx index 322d647d2..89695ec0c 100644 --- a/website/content/commands/acl/binding-rule/list.mdx +++ b/website/content/commands/acl/binding-rule/list.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl binding-rule list` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-meta` - Indicates that binding rule metadata such as the raft indices @@ -38,9 +32,15 @@ Usage: `consul acl binding-rule list` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/binding-rule/read.mdx b/website/content/commands/acl/binding-rule/read.mdx index 1ac0e2c85..41ee7f2a3 100644 --- a/website/content/commands/acl/binding-rule/read.mdx +++ b/website/content/commands/acl/binding-rule/read.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl binding-rule read [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the binding rule to read. It may be specified as a unique ID @@ -41,9 +35,15 @@ Usage: `consul acl binding-rule read [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/binding-rule/update.mdx b/website/content/commands/acl/binding-rule/update.mdx index 320979663..5c292f5bf 100644 --- a/website/content/commands/acl/binding-rule/update.mdx +++ b/website/content/commands/acl/binding-rule/update.mdx @@ -26,12 +26,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl binding-rule update [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-bind-name=` - Name to bind on match. Can use `${var}` @@ -58,9 +52,15 @@ Usage: `consul acl binding-rule update [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/bootstrap.mdx b/website/content/commands/acl/bootstrap.mdx index 534674267..d33c550e6 100644 --- a/website/content/commands/acl/bootstrap.mdx +++ b/website/content/commands/acl/bootstrap.mdx @@ -26,12 +26,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl bootstrap [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-format={pretty|json}` - Command output format. The default value is `pretty`. @@ -47,3 +41,9 @@ Create Time: 2018-10-22 11:27:04.479026 -0400 EDT Policies: 00000000-0000-0000-0000-000000000001 - global-management ``` + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/acl/policy/create.mdx b/website/content/commands/acl/policy/create.mdx index 2cf29f87b..14a863b70 100644 --- a/website/content/commands/acl/policy/create.mdx +++ b/website/content/commands/acl/policy/create.mdx @@ -35,12 +35,6 @@ support for the legacy ACL system is removed. Usage: `consul acl policy create [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the policy. @@ -69,9 +63,15 @@ Usage: `consul acl policy create [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/policy/delete.mdx b/website/content/commands/acl/policy/delete.mdx index 9449a5edc..3dc717539 100644 --- a/website/content/commands/acl/policy/delete.mdx +++ b/website/content/commands/acl/policy/delete.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl policy delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the policy to delete. It may be specified as a @@ -38,9 +32,15 @@ Usage: `consul acl policy delete [options]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/policy/list.mdx b/website/content/commands/acl/policy/list.mdx index acb0bebae..4b227c708 100644 --- a/website/content/commands/acl/policy/list.mdx +++ b/website/content/commands/acl/policy/list.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl policy list` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-meta` - Indicates that policy metadata such as the content hash and @@ -38,9 +32,15 @@ Usage: `consul acl policy list` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/policy/read.mdx b/website/content/commands/acl/policy/read.mdx index 119a71c1d..859827704 100644 --- a/website/content/commands/acl/policy/read.mdx +++ b/website/content/commands/acl/policy/read.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl policy read [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the policy to read. It may be specified as a unique ID @@ -43,9 +37,15 @@ Usage: `consul acl policy read [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/policy/update.mdx b/website/content/commands/acl/policy/update.mdx index c3b23278e..15c803fee 100644 --- a/website/content/commands/acl/policy/update.mdx +++ b/website/content/commands/acl/policy/update.mdx @@ -27,12 +27,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl policy update [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the policy. @@ -60,9 +54,15 @@ Usage: `consul acl policy update [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/role/create.mdx b/website/content/commands/acl/role/create.mdx index fea5919b8..5aff61f1c 100644 --- a/website/content/commands/acl/role/create.mdx +++ b/website/content/commands/acl/role/create.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl role create [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the role. @@ -56,9 +50,15 @@ Usage: `consul acl role create [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/role/delete.mdx b/website/content/commands/acl/role/delete.mdx index d0b9823d2..a353d09cd 100644 --- a/website/content/commands/acl/role/delete.mdx +++ b/website/content/commands/acl/role/delete.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl role delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the role to delete. It may be specified as a @@ -38,9 +32,15 @@ Usage: `consul acl role delete [options]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/role/list.mdx b/website/content/commands/acl/role/list.mdx index dd973c630..f81374b9c 100644 --- a/website/content/commands/acl/role/list.mdx +++ b/website/content/commands/acl/role/list.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl role list` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-meta` - Indicates that role metadata such as the content hash and @@ -38,9 +32,15 @@ Usage: `consul acl role list` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/role/read.mdx b/website/content/commands/acl/role/read.mdx index ef45e636c..9ed3d43d9 100644 --- a/website/content/commands/acl/role/read.mdx +++ b/website/content/commands/acl/role/read.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl role read [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the role to read. It may be specified as a unique ID @@ -43,9 +37,15 @@ Usage: `consul acl role read [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/role/update.mdx b/website/content/commands/acl/role/update.mdx index 52133e117..d1e7768af 100644 --- a/website/content/commands/acl/role/update.mdx +++ b/website/content/commands/acl/role/update.mdx @@ -27,12 +27,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl role update [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the role. @@ -67,9 +61,15 @@ Usage: `consul acl role update [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/set-agent-token.mdx b/website/content/commands/acl/set-agent-token.mdx index cf7ee90f0..a7178c34b 100644 --- a/website/content/commands/acl/set-agent-token.mdx +++ b/website/content/commands/acl/set-agent-token.mdx @@ -26,9 +26,9 @@ are not supported from commands, but may be from the corresponding HTTP endpoint ## Usage -Usage: `consul acl set-agent-token [options] TYPE TOKEN` +Usage: `consul acl set-agent-token [options] token_type token_secret_id` -### Token Types +The token types are: - `default` - The default token is the token that the agent will use for both internal agent operations and operations initiated by the HTTP diff --git a/website/content/commands/acl/token/clone.mdx b/website/content/commands/acl/token/clone.mdx index 7dafeb34e..36a871666 100644 --- a/website/content/commands/acl/token/clone.mdx +++ b/website/content/commands/acl/token/clone.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl token clone [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the new cloned token. @@ -42,9 +36,15 @@ Usage: `consul acl token clone [options]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/token/create.mdx b/website/content/commands/acl/token/create.mdx index 8690e5b76..62cbdd6e0 100644 --- a/website/content/commands/acl/token/create.mdx +++ b/website/content/commands/acl/token/create.mdx @@ -25,12 +25,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl token create [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-accessor=` - Create the token with this Accessor ID. It must be a UUID. If not @@ -70,9 +64,15 @@ Usage: `consul acl token create [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/token/delete.mdx b/website/content/commands/acl/token/delete.mdx index eee3e5db6..247828315 100644 --- a/website/content/commands/acl/token/delete.mdx +++ b/website/content/commands/acl/token/delete.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl token delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the token to delete. It may be specified as a @@ -36,9 +30,15 @@ Usage: `consul acl token delete [options]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/token/list.mdx b/website/content/commands/acl/token/list.mdx index f3a64c1ca..abceb8dce 100644 --- a/website/content/commands/acl/token/list.mdx +++ b/website/content/commands/acl/token/list.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl token list` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-meta` - Indicates that token metadata such as the content hash and @@ -38,9 +32,15 @@ Usage: `consul acl token list` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/token/read.mdx b/website/content/commands/acl/token/read.mdx index 85f0f6a4e..e3472108e 100644 --- a/website/content/commands/acl/token/read.mdx +++ b/website/content/commands/acl/token/read.mdx @@ -23,12 +23,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl token read [options] [args]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-id=` - The ID of the policy to read. It may be specified as a unique ID @@ -47,9 +41,15 @@ Usage: `consul acl token read [options] [args]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/token/update.mdx b/website/content/commands/acl/token/update.mdx index b7c2b5bbc..b8360dba2 100644 --- a/website/content/commands/acl/token/update.mdx +++ b/website/content/commands/acl/token/update.mdx @@ -24,12 +24,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl token update [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-description=` - A description of the token @@ -79,9 +73,15 @@ guide. #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/acl/translate-rules.mdx b/website/content/commands/acl/translate-rules.mdx index 1255de367..8cdd1104e 100644 --- a/website/content/commands/acl/translate-rules.mdx +++ b/website/content/commands/acl/translate-rules.mdx @@ -26,12 +26,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul acl translate-rules [options] TRANSLATE` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `TRANSLATE` - The rules to translate. If `-` is used, then @@ -47,6 +41,12 @@ Usage: `consul acl translate-rules [options] TRANSLATE` holds is not a rule set but rather the token accessor ID of a legacy ACL token that holds the rule set. +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ### Examples Translate rules within a file: diff --git a/website/content/commands/catalog/nodes.mdx b/website/content/commands/catalog/nodes.mdx index 7537ce1ef..efe705010 100644 --- a/website/content/commands/catalog/nodes.mdx +++ b/website/content/commands/catalog/nodes.mdx @@ -60,13 +60,7 @@ worker-02 d407a592-e93c-4d8e-8a6d-aba853d1e067 10.4.4.158 dc1 lan=10.4.4.158 Usage: `consul catalog nodes [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Catalog List Nodes Options +#### Command Options - `-detailed` - Output detailed information about the nodes including their addresses and metadata. @@ -90,3 +84,9 @@ Usage: `consul catalog nodes [options]` #### Enterprise Options @include 'http_api_partition_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/catalog/services.mdx b/website/content/commands/catalog/services.mdx index d4653f04f..ab56251d4 100644 --- a/website/content/commands/catalog/services.mdx +++ b/website/content/commands/catalog/services.mdx @@ -53,19 +53,7 @@ redis Usage: `consul catalog services [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### Catalog List Nodes Options +#### Command Options - `-node=` - Node `id or name` for which to list services. @@ -76,3 +64,15 @@ Usage: `consul catalog services [options]` - `-tags` - Display each service's tags as a comma-separated list beside each service entry. + +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/config/delete.mdx b/website/content/commands/config/delete.mdx index 048832dda..e082310fd 100644 --- a/website/content/commands/config/delete.mdx +++ b/website/content/commands/config/delete.mdx @@ -38,17 +38,7 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul config delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### Config Delete Options +#### Command Options - `-kind` - Specifies the kind of the config entry to read. @@ -64,6 +54,16 @@ Usage: `consul config delete [options]` - `-modify-index=` - Unsigned integer representing the ModifyIndex of the config entry. This is used in combination with the -cas flag. +#### Enterprise Options + +@include 'http_api_namespace_options.mdx' + +@include 'http_api_partition_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples $ consul config delete -kind service-defaults -name web diff --git a/website/content/commands/config/list.mdx b/website/content/commands/config/list.mdx index 8ceec02b6..4e5484cb3 100644 --- a/website/content/commands/config/list.mdx +++ b/website/content/commands/config/list.mdx @@ -38,19 +38,19 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul config list [options]` -#### API Options +#### Command Options -@include 'http_api_options_client.mdx' +- `-kind` - Specifies the kind of the config entry to list. #### Enterprise Options -@include 'http_api_namespace_options.mdx' - @include 'http_api_partition_options.mdx' -#### Config List Options +@include 'http_api_namespace_options.mdx' -- `-kind` - Specifies the kind of the config entry to list. +#### API Options + +@include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/config/read.mdx b/website/content/commands/config/read.mdx index b57f74de9..985e0ca9e 100644 --- a/website/content/commands/config/read.mdx +++ b/website/content/commands/config/read.mdx @@ -39,16 +39,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint 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. @@ -57,6 +47,16 @@ Usage: `consul config read [options]` `proxy-defaults` config entry must be `global`, and the name of the `mesh` config entry must be `mesh`. +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples $ consul config read -kind service-defaults -name web diff --git a/website/content/commands/config/write.mdx b/website/content/commands/config/write.mdx index 01c0b7d06..33358cfee 100644 --- a/website/content/commands/config/write.mdx +++ b/website/content/commands/config/write.mdx @@ -41,23 +41,23 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul config write [options] FILE` -#### API Options - -@include 'http_api_options_client.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### Config Write Options +#### Command Options - `-cas` - Specifies to use a Check-And-Set operation. If the index is 0, Consul will only store the entry if it does not already exist. If the index is non-zero, the entry is only set if the current index matches the `ModifyIndex` of that entry. +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples From file: diff --git a/website/content/commands/connect/ca.mdx b/website/content/commands/connect/ca.mdx index e00be9f94..1916fa04e 100644 --- a/website/content/commands/connect/ca.mdx +++ b/website/content/commands/connect/ca.mdx @@ -89,11 +89,13 @@ Usage: `consul connect ca set-config [options]` Corresponding HTTP API Endpoint: [\[PUT\] /v1/connect/ca/configuration](/api-docs/connect/ca#update-ca-configuration) -#### API Options +The output looks like this: -@include 'http_api_options_client.mdx' +``` +Configuration updated! +``` -@include 'http_api_options_server.mdx' +The return code will indicate success or failure. #### Command Options @@ -108,10 +110,8 @@ Corresponding HTTP API Endpoint: [\[PUT\] /v1/connect/ca/configuration](/api-doc Cross-Signing](/docs/connect/ca#forced-rotation-without-cross-signing) for more detail. -The output looks like this: +#### API Options -``` -Configuration updated! -``` +@include 'http_api_options_client.mdx' -The return code will indicate success or failure. +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/connect/envoy.mdx b/website/content/commands/connect/envoy.mdx index 88f7fccb7..66e244563 100644 --- a/website/content/commands/connect/envoy.mdx +++ b/website/content/commands/connect/envoy.mdx @@ -30,26 +30,6 @@ build on but then used in a virtualized environment that can run Envoy. Usage: `consul connect envoy [options] [-- pass-through options]` -#### API Options - -The standard API options are used to connect to the local agent to discover the -proxy configuration needed. - -- `-grpc-addr=` - Address of the Consul agent with `grpc` port. This can - be an IP address or DNS address, but it must include the port. This can also - be specified via the CONSUL_GRPC_ADDR environment variable. In Consul 1.3 and - later, the default value is 127.0.0.1:8502, and https can optionally - be used instead. The scheme can also be set to HTTPS by setting the - environment variable CONSUL_HTTP_SSL=true. This may be a unix domain socket - using `unix:///path/to/socket` if the [agent is configured to - listen](/docs/agent/config/config-files#addresses) that way. - - -> **Note:** gRPC uses the same TLS - settings as the HTTPS API. If HTTPS is enabled then gRPC will require HTTPS - as well. - - @include 'http_api_options_client.mdx' - #### Envoy Options for both Sidecars and Gateways - `-proxy-id` - The [proxy service](/docs/connect/registration/service-registration) ID. @@ -189,9 +169,29 @@ proxy configuration needed. #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +The standard API options are used to connect to the local agent to discover the +proxy configuration needed. + +- `-grpc-addr=` - Address of the Consul agent with `grpc` port. This can + be an IP address or DNS address, but it must include the port. This can also + be specified via the CONSUL_GRPC_ADDR environment variable. In Consul 1.3 and + later, the default value is 127.0.0.1:8502, and https can optionally + be used instead. The scheme can also be set to HTTPS by setting the + environment variable CONSUL_HTTP_SSL=true. This may be a unix domain socket + using `unix:///path/to/socket` if the [agent is configured to + listen](/docs/agent/config/config-files#addresses) that way. + + -> **Note:** gRPC uses the same TLS + settings as the HTTPS API. If HTTPS is enabled then gRPC will require HTTPS + as well. + + @include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/connect/expose.mdx b/website/content/commands/connect/expose.mdx index 9657ebec0..4b752438c 100644 --- a/website/content/commands/connect/expose.mdx +++ b/website/content/commands/connect/expose.mdx @@ -24,13 +24,7 @@ Usage: consul connect expose [options] given protocol and port. ``` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Expose Options +#### Command Options - `-ingress-gateway` - (Required) The name of the ingress gateway service to use. A partition and namespace can optionally be specified as a prefix via the @@ -50,6 +44,12 @@ Usage: consul connect expose [options] - `-host` - Additional DNS hostname to use for routing to this service. Can be specified multiple times. +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples The example below shows using the `expose` command to make the `foo` service available diff --git a/website/content/commands/connect/proxy.mdx b/website/content/commands/connect/proxy.mdx index 0b7d19aec..db9d0d308 100644 --- a/website/content/commands/connect/proxy.mdx +++ b/website/content/commands/connect/proxy.mdx @@ -19,13 +19,7 @@ can also be used in development to connect to Connect-enabled services. Usage: `consul connect proxy [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Proxy Options +#### Command Options - `-sidecar-for` - The _ID_ (not name if they differ) of the service instance this proxy will represent. The target service doesn't need to exist on the @@ -76,6 +70,12 @@ Usage: `consul connect proxy [options]` register a fully configured proxy instance rather than specify config and registration via this command. +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples The example below shows how to start a local proxy for establishing outbound diff --git a/website/content/commands/connect/redirect-traffic.mdx b/website/content/commands/connect/redirect-traffic.mdx index fef0dc716..d50622844 100644 --- a/website/content/commands/connect/redirect-traffic.mdx +++ b/website/content/commands/connect/redirect-traffic.mdx @@ -30,11 +30,7 @@ inbound and outbound ports specified in the service registration. Usage: `consul connect redirect-traffic [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -#### Options for Traffic Redirection Rules +#### Command Options - `-consul-dns-ip` - The IP address of the Consul DNS resolver. If provided, DNS queries will be redirected to the provided IP address for name resolution. @@ -60,9 +56,13 @@ Usage: `consul connect redirect-traffic [options]` #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/debug.mdx b/website/content/commands/debug.mdx index 0e7b16e82..202fefd74 100644 --- a/website/content/commands/debug.mdx +++ b/website/content/commands/debug.mdx @@ -45,10 +45,6 @@ or otherwise. By default, the debug command will capture an archive at the current path for all targets for 2 minutes. -#### API Options - -@include 'http_api_options_client.mdx' - #### Command Options - `-duration` - Optional, the total time to capture data for from the target agent. Must @@ -66,6 +62,10 @@ all targets for 2 minutes. - `-archive` - Optional, if the tool show archive the directory of data into a compressed tar file. Defaults to true. +#### API Options + +@include 'http_api_options_client.mdx' + ## Capture Targets The `-capture` flag can be specified multiple times to capture specific diff --git a/website/content/commands/event.mdx b/website/content/commands/event.mdx index ec85dba6c..8bb719530 100644 --- a/website/content/commands/event.mdx +++ b/website/content/commands/event.mdx @@ -52,12 +52,6 @@ Usage: `consul event [options] [payload]` The only required option is `-name` which specifies the event name. An optional payload can be provided as the final argument. -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-name` - The name of the event. @@ -69,3 +63,9 @@ payload can be provided as the final argument. - `-tag` - Regular expression to filter to only nodes with a service that has a matching tag. This must be used with `-service`. As an example, you may do `-service mysql -tag secondary`. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/exec.mdx b/website/content/commands/exec.mdx index 4f992b1c9..f957c6ef4 100644 --- a/website/content/commands/exec.mdx +++ b/website/content/commands/exec.mdx @@ -50,12 +50,6 @@ The only required option is a command to execute. This is either given as trailing arguments, or by specifying `-`; STDIN will be read to completion as a script to evaluate. -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-prefix` - Key prefix in the KV store to use for storing request data. @@ -81,3 +75,9 @@ completion as a script to evaluate. to 200 msec. - `-verbose` - Enables verbose output. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/intention/check.mdx b/website/content/commands/intention/check.mdx index 02b6abb73..393075354 100644 --- a/website/content/commands/intention/check.mdx +++ b/website/content/commands/intention/check.mdx @@ -46,15 +46,15 @@ Usage: `consul intention check [options] SRC DST` `SRC` and `DST` can both take [several forms](/commands/intention#source-and-destination-naming). -#### API Options - -@include 'http_api_options_client.mdx' - #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/intention/create.mdx b/website/content/commands/intention/create.mdx index 4b3cd5d43..8e5b49d7e 100644 --- a/website/content/commands/intention/create.mdx +++ b/website/content/commands/intention/create.mdx @@ -41,17 +41,7 @@ are not supported from commands, but may be from the corresponding HTTP endpoint `SRC` and `DST` can both take [several forms](/commands/intention#source-and-destination-naming). -#### API Options - -@include 'http_api_options_client.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### Intention Create Options +#### Command Options - `-allow` - Set the action to "allow" for intentions. This is the default. @@ -67,6 +57,16 @@ are not supported from commands, but may be from the corresponding HTTP endpoint - `-replace` - Replace any matching intention. The replacement is done atomically per intention. +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples Create an intention `web => db`: diff --git a/website/content/commands/intention/delete.mdx b/website/content/commands/intention/delete.mdx index 474065332..f03948752 100644 --- a/website/content/commands/intention/delete.mdx +++ b/website/content/commands/intention/delete.mdx @@ -42,15 +42,15 @@ Usage: `SRC` and `DST` can both take [several forms](/commands/intention#source-and-destination-naming). -#### API Options - -@include 'http_api_options_client.mdx' - #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/intention/get.mdx b/website/content/commands/intention/get.mdx index f61ab5e93..05bec1bfb 100644 --- a/website/content/commands/intention/get.mdx +++ b/website/content/commands/intention/get.mdx @@ -42,15 +42,15 @@ Usage: `SRC` and `DST` can both take [several forms](/commands/intention#source-and-destination-naming). -#### API Options - -@include 'http_api_options_client.mdx' - #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/intention/list.mdx b/website/content/commands/intention/list.mdx index 004914a73..a4fa999ba 100644 --- a/website/content/commands/intention/list.mdx +++ b/website/content/commands/intention/list.mdx @@ -34,14 +34,14 @@ Usage: - `consul intention list` -#### API Options - -@include 'http_api_options_client.mdx' - #### Enterprise Options @include 'http_api_namespace_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples ```shell-session diff --git a/website/content/commands/intention/match.mdx b/website/content/commands/intention/match.mdx index b7d456c4f..5208af954 100644 --- a/website/content/commands/intention/match.mdx +++ b/website/content/commands/intention/match.mdx @@ -39,22 +39,22 @@ Usage: `consul intention match [options] SRC_OR_DST` `SRC` and `DST` can both take [several forms](/commands/intention#source-and-destination-naming). -#### API Options - -@include 'http_api_options_client.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### Intention Match Options +#### Command Options - `-destination` - Match by destination. - `-source` - Match by source. +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples ```shell-session diff --git a/website/content/commands/join.mdx b/website/content/commands/join.mdx index 85125d75f..dcfca8962 100644 --- a/website/content/commands/join.mdx +++ b/website/content/commands/join.mdx @@ -38,12 +38,12 @@ You may call `join` with multiple addresses if you want attempt to join the clus through multiple nodes. Consul will attempt to join all addresses. The join command will fail only if Consul was unable to join any of the specified addresses. -#### API Options - -@include 'http_api_options_client.mdx' - #### Command Options - `-wan` - For agents running in server mode, the agent will attempt to join other servers gossiping in a WAN cluster. This is used to form a bridge between multiple datacenters. + +#### API Options + +@include 'http_api_options_client.mdx' diff --git a/website/content/commands/keyring.mdx b/website/content/commands/keyring.mdx index 50494a66d..37cd21944 100644 --- a/website/content/commands/keyring.mdx +++ b/website/content/commands/keyring.mdx @@ -49,10 +49,6 @@ Usage: `consul keyring [options]` Only one actionable argument may be specified per run, including `-list`, `-install`, `-remove`, and `-use`. -#### API Options - -@include 'http_api_options_client.mdx' - #### Command Options - `-list` - List all keys currently in use within the cluster. @@ -76,6 +72,10 @@ Only one actionable argument may be specified per run, including `-list`, local servers (no WAN traffic). Setting `local-only` is only allowed for list queries. +#### API Options + +@include 'http_api_options_client.mdx' + ## Output The output of the `consul keyring -list` command consolidates information from diff --git a/website/content/commands/kv/delete.mdx b/website/content/commands/kv/delete.mdx index 8fe1f5bb1..b67745c01 100644 --- a/website/content/commands/kv/delete.mdx +++ b/website/content/commands/kv/delete.mdx @@ -24,29 +24,30 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul kv delete [options] KEY_OR_PREFIX` +#### Command Options + +- `-cas` - Perform a Check-And-Set operation. + To use this option, the `-modify-index` flag must also be set. + The default value is `false`. + +- `-modify-index=` - Specifies an unsigned integer that represents + the `ModifyIndex` of the key. Used in combination with the `-cas` flag. + +- `-recurse` - Recursively delete all keys with the path. The default value is + `false`. + +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + #### API Options @include 'http_api_options_client.mdx' @include 'http_api_options_server.mdx' -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### KV Delete Options - -- `-cas` - Perform a Check-And-Set operation. Specifying this value also - requires the -modify-index flag to be set. The default value is false. - -- `-modify-index=` - Unsigned integer representing the ModifyIndex of the - key. This is used in combination with the -cas flag. - -- `-recurse` - Recursively delete all keys with the path. The default value is - false. - ## Examples To remove the value for the key named "redis/config/connections" in the diff --git a/website/content/commands/kv/export.mdx b/website/content/commands/kv/export.mdx index b117de87c..bfd34c2bd 100644 --- a/website/content/commands/kv/export.mdx +++ b/website/content/commands/kv/export.mdx @@ -24,18 +24,18 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul kv export [options] [PREFIX]` +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + #### API Options @include 'http_api_options_client.mdx' @include 'http_api_options_server.mdx' -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - ## Examples To export the tree at "vault/" in the key value store: diff --git a/website/content/commands/kv/get.mdx b/website/content/commands/kv/get.mdx index 44e2c8bc8..ba528fba5 100644 --- a/website/content/commands/kv/get.mdx +++ b/website/content/commands/kv/get.mdx @@ -32,19 +32,7 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul kv get [options] [KEY_OR_PREFIX]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### KV Get Options +#### Command Options - `-base64` - Base 64 encode the value. The default value is false. @@ -64,6 +52,18 @@ Usage: `consul kv get [options] [KEY_OR_PREFIX]` default value is "/", and only used when paired with the `-keys` flag. This will limit the prefix of keys returned, only up to the given separator. +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples To retrieve the value for the key named "redis/config/connections" in the diff --git a/website/content/commands/kv/import.mdx b/website/content/commands/kv/import.mdx index f8ef0b670..e6fc642a2 100644 --- a/website/content/commands/kv/import.mdx +++ b/website/content/commands/kv/import.mdx @@ -22,22 +22,22 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul kv import [options] [DATA]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### KV Import Options +#### Command Options - `-prefix` - Key prefix for imported data. The default value is empty meaning root. Added in Consul 1.10. #### Enterprise Options +@include 'http_api_partition_options.mdx' + @include 'http_api_namespace_options.mdx' -@include 'http_api_partition_options.mdx' +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## Examples diff --git a/website/content/commands/kv/put.mdx b/website/content/commands/kv/put.mdx index f8c9dd137..daa916f29 100644 --- a/website/content/commands/kv/put.mdx +++ b/website/content/commands/kv/put.mdx @@ -28,19 +28,7 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul kv put [options] KEY [DATA]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### KV Put Options +#### Command Options - `-acquire` - Obtain a lock on the key. If the key does not exist, this operation will create the key and obtain the lock. The session must already @@ -67,6 +55,18 @@ Usage: `consul kv put [options] KEY [DATA]` robust locking, but it can be set on any key. The default value is empty (no session). +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples To insert a value of "5" for the key named "redis/config/connections" in the diff --git a/website/content/commands/license.mdx b/website/content/commands/license.mdx index 7b19228d4..08ee230b0 100644 --- a/website/content/commands/license.mdx +++ b/website/content/commands/license.mdx @@ -138,12 +138,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul license put [options] LICENSE` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - The output looks like this: ```text @@ -162,6 +156,12 @@ Licensed Features: Advanced Network Federation ``` +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## get Corresponding HTTP API Endpoint: [\[GET\] /v1/operator/license](/api-docs/operator/license#getting-the-consul-license) @@ -178,12 +178,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul license get [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - The output looks like this: ```text @@ -202,6 +196,12 @@ Licensed Features: Advanced Network Federation ``` +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## reset -> **Deprecated** The ability to manage the cluster's license via the CLI @@ -223,12 +223,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul license reset [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - The output looks like this: ```text @@ -246,3 +240,9 @@ Licensed Features: Redundancy Zone Advanced Network Federation ``` + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' diff --git a/website/content/commands/lock.mdx b/website/content/commands/lock.mdx index 389ca8d88..0c12dff7f 100644 --- a/website/content/commands/lock.mdx +++ b/website/content/commands/lock.mdx @@ -46,12 +46,6 @@ of 5 seconds, a `SIGKILL` will be used to force termination. For Consul agents on Windows, the child process is always terminated with a `SIGKILL`, since Windows has no POSIX compatible notion for `SIGTERM`. -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-child-exit-code` - Exit 2 if the child process exited with an error @@ -82,6 +76,12 @@ Windows has no POSIX compatible notion for `SIGTERM`. - `-verbose` - Enables verbose output. +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## SHELL Consul lock launches its children in a shell. By default, Consul will use the shell diff --git a/website/content/commands/login.mdx b/website/content/commands/login.mdx index 715ba71c5..6af84c64f 100644 --- a/website/content/commands/login.mdx +++ b/website/content/commands/login.mdx @@ -29,10 +29,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul login [options]` -#### API Options - -@include 'http_api_options_client.mdx' - #### Command Options - `-bearer-token-file=` - Path to a file containing a secret bearer @@ -52,11 +48,15 @@ Usage: `consul login [options]` #### Enterprise Options -@include 'http_api_namespace_options.mdx' - - `-oidc-callback-listen-addr=` - The address to bind a webserver on to handle the browser callback from the OIDC workflow. Added in Consul 1.8.0. +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ### Examples Login to an auth method. diff --git a/website/content/commands/maint.mdx b/website/content/commands/maint.mdx index 2bd327b34..81f16f013 100644 --- a/website/content/commands/maint.mdx +++ b/website/content/commands/maint.mdx @@ -33,10 +33,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul maint [options]` -#### API Options - -@include 'http_api_options_client.mdx' - #### Command Options - `-enable` - Enable node-wide maintenance mode flag. If combined with the @@ -55,6 +51,10 @@ Usage: `consul maint [options]` providing this flag, the `-enable` and `-disable` flags functionality is modified to operate on the given service ID. +#### API Options + +@include 'http_api_options_client.mdx' + ## List mode If neither `-enable` nor `-disable` are passed, the `maint` command will diff --git a/website/content/commands/members.mdx b/website/content/commands/members.mdx index fe0c3120c..70dd3eec0 100644 --- a/website/content/commands/members.mdx +++ b/website/content/commands/members.mdx @@ -33,14 +33,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul members [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -#### Enterprise Options - -@include 'http_api_partition_options.mdx' - #### Command Options - `-detailed` - If provided, output shows more detailed information @@ -55,3 +47,11 @@ Usage: `consul members [options]` - `-wan` - For agents in Server mode, this will return the list of nodes in the WAN gossip pool. These are generally all the server nodes in each datacenter. + +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' diff --git a/website/content/commands/monitor.mdx b/website/content/commands/monitor.mdx index 58abbeede..b37635b57 100644 --- a/website/content/commands/monitor.mdx +++ b/website/content/commands/monitor.mdx @@ -23,10 +23,6 @@ logs and watch the debug logs if necessary. Usage: `consul monitor [options]` -#### API Options - -@include 'http_api_options_client.mdx' - #### Command Options - `-log-level` - The log level of the messages to show. By default this @@ -35,3 +31,7 @@ Usage: `consul monitor [options]` "warn", and "error". - `-log-json` - Toggles whether the messages are streamed in JSON format. By default this is false. + +#### API Options + +@include 'http_api_options_client.mdx' diff --git a/website/content/commands/namespace/create.mdx b/website/content/commands/namespace/create.mdx index 6fd8e083c..a497649e1 100644 --- a/website/content/commands/namespace/create.mdx +++ b/website/content/commands/namespace/create.mdx @@ -29,14 +29,6 @@ Usage: `consul namespace create -name [options]` Request a namespace to be created. Construction of the namespace definition is handled by this command from the CLI arguments. -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -@include 'http_api_partition_options.mdx' - #### Command Options - `-default-policy-id=` - ID of a policy from the default namespace to inject for all tokens @@ -65,6 +57,14 @@ from the CLI arguments. - `-show-meta` - Indicates that namespace metadata such as the raft indices should be shown for the namespace +#### API Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples Create a new Namespace: diff --git a/website/content/commands/namespace/delete.mdx b/website/content/commands/namespace/delete.mdx index 5854b585f..7a230ba14 100644 --- a/website/content/commands/namespace/delete.mdx +++ b/website/content/commands/namespace/delete.mdx @@ -28,12 +28,12 @@ Usage: `consul namespace delete ` #### API Options +@include 'http_api_partition_options.mdx' + @include 'http_api_options_client.mdx' @include 'http_api_options_server.mdx' -@include 'http_api_partition_options.mdx' - ## Examples Delete a Namespace: diff --git a/website/content/commands/namespace/list.mdx b/website/content/commands/namespace/list.mdx index ede6da945..9cc1c6073 100644 --- a/website/content/commands/namespace/list.mdx +++ b/website/content/commands/namespace/list.mdx @@ -31,14 +31,6 @@ the request has been granted any access in the namespace (read, list or write). Usage: `consul namespace list` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -@include 'http_api_partition_options.mdx' - #### Command Options - `-format=` - How to output the results. The choices are: pretty or json @@ -46,6 +38,14 @@ Usage: `consul namespace list` - `-meta` - Indicates that namespace metadata such as the raft indices should be shown for the namespace +#### API Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples List Namespaces: diff --git a/website/content/commands/namespace/read.mdx b/website/content/commands/namespace/read.mdx index d194a7ff6..950895d87 100644 --- a/website/content/commands/namespace/read.mdx +++ b/website/content/commands/namespace/read.mdx @@ -30,14 +30,6 @@ the request has been granted any access in the namespace (read, list or write). Usage: `consul namespace read ` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -@include 'http_api_partition_options.mdx' - #### Command Options - `-format=` - How to output the results. The choices are: pretty or json @@ -45,6 +37,14 @@ Usage: `consul namespace read ` - `-meta` - Indicates that namespace metadata such as the raft indices should be shown for the namespace +#### API Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples Read a Namespace: diff --git a/website/content/commands/namespace/update.mdx b/website/content/commands/namespace/update.mdx index e74dbc66e..16c240c67 100644 --- a/website/content/commands/namespace/update.mdx +++ b/website/content/commands/namespace/update.mdx @@ -30,14 +30,6 @@ Request a namespace to be update. Construction of the namespace definition is ha from the CLI arguments. Some parts of the Namespace such as ACL configurations and meta can be merged with the existing namespace definition. -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -@include 'http_api_partition_options.mdx' - #### Command Options - `-default-policy-id=` - ID of a policy from the default namespace to inject for all tokens @@ -72,6 +64,14 @@ with the existing namespace definition. - `-show-meta` - Indicates that namespace metadata such as the raft indices should be shown for the namespace +#### API Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples Update a namespace with a new description: diff --git a/website/content/commands/namespace/write.mdx b/website/content/commands/namespace/write.mdx index ddcc04348..b0d076586 100644 --- a/website/content/commands/namespace/write.mdx +++ b/website/content/commands/namespace/write.mdx @@ -29,14 +29,6 @@ The `` must either be a file path or `-` to indicate that the definition should be read from stdin. The definition can be in either JSON or HCL format. See [here](/docs/enterprise/namespaces#namespace-definition) for a description of the namespace definition. -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -@include 'http_api_partition_options.mdx' - #### Command Options - `-format=` - How to output the results. The choices are: pretty or json @@ -44,6 +36,14 @@ or HCL format. See [here](/docs/enterprise/namespaces#namespace-definition) for - `-meta` - Indicates that namespace metadata such as the raft indices should be shown for the namespace +#### API Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## Examples Create a new Namespace: diff --git a/website/content/commands/operator/area.mdx b/website/content/commands/operator/area.mdx index ae61c6b31..22a02387b 100644 --- a/website/content/commands/operator/area.mdx +++ b/website/content/commands/operator/area.mdx @@ -61,11 +61,13 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator area create [options]` -#### API Options +The following example output shows the ID of the newly-created network area: -@include 'http_api_options_client.mdx' +```text +Created area "d2872ec5-68ea-b862-b75d-0bee99aca100" with peer datacenter "other"! +``` -@include 'http_api_options_server.mdx' +The return code indicates success or failure. #### Command Options @@ -79,13 +81,11 @@ Usage: `consul operator area create [options]` - `-use-tls=` Specifies whether gossip over this area should be encrypted with TLS if possible. Must be either `true` or `false`. -The output looks like this, displaying the ID of the newly-created network area: +#### API Options -```text -Created area "d2872ec5-68ea-b862-b75d-0bee99aca100" with peer datacenter "other"! -``` +@include 'http_api_options_client.mdx' -The return code will indicate success or failure. +@include 'http_api_options_server.mdx' ## delete @@ -103,27 +103,27 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator area delete [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Command Options - -- `-id=` - Looks up the area to operate on by its ID. This can be given - instead of a peer datacenter. - -- `-peer-datacenter=` - Looks up the area to operate on by its peer - datacenter. This can be given instead of an ID. - The output looks like this: ```text Deleted area "154941b0-80e2-9d69-c560-ab2c02807332"! ``` -The return code will indicate success or failure. +The return code indicates success or failure. + +#### Command Options + +- `-id=` - Specifies the ID of a network area to operate on. + Use this option as an alternative to `-peer-datacenter`. + +- `-peer-datacenter=` - Specifies the peer datacenter of a network area to operate on. + Use this option as an alternative to `-id`. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## join @@ -142,20 +142,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator area join [options] ADDRESSES` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Command Options - -- `-id=` - Looks up the area to operate on by its ID. This can be given - instead of a peer datacenter. - -- `-peer-datacenter=` - Looks up the area to operate on by its peer - datacenter. This can be given instead of an ID. - The output looks like this: ```text @@ -168,7 +154,21 @@ Address Joined Error The `Error` field will have a human-readable error message if Consul was unable to join the given address. -The return code will indicate success or failure. +The return code indicates success or failure. + +#### Command Options + +- `-id=` - Specifies the ID of a network area to operate on. + Use this option as an alternative to `-peer-datacenter`. + +- `-peer-datacenter=` - Specifies the peer datacenter of a network area to operate on. + Use this option as an alternative to `-id`. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## list @@ -186,12 +186,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator area list [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - The output looks like this: ```text @@ -206,7 +200,13 @@ Area PeerDC RetryJoin `RetryJoin` is the list of servers to join, defined when the area was created. -The return code will indicate success or failure. +The return code indicates success or failure. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## members @@ -225,20 +225,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator area members [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Command Options - -- `-id=` - Looks up the area to operate on by its ID. This can be given - instead of a peer datacenter. - -- `-peer-datacenter=` - Looks up the area to operate on by its peer - datacenter. This can be given instead of an ID. - The output looks like this: ```text @@ -271,7 +257,21 @@ spoken by the node. to the given server, in a human-readable format. This is computed using [network coordinates](/docs/architecture/coordinates). -The return code will indicate success or failure. +The return code indicates success or failure. + +#### Command Options + +- `-id=` - Specifies the ID of a network area to operate on. + Use this option as an alternative to `-peer-datacenter`. + +- `-peer-datacenter=` - Specifies the peer datacenter of a network area to operate on. + Use this option as an alternative to `-id`. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' ## update @@ -289,28 +289,27 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator area update [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -#### Command Options - -- `-id=` - Looks up the area to operate on by its ID. This can be given - instead of a peer datacenter. - -- `-peer-datacenter=` - Declares the peer Consul datacenter that will make up the other - side of this network area. Network areas always involve a pair of datacenters: the datacenter - where the area was created, and the peer datacenter. This is required. - -- `-use-tls=` Specifies whether gossip over this area should be encrypted with - TLS if possible. Must be either `true` or `false`. - The output looks like this: ```text Updated area "d2872ec5-68ea-b862-b75d-0bee99aca100" ``` -The return code will indicate success or failure. +The return code indicates success or failure. + +#### Command Options + +- `-id=` - Specifies the ID of a network area to operate on. + Use this option as an alternative to `-peer-datacenter`. + +- `-peer-datacenter=` - Specifies the peer datacenter of a network area to operate on. + Use this option as an alternative to `-id`. + +- `-use-tls=` Specifies whether gossip over this area should be encrypted with + TLS if possible. Must be either `true` or `false`. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' \ No newline at end of file diff --git a/website/content/commands/operator/autopilot.mdx b/website/content/commands/operator/autopilot.mdx index f0b16a5de..3d05f7986 100644 --- a/website/content/commands/operator/autopilot.mdx +++ b/website/content/commands/operator/autopilot.mdx @@ -42,13 +42,7 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator autopilot get-config [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - -### Command Output +#### Sample Output ```sh $ consul operator autopilot get-config @@ -61,6 +55,12 @@ DisableUpgradeMigration = false UpgradeMigrationTag = "" ``` +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx' + ## set-config Corresponding HTTP API Endpoint: [\[PUT\] /v1/operator/autopilot/configuration](/api-docs/operator/autopilot#update-configuration) @@ -77,11 +77,14 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator autopilot set-config [options]` -#### API Options +#### Sample Output -@include 'http_api_options_client.mdx' +```sh +$ consul operator autopilot set-config -min-quorum=3 +Configuration updated! +``` -@include 'http_api_options_server.mdx' +The return code indicates success or failure. #### Command Options @@ -110,14 +113,11 @@ Usage: `consul operator autopilot set-config [options]` - `-upgrade-version-tag` - Controls the [`-node-meta`](/docs/agent/config/cli-flags#_node_meta) tag to use for version info when performing upgrade migrations. If left blank, the Consul version will be used. -### Command Output +#### API Options -```sh -$ consul operator autopilot set-config -min-quorum=3 -Configuration updated! -``` +@include 'http_api_options_client.mdx' -The return code will indicate success or failure. +@include 'http_api_options_server.mdx' ## state diff --git a/website/content/commands/operator/raft.mdx b/website/content/commands/operator/raft.mdx index 6c0e1f22d..6c7f23779 100644 --- a/website/content/commands/operator/raft.mdx +++ b/website/content/commands/operator/raft.mdx @@ -43,10 +43,6 @@ are not supported from commands, but may be from the corresponding HTTP endpoint Usage: `consul operator raft list-peers -stale=[true|false]` -- `-stale` - Optional and defaults to "false" which means the leader provides - the result. If the cluster is in an outage state without a leader, you may need - to set this to "true" to get the configuration from a non-leader server. - The output looks like this: ```text @@ -70,6 +66,13 @@ Raft configuration. `Voter` is "true" or "false", indicating if the server has a vote in the Raft configuration. +#### Command Options + +- `-stale` - Enables non-leader servers to provide cluster state information. + If the cluster is in an outage state without a leader, + we recommend setting this option to `true. + Default is `false`. + ## remove-peer Corresponding HTTP API Endpoint: [\[DELETE\] /v1/operator/raft/peer](/api-docs/operator/raft#delete-raft-peer) diff --git a/website/content/commands/rtt.mdx b/website/content/commands/rtt.mdx index 3f8a1f819..d2d2a46ce 100644 --- a/website/content/commands/rtt.mdx +++ b/website/content/commands/rtt.mdx @@ -37,9 +37,21 @@ At least one node name is required. If the second node name isn't given, it is set to the agent's node name. These are the node names as known to Consul as the `consul members` command would show, not IP addresses. -#### API Options +## Sample Output -@include 'http_api_options_client.mdx' +If coordinates are available, the command will print the estimated round trip +time between the given nodes: + +```shell-session +$ consul rtt n1 n2 +Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates) + +$ consul rtt n2 # Running from n1 +Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates) + +$ consul rtt -wan n1.dc1 n2.dc2 +Estimated n1.dc1 <-> n2.dc2 rtt: 1.275 ms (using WAN coordinates) +``` #### Command Options @@ -55,18 +67,6 @@ The following environment variables control accessing the HTTP server via SSL: - `CONSUL_HTTP_SSL` Set this to enable SSL - `CONSUL_HTTP_SSL_VERIFY` Set this to disable certificate checking (not recommended) -## Output +#### API Options -If coordinates are available, the command will print the estimated round trip -time between the given nodes: - -```shell-session -$ consul rtt n1 n2 -Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates) - -$ consul rtt n2 # Running from n1 -Estimated n1 <-> n2 rtt: 0.610 ms (using LAN coordinates) - -$ consul rtt -wan n1.dc1 n2.dc2 -Estimated n1.dc1 <-> n2.dc2 rtt: 1.275 ms (using WAN coordinates) -``` +@include 'http_api_options_client.mdx' diff --git a/website/content/commands/services/deregister.mdx b/website/content/commands/services/deregister.mdx index e61456b69..c1af5d831 100644 --- a/website/content/commands/services/deregister.mdx +++ b/website/content/commands/services/deregister.mdx @@ -38,23 +38,20 @@ in HCL or JSON format. This flexibility makes it easy to pair the command with the `services register` command since the argument syntax is the same. -#### API Options +#### Command Options -@include 'http_api_options_client.mdx' +- `-id` - Specifies the ID of a service instance to deregister. + Do not use this flag if any FILE arguments are given. #### Enterprise Options -@include 'http_api_namespace_options.mdx' - @include 'http_api_partition_options.mdx' -#### Service Deregistration Flags +@include 'http_api_namespace_options.mdx' -The flags below should only be set if _no arguments_ are given. If no -arguments are given, the flags below can be used to deregister a single -service. +#### API Options -- `-id` - The ID of the service. +@include 'http_api_options_client.mdx' ## Examples diff --git a/website/content/commands/services/register.mdx b/website/content/commands/services/register.mdx index 7c0b04446..dcd8e5cd3 100644 --- a/website/content/commands/services/register.mdx +++ b/website/content/commands/services/register.mdx @@ -57,17 +57,7 @@ restarts. services in the local state directory. If this state directory is deleted or lost, services registered with this command will need to be reregistered. -#### API Options - -@include 'http_api_options_client.mdx' - -#### Enterprise Options - -@include 'http_api_namespace_options.mdx' - -@include 'http_api_partition_options.mdx' - -#### Service Registration Flags +#### Command Options The flags below should only be set if _no arguments_ are given. If no arguments are given, the flags below can be used to register a single @@ -94,6 +84,16 @@ Please refer to that documentation for full details. - `-tag value` - Associate a tag with the service instance. This flag can be specified multiples times. +#### Enterprise Options + +@include 'http_api_partition_options.mdx' + +@include 'http_api_namespace_options.mdx' + +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples To create a simple service: diff --git a/website/content/commands/snapshot/agent.mdx b/website/content/commands/snapshot/agent.mdx index 136a0f065..c565a52e6 100644 --- a/website/content/commands/snapshot/agent.mdx +++ b/website/content/commands/snapshot/agent.mdx @@ -118,11 +118,7 @@ snapshot agent is deployed across more than one host. Usage: `consul snapshot agent [options]` -#### API Options - -@include 'http_api_options_client.mdx' - -#### Config File Options: +#### Config File Options - `-config-dir` - Directory to look for JSON config files. Files will be read in alphabetical order and must end with the extension ".json". This won't @@ -353,6 +349,10 @@ This integration needs the following information: - `-gcs-bucket` supplies the bucket to use. +#### API Options + +@include 'http_api_options_client.mdx' + ## Examples Running the agent with no arguments will run a long-running daemon process that will diff --git a/website/content/commands/snapshot/inspect.mdx b/website/content/commands/snapshot/inspect.mdx index 3a5e0b32d..ef5c03cc0 100644 --- a/website/content/commands/snapshot/inspect.mdx +++ b/website/content/commands/snapshot/inspect.mdx @@ -40,6 +40,23 @@ The following fields are displayed when inspecting a snapshot: Usage: `consul snapshot inspect [options] FILE` +#### Command Options + +- `-kvdetails` - Provides information about space usage for KV data stored in Consul. + +- `-kvdepth` - Adjusts the grouping levels of keys. + Can only be used with `-kvdetails`. + Default is `2`. + +- `-kvfilter` - Only keys that match the specified key prefix + are included in the response. + Can only be used with `-kvdetails`. + +- `-format` - Specifies an output format for the response. + Specify `pretty` (default) to format the response in a human-readable form + as shown in the examples below, + or specify `JSON` to format the response as JSON. + ## Examples To inspect a snapshot from the file "backup.snap": @@ -137,10 +154,3 @@ $ consul snapshot inspect /opt/consul/raft/snapshots/9-4600669-1618935304715/sta ---- ---- ---- Total 4.3GB ``` - -#### Command Options - -- `-kvdetails` - Optional, provides a space usage breakdown for any KV data stored in Consul. -- `-kvdepth` - Can only be used with `-kvdetails`. Used to adjust the grouping level of keys. Defaults to 2. -- `-kvfilter` - Can only be used with `-kvdetails`. Used to specify a key prefix that excludes keys that don't match. -- `-format` - Optional, allows from changing the output to JSON. Parameters accepted are "pretty" and "JSON". diff --git a/website/content/commands/tls/ca.mdx b/website/content/commands/tls/ca.mdx index c6531e3c0..0ad2de08e 100644 --- a/website/content/commands/tls/ca.mdx +++ b/website/content/commands/tls/ca.mdx @@ -23,7 +23,7 @@ $ consul tls ca create Usage: `consul tls ca create [filename-prefix] [options]` -#### TLS CA Create Options +#### Command Options - `-additional-name-constraint=` - Add name constraints for the CA. Results in rejecting certificates for other DNS than specified. Can be used diff --git a/website/content/commands/tls/cert.mdx b/website/content/commands/tls/cert.mdx index 097de83bb..528ddd31b 100644 --- a/website/content/commands/tls/cert.mdx +++ b/website/content/commands/tls/cert.mdx @@ -47,7 +47,7 @@ $ consul tls cert create -cli Usage: `consul tls cert create [filename-prefix] [options]` -#### TLS Cert Create Options +#### Command Options - `-additional-dnsname=` - Provide an additional dnsname for Subject Alternative Names. localhost is always included. This flag may be provided diff --git a/website/content/commands/version.mdx b/website/content/commands/version.mdx index fb3462536..0db055251 100644 --- a/website/content/commands/version.mdx +++ b/website/content/commands/version.mdx @@ -16,7 +16,7 @@ The `version` command prints the version of Consul and the protocol versions it Usage: `consul version [options]` -### Command Options +#### Command Options - `-format={pretty|json}` - Command output format. The default value is `pretty`. diff --git a/website/content/commands/watch.mdx b/website/content/commands/watch.mdx index 3be6bfd2d..4518a257d 100644 --- a/website/content/commands/watch.mdx +++ b/website/content/commands/watch.mdx @@ -30,12 +30,6 @@ data view. Depending on the type, various options may be required or optionally provided. There is more documentation on watch [specifications here](/docs/dynamic-app-config/watches). -#### API Options - -@include 'http_api_options_client.mdx' - -@include 'http_api_options_server.mdx' - #### Command Options - `-key` - Key to watch. Only for `key` type. @@ -58,3 +52,9 @@ or optionally provided. There is more documentation on watch - `-type` - Watch type. Required, one of "`key`, `keyprefix`, `services`, `nodes`, `service`, `checks`, or `event`. + +#### API Options + +@include 'http_api_options_client.mdx' + +@include 'http_api_options_server.mdx'