Files
doc-exports/docs/rds/api-ref/rds_05_0031.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

144 lines
12 KiB
HTML

<a name="rds_05_0031"></a><a name="rds_05_0031"></a>
<h1 class="topictitle1">Querying the Domain Name of a DB Instance</h1>
<div id="body0000002500391665"><div class="section" id="rds_05_0031__section4850156117316"><h4 class="sectiontitle">Function</h4><p id="rds_05_0031__p5753583532">This API is used to query the domain name of a DB instance.</p>
<ul id="rds_05_0031__ul11744937175719"><li id="rds_05_0031__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_0031__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_0031__section28961517113719"><h4 class="sectiontitle">URI</h4><ul id="rds_05_0031__ul53354139141429"><li id="rds_05_0031__li1270098217262">URI format<p id="rds_05_0031__p147291933121420"><a name="rds_05_0031__li1270098217262"></a><a name="li1270098217262"></a>GET /v3/{project_id}/instances/{instance_id}/dns</p>
</li></ul>
<ul id="rds_05_0031__ul49831254144655"><li id="rds_05_0031__li15430535">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0031__table4657088" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI Parameters</caption><thead align="left"><tr id="rds_05_0031__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_0031__p34889605"><strong id="rds_05_0031__b941013319285">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_0031__p7485743"><strong id="rds_05_0031__b86041829162917">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_0031__p2365466"><strong id="rds_05_0031__b1058615319292">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0031__row57385070"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0031__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_0031__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_0031__p1434580163733">Project ID of a tenant in a region.</p>
<p id="rds_05_0031__p181691757183820">To obtain the value, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="rds_05_0031__row2864326155157"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0031__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_0031__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_0031__p981962520456">Instance ID.</p>
</td>
</tr>
<tr id="rds_05_0031__row222712222172"><td class="cellrowborder" valign="top" width="20.979999999999997%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_05_0031__p11220142221714">dns_type</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_0031__p5220222141715">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_0031__p8220182201719">Domain type. Only private domains are supported.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_05_0031__section3074340117316"><h4 class="sectiontitle">Request</h4><ul id="rds_05_0031__ul5099287616954"><li id="rds_05_0031__li5628270116954">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0031__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_05_0031__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="rds_05_0031__p95111733143318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="rds_05_0031__p13511123373311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="rds_05_0031__p125111433133312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="rds_05_0031__p551110331335">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0031__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="rds_05_0031__p1163015550331">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="rds_05_0031__p1963035563316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="rds_05_0031__p1630105520331">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="rds_05_0031__p1086851153317">Specifies the user token.</p>
<p id="rds_05_0031__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>
</li><li id="rds_05_0031__li4411135064210">Example<p id="rds_05_0031__p1454414211213"><a name="rds_05_0031__li4411135064210"></a><a name="li4411135064210"></a>GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/c90928717dc747e2a20099894a87c468in01/dns?dns_type=private</p>
</li></ul>
</div>
<div class="section" id="rds_05_0031__section28521534113742"><h4 class="sectiontitle">Response</h4><ul id="rds_05_0031__ul1013184717238"><li id="rds_05_0031__li161384752315">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_05_0031__table32267243" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="rds_05_0031__row9230088"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="rds_05_0031__p9439626"><strong id="rds_05_0031__b7143122105018">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="rds_05_0031__p26412257"><strong id="rds_05_0031__b19655202618508">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="rds_05_0031__p59018101"><strong id="rds_05_0031__b1673220284500">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_05_0031__row9246228181816"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_05_0031__p1722720284184">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_05_0031__p922702821810">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_05_0031__p8229122801816">Instance ID.</p>
</td>
</tr>
<tr id="rds_05_0031__row724682841815"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_05_0031__p1622912861813">dns_name</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_05_0031__p82291528201817">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_05_0031__p17229152861818">Domain name of the instance.</p>
</td>
</tr>
<tr id="rds_05_0031__row15245112815189"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_05_0031__p1823013287184">dns_type</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_05_0031__p1230162811182">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_05_0031__p132302288187">Domain type. Value: <strong id="rds_05_0031__b6659710203112">private</strong>.</p>
</td>
</tr>
<tr id="rds_05_0031__row192451628201810"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_05_0031__p123032810181">ipv4_address</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_05_0031__p17230728131819">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_05_0031__p1923042820181">Virtual IP address bound to the instance domain name.</p>
</td>
</tr>
<tr id="rds_05_0031__row102457289181"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_05_0031__p92309283186">status</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_05_0031__p5230928121812">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_05_0031__p1523014287189">Domain status:</p>
<ul id="rds_05_0031__ul179193034012"><li id="rds_05_0031__li9933014406">normal</li><li id="rds_05_0031__li69143016401">abnormal</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_05_0031__ul12573920"><li id="rds_05_0031__li46056421">Example normal response<pre class="screen" id="rds_05_0031__screen37293342375">{
"instance_id": "2de6315e7197418fbf2fdaed59d65da1in03",
"dns_name": "2de6315e7197418fbf2fdaed59d65da1in03.internal.eu-de-****.com",
"dns_type": "private",
"ipv4_address": "192.168.6.105",
"status": "normal"
}</pre>
</li><li id="rds_05_0031__li33014451514">Abnormal response<p id="rds_05_0031__en-us_topic_0110967248_p014165512396"><a name="rds_05_0031__li33014451514"></a><a name="li33014451514"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_05_0031__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_05_0031__rds_01_0002_en-us_topic_0032347778_ul7858132212142"><li id="rds_05_0031__rds_01_0002_en-us_topic_0032347778_li58581622171411">Normal<p id="rds_05_0031__rds_01_0002_en-us_topic_0032347778_p1040982941020"><a name="rds_05_0031__rds_01_0002_en-us_topic_0032347778_li58581622171411"></a><a name="rds_01_0002_en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_05_0031__rds_01_0002_en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_05_0031__rds_01_0002_en-us_topic_0032347778_p0723374409"><a name="rds_05_0031__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_0031__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_05_0031__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>