anchorectl policy
Policy related operations.
Every command on this page also accepts the global flags.
Subcommands
- policy activate — Activate a policy
- policy add — Adds a new policy bundle to the system
- policy delete — Delete the specified policy
- policy get — Get the policy content
- policy list — List all saved policies
- policy update — Update/replace an existing policy
policy activate
Activate a policy.
anchorectl policy activate POLICY [flags]
Arguments
| Argument | Description |
|---|---|
POLICY | The policy name or ID. |
Examples
anchorectl policy activate strict-policy
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
policy add
Adds a new policy bundle to the system.
anchorectl policy add [flags]
Examples
# Upload a policy bundle from a file
anchorectl policy add --input strict-policy.json
# Upload a policy bundle from stdin
cat strict-policy.json | anchorectl policy add --input -
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-i, --input | string | ANCHORECTL_INPUT | "" | Yes | Path to a JSON input file or - to read from stdin. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
policy delete
Delete the specified policy.
anchorectl policy delete POLICY [flags]
Aliases: del
Arguments
| Argument | Description |
|---|---|
POLICY | The policy name or ID. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
policy get
Get the policy content.
anchorectl policy get POLICY [flags]
Arguments
| Argument | Description |
|---|---|
POLICY | The policy name or ID. |
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
--detail | bool | ANCHORECTL_POLICY_DETAIL | true | No | Include policy detail in the form of the full policy content. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
policy list
List all saved policies.
anchorectl policy list [flags]
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
--detail | bool | ANCHORECTL_DETAIL | false | No | Include full policy content. Available with output selections of [JSON | json-raw]. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |
policy update
Update/replace an existing policy.
anchorectl policy update [flags]
Flags
| Flag | Type | Environment variable | Default | Required | Description |
|---|---|---|---|---|---|
-i, --input | string | ANCHORECTL_INPUT | "" | Yes | Path to a JSON input file or - to read from stdin. |
-o, --output | string | ANCHORECTL_FORMAT | text | No | The format to show the results. Allowable values: text, json, json-raw, id. See Output Formats. |