1package command
2
3import (
4	"strings"
5
6	"github.com/mitchellh/cli"
7)
8
9type ACLTokenCommand struct {
10	Meta
11}
12
13func (f *ACLTokenCommand) Help() string {
14	helpText := `
15Usage: nomad acl token <subcommand> [options] [args]
16
17  This command groups subcommands for interacting with ACL tokens. Nomad's ACL
18  system can be used to control access to data and APIs. ACL tokens are
19  associated with one or more ACL policies which grant specific capabilities.
20  For a full guide see: https://www.nomadproject.io/guides/acl.html
21
22  Create an ACL token:
23
24      $ nomad acl token create -name "my-token" -policy foo -policy bar
25
26  Lookup a token and display its associated policies:
27
28      $ nomad acl policy info <token_accessor_id>
29
30  Revoke an ACL token:
31
32      $ nomad acl policy delete <token_accessor_id>
33
34  Please see the individual subcommand help for detailed usage information.
35`
36	return strings.TrimSpace(helpText)
37}
38
39func (f *ACLTokenCommand) Synopsis() string {
40	return "Interact with ACL tokens"
41}
42
43func (f *ACLTokenCommand) Name() string { return "acl token" }
44
45func (f *ACLTokenCommand) Run(args []string) int {
46	return cli.RunResultHelp
47}
48