腾讯云对象存储PutBucketreplication

PutBucketreplication描述

该操作在指定Bucket中创建新的复制配置(或替换原有复制配置)。

请求语法PUT/?replicationHTTP/1.1Host:BUCKET_NAME.s3.REGION.jdcloud-oss.comContent-Length:lengthDate:dateAuthorization:authorizationstringContent-MD5:MD5ReplicationconfigurationXMLinthebody请求参数

无请求参数

请求Header名称描述必须Content-MD5该Header用来确定请求实体在传输中没有损坏。
Type:String
Default:None是请求实体

可在请求实体中指定一个或多个复制规则。

ReplicationConfigurationRoleIAM-role-ARN/RoleRuleIDRule-1/IDStatusrule-status/StatusPrefixkey-prefix/PrefixDestination     Bucketarn:aws:s3:::bucket-name/BucketStorageClassoptional-destination-storage-class-override/StorageClass     /Destination/RuleRuleIDRule-2/ID.../Rule.../ReplicationConfiguration名称描述需要ReplicationConfiguration复制规则的集合。最多1000条规则。总大小不超过2MB。
Type:Container
Children:Rule
Ancestor:None是Rule特性规则的信息集合。
Type:Container
Ancestor:ReplicationConfiguration是ID规则标识。
Type:String
Ancestor:Rule否Status规则状态
Type:String
Ancestor:Rule
Validvalues:Enabled,Disabled是Prefix匹配前缀,最长不超过1024个字符,前缀不能重叠。
Type:String
Ancestor:Rule是Destination目的信息集合
Type:Container
Ancestor:Rule是Bucket目的地Bucket,多个复制规则必须指定同一个Bucket。
Type:String
Ancestor:Destination是StorageClass指定复制Object的存储类型,未指定存储类型,则使用源Object存储类型。
Type:String
Ancestor:Destination
Default:Storageclassofthesourceobject.
Validvalues:STANDARD、REDUCED_REDUNDANCY否响应响应Header

无特殊响应Header

响应元素

无响应元素

特殊错误HTTPErrorCodeCauseHTTP400InvalidRequestelementmustbespecifiediftheinhasavalue.HTTP400InvalidArgumentelementisemptyandmustcontainavalidaccountID.HTTP400InvalidArgumentTheAWSaccountspecifiedintheelementmustmatchthedestinationbucketowner.示例请求示例PUT/?replicationHTTP/1.1Host:BUCKET_NAME.s3.REGION.jdcloud-oss.comDate:Wed,11Feb201502:11:21GMTContent-MD5:q6yJDlIkcBaGGfb3QLY69A==Authorization:authorizationstringContent-Length:406ReplicationConfigurationRolearn:aws:iam::35667example:role/CrossRegionReplicationRoleForS3/RoleRuleIDrule1/IDPrefixTaxDocs/PrefixStatusEnabled/StatusDestinationBucketarn:aws:s3:::exampletargetbucket/Bucket/Destination/Rule/ReplicationConfiguration响应示例HTTP/1.1200OKx-amz-request-id:9E26D08072A8EF9EDate:Wed,11Feb201502:11:22GMTContent-Length:0Server:JDCloud腾讯云对象存储