Skip to main content
Version: v5.6.1

opschain admin runner-attributes set

Included from Basic tier

opschain admin runner-attributes set <key> [--values v1,v2...]

Registers a placement attribute key, optionally enumerating its allowed values (the v2 RunnerService.PutRunnerAttribute RPC). Registration is write-time vocabulary control: a runner group can only carry attributes whose keys are registered here, and when a key's values are enumerated, group writes and run-creation selectors naming that key only accept one of them.

The PUT is an upsert and the value list is replaced wholesale: re-set a key with the full list to add or remove a value, and re-set it with an empty --values to lift the restriction back to any value. Tightening a key's values does not reclassify groups that already carry an older value, and a queued entry's requirement is frozen at enqueue — the enumeration bites on the next write, not retroactively.

Flags​

FlagMeaning
--values <v1,v2...>Comma-separated allowed values. Empty (the default) = any value.
--server <url>Server base URL. Default: the active context / OPSCHAIN_SERVER.
--auth-token <token>Admin bearer token override. Default: your opschain login session, then $OPSCHAIN_ADMIN_TOKEN, then the token stored by opschain admin login.

Output​

The stored definition, as JSON (-o yaml for YAML):

{
"key": "location",
"values": [
"dc1",
"dc2"
]
}

Exit codes​

0 stored; 1 the request failed (network, HTTP error, rejected token); 2 usage.

Named errors​

  • a server is required — pass --server <url>, set OPSCHAIN_SERVER, or 'opschain context use <name>' (exit 2)
  • this command needs a login or an admin token — run 'opschain login', pass --auth-token, set OPSCHAIN_ADMIN_TOKEN, or store one with 'opschain admin login' (exit 2)
  • the server rejected the credential — run 'opschain login' again, or check the admin token (exit 1)
  • invalid attribute key "<key>": use letters, digits, '.', '_' or '-' — 422, passed through (exit 1).

See also​

  • opschain docs cli/admin-runner-attributes-list — the registered vocabulary.
  • opschain docs cli/admin-runner-attributes-remove — unregister a key.
  • opschain docs cli/admin-runner-group-set — attach registered attributes to a group.
  • opschain docs fleet-queue — how selectors demand these keys.