PUT /?replication HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-MD5: MD5Authorization: Auth Stringrequest body
<ReplicationConfiguration><Role>qcs::cam::uin/<OwnerUin>:uin/<SubUin></Role><Rule><Status></Status><ID></ID><Prefix></Prefix><Destination><Bucket>qcs::cos:<Region>::<BucketName-APPID></Bucket><StorageClass></StorageClass></Destination><DeleteMarkerReplication><Status></Status></DeleteMarkerReplication></Rule></ReplicationConfiguration>
节点名称(关键字) | 父节点 | 描述 | 类型 | 是否必选 |
ReplicationConfiguration | 无 | 说明所有复制配置信息 | Container | 是 |
Role | ReplicationConfiguration | 发起者身份标示: qcs::cam::uin/<OwnerUin>:uin/<SubUin> | String | 是 |
Rule | ReplicationConfiguration | 具体配置信息,最多支持1000个 | Container | 是 |
ID | ReplicationConfiguration.Rule | 用来标注具体 Rule 的名称 | String | 否 |
Status | ReplicationConfiguration.Rule | 标识 Rule 是否生效,枚举值:Enabled、Disabled | String | 是 |
Prefix | ReplicationConfiguration.Rule | 需要复制的对象前缀 | String | 否 |
Destination | ReplicationConfiguration.Rule | 目标存储桶信息 | Container | 是 |
Bucket | ReplicationConfiguration.Rule.Destination | 资源标识符: qcs::cos:<Region>::<BucketName-APPID> | String | 是 |
DeleteMarkerReplication | ReplicationConfiguration.Rule | 是否同步删除标记 | Container | 否 |
Status | ReplicationConfiguration.Rule. DeleteMarkerReplication | 是否同步删除标记,支持 Disabled 或 Enabled 。默认值为 Enabled ,即同步删除标记 | String | 否 |
originbucket-1250000000
添加一条存储桶复制配置。该存储桶复制配置中,指定复制对象前缀为 testPrefix
的对象,目标存储桶为广州的 destinationbucket-1250000000
。PUT /?replication HTTP/1.1Date: Mon, 28 Aug 2017 02:53:38 GMTAuthorization: q-sign-algorithm=sha1&q-ak=AKIDZfbOAo7cllgPvF9cXFrJD0a1ICvR****&q-sign-time=1503888878;1503889238&q-key-time=1503888878;1503889238&q-header-list=host&q-url-param-list=replication&q-signature=254bf9cd3d6615e89a36ab652437f9d45c5f****Content-MD5: AAq9nzrpsz5LJ4UEe1f6Q==Host: originbucket-1250000000.cos.ap-guangzhou.myqcloud.comContent-Length: 312<ReplicationConfiguration><Role>qcs::cam::uin/100000000001:uin/100000000001</Role><Rule><Status>Enabled</Status><ID>RuleId_01</ID><Prefix>testPrefix</Prefix><Destination><Bucket>qcs::cos:ap-guangzhou::destinationbucket-1250000000</Bucket></Destination></Rule></ReplicationConfiguration>
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 0Connection: keep-aliveDate: Fri, 14 Apr 2019 07:06:19 GMTServer: tencent-cosx-cos-bucket-region: ap-guangzhoux-cos-request-id: NWQwMzQ3NmJfMjRiMjU4NjRfOTM4NV82ZDU1****x-cos-trace-id: OGVmYzZiMmQzYjA2OWNhODk0NTRkMTBiOWVmMDAxODc0OWRkZjk0ZDM1NmI1M2E2MTRlY2MzZDhmNmI5MWI1OWE4OGMxZjNjY2JiNTBmMTVmMWY1MzAzYzkyZGQ2ZWM4MzUyZTg1NGRhNWY0NTJiOGUyNTViYzgyNzgxZTEwOTY=
本页内容是否解决了您的问题?