ExtendBucketWorm is used to extend the retention period of objects in a bucket whose retention policy is locked.
By default, a time-based policy is in the InProgress state after the policy is created for a bucket. The state remains valid for 24 hours. Within the validity period, the retention policy protects the data in the bucket.
- In the 24-hour window after the retention policy is enabled: If the retention policy is not locked, the bucket owner and authorized users can delete this policy. If the retention policy is locked, the protection period of the policy cannot be shortened and the policy cannot be deleted. The protection period can only be prolonged.
- 24 hours after the retention policy is enabled: If the retention policy is not locked, the policy becomes invalid.
If a bucket contains objects that are within the protection period, you cannot delete the bucket or its retention policy. To delete the retention policy of a bucket, the bucket must be empty. Only the bucket owner can delete the retention policy.
|ExtendWormConfiguration||Container||Yes||The root node.
Child nodes: RetentionPeriodInDays
|RetentionPeriodInDays||Positive integer||Yes||The number of days for which objects can be retained.|
- Sample requests
POST /? wormId=xxx&wormExtend HTTP/1.1 Date: Thu, 15 May 2014 11:18:32 GMT Host: BucketName.oss.aliyuncs.com Authorization: OSS nxj7dtlhcyl5hp****:COS3OQkfQPnKmYZTEHYv2**** <ExtendWormConfiguration> <RetentionPeriodInDays>366</RetentionPeriodInDays> </ExtendWormConfiguration>
- Sample responses
HTTP/1.1 200 OK x-oss-request-id: 5374A2880232A65C2300**** Date: Thu, 15 May 2014 11:18:32 GMT Content-Type: application/xml Content-Length: 556