Skip to content

Assign labels to objects

An Assignment binds a Label Definition's key to a value on a concrete object. plexctl label object wraps /v1/objects/{kind}/{id}/labels; plexctl label selector preview tests selector expressions.

Prerequisites

Steps

Set and list assignments

shell
plexctl label object set node:<node-uuid> --definition-id <definition-uuid> --value gold
plexctl label object list node:<node-uuid>

--value is validated against the Definition's value schema.

Remove an assignment

shell
plexctl label object delete node:<node-uuid> --qualified-key <qualified-key> --yes

delete is destructive and requires the persistent --yes flag.

Preview a selector

shell
plexctl label selector preview --selector 'tier in (gold, silver) && env == prod'

preview never raises — it renders the parsed AST, or an ERROR row per parse error with the offending position.

Verification

shell
plexctl label object list node:<node-uuid> --output json | jq

See also