0014-00000011

Updated at:

Problem description

In the PutBucketLifecycle request, the XML request body does not meet the requirements of the request.

Causes

You initiated a PutBucketLifecycle request, but the XML request body is invalid. The following list describes the possible causes:

  • The XML request body is invalid. For example, a node does not have a closing tag.

  • The root node in the XML request body is not LifecycleConfiguration.

Examples

In the following sample code, the LifecycleConfiguration node does not have a closing tag in the XML request body.

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>

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>
    </Transition>    
  </Rule>
</LifecycleConfiguration>
  • Configure lifecycle rules in the Object Storage Service (OSS) console to automatically create request bodies.

References