0014-00000027
Updated at:
Problem description
The XML request body of the PutBucketLifecycle request contains child nodes that are mutually exclusive.
Causes
Nodes such as AbortMultipartUpload and ExpiredObjectDeleteMarker cannot be used together with the Tag node in the XML request body of the PutBucketLifecycle request.
Examples
In the following sample code, both the ExpiredObjectDeleteMarker and Tag nodes exist.
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
-
If you want to retain the
ExpiredObjectDeleteMarkernode, remove theTagnode and its child nodesKeyandValue. -
If you want to retain the
Tagnode, remove theExpiredObjectDeleteMarkerchild node from theExpirationnode. -
Configure lifecycle rules in the Object Storage Service (OSS) console to automatically create request bodies.
References
Is this page helpful?