Skip to content

Manage Label Definitions

A Label Definition is the schema for a label key plus its value contract and on-delete policy. plexctl label define wraps /v1/label-definitions.

Prerequisites

  • An authenticated session — see Log in with plexctl.
  • The scope coordinate: platform, domain:<uuid>, or project:<uuid>. Pick the narrowest scope that covers every object you label.

Steps

Create a Definition

shell
plexctl label define create \
  --scope domain:<domain-uuid> \
  --key tier \
  --type enum \
  --on-delete block

--type is checked against the value-schema kinds (boolean, numeric, regex, enum, string). --on-delete is block, cascade, or orphan.

List, inspect, and update

shell
plexctl label define list --scope domain:<domain-uuid>
plexctl label define get <definition-uuid>
plexctl label define update <definition-uuid> --description "Service tier"

scope, key, and immutable are frozen after creation.

Delete a Definition

shell
plexctl label define delete <definition-uuid> --yes

Delete honours the Definition's own on_delete policy.

Verification

shell
plexctl label define get <definition-uuid> --output json | jq '{key, value_schema}'

See also