service_rollback
Roll back a Docker swarm service to its previous specification using the service ID or name. Reapplies the spec before the most recent update.
Instructions
Roll a swarm service back to its previous spec (the docker service rollback equivalent).
Re-applies the service's PreviousSpec — the spec from before the most recent service_update /
service_scale. Raises ValueError if the service has no PreviousSpec
(it has never been updated, or was already rolled back). The high-level SDK exposes no rollback,
so this reads the current version and previous spec via the low-level APIClient and submits them
with the low-level update_service API call.
args: id_or_name - The service id or name returns: dict - The daemon response (a dict with a "Warnings" key)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_or_name | Yes |