forked from docs/doc-exports
249 lines
17 KiB
HTML
249 lines
17 KiB
HTML
<a name="ListDnsServers"></a><a name="ListDnsServers"></a>
|
|
|
|
<h1 class="topictitle1">Querying the DNS Server List</h1>
|
|
<div id="body1273355423518"><div class="section" id="ListDnsServers__section14733954183520"><h4 class="sectiontitle">Function</h4><p id="ListDnsServers__p1273415463513">This API is used to query the DNS server list.</p>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section19735165412357"><h4 class="sectiontitle">URI</h4><p id="ListDnsServers__p1873615453512">GET /v1/{project_id}/dns/servers</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDnsServers__table673745416358" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ListDnsServers__row1573695418356"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ListDnsServers__p1273755417352">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ListDnsServers__p57371054143517">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ListDnsServers__p16737135410352">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ListDnsServers__p1737105417351">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListDnsServers__row9736254113520"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ListDnsServers__p19738155410350">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ListDnsServers__p273817544357">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ListDnsServers__p4738175453510">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ListDnsServers__p4738175463519">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDnsServers__table1273915417353" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="ListDnsServers__row273915545355"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="ListDnsServers__p1873955418351">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="ListDnsServers__p1374065423519">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="ListDnsServers__p1874017543356">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="ListDnsServers__p157401754173519">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListDnsServers__row127393549359"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="ListDnsServers__p177401054163518">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="ListDnsServers__p97411354113514">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="ListDnsServers__p1374135412350">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="ListDnsServers__p87411754103519">Number of records displayed on each page, in the range 1-1024</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row373945483510"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="ListDnsServers__p177411854193518">offset</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="ListDnsServers__p13742145413513">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="ListDnsServers__p1574217545357">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="ListDnsServers__p1674211546355">Offset, which specifies the start position of the record to be returned. The value must be a number no less than 0. The default value is <strong id="ListDnsServers__b117421954193520">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row1173965420357"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="ListDnsServers__p1742185483519">fw_instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="ListDnsServers__p1274213549353">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="ListDnsServers__p9743175412353">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="ListDnsServers__p1374315420356">Firewall instance ID, which is automatically generated after a CFW instance is created. You can obtain the ID by calling the API used for querying a firewall instance. For details, see the API Explorer and Help Center FAQ.By default, if fw_instance_Id is not specified, information about the first firewall under the account is returned. If fw_instance_Id is specified, information about the firewall with this fw_instance_Id is returned.If object_Id is specified, information about the firewall with this object_Id is returned by default. If both fw_instance_Id and object_Id are specified, the specified object_Id must belong to the specified firewall.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row073985483516"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="ListDnsServers__p18743454133511">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="ListDnsServers__p10743125423513">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="ListDnsServers__p18743155403517">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="ListDnsServers__p8744115493520">Enterprise project id, the id generated by the enterprise project after the user supports the enterprise project.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section157441054123513"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDnsServers__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="ListDnsServers__row474535410354"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ListDnsServers__p157451254133512">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ListDnsServers__p674525420352">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ListDnsServers__p6746254203518">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ListDnsServers__p19746165412351">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListDnsServers__row5745185423515"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ListDnsServers__p374612547356">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ListDnsServers__p1174665413511">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ListDnsServers__p13747195483511">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ListDnsServers__p15747175433513">User token. It can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is a token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section1674714542358"><h4 class="sectiontitle">Response Parameters</h4><p id="ListDnsServers__p474755403518"><strong id="ListDnsServers__b9747354163513">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDnsServers__response_HttpGetDnsServersResponseData" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="ListDnsServers__row57481540357"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="ListDnsServers__p374975410358">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="ListDnsServers__p4749185419357">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="ListDnsServers__p127491154103517">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListDnsServers__row7748654123514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListDnsServers__p17750554103515">data</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListDnsServers__p18750175411357">Array of <a href="#ListDnsServers__response_DnsServersResponseDTO">DnsServersResponseDTO</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListDnsServers__p1175165415358">dns server list</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row7748195493519"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ListDnsServers__p167511541357">total</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ListDnsServers__p875115540356">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ListDnsServers__p197521547359">dns server total</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ListDnsServers__response_DnsServersResponseDTO"></a><a name="response_DnsServersResponseDTO"></a><table cellpadding="4" cellspacing="0" summary="" id="ListDnsServers__response_DnsServersResponseDTO" frame="border" border="1" rules="all"><caption><b>Table 5 </b>DnsServersResponseDTO</caption><thead align="left"><tr id="ListDnsServers__row3752554153518"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="ListDnsServers__p127536540353">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="ListDnsServers__p1375615463514">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="ListDnsServers__p775735410352">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListDnsServers__row18753954203513"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListDnsServers__p17574544359">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListDnsServers__p1175715483511">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListDnsServers__p9757754163518">id</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row18753135493514"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListDnsServers__p207581154103518">is_applied</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListDnsServers__p475815417358">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListDnsServers__p19758115410352">Indicates whether to apply. 0: no; 1: yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row137531954123517"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListDnsServers__p1075805414351">is_customized</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListDnsServers__p9759195413517">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListDnsServers__p375905413510">Indicates whether the DNS server is user-defined. 0: no; 1: yes</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row127531543353"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListDnsServers__p187591954153516">server_ip</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListDnsServers__p1975975443516">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListDnsServers__p2760125473517">DNS server IP address</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row775345411358"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ListDnsServers__p17601954133513">health_check_domain_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ListDnsServers__p1076015433517">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ListDnsServers__p16760354143510">health check domain name</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section17761175423513"><h4 class="sectiontitle">Example Requests</h4><p id="ListDnsServers__p15761115493512">Obtain the DNS server list of the project whose ID is 2349ba469daf4b7daf268bb0261d18b0.</p>
|
|
<pre class="screen" id="ListDnsServers__screen19761954203514">https://endpoint/cfw/v1/2349ba469daf4b7daf268bb0261d18b0/dns/servers</pre>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section11761105419353"><h4 class="sectiontitle">Example Responses</h4><p id="ListDnsServers__p4762854163513"><strong id="ListDnsServers__b276219541353">Status code: 200</strong></p>
|
|
<p id="ListDnsServers__p117623542354">Response to the request for obtaining DNS servers</p>
|
|
<pre class="screen" id="ListDnsServers__screen3763155453520">{
|
|
"data" : {
|
|
"data" : [ {
|
|
"health_check_domain_name" : "sslstatic.xiaoyusan.com",
|
|
"id" : 20165,
|
|
"is_applied" : 0,
|
|
"is_customized" : 1,
|
|
"server_ip" : "0.0.0.0"
|
|
}, {
|
|
"health_check_domain_name" : "sslstatic.xiaoyusan.com",
|
|
"id" : 14190,
|
|
"is_applied" : 1,
|
|
"is_customized" : 0,
|
|
"server_ip" : "100.79.1.240"
|
|
} ]
|
|
},
|
|
"total" : 2
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section96461554358"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ListDnsServers__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ListDnsServers__row77901454123512"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ListDnsServers__p1664645563518">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ListDnsServers__p19646165514357">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ListDnsServers__row1879075463516"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListDnsServers__p1964616552354">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListDnsServers__p9646355143517">Response to the request for obtaining DNS servers</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row27902549353"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListDnsServers__p1064625583510">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListDnsServers__p16647155517351">Unauthorized</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row187901554133514"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListDnsServers__p2647115516356">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListDnsServers__p17647115593511">Forbidden</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row11790125413518"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListDnsServers__p19647115533516">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListDnsServers__p1864755520353">Not Found</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ListDnsServers__row5790354123517"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ListDnsServers__p10647195514354">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ListDnsServers__p064765553514">Internal Server Error</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ListDnsServers__section20647205512351"><h4 class="sectiontitle">Error Codes</h4><p id="ListDnsServers__p146477550352">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000006.html">Domain Parse and Domain Set Management</a></div>
|
|
</div>
|
|
</div>
|
|
|