opschain admin authz policies attach-rule
Included from Basic tier
Links an existing standalone authorisation rule to a policy. The policy is
addressed by name or id; the rule by its id (rule paths are not unique, so
there is no by-path addressing — find the id with
opschain admin authz rules list). One rule can be linked to many
policies.
opschain admin authz policies attach-rule ops-team --rule 0199c2…
attached rule 0199c2… to policy "ops-team"
This is the incremental alternative to update, whose YAML definition
replaces the policy's rule set wholesale.
Flags
| Flag | Meaning |
|---|---|
--rule <rule-id> | Required. The authorisation rule id to link. |
Exit codes
- 0 — linked.
- 1 — the policy cannot be resolved, or the server refused (for example a system policy).
- 2 — usage. Shared named errors:
opschain docs cli/admin-authz-policies.
See also
opschain docs cli/admin-authz-policies-detach-rule— the inverse.opschain docs cli/admin-authz-rules-create— creating the standalone rule first.