Swarm

Update a swarm

post/swarm/update

Request

Query parameters

versioninteger required

The version number of the swarm object being updated. This is required to avoid conflicting writes.

rotateWorkerTokenboolean

Rotate the worker join token.

rotateManagerTokenboolean

Rotate the manager join token.

rotateManagerUnlockKeyboolean

Rotate the manager unlock key.

Request body

Namestring

Name of the swarm.

Labelsobject

User-defined key/value metadata.

Example request

{
  "Name": "default",
  "Labels": {
    "com.example.corp.type": "production",
    "com.example.corp.department": "engineering"
  },
  "Orchestration": {
    "TaskHistoryRetentionLimit": 10
  },
  "Raft": {
    "SnapshotInterval": 10000,
    "LogEntriesForSlowFollowers": 500,
    "ElectionTick": 3,
    "HeartbeatTick": 1
  },
  "Dispatcher": {
    "HeartbeatPeriod": 5000000000
  },
  "CAConfig": {
    "NodeCertExpiry": 7776000000000000
  },
  "TaskDefaults": {
    "LogDriver": {
      "Name": "json-file",
      "Options": {
        "max-file": "10",
        "max-size": "100m"
      }
    }
  }
}

Response

no error

Changes

No recorded changes to this operation across all 2 revisions of this API.