0014-00000027

Updated at:

Problem description

The PutBucketLifecycle request failed because the XML request body contains mutually exclusive nodes.

Causes

The following lifecycle rule actions cannot coexist with a Tag filter in the same rule:

  • AbortMultipartUpload — cannot be used with a Tag node in the same rule

  • ExpiredObjectDeleteMarker — cannot be used with a Tag node in the same rule

Examples

The following request triggers this error. The rule specifies both ExpiredObjectDeleteMarker and a Tag filter, which are mutually exclusive.

PUT /?lifecycle HTTP/1.1
Host: oss-example.oss.aliyuncs.com
Content-Length: 336
Date: Mon , 6 May 2019 15:23:20 GMT
Authorization: OSSWnjl3fg9fdv8fg4b****:Phuu8bBhS8dsff2a****

<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
  <Rule>
    <ID>abc</ID>
    <Status>Enabled</Status>
    <Prefix>log/</Prefix>
    <Tag>
      <Key>test</Key>
      <Value>abc</Value>
    </Tag>
    <Expiration>
      <Days>30</Days>
      <ExpiredObjectDeleteMarker>true</ExpiredObjectDeleteMarker>
    </Expiration>
  </Rule>
</LifecycleConfiguration>

Solutions

Choose one of the following options based on what the rule needs to accomplish.

Option 1: Keep ExpiredObjectDeleteMarker, remove the tag filter

Remove the Tag node and its child nodes Key and Value from the rule.

<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
  <Rule>
    <ID>abc</ID>
    <Status>Enabled</Status>
    <Prefix>log/</Prefix>
    <Expiration>
      <ExpiredObjectDeleteMarker>true</ExpiredObjectDeleteMarker>
    </Expiration>
  </Rule>
</LifecycleConfiguration>

Option 2: Keep the tag filter, remove ExpiredObjectDeleteMarker

Remove the ExpiredObjectDeleteMarker node from the Expiration element.

<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
  <Rule>
    <ID>abc</ID>
    <Status>Enabled</Status>
    <Prefix>log/</Prefix>
    <Tag>
      <Key>test</Key>
      <Value>abc</Value>
    </Tag>
    <Expiration>
      <Days>30</Days>
    </Expiration>
  </Rule>
</LifecycleConfiguration>

Option 3: Use the OSS console

Configure lifecycle rules in the Object Storage Service (OSS) console. The console automatically builds a valid request body and prevents incompatible combinations.

References