Set Bucket Retention
PUT /object/bucket/{bucketName}/retention
Updates the default retention period setting for the specified bucket.
bucketName | Bucket name for which retention period will be updated. |
Required Roles
Prerequisites
The following conditions must be met in order to call this operation.
Request Payload
<default_bucket_retention_update>
<period></period>
<namespace></namespace>
<min_max_governor>
<enforce_retention></enforce_retention>
<minimum_fixed_retention></minimum_fixed_retention>
<maximum_fixed_retention></maximum_fixed_retention>
<minimum_variable_retention></minimum_variable_retention>
<maximum_variable_retention></maximum_variable_retention>
</min_max_governor>
</default_bucket_retention_update>
{
"period": "",
"namespace": "",
"min_max_governor": {
"enforce_retention": "",
"minimum_fixed_retention": "",
"maximum_fixed_retention": "",
"minimum_variable_retention": "",
"maximum_variable_retention": ""
}
}
All parameters are required unless otherwise stated.
Field |
Description |
Type |
Notes |
default_bucket_retention_update |
|
|
|
period |
Default retention period in seconds |
Long |
|
namespace |
Namespace to which this bucket belongs |
String |
|
min_max_governor |
|
|
|
enforce_retention |
|
Boolean |
|
minimum_fixed_retention |
|
Long |
|
maximum_fixed_retention |
|
Long |
|
minimum_variable_retention |
|
Long |
|
maximum_variable_retention |
|
Long |
|
Response Body
Response indicating Success or Failure of the operation
Examples
Request
PUT https://192.168.0.0:4443/object/bucket/standalone-bucket/retention: HTTP/1.1
Content-Type: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
<default_bucket_retention_update>
<period>3</period>
<namespace>s3</namespace>
</default_bucket_retention_update>
Response
HTTP/1.1 200 OK
Content-Type: application/xml
Request
PUT https://192.168.0.0:4443/object/bucket/standalone-bucket/retention.json HTTP/1.1
Content-Type: application/json
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
{
"default_bucket_retention_update": {
"period": "3",
"namespace": "s3"
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json
Request
curl -H $token -H "Content-Type: application/xml" -X PUT https://$nodeIp:4443/object/bucket/standalone-bucket/retention
Response
HTTP/1.1 200 OK
Content-Type: application/xml