service_scale
Scale a Docker Swarm service by setting its desired replica count, increasing or decreasing tasks as needed. Returns acceptance of the update.
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: 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 |