📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ALTER WORKER



Modifies a worker's tags, options, or state.

Syntax

ALTER WORKER <worker_name> SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ] ALTER WORKER <worker_name> UNSET TAG <tag_name> [ , <tag_name> ... ] ALTER WORKER <worker_name> SET <option_name> = <option_value> [ , <option_name> = <option_value> ... ] ALTER WORKER <worker_name> UNSET <option_name> [ , <option_name> ... ] ALTER WORKER <worker_name> SUSPEND ALTER WORKER <worker_name> RESUME

Parameters

FormDescription
SET TAGAdds or updates worker tags. Tag values must be string literals.
UNSET TAGRemoves one or more worker tags.
SETAdds or updates worker options. Option names are normalized to lowercase.
UNSETRemoves one or more worker options.
SUSPENDSuspends the worker.
RESUMEResumes the worker.

Examples

Set tags on a worker:

ALTER WORKER read_env SET TAG purpose = 'sandbox', owner = 'ci';

Update worker options:

ALTER WORKER read_env SET size = 'medium', auto_suspend = '600';

Remove a tag and an option:

ALTER WORKER read_env UNSET TAG owner; ALTER WORKER read_env UNSET auto_suspend;

Change worker state:

ALTER WORKER read_env SUSPEND; ALTER WORKER read_env RESUME;

Was this page helpful?