Skip to main content
Version: v5.6.1

opschain admin authz policies update

Included from Basic tier

Replaces a policy's definition from a YAML file: the policy is addressed by name or id, and the file uses the same strict vocabulary as create (name, description, authorisation_rules). The rule set in the file replaces the policy's rules wholesale — a rule left out of the file is removed from the policy. To add or remove a single standalone rule without restating the rest, use attach-rule/detach-rule instead.

opschain admin authz policies update ops-team -f ops-team.yaml
updated authorisation policy "ops-team" (0199c1…)

Flags​

FlagMeaning
-f, --file <file.yaml>Required. The YAML policy definition (accepted keys: name, description, authorisation_rules).

Exit codes​

  • 0 — updated (-o json|yaml prints the updated resource).
  • 1 — the policy cannot be resolved, or the server refused (system policies refuse edits; the 422 detail passes through).
  • 2 — usage, including an unknown key in the file: <file.yaml>: unknown policy attribute(s) <keys> (accepted: name, description, authorisation_rules).

The shared resolution and no-server named errors are on opschain docs cli/admin-authz-policies.

See also​

  • opschain docs cli/admin-authz-policies-create — the file format, with an example.
  • opschain docs cli/admin-authz-policies-attach-rule — incremental rule changes.