doc-exports/docs/obs/api-ref/obs_04_0059.html
Jawei, Li f1cb839979 OBS api-ref 2.0.38.SP5
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Jawei, Li <lijiawei5@huawei.com>
Co-committed-by: Jawei, Li <lijiawei5@huawei.com>
2022-11-03 11:54:51 +00:00

108 lines
6.0 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__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"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7</pre></div></td><td class="code"><div class="highlight"><pre><span></span>PUT /?customdomain=domainname HTTP/1.1
User-Agent: curl/7.29.0
Host: bucketname.obs.region.example.com
Accept: */*
Date: date
Authorization: authorization string
Content-Length: 0
</pre></div>
</td></tr></table></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</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__p16551024153319">Custom domain name of a bucket.</p>
<p id="obs_04_0059__p3653204810576">Type: string, which must meet the naming convention of domain names.</p>
<p id="obs_04_0059__p154809270334">Specifications: The value contains a maximum of 256 characters.</p>
<p id="obs_04_0059__p163341526203219">No default value.</p>
<p id="obs_04_0059__p1557415131589">Constraints: A bucket can have a maximum of 30 domain names. A custom domain name can be used for only one bucket.</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><p id="obs_04_0059__p1231635205817">This request uses common headers. For details, 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"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: request id
x-obs-id-2: id
Date: date
Content-Length: 0
</pre></div>
</td></tr></table></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 involves 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__screen11617610142118"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6
7</pre></div></td><td class="code"><div class="highlight"><pre><span></span>PUT /?customdomain=obs.ccc.com HTTP/1.1
User-Agent: curl/7.29.0
Host: examplebucket.obs.region.example.com
Accept: */*
Date: Mon, 14 Jan 2019 08:31:36 +0000
Authorization: OBS UDSIAMSTUBTEST000094:u2kJF4kENs6KlIDcAZpAKSKPtnc=
Content-Length: 0
</pre></div>
</td></tr></table></div>
</div>
<div class="section" id="obs_04_0059__section0901443174010"><h4 class="sectiontitle">Sample Response</h4><div class="codecoloring" codetype="Xml" id="obs_04_0059__screen12451330122319"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2
3
4
5
6</pre></div></td><td class="code"><div class="highlight"><pre><span></span>HTTP/1.1 200 OK
Server: OBS
x-obs-request-id: 000001697692CC5380E9D272E6D8F830
x-obs-id-2: 32AAAQAAEAABSAAgAAEAABAAAQAAEAABCSsfu2GXj9gScHhFnrrTPY2cFOEZuvta
Date: Wed, 13 Mar 2019 10:22:05 GMT
Content-Length: 0
</pre></div>
</td></tr></table></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>