Problem description
The request contains an invalid XML structure for the Write-Once-Read-Many (WORM) retention policy configuration.
Causes
You sent a request to configure a bucket retention policy, such as InitiateBucketWorm or ExtendBucketWorm. The request body is missing the RetentionPeriodInDays element, which makes the XML structure invalid.
Examples
The following example is missing the RetentionPeriodInDays element.
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 element with a valid value to 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>
<RetentionPeriodInDays>365</RetentionPeriodInDays>
</InitiateWormConfiguration>The RetentionPeriodInDays element specifies the retention period in days. The value must be an integer from 1 to 25,550.
References
该文章对您有帮助吗?