forked from docs/doc-exports
Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: weihongmin1 <weihongmin1@huawei.com> Co-committed-by: weihongmin1 <weihongmin1@huawei.com>
149 lines
11 KiB
HTML
149 lines
11 KiB
HTML
<a name="obs_04_0059"></a><a name="obs_04_0059"></a>
|
|
|
|
<h1 class="topictitle1">Configuring a Custom Domain Name for a Bucket</h1>
|
|
<div id="body1547543646680"><div class="section" id="obs_04_0059__section1097191013372"><h4 class="sectiontitle">Functions</h4><p id="obs_04_0059__p52777375515">OBS uses the PUT method to configure a custom domain name for a bucket. After the configuration is successful, you can access the bucket through the domain name.</p>
|
|
<p id="obs_04_0059__p13803112713494">To perform this operation, the user must be the bucket owner or the bucket owner's IAM user that has permissions required for configuring custom domain names.</p>
|
|
<p id="obs_04_0059__p495617724216">Ensure that the custom domain name can correctly resolve to the OBS service through DNS.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section567762953711"><h4 class="sectiontitle">Request Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0059__screen175419175810"><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>PUT<span class="w"> </span>/?customdomain=domainname<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>bucketname.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>date
|
|
Authorization:<span class="w"> </span>authorization<span class="w"> </span>string
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section4177155819377"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0059__table34931235193212" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameters</caption><thead align="left"><tr id="obs_04_0059__row195001352328"><th align="left" class="cellrowborder" valign="top" width="22.430000000000003%" id="mcps1.3.3.2.2.4.1.1"><p id="obs_04_0059__p750214358321">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.260000000000005%" id="mcps1.3.3.2.2.4.1.2"><p id="obs_04_0059__p95049355327">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.310000000000002%" id="mcps1.3.3.2.2.4.1.3"><p id="obs_04_0059__p185061235143215">Mandatory (Yes/No)</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0059__row175081135133212"><td class="cellrowborder" valign="top" width="22.430000000000003%" headers="mcps1.3.3.2.2.4.1.1 "><p id="obs_04_0059__p19510123510324">customdomain</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.260000000000005%" headers="mcps1.3.3.2.2.4.1.2 "><p id="obs_04_0059__p122588914915"><strong id="obs_04_0059__b470216154916">Definition</strong>:</p>
|
|
<p id="obs_04_0059__p16551024153319">Custom domain name of a bucket.</p>
|
|
<p id="obs_04_0059__p89852224918">Type: String, which must meet the naming conventions of domain names.</p>
|
|
<p id="obs_04_0059__p176064044514"><strong id="obs_04_0059__b8324124014510">Constraints</strong>:</p>
|
|
<p id="obs_04_0059__p15152104111451">A bucket can have a maximum of 30 domain names. One custom domain name can be used for only one bucket.</p>
|
|
<p id="obs_04_0059__p1320155144515"><strong id="obs_04_0059__b14206553450">Range</strong>:</p>
|
|
<p id="obs_04_0059__p17201551456">The maximum length is 256 bytes.</p>
|
|
<p id="obs_04_0059__p132018557453"><strong id="obs_04_0059__b1205557459">Default value</strong>:</p>
|
|
<p id="obs_04_0059__p163341526203219">None</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.310000000000002%" headers="mcps1.3.3.2.2.4.1.3 "><p id="obs_04_0059__p853293516321">Yes</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section39931740163810"><h4 class="sectiontitle">Request Header</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="obs_04_0059__table436706591789" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request headers</caption><thead align="left"><tr id="obs_04_0059__row532609251789"><th align="left" class="cellrowborder" valign="top" width="17.008299170082992%" id="mcps1.3.4.2.2.5.1.1"><p id="obs_04_0059__p90786001789">Header</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.998400159984003%" id="mcps1.3.4.2.2.5.1.2"><p id="obs_04_0059__p1888434013510">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.82871712828717%" id="mcps1.3.4.2.2.5.1.3"><p id="obs_04_0059__p391355251789">Mandatory (Yes/No)</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.164583541645825%" id="mcps1.3.4.2.2.5.1.4"><p id="obs_04_0059__p642780001789">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="obs_04_0059__row520210419261"><td class="cellrowborder" valign="top" width="17.008299170082992%" headers="mcps1.3.4.2.2.5.1.1 "><p id="obs_04_0059__p1376912802612">Content-MD5</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.998400159984003%" headers="mcps1.3.4.2.2.5.1.2 "><p id="obs_04_0059__p9884440851">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.82871712828717%" headers="mcps1.3.4.2.2.5.1.3 "><p id="obs_04_0059__p12769889268">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.164583541645825%" headers="mcps1.3.4.2.2.5.1.4 "><p id="obs_04_0059__p793733224511"><strong id="obs_04_0059__b15368164994116">Definition:</strong></p>
|
|
<p id="obs_04_0059__p85101514134113">This header is mandatory when you configure a custom domain name certificate to verify that the content of the request body is consistent with what was sent.</p>
|
|
<p id="obs_04_0059__p57421655419">Base64-encoded 128-bit MD5 value of the request body calculated according to RFC 1864.</p>
|
|
<p id="obs_04_0059__p179925362264">Example: <strong id="obs_04_0059__b92612365426">n58IG6hfM7vqI4K0vnWpog==</strong></p>
|
|
<p id="obs_04_0059__p17609165413402"><strong id="obs_04_0059__b462617448427">Constraints</strong>:</p>
|
|
<p id="obs_04_0059__p8609155464014">None</p>
|
|
<p id="obs_04_0059__p260917546408"><strong id="obs_04_0059__b132119562426">Range:</strong></p>
|
|
<p id="obs_04_0059__p17609165484019">None</p>
|
|
<p id="obs_04_0059__p360915417401"><strong id="obs_04_0059__b11963115710429">Default value</strong>:</p>
|
|
<p id="obs_04_0059__p1420135514459">None</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="obs_04_0059__p1231635205817">For details about other common headers, see <a href="obs_04_0007.html#obs_04_0007__table25197309">Table 3</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section516565919384"><h4 class="sectiontitle">Request Elements</h4><p id="obs_04_0059__p125891247183719">This request involves no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section7368119183918"><h4 class="sectiontitle">Response Syntax</h4><div class="codecoloring" codetype="Xml" id="obs_04_0059__screen065719411711"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>request<span class="w"> </span>id
|
|
x-obs-id-2:<span class="w"> </span>id
|
|
Date:<span class="w"> </span>date
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section25421546193914"><h4 class="sectiontitle">Response Headers</h4><p class="msonormal" id="obs_04_0059__p1512332591013">The response to the request uses common headers. For details, see <a href="obs_04_0013.html#obs_04_0013__d0e686">Table 1</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section37921407409"><h4 class="sectiontitle">Response Elements</h4><p id="obs_04_0059__p1844815207155">This response contains no elements.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section7651222194014"><h4 class="sectiontitle">Error Responses</h4><p id="obs_04_0059__p117237512114">No special error responses are returned. For details about error responses, see <a href="obs_04_0115.html#obs_04_0115__d0e843">Table 2</a>.</p>
|
|
</div>
|
|
<div class="section" id="obs_04_0059__section10465193414013"><h4 class="sectiontitle">Sample Request</h4><div class="codecoloring" codetype="Xml" id="obs_04_0059__screen1661152375719"><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>PUT<span class="w"> </span>/?customdomain=obs.ccc.com<span class="w"> </span>HTTP/1.1
|
|
User-Agent:<span class="w"> </span>curl/7.29.0
|
|
Host:<span class="w"> </span>examplebucket.obs.region.example.com
|
|
Accept:<span class="w"> </span>*/*
|
|
Date:<span class="w"> </span>Mon,<span class="w"> </span>14<span class="w"> </span>Jan<span class="w"> </span>2019<span class="w"> </span>08:31:36<span class="w"> </span>+0000
|
|
Authorization:<span class="w"> </span>OBS<span class="w"> </span>UDSIAMSTUBTEST000094:u2kJF4kENs6KlIDcAZpAKSKPtnc=
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
<p id="obs_04_0059__p0609112615576"></p>
|
|
</div>
|
|
<p id="obs_04_0059__p18601657385"></p>
|
|
<p id="obs_04_0059__p18364804912"></p>
|
|
<p id="obs_04_0059__p12364120695"></p>
|
|
<div class="section" id="obs_04_0059__section0901443174010"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0059__screen12451330122319"><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></pre></div></td><td class="code"><div><pre><span></span>HTTP/1.1<span class="w"> </span>200<span class="w"> </span>OK
|
|
Server:<span class="w"> </span>OBS
|
|
x-obs-request-id:<span class="w"> </span>000001697692CC5380E9D272E6D8F830
|
|
x-obs-id-2:<span class="w"> </span>32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSsfu2GXj9gScHhFnrrTPY2cFOEZuvta
|
|
Date:<span class="w"> </span>Wed,<span class="w"> </span>13<span class="w"> </span>Mar<span class="w"> </span>2019<span class="w"> </span>10:22:05<span class="w"> </span>GMT
|
|
Content-Length:<span class="w"> </span>0
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="obs_04_0026.html">Advanced Bucket Settings</a></div>
|
|
</div>
|
|
</div>
|
|
|