Update a swarm Run in API Explorer
Query parameters
-
The version number of the swarm object being updated. This is required to avoid conflicting writes.
-
Rotate the worker join token.
Default value is
false
. -
Rotate the manager join token.
Default value is
false
. -
Rotate the manager unlock key.
Default value is
false
.
POST
/swarm/update
curl \
--request POST 'http://api.example.com/v1.44/swarm/update?version=42' \
--header "Content-Type: application/json" \
--data '{"Name":"default","Labels":{"com.example.corp.type":"production","com.example.corp.department":"engineering"},"Orchestration":{"TaskHistoryRetentionLimit":10},"Raft":{"SnapshotInterval":10000,"KeepOldSnapshots":42,"LogEntriesForSlowFollowers":500,"ElectionTick":3,"HeartbeatTick":1},"Dispatcher":{"HeartbeatPeriod":5000000000},"CAConfig":{"NodeCertExpiry":7776000000000000,"ExternalCAs":[{"Protocol":"cfssl","URL":"string","Options":{"additionalProperty1":"string","additionalProperty2":"string"},"CACert":"string"}],"SigningCACert":"string","SigningCAKey":"string","ForceRotate":42},"EncryptionConfig":{"AutoLockManagers":false},"TaskDefaults":{"LogDriver":{"Name":"json-file","Options":{"max-file":"10","max-size":"100m"}}}}'
Request examples
{
"Name": "default",
"Labels": {
"com.example.corp.type": "production",
"com.example.corp.department": "engineering"
},
"Orchestration": {
"TaskHistoryRetentionLimit": 10
},
"Raft": {
"SnapshotInterval": 10000,
"KeepOldSnapshots": 42,
"LogEntriesForSlowFollowers": 500,
"ElectionTick": 3,
"HeartbeatTick": 1
},
"Dispatcher": {
"HeartbeatPeriod": 5000000000
},
"CAConfig": {
"NodeCertExpiry": 7776000000000000,
"ExternalCAs": [
{
"Protocol": "cfssl",
"URL": "string",
"Options": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"CACert": "string"
}
],
"SigningCACert": "string",
"SigningCAKey": "string",
"ForceRotate": 42
},
"EncryptionConfig": {
"AutoLockManagers": false
},
"TaskDefaults": {
"LogDriver": {
"Name": "json-file",
"Options": {
"max-file": "10",
"max-size": "100m"
}
}
}
}
Response examples (400)
{
"message": "Something went wrong."
}
Response examples (400)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (500)
{
"message": "Something went wrong."
}
Response examples (503)
{
"message": "Something went wrong."
}
Response examples (503)
{
"message": "Something went wrong."
}