Problem description
The XML request body of the PutBucketLifecycle request contains a node that is not supported.
Causes
You initiated a PutBucketLifecycle request, but the XML request body contains a node that is not supported. In this case, a request error occurs.
Examples
In the following sample code, the Rule
node contains the AtimeBase
child node. The child node is not supported by the PutBucketLifecycle request.
PUT /?lifecycle HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Content-Length: 336
Date: Mon , 6 May 2019 15:23:20 GMT
Authorization: OSS qn6q**************:77Dv****************
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
<Rule>
<ID>rule</ID>
<Prefix>log/</Prefix>
<Status>Enabled</Status>
<Transition>
<Days>30</Days>
<StorageClass>IA</StorageClass>
<IsAccessTime>true</IsAccessTime>
<ReturnToStdWhenVisit>true</ReturnToStdWhenVisit>
<AtimeBase>100</AtimeBase>
</Transition>
</Rule>
</LifecycleConfiguration>
Solutions
Make sure that the XML request body in the PutBucketLifecycle request is valid.
PUT /?lifecycle HTTP/1.1 Host: oss-example.oss-cn-hangzhou.aliyuncs.com Content-Length: 336 Date: Mon , 6 May 2019 15:23:20 GMT Authorization: OSS qn6q**************:77Dv**************** <?xml version="1.0" encoding="UTF-8"?> <LifecycleConfiguration> <Rule> <ID>rule</ID> <Prefix>log/</Prefix> <Status>Enabled</Status> <Transition> <Days>30</Days> <StorageClass>IA</StorageClass> <IsAccessTime>true</IsAccessTime> <ReturnToStdWhenVisit>true</ReturnToStdWhenVisit> </Transition> </Rule> </LifecycleConfiguration>
Configure lifecycle rules in the Object Storage Service (OSS) console to automatically create request bodies.