Swarm

Update a swarm

post/swarm/update

Request

  • Base URL
    /v1.49 (relative, and the document was published on a file host, not at the API’s origin)
  • URL
    /v1.49/swarm/update
  • Auth
    none declared

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 4 revisions of this API.