0014-00000015
Updated at:
Problem description
The root node in the XML request body of a PutBucketLifecycle request contains a child node that is not named Rule.
Causes
You initiated a PutBucketLifecycle request, but the request failed because the LifecycleConfiguration root node in the XML request body contains a child node that is not named Rule. This structure does not meet the API requirements.
Examples
In the following example, the LifecycleConfiguration root node contains an invalid child node named UnknownNode.
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>
...
</Rule>
<UnknownNode>abc<UnknownNode/>
</LifecycleConfiguration>
Solutions
-
Ensure 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>
</Transition>
</Rule>
</LifecycleConfiguration>
-
Configure lifecycle rules in the Object Storage Service (OSS) console to avoid manually creating the request body.
References
Is this page helpful?