0027-00000005

更新时间:
复制 MD 格式

Problem description

The value of the RetentionPeriodInDays parameter in the Write-Once-Read-Many (WORM) retention policy configuration is invalid.

Causes

You sent a request, such as InitiateBucketWorm or ExtendBucketWorm, to configure a bucket retention policy. The request failed because the value of the RetentionPeriodInDays parameter is invalid.

Examples

In the following example, the value of the RetentionPeriodInDays parameter is set to test. This value is invalid.

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>test</RetentionPeriodInDays>
</InitiateWormConfiguration>

Solutions

The RetentionPeriodInDays parameter specifies the retention period in days. Valid values: 1 to 25,550.

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

Retention policy