PUT
/volumes/{name} Connection and access
API connection and authentication guidance
/v1.57
No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.
Parameters
name
path
Required
The name or ID of the volume
Type:
string
All schema constraints and annotations
{
"type": "string"
}version
query
Required
The version number of the volume being updated. This is required to
avoid conflicting writes. Found in the volume's
ClusterVolume
field.Type:
integer
All schema constraints and annotations
{
"format": "int64",
"type": "integer"
}Request and responses
Request
The spec of the volume to update. Currently, only Availability may
change. All other fields must remain unchanged.
application/json
Type:
object
Volume configuration
Spec
Schema:
ClusterVolumeSpec
All schema constraints and annotations
{
"description": "Volume configuration",
"properties": {
"Spec": {
"$ref": "#/components/schemas/ClusterVolumeSpec"
}
},
"type": "object"
}Response
200
no error
application/json
Response
400
bad parameter
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
404
no such volume
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
500
server error
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Response
503
node is not part of a swarm
application/json
Schema:
ErrorResponse
Schema example
{
"message": "Something went wrong."
}Referenced schemas
#/components/schemas/ClusterVolumeSpec
#/components/schemas/ErrorResponse
Complete operation contract
{
"operationId": "VolumeUpdate",
"parameters": [
{
"description": "The name or ID of the volume",
"in": "path",
"name": "name",
"required": true,
"schema": {
"type": "string"
}
},
{
"description": "The version number of the volume being updated. This is required to\navoid conflicting writes. Found in the volume's `ClusterVolume`\nfield.\n",
"in": "query",
"name": "version",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"description": "Volume configuration",
"properties": {
"Spec": {
"$ref": "#/components/schemas/ClusterVolumeSpec"
}
},
"type": "object"
}
}
},
"description": "The spec of the volume to update. Currently, only Availability may\nchange. All other fields must remain unchanged.\n",
"x-codegen-request-body-name": "body"
},
"responses": {
"200": {
"content": {
"application/json": {}
},
"description": "no error"
},
"400": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "bad parameter"
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "no such volume"
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "server error"
},
"503": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
},
"description": "node is not part of a swarm"
}
},
"summary": "\"Update a volume. Valid only for Swarm cluster volumes\"\n",
"tags": [
"Volume"
]
}