0027-00000004

Updated at:

Problem description

The XML request body of the retention policy is invalid.

Causes

You initiated a request that is related to bucket retention policy configurations, such as InitiateBucketWorm and ExtendBucketWorm, but the RetentionPeriodInDays parameter does not exist in the XML request body.

Examples

In the following example, the RetentionPeriodInDays parameter does not exist in the XML request body.

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

Solutions

Add the RetentionPeriodInDays parameter to the XML request body and make sure that a valid value is specified for the parameter.

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>

The RetentionPeriodInDays parameter specifies the retention period of a retention policy. Unit: days. Valid values: 1 to 25550. Make sure that a valid value is specified for the RetentionPeriodInDays parameter.

References

Retention policies