5faa61a906
* website: add multi-dc enterprise landing page * website: switch all 1.4.0 alerts/RC warnings * website: connect product wording Co-Authored-By: pearkes <jackpearkes@gmail.com> * website: remove RC notification * commmand/acl: fix usage docs for ACL tokens * agent: remove comment, OperatorRead * website: improve multi-dc docs Still not happy with this but tried to make it slightly more informative. * website: put back acl guide warning for 1.4.0 * website: simplify multi-dc page and respond to feedback * Fix Multi-DC typos on connect index page. * Improve Multi-DC overview. A full guide is a WIP and will be added post-release. * Fixes typo avaiable > available
57 lines
1.2 KiB
Go
57 lines
1.2 KiB
Go
package token
|
|
|
|
import (
|
|
"github.com/hashicorp/consul/command/flags"
|
|
"github.com/mitchellh/cli"
|
|
)
|
|
|
|
func New() *cmd {
|
|
return &cmd{}
|
|
}
|
|
|
|
type cmd struct{}
|
|
|
|
func (c *cmd) Run(args []string) int {
|
|
return cli.RunResultHelp
|
|
}
|
|
|
|
func (c *cmd) Synopsis() string {
|
|
return synopsis
|
|
}
|
|
|
|
func (c *cmd) Help() string {
|
|
return flags.Usage(help, nil)
|
|
}
|
|
|
|
const synopsis = "Manage Consul's ACL Tokens"
|
|
const help = `
|
|
Usage: consul acl token <subcommand> [options] [args]
|
|
|
|
This command has subcommands for managing Consul ACL tokens.
|
|
Here are some simple examples, and more detailed examples are available
|
|
in the subcommands or the documentation.
|
|
|
|
Create a new ACL Token:
|
|
|
|
$ consul acl token create \
|
|
-description "This is an example token" \
|
|
-policy-id 06acc965
|
|
List all tokens:
|
|
|
|
$ consul acl token list
|
|
|
|
Update a token:
|
|
|
|
$ consul acl token update -id 986193 -description "WonderToken"
|
|
|
|
Read a token with an accessor ID:
|
|
|
|
$ consul acl token read -id 986193
|
|
|
|
Delete a token
|
|
|
|
$ consul acl token delete -id 986193
|
|
|
|
For more examples, ask for subcommand help or view the documentation.
|
|
`
|