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