Configure space auto-cleaning mechanism
Configures space auto-cleaning mechanism in the space.
Path parameters
| Parameter | Type & Description |
|---|---|
| id required | string The Id of a space. |
Request body
New configuration of space auto-cleaning mechanism.
| Property | Type & Description | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
enabled boolean If true, auto-cleaning mechanism is enabled in the space. | |||||||||||||||||||||||||||||||||||||||||||||
threshold integer Amount of data [b], which should trigger the auto-cleaning in the space. Only replicas maintained by this storage provider will be removed. This parameter is required to enable auto-cleaning. | |||||||||||||||||||||||||||||||||||||||||||||
target integer Amount of data [b], at which the auto-cleaning process should stop. This parameter is required to enable auto-cleaning. | |||||||||||||||||||||||||||||||||||||||||||||
rules object (SpaceAutoCleaningRules) Rules used to select certain list of file replicas that can be evicted by auto-cleaning mechanism.
| |||||||||||||||||||||||||||||||||||||||||||||
Request Examples
{
"enabled": true,
"target": 1073741824,
"threshold": 1099511627776,
"rules": {
"enabled": true,
"maxOpenCount": {
"enabled": true,
"value": 1000
},
"minHoursSinceLastOpen": {
"enabled": true,
"value": 10
},
"minFileSize": {
"enabled": true,
"value": 1
},
"maxFileSize": {
"enabled": true,
"value": 1024
},
"maxHourlyMovingAverage": {
"enabled": true,
"value": 10
},
"maxDailyMovingAverage": {
"enabled": false,
"value": 100
},
"maxMonthlyMovingAverage": {
"enabled": false
}
}
}Responses
Auto-cleaning configuration has been updated.
Unauthorized request.
Forbidden request.
Internal server error.
| Property | Type & Description | ||||||
|---|---|---|---|---|---|---|---|
error object Object describing an error.
| |||||||
Example
{
"error": {
"id": "badValueString",
"details": {
"key": "name"
},
"description": "Bad value: provided \"name\" must be a string."
}
}