Skip to main content
Version: v5.7.0

opschain nodes update

Included from Basic tier

opschain nodes update <path> [-f <file.yaml>] [--name <name>] ...

Updates a node's attributes with a sparse PATCH: only what you supply is sent, everything else keeps its stored value. The node's code (and so its path) is immutable — there is no rename-in-place; supplying nothing at all is a usage error rather than a no-op.

An entity path (demo/entities/rack_1) updates the entity through EntityService.UpdateEntity: name, description and archived apply; --template-version and --release-stage-floor are not sent, since an entity pins no template and is not an environment. An entity left archived by a promotion updates like any other entity (opschain docs resources/entity).

Flags​

FlagMeaning
-f, --file <file.yaml>YAML node definition — every attribute in it is sent. Accepted keys: name, description, archived, template_version; an unknown key is refused by name.
--name <name>New display name.
--description <text>New description.
--archivedArchive the node; --archived=false unarchives it. Sent only when the flag is given explicitly, so its absence never touches the stored value.
--template-version <version>Assets only — repoint the asset to another version of its own template (the template itself cannot be swapped here).
--release-stage-floor <rung>Environments only — the agent release-stage floor: a rung of the estate's release stage ladder (opschain admin agent-release stages); pass an empty value (--release-stage-floor "") to clear it. While set, an agent whose enrolled release sits below the rung — or that enrolled without a release — is refused every action, run and governed read under the environment (opschain docs agent-releases, "Where a stage may act"). Needs packs:agent-governance; a name that is not a rung is refused.

Flags win over -f file values.

Exit codes​

CodeMeaning
0Updated.
1The server refused the update (validation, authorisation, missing node).
2Usage error — malformed path, unknown file keys, nothing to send, no server target.

Named errors​

  • nothing to update — pass -f, --name, --description, --archived, --release-stage-floor and/or --template-version
  • --release-stage-floor applies to environments only
  • <file.yaml>: unknown node attribute(s) … (accepted: name, description, archived, template_version)
  • expected a node path like demo, demo/environments/dev, /projects/demo/environments/dev/assets/web or demo/entities/rack_1, got "…"
  • nodes operate on a server's estate — pass --server <url> or 'opschain context use <name>'

All exit 2.

Examples​

opschain nodes update demo --description "Retiring soon" --archived
updated project /projects/demo
opschain nodes update demo/environments/dev/assets/web --template-version 1.1.0
opschain nodes update demo --archived=false
opschain nodes update demo/environments/prod --release-stage-floor prod

-o json / -o yaml print the updated node object instead of the confirmation line.

See also​

  • opschain docs cli/nodes-show — the current stored values.
  • opschain docs cli/admin-nodes-delete — archiving hides nothing; removing a node from service is the admin delete lane.