0031-00000001

Updated at:

Problem description

Your PutBucketReplication request fails because the XML request body is missing the <ReplicationConfiguration> root node.

Causes

The XML request body starts with a <Rule> element instead of the required <ReplicationConfiguration> root node.

Examples

The following request triggers this error. The XML body has no <ReplicationConfiguration> wrapper — <Rule> appears directly as the root element:

POST /?replication&comp=add HTTP/1.1
Date: <GMT-date>
Content-Length: <content-length>
Content-Type: application/xml
Authorization: <signature>
Host: <bucket-name>.oss-cn-hangzhou.aliyuncs.com

<?xml version="1.0" encoding="UTF-8"?>
<Rule>
    <RTC>
        <Status>enabled or disabled</Status>
    </RTC>
    <PrefixSet>
        <Prefix>prefix_1</Prefix>
        <Prefix>prefix_2</Prefix>
    </PrefixSet>
    <Action>ALL,PUT</Action>
    <Destination>
        <Bucket>destbucket</Bucket>
        <Location>oss-cn-hangzhou</Location>
        <TransferType>oss_acc</TransferType>
    </Destination>
    <HistoricalObjectReplication>enabled or disabled</HistoricalObjectReplication>
</Rule>

Solutions

Wrap the <Rule> element with a <ReplicationConfiguration> root node:

POST /?replication&comp=add HTTP/1.1
Date: <GMT-date>
Content-Length: <content-length>
Content-Type: application/xml
Authorization: <signature>
Host: <bucket-name>.oss-cn-hangzhou.aliyuncs.com

<?xml version="1.0" encoding="UTF-8"?>
<ReplicationConfiguration>
    <Rule>
        <RTC>
            <Status>enabled or disabled</Status>
        </RTC>
        <PrefixSet>
            <Prefix>prefix_1</Prefix>
            <Prefix>prefix_2</Prefix>
        </PrefixSet>
        <Action>ALL,PUT</Action>
        <Destination>
            <Bucket>destbucket</Bucket>
            <Location>oss-cn-hangzhou</Location>
            <TransferType>oss_acc</TransferType>
        </Destination>
        <HistoricalObjectReplication>enabled or disabled</HistoricalObjectReplication>
    </Rule>
</ReplicationConfiguration>

Replace the following placeholders with your actual values:

PlaceholderDescriptionExample
<GMT-date>Request date in GMT formatThu, 19 Mar 2026 12:00:00 GMT
<content-length>Length of the request body in bytes423
<signature>Request signature valueOSS <AccessKeyId>:<Signature>
<bucket-name>Name of the source bucketmy-source-bucket
destbucketName of the destination bucketmy-dest-bucket

References

PutBucketReplication