All Products
Search
Document Center

Object Storage Service:0014-00000039

Last Updated:Jul 21, 2023

Problem description

In the XML request body of the PutBucketLifecycle request, the value of the Filter/ObjectSizeGreaterThan node is invalid.

Causes

In the XML request body of the PutBucketLifecycle request, the value of the Filter/ObjectSizeGreaterThan node is not a positive integer. The value must be a positive integer. In this case, a request error occurs.

Examples

In the following sample code, the value of the Filter/ObjectSizeGreaterThan node is abc, which is invalid.

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 Wnjl3fg9fdv8fg4b****:Phuu8bBhS8dsff2a****
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration>
  <Rule>
    <ID>rule</ID>
    <Prefix>test</Prefix>
    <Status>Enabled</Status>
    <Filter>      
      <ObjectSizeGreaterThan>abc</ObjectSizeGreaterThan>
    </Filter>    
    <Expiration>
      <Days>100</Days>
      <ExpiredObjectDeleteMarker>true</ExpiredObjectDeleteMarker>
    </Expiration>
  </Rule>
</LifecycleConfiguration>

Solutions

  • Make sure that the value of the Filter/ObjectSizeGreaterThan node in the XML request body is a positive integer in the range of 0 to 5 TB. Unit: bytes.

  • Configure lifecycle rules in the Object Storage Service (OSS) console to automatically create request bodies.

References