文档

0031-00000001

更新时间:

问题描述

请求中提供的数据复制规则配置XML结构不合法。

问题原因

您发起了PutBucketReplication请求,但是请求体中缺少根结点ReplicationConfiguration

问题示例

以下示例中缺少根结点ReplicationConfiguration

POST /?replication&comp=add HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Authorization: SignatureValue
Host: BucketName.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>     

解决方案

在请求XML结构中补充ReplicationConfiguration节点。

POST /?replication&comp=add HTTP/1.1
Date: GMT Date
Content-Length: ContentLength
Content-Type: application/xml
Authorization: SignatureValue
Host: BucketName.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>

相关文档

PutBucketReplication

  • 本页导读 (1)
文档反馈