Skip to main content
Version: v5.7.0

opschain admin authz rules delete

Included from Basic tier

Deletes an authorisation rule by id. Without --confirm the command only previews, naming the rule's path and how many policies still link it — the grant disappears from every one of them when the delete goes through:

opschain admin authz rules delete 0199c2…
would delete authorisation rule /projects/demo (0199c2…), linked to 2 policy(ies)
re-run with --confirm to delete

opschain admin authz rules delete 0199c2… --confirm
deleted authorisation rule /projects/demo (0199c2…)

To remove a rule from one policy while keeping it elsewhere, use admin authz policies detach-rule instead. A rule linked to a system policy refuses deletion server-side (the 422 detail passes through).

Flags​

FlagMeaning
--confirmActually delete. Without it the command previews and exits 0.

Exit codes​

  • 0 — deleted, or previewed.
  • 1 — the rule does not exist, or the server refused.
  • 2 — usage (no server target — the shared named error on opschain docs cli/admin-authz-rules).

See also​

  • opschain docs cli/admin-authz-policies-detach-rule — the narrower removal.