Problem description
The value specified for the RetentionPeriodInDays parameter in the WORM retention policy is invalid.
Causes
The error occurs if you send a request to configure a bucket retention policy, such as InitiateBucketWorm or ExtendBucketWorm, and the value of the RetentionPeriodInDays parameter is outside the valid range.
Examples
In the following example, the value of the RetentionPeriodInDays parameter is -32. This value is outside the valid range.
POST /?worm HTTP/1.1
Date: Thu, 15 May 2014 11:18:32 GMT
Content-Length: 556
Content-Type: application/xml
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<InitiateWormConfiguration>
<RetentionPeriodInDays>-32</RetentionPeriodInDays>
</InitiateWormConfiguration>Solution
Ensure that the value of the RetentionPeriodInDays parameter is an integer from 1 to 25,550. This parameter specifies the retention period in days.
POST /?worm HTTP/1.1
Date: Thu, 15 May 2014 11:18:32 GMT
Content-Length: 556
Content-Type: application/xml
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Authorization: OSS qn6q**************:77Dv****************
<InitiateWormConfiguration>
<RetentionPeriodInDays>365</RetentionPeriodInDays>
</InitiateWormConfiguration>References
该文章对您有帮助吗?