Files
doc-exports/docs/rds/api-ref/rds_05_0022.html
wangdengke2 1ddaec1a62 rds_api
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: wangdengke2 <wangdengke2@huawei.com>
Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
2026-01-29 11:28:26 +00:00

142 lines
12 KiB
HTML

<a name="rds_05_0022"></a><a name="rds_05_0022"></a>
<h1 class="topictitle1">Applying for a Private Domain Name</h1>
<div id="body0000002500351637"><div class="section" id="rds_05_0022__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="rds_05_0022__p5753583532">This API is used to bind a private domain name to a specified DB instance.</p>
<ul id="rds_05_0022__ul11744937175719"><li id="rds_05_0022__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_05_0022__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="rds_05_0022__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="rds_05_0022__ul53354139141429"><li id="rds_05_0022__li1270098217262">URI format<p id="rds_05_0022__p66079617141421"><a name="rds_05_0022__li1270098217262"></a><a name="li1270098217262"></a>POST /v3/{project_id}/instances/{instance_id}/create-dns</p>
</li></ul>
<ul id="rds_05_0022__ul49831254144655"><li id="rds_05_0022__li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0022__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI Parameters</caption><thead align="left"><tr id="rds_05_0022__row60083059"><th align="left" class="cellrowborder" valign="top" width="20.979999999999997%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="rds_05_0022__p34889605"><strong id="rds_05_0022__b1357175416261">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.55%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="rds_05_0022__p7485743"><strong id="rds_05_0022__b644410201408">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.470000000000006%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="rds_05_0022__p2365466"><strong id="rds_05_0022__b59552020194010">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0022__row57385070"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0022__p17679057">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_05_0022__p22717550">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="62.470000000000006%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_05_0022__p1434580163733">Project ID of a tenant in a region.</p>
<p id="rds_05_0022__p181691757183820">To obtain the value, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="rds_05_0022__row2864326155157"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0022__p41557789155220">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.55%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_05_0022__p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="62.470000000000006%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_05_0022__p981962520456">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_05_0022__section3074340117316"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0022__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_05_0022__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.3.2.2.5.1.1"><p id="rds_05_0022__p95111733143318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.3.2.2.5.1.2"><p id="rds_05_0022__p13511123373311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.3.2.2.5.1.3"><p id="rds_05_0022__p125111433133312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.3.2.2.5.1.4"><p id="rds_05_0022__p551110331335">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0022__row353717218338"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.3.2.2.5.1.1 "><p id="rds_05_0022__p18511533163317">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.3.2.2.5.1.2 "><p id="rds_05_0022__p13511153333312">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.3.2.2.5.1.3 "><p id="rds_05_0022__p55111833183319">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.3.2.2.5.1.4 "><p id="rds_05_0022__p35111331332">The content type.</p>
<p id="rds_05_0022__p1351133311330">The default value is <strong id="rds_05_0022__b105111133143310">application/json</strong>.</p>
</td>
</tr>
<tr id="rds_05_0022__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.3.2.2.5.1.1 "><p id="rds_05_0022__p1163015550331">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.3.2.2.5.1.2 "><p id="rds_05_0022__p1963035563316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.3.2.2.5.1.3 "><p id="rds_05_0022__p1630105520331">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.3.2.2.5.1.4 "><p id="rds_05_0022__p1086851153317">Specifies the user token.</p>
<p id="rds_05_0022__p1057635831">The user token is a response to the API used to <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html" target="_blank" rel="noopener noreferrer">obtain a user token</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0022__table11236435" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="rds_05_0022__row61525259"><th align="left" class="cellrowborder" valign="top" width="18.110000000000003%" id="mcps1.3.3.3.2.5.1.1"><p id="rds_05_0022__p17490046"><strong id="rds_05_0022__b1368339202717">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.500000000000004%" id="mcps1.3.3.3.2.5.1.2"><p id="rds_05_0022__p7407659"><strong id="rds_05_0022__b776123415403">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.71%" id="mcps1.3.3.3.2.5.1.3"><p id="rds_05_0022__p63149496"><strong id="rds_05_0022__b6265235114010">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.68%" id="mcps1.3.3.3.2.5.1.4"><p id="rds_05_0022__p14835533"><strong id="rds_05_0022__b20712143515406">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0022__row60827539"><td class="cellrowborder" valign="top" width="18.110000000000003%" headers="mcps1.3.3.3.2.5.1.1 "><p id="rds_05_0022__p28083633">dns_type</p>
</td>
<td class="cellrowborder" valign="top" width="18.500000000000004%" headers="mcps1.3.3.3.2.5.1.2 "><p id="rds_05_0022__p60181840">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.71%" headers="mcps1.3.3.3.2.5.1.3 "><p id="rds_05_0022__p42890904">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.68%" headers="mcps1.3.3.3.2.5.1.4 "><p id="rds_05_0022__p13882179385">Specifies the domain name type. Currently, only <strong id="rds_05_0022__b108541636204017">private</strong> is supported.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="rds_05_0022__section1720840154018"><h4 class="sectiontitle">Example Request</h4><div class="p" id="rds_05_0022__p1492113114110">Apply for a private domain name.<pre class="screen" id="rds_05_0022__screen1232593517405">POST https://rds.eu-de.otc.t-systems.com/v3/054ea741f700d4a32f1bc00f5c80dd4c/instances/5b409baece064984a1b3eef6addae50cin01/create-dns
{
"dns_type": "private"
}</pre>
</div>
</div>
<div class="section" id="rds_05_0022__section28521534113742"><h4 class="sectiontitle">Response</h4><ul id="rds_05_0022__ul1013184717238"><li id="rds_05_0022__li161384752315">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0022__table32267243" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="rds_05_0022__row9230088"><th align="left" class="cellrowborder" valign="top" width="29.182918291829186%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="rds_05_0022__p9439626"><strong id="rds_05_0022__b1937012227274">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.002600260026004%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="rds_05_0022__p26412257"><strong id="rds_05_0022__b7197181694110">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="44.81448144814482%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="rds_05_0022__p59018101"><strong id="rds_05_0022__b1587881610411">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0022__row15736877"><td class="cellrowborder" valign="top" width="29.182918291829186%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_05_0022__p1331918533912">job_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.002600260026004%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_05_0022__p36221483">String</p>
</td>
<td class="cellrowborder" valign="top" width="44.81448144814482%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_05_0022__p88041596539">Indicates the ID of the task for applying for a private domain name. To query actual status of the running task, see <a href="rds_13_0003.html">Obtaining Information About a Task with a Specified ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_05_0022__ul12573920"><li id="rds_05_0022__li46056421">Normal response<pre class="screen" id="rds_05_0022__screen10762111113713">{
"job_id": "b9e057a0-f0fb-4987-9d21-f3a7550b32e7"
}</pre>
</li></ul>
</div>
<ul id="rds_05_0022__ul26818564"><li id="rds_05_0022__li33014451514">Abnormal response<p id="rds_05_0022__en-us_topic_0110967248_p014165512396"><a name="rds_05_0022__li33014451514"></a><a name="li33014451514"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
<div class="section" id="rds_05_0022__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_05_0022__rds_01_0002_en-us_topic_0032347778_ul7858132212142"><li id="rds_05_0022__rds_01_0002_en-us_topic_0032347778_li58581622171411">Normal<p id="rds_05_0022__rds_01_0002_en-us_topic_0032347778_p1040982941020"><a name="rds_05_0022__rds_01_0002_en-us_topic_0032347778_li58581622171411"></a><a name="rds_01_0002_en-us_topic_0032347778_li58581622171411"></a>202</p>
</li><li id="rds_05_0022__rds_01_0002_en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_05_0022__rds_01_0002_en-us_topic_0032347778_p0723374409"><a name="rds_05_0022__rds_01_0002_en-us_topic_0032347778_li11583183218149"></a><a name="rds_01_0002_en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_05_0022__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_05_0022__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0056887470.html">DB Instance Management</a></div>
</div>
</div>