service_scale
Set the desired number of running replicas for a Replicated-mode Docker Swarm service. Returns once the update is accepted.
Instructions
Set the desired replica count for a Replicated-mode swarm service.
Only applies to services in Replicated mode; a Global service runs one task per
eligible node and has no replica count to set. The swarm scheduler places or removes
tasks asynchronously to converge on the new count — this call returns once the update
is accepted, not once every task is running. Check progress with service_ps or
service_inspect. For any other spec change (image, env, resources) use
service_update instead.
args: id_or_name - The service id or name replicas - The desired number of running task replicas returns: bool - True once the scale request is accepted
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| replicas | Yes | ||
| id_or_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |