forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
53 lines
5.8 KiB
HTML
53 lines
5.8 KiB
HTML
<a name="obs_03_0350"></a><a name="obs_03_0350"></a>
|
|
|
|
<h1 class="topictitle1">Requester Pays</h1>
|
|
<div id="body1584694375447"><div class="section" id="obs_03_0350__section13818165256"><h4 class="sectiontitle">Scenarios</h4><p id="obs_03_0350__p8260142734515">The requester-pays configuration allows the requester to pay for data transfer and API calls associated with accessing the requested OBS resources, while the bucket owner only pays for data storage. If your bucket is the source for large-scale data sharing, you can enable requester-pays for the bucket, so that the requester pays for data access in the bucket. Otherwise, you, the bucket owner, will pay for all costs associated with the bucket.</p>
|
|
</div>
|
|
<div class="section" id="obs_03_0350__section274935524720"><h4 class="sectiontitle">Constraints</h4><ul id="obs_03_0350__ul1148020910491"><li id="obs_03_0350__li1026414645111">Only buckets of version 3.0 support the requester-pays function.</li><li id="obs_03_0350__li104806984917">A requester-pays bucket does not allow access by anonymous users.</li><li id="obs_03_0350__li1816312333520">The <strong id="obs_03_0350__b19663122020513">x-obs-request-payer: requester</strong> header must be included in the request accessing a requester-pays bucket, indicating that the requester agrees to pay for the request and associated data transfer. Without this header, the identity authentication fails, and error 403 (Forbidden) is returned. The response returned by the server includes the <strong id="obs_03_0350__b778416181768">x-obs-request-charged: requester</strong> header, indicating the requester is billed for this request.<p id="obs_03_0350__p021361114449"><strong id="obs_03_0350__b433102814201">Sample request for downloading an object by a requester</strong></p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_03_0350__screen6103826"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span>GET<span class="w"> </span>/ObjectName<span class="w"> </span>HTTP/1.1<span class="w"> </span>
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Date:<span class="w"> </span>date
|
|
Authorization:<span class="w"> </span>authorization
|
|
x-obs-request-payer:<span class="w"> </span>requester
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
<p id="obs_03_0350__p592445114464"><strong id="obs_03_0350__b117841542162016">Sample response</strong></p>
|
|
<div class="codecoloring" codetype="Xml" id="obs_03_0350__screen2554141574714"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>status_code
|
|
x-obs-request-charged:<span class="w"> </span>requester
|
|
Content-Type:<span class="w"> </span>type
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>length
|
|
|
|
<span class="nt"><Object</span><span class="w"> </span><span class="err">Content</span><span class="nt">></span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</li><li id="obs_03_0350__li852388194419">If the bucket owner or an IAM user under the bucket owner account accesses the requester-pays bucket, the <strong id="obs_03_0350__b177355123188">x-obs-request-payer: requester</strong> header is not required. In such case, no matter whether this header is included in the request, the response does not include the <strong id="obs_03_0350__b789871393312">x-obs-request-charged: requester</strong> header.</li></ul>
|
|
</div>
|
|
<div class="section" id="obs_03_0350__section1794074314519"><h4 class="sectiontitle">Configuring Requester Pays</h4><ol id="obs_03_0350__ol1253415143412"><li id="obs_03_0350__li99821455306"><span>In the bucket list, click the bucket you want to operate. The <strong id="obs_03_0350__obs_03_0307_b144421021120">Overview</strong> page is displayed.</span></li><li id="obs_03_0350__li51927620"><span>In the <strong id="obs_03_0350__b18870855202718">Basic Configurations</strong> area, click <strong id="obs_03_0350__b11167202583016">Requester Pays</strong>. The <strong id="obs_03_0350__b158716432302">Requester Pays</strong> dialog box is displayed.</span><p><div class="fignone" id="obs_03_0350__fig28922443919"><span class="figcap"><b>Figure 1 </b>Requester pays</span><br><span><img id="obs_03_0350__image14801315134511" src="en-us_image_0250427066.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</p></li><li id="obs_03_0350__li11277147164212"><span>Select <strong id="obs_03_0350__b123763613114">Enable</strong>.</span><p><ul id="obs_03_0350__ul1927410610443"><li id="obs_03_0350__li1320399104416"><strong id="obs_03_0350__b357372918326">Enable</strong>: The requester is charged for requests and data transfer associated with accessing the bucket, while the bucket owner is charged for data storage in the bucket.</li><li id="obs_03_0350__li927413694411"><strong id="obs_03_0350__b1217812115331">Disable</strong>: The bucket owner is charged for all costs associated with the bucket.</li></ul>
|
|
</p></li><li id="obs_03_0350__li116741550203611"><span>Click <strong id="obs_03_0350__b1858172610349">OK</strong>.</span></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_03_0300.html">OBS Console Operation Guide</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
image_size('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |