0014-00000089

Updated at:

Problem description

The request body of the PutBucketLifecycle request contains duplicate nodes.

Causes

The PutBucketLifecycle request failed because the request body contains duplicate nodes. The API allows only one instance of a specific node.

Examples

For example, the following request body contains two Not child nodes in the Filter node. The API allows only one Not node.

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>rule1</ID>
    <Prefix></Prefix>
    <Status>Enabled</Status>
    <Filter>
      <Not>
      	<Prefix>test</Prefix>
      </Not>
      <Not>
      	<Prefix>abc</Prefix>
      </Not>
    </Filter>
    <Expiration>
    	<CreatedBeforeDate>2021-12-30T00:00:00.000Z</CreatedBeforeDate>
    </Expiration>
  </Rule>
</LifecycleConfiguration>

Solutions

  • Check the ErrorMessage from the API and remove the duplicate nodes.

  • Configure lifecycle rules in the OSS console to avoid having to manually construct the request body.

References