Problem description
Unsupported child nodes are specified in the Expiration node in the XML request body of a PutBucketLifecycle request.
Causes
You initialize a PutBucketLifecycle request and specify the IsAccessTime child node in the Expiration node of the XML request body. However, IsAccessTime child nodes are not supported in the Expiration node.
Examples
The following code provides an example of the Expiration node in the XML request body of a PutBucketLifecycle request. In this example, an IsAccessTime child node is specified. As a result, a request error occurs.
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>zzz</Prefix>
<Status>Enabled</Status>
<Expiration>
<IsAccessTime>true</IsAccessTime>
<Days>200</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>Solutions
Delete the
IsAccessTimechild node from theExpirationnode in the XML request body.Configure lifecycle rules in the Object Storage Service (OSS) console to prevent errors caused by manual construction of request bodies.