0020-00000040

Updated at:

Problem description

This error occurs when a PutBucketInventory request configures daily inventory export for a bucket that contains 10 billion or more objects. Daily export is only supported for buckets with fewer than 10 billion objects.

Causes

The <Frequency>Daily</Frequency> setting in InventoryConfiguration enforces a per-bucket object count limit. If the bucket exceeds 10 billion objects, OSS rejects the request with this error.

Examples

The following request targets a bucket named oss-example, which contains more than 10 billion objects. The highlighted field triggers the error.

PUT /?inventory&inventoryId=report1 HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Mon, 31 Oct 2016 12:00:00 GMT
Authorization: authorization string
Content-Length: length

<?xml version="1.0" encoding="UTF-8"?>
<InventoryConfiguration>
   <Id>report1</Id>
   <IsEnabled>true</IsEnabled>
   <Filter>
       <Prefix>Pics/</Prefix>
       <LastModifyBeginTimeStamp>1637883649</LastModifyBeginTimeStamp>
       <LastModifyEndTimeStamp>1638347592</LastModifyEndTimeStamp>
       <LowerSizeBound>1024</LowerSizeBound>
       <UpperSizeBound>1048576</UpperSizeBound>
       <StorageClass>Standard,IA</StorageClass>
   </Filter>
   <Destination>
      <OSSBucketDestination>
        <Format>CSV</Format>
        <AccountId>100000000000000</AccountId>
        <RoleArn>acs:ram::100000000000000:role/AliyunOSSRole</RoleArn>
        <Bucket>acs:oss:::destbucket</Bucket>
        <Prefix>prefix1/</Prefix>
        <Encryption>
           <SSE-KMS>
              <KeyId>keyId</KeyId>
           </SSE-KMS>
         </Encryption>
      </OSSBucketDestination>
   </Destination>
   <Schedule>
      <Frequency>Daily</Frequency>  <!-- Error: bucket exceeds 10 billion objects; daily export is not supported -->
   </Schedule>
   <IncludedObjectVersions>All</IncludedObjectVersions>
   <OptionalFields>
      <Field>Size</Field>
      <Field>LastModifiedDate</Field>
      <Field>ETag</Field>
      <Field>StorageClass</Field>
      <Field>IsMultipartUploaded</Field>
      <Field>EncryptionStatus</Field>
   </OptionalFields>
</InventoryConfiguration>

Solutions

Choose a solution based on the number of objects in your bucket.

Object countAction
10 billion–50 billionSwitch to weekly export: set <Frequency> to Weekly.
50 billion or moreExport by prefix in batches, or submit a ticket to increase your inventory export quota.

To switch to weekly export, update the <Schedule> element in your PutBucketInventory request:

<Schedule>
   <Frequency>Weekly</Frequency>
</Schedule>

To export by prefix, split your inventory configuration into multiple rules, each targeting a distinct prefix. For example, use Pics/2023/, Pics/2024/, and so on, instead of a single Pics/ prefix.

References