doc-exports/docs/obs/s3api/en-us_topic_0000001635744308.html
zhangyue 6fcdbfd13e OBS S3 API DOC
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com>
Co-authored-by: zhangyue <zhangyue164@huawei.com>
Co-committed-by: zhangyue <zhangyue164@huawei.com>
2024-02-26 11:17:13 +00:00

199 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0000001635744308"></a><a name="EN-US_TOPIC_0000001635744308"></a>
<h1 class="topictitle1">GET Bucket Replication</h1>
<div id="body0000001635744308"><p id="EN-US_TOPIC_0000001635744308__p8060118">This operation obtains the replication configuration information of a specified bucket. Only users have the <strong id="EN-US_TOPIC_0000001635744308__b54991136">s3:GetReplicationConfiguration</strong> permission can perform this operation.</p>
<div class="section" id="EN-US_TOPIC_0000001635744308__section25759717"><h4 class="sectiontitle">Request Syntax</h4><pre class="screen" id="EN-US_TOPIC_0000001635744308__screen4238181811212">GET /?replication HTTP/1.1
Host:<em id="EN-US_TOPIC_0000001635744308__i1624016184124"> bucketname</em>.obs.<em id="EN-US_TOPIC_0000001635744308__i1240161814129">region</em>.example.com
Date: date
Authorization:authorization string</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section30510864"><h4 class="sectiontitle">Request Parameters</h4><p class="msonormal" id="EN-US_TOPIC_0000001635744308__p58697470">This request contains no parameter.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section6162323"><h4 class="sectiontitle">Request Headers</h4><p class="msonormal" id="EN-US_TOPIC_0000001635744308__p56874649">This request uses common headers. For details about common request headers, see the section <a href="en-us_topic_0125560462.html">Common Request Headers</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section55460911"><h4 class="sectiontitle">Request Elements</h4><p class="msonormal" id="EN-US_TOPIC_0000001635744308__p43443869">This request involves no elements.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section46270551"><h4 class="sectiontitle">Response Syntax</h4><pre class="screen" id="EN-US_TOPIC_0000001635744308__screen26997610122811">HTTP/1.1 status_code
x-amz-id-2: id
x-amz-request-id:id
Date: date
Server:OBS
Content-Length: contentlength
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ReplicationConfiguration xmlns="http://obs.example.com/doc/2006-03-01/"&gt;
&lt;Rule&gt;
&lt;ID&gt;rule1&lt;/ID&gt;
&lt;Status&gt;Enabled&lt;/Status&gt;
&lt;Prefix&gt;&lt;/Prefix&gt;
&lt;Destination&gt;
&lt;Bucket&gt;arn:aws:s3:::exampletargetbucket&lt;/Bucket&gt;
&lt;StorageClass&gt;GLACIER&lt;/StorageClass&gt;
&lt;DeleteData&gt;Enabled&lt;/DeleteData&gt;
&lt;/Destination&gt;
&lt;HistoricalObjectReplication&gt;Enabled&lt;/HistoricalObjectReplication&gt;
&lt;/Rule&gt;
&lt;Agency&gt;testAgency&lt;/Agency&gt;
&lt;/ReplicationConfiguration&gt;</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section42808444"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="EN-US_TOPIC_0000001635744308__p46320746">This response uses common headers. For details about common response headers, see the section <a href="en-us_topic_0125560484.html">Common Response Headers</a>.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section49731683"><h4 class="sectiontitle">Response Elements</h4><p class="msonormal" id="EN-US_TOPIC_0000001635744308__p60992974">This response contains elements to detail the configuration. The following table describes the elements.</p>
<p class="litext" id="EN-US_TOPIC_0000001635744308__p12065858">Bucket replication configuration elements</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001635744308__table41483862" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001635744308__row39961240"><th align="left" class="cellrowborder" valign="top" width="31.31%" id="mcps1.3.8.4.1.3.1.1"><p id="EN-US_TOPIC_0000001635744308__p15634987">Element</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="68.69%" id="mcps1.3.8.4.1.3.1.2"><p id="EN-US_TOPIC_0000001635744308__p58474406">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001635744308__row38806450"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p56314742">ReplicationConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p65200283">Container for the replication rules. A maximum of 100 rules can be configured. The size of the XML file can reach 50 KB.</p>
<p id="EN-US_TOPIC_0000001635744308__p49931641">Type: container</p>
<p id="EN-US_TOPIC_0000001635744308__p46731593">Children: Rule</p>
<p id="EN-US_TOPIC_0000001635744308__p17931154">Ancestor: none</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row118865184817"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p11111579205">Agency</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p14111577201">Name of the agency, which can have a maximum of 64 characters.</p>
<p id="EN-US_TOPIC_0000001635744308__p1911157162011">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p9115578208">Ancestor: ReplicationConfiguration</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row27162663"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p52692061">Rule</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p40198548">Container of a specified replication rule.</p>
<p id="EN-US_TOPIC_0000001635744308__p26242615">The replication configuration must contain at least one rule. The maximum number of rules is 100.</p>
<p id="EN-US_TOPIC_0000001635744308__p34856947">Type: container</p>
<p id="EN-US_TOPIC_0000001635744308__p45277074">Ancestor: ReplicationConfiguration</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row4840483"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p56534860">ID</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p15920917">Unique identifier of a rule, with a maximum length of 255 characters.</p>
<p id="EN-US_TOPIC_0000001635744308__p9070525">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p14525862">Ancestor: Rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row63623897"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p53262058">Status</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p19259480">If the value of this element is <strong id="EN-US_TOPIC_0000001635744308__b39117597">Disabled</strong>, this rule will be ignored.</p>
<p id="EN-US_TOPIC_0000001635744308__p16514058">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p14408801">Ancestor: Rule</p>
<p id="EN-US_TOPIC_0000001635744308__p62570345">Value options: <strong id="EN-US_TOPIC_0000001635744308__b26262196">Enabled</strong>, <strong id="EN-US_TOPIC_0000001635744308__b35033180">Disabled</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row46863169"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p37820334">Prefix</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p43548195">Prefix of an object key name, applicable to one or more objects.If the Prefix is left blank, the cross-region replication rule is applied to the whole bucket.</p>
<p id="EN-US_TOPIC_0000001635744308__p56389441">The maximum length of a prefix is 1,024 characters. Duplicated prefixes are not supported.</p>
<p id="EN-US_TOPIC_0000001635744308__p37742921">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p4141974">Ancestor: Rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row37277767"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p66709190">Destination</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p34735342">Container for the destination bucket information.</p>
<p id="EN-US_TOPIC_0000001635744308__p44182624">Type: container</p>
<p id="EN-US_TOPIC_0000001635744308__p62099302">Ancestor: Rule</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row22022807"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p39016971">Bucket</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p6258083">Bucket used to store object copies that are marked by rules.</p>
<p id="EN-US_TOPIC_0000001635744308__p56322752">If the replication configuration contains multiple rules, the rules must specify the same bucket as the destination bucket.</p>
<p id="EN-US_TOPIC_0000001635744308__p37142728">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p65849098">Ancestor: Destination</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row55770977"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p21155287">StorageClass</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p35856657">Storage class of an object.</p>
<p id="EN-US_TOPIC_0000001635744308__p54274459">Type: enumeration</p>
<p id="EN-US_TOPIC_0000001635744308__p18708087">Ancestor: Destination</p>
<p id="EN-US_TOPIC_0000001635744308__p34155063">Value options: <strong id="EN-US_TOPIC_0000001635744308__b181465209431">STANDARD, STANDARD_IA, GLACIER</strong></p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row2058675014319"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p1011725114611">DeleteData</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p741071644716">Keyword for synchronizing object deletion operations. If the value is <strong id="EN-US_TOPIC_0000001635744308__b1877417551657">Enabled</strong>, the object deletion for the source bucket will be replicated to the destination bucket.</p>
<p id="EN-US_TOPIC_0000001635744308__p144101167471">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p19410816164719">Ancestor: Destination</p>
<p id="EN-US_TOPIC_0000001635744308__p54101316144719">Value options: <strong id="EN-US_TOPIC_0000001635744308__b17805121412238">Enabled</strong> and <strong id="EN-US_TOPIC_0000001635744308__b148051314102319">Disabled</strong> (If this element is absent from the request, <strong id="EN-US_TOPIC_0000001635744308__b980520148237">Disabled</strong> is applied by default.)</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001635744308__row129627553314"><td class="cellrowborder" valign="top" width="31.31%" headers="mcps1.3.8.4.1.3.1.1 "><p id="EN-US_TOPIC_0000001635744308__p1916024716315">HistoricalObjectReplication</p>
</td>
<td class="cellrowborder" valign="top" width="68.69%" headers="mcps1.3.8.4.1.3.1.2 "><p id="EN-US_TOPIC_0000001635744308__p419115115473">Keyword for copying a historical object. If the value is <strong id="EN-US_TOPIC_0000001635744308__b8853171412366">Enabled</strong>, historical objects meeting this rule are copied.</p>
<p id="EN-US_TOPIC_0000001635744308__p16191145194714">Type: string</p>
<p id="EN-US_TOPIC_0000001635744308__p18191135112470">Ancestor: Rule</p>
<p id="EN-US_TOPIC_0000001635744308__p1319165118472">Value options: <strong id="EN-US_TOPIC_0000001635744308__b76283115466">Enabled</strong> and <strong id="EN-US_TOPIC_0000001635744308__b1763163116469">Disabled</strong> (If this element is absent from the request, <strong id="EN-US_TOPIC_0000001635744308__b36317313468">Disabled</strong> is applied by default.)</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section44931965"><h4 class="sectiontitle">Error Responses</h4><p class="msonormal" id="EN-US_TOPIC_0000001635744308__p66761030">The following table describes the error response for this request.</p>
<p class="litext" id="EN-US_TOPIC_0000001635744308__p63978366">Error response elements</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001635744308__table38934383" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001635744308__row19405416"><th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.3.9.4.1.5.1.1"><p id="EN-US_TOPIC_0000001635744308__p28334888">Error Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.9.4.1.5.1.2"><p id="EN-US_TOPIC_0000001635744308__p13424609">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.9.4.1.5.1.3"><p id="EN-US_TOPIC_0000001635744308__p13651514">HTTP Response Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.9.4.1.5.1.4"><p id="EN-US_TOPIC_0000001635744308__p32030811">SOAP Error Code Prefix</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001635744308__row44358893"><td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.9.4.1.5.1.1 "><p id="EN-US_TOPIC_0000001635744308__p36300567">NoSuchReplicationConfiguration</p>
</td>
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.9.4.1.5.1.2 "><p id="EN-US_TOPIC_0000001635744308__p54664834">Cross-region replication configuration does not exist.</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.9.4.1.5.1.3 "><p id="EN-US_TOPIC_0000001635744308__p65775446">404 not found</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.9.4.1.5.1.4 "><p id="EN-US_TOPIC_0000001635744308__p26210873">Client</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section32323009"><h4 class="sectiontitle">Sample Request</h4><pre class="screen" id="EN-US_TOPIC_0000001635744308__screen6066468122732">GET /?replication HTTP/1.1
Host: examplebucket.obs.<em id="EN-US_TOPIC_0000001635744308__i12367117502">region</em>.example.com
x-amz-date: Tue, 10 Feb 2015 00:17:21 GMT
Authorization: signatureValue</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001635744308__section22471632"><h4 class="sectiontitle">Sample Response</h4><pre class="screen" id="EN-US_TOPIC_0000001635744308__screen47322359204949">HTTP/1.1 200 OK
x-amz-id-2: ITnGT1y4RyTmXa3rPi4hklTXouTf0hccUjo0iCPjz6FnfIutBj3M7fPGlWO2SEWp
x-amz-request-id: 51991C342example
Date: Tue, 10 Feb 2015 00:17:23 GMT
Server: OBS
Content-Length: contentlength
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;ReplicationConfiguration xmlns="http://obs.example.com/doc/2006-03-01/"&gt;
&lt;Rule&gt;
&lt;ID&gt;rule1&lt;/ID&gt;
&lt;Status&gt;Enabled&lt;/Status&gt;
&lt;Prefix&gt;&lt;/Prefix&gt;
&lt;Destination&gt;
&lt;Bucket&gt;arn:aws:s3:::exampletargetbucket&lt;/Bucket&gt;
&lt;StorageClass&gt;STANDARD&lt;/StorageClass&gt;
&lt;DeleteData&gt;Disabled&lt;/DeleteData&gt;
&lt;/Destination&gt;
&lt;HistoricalObjectReplication&gt;Disabled&lt;/HistoricalObjectReplication&gt;
&lt;/Rule&gt;
&lt;Agency&gt;testAgency&lt;/Agency&gt;
&lt;/ReplicationConfiguration&gt;</pre>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0125560493.html">Operations on Buckets</a></div>
</div>
</div>