doc-exports/docs/natgw/api-ref/nat_api_0013.html
Qin Ying, Fan 97c594f41f NATGW API 0930 version
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2022-10-04 12:12:29 +00:00

189 lines
14 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<a name="nat_api_0013"></a><a name="nat_api_0013"></a>
<h1 class="topictitle1">Querying Details About a Specified DNAT Rule</h1>
<div id="body1516089194257"><div class="section" id="nat_api_0013__section242916116504"><h4 class="sectiontitle">Function</h4><p id="nat_api_0013__p24472239165022">This API is used to query details about a specified DNAT rule.</p>
</div>
<div class="section" id="nat_api_0013__section55252672165026"><h4 class="sectiontitle">URI</h4><p id="nat_api_0013__p01205233366">GET /v2.0/dnat_rules/{dnat_rule_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0013__table41603310017" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="nat_api_0013__row323012314017"><th align="left" class="cellrowborder" valign="top" width="21%" id="mcps1.3.2.3.2.5.1.1"><p id="nat_api_0013__p1023043508">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.2.3.2.5.1.2"><p id="nat_api_0013__p1823017318015">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.2.5.1.3"><p id="nat_api_0013__p52301036011">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32%" id="mcps1.3.2.3.2.5.1.4"><p id="nat_api_0013__p7230330014">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nat_api_0013__row9230031106"><td class="cellrowborder" valign="top" width="21%" headers="mcps1.3.2.3.2.5.1.1 "><p id="nat_api_0013__p1823033907">dnat_rule_id</p>
</td>
<td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.2.3.2.5.1.2 "><p id="nat_api_0013__p42301335017">String</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.2.5.1.3 "><p id="nat_api_0013__p623013311018">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="32%" headers="mcps1.3.2.3.2.5.1.4 "><p id="nat_api_0013__p5230735019">Specifies the DNAT rule ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nat_api_0013__section30445355165052"><h4 class="sectiontitle">Request</h4><p id="nat_api_0013__p67080114165059">None</p>
</div>
<div class="section" id="nat_api_0013__section1412948816517"><h4 class="sectiontitle">Response</h4><p id="nat_api_0013__p1894165716361"><a href="#nat_api_0013__table66411570165117">Table 2</a> lists response parameters.</p>
<div class="tablenoborder"><a name="nat_api_0013__table66411570165117"></a><a name="table66411570165117"></a><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0013__table66411570165117" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="nat_api_0013__row43436947165117"><th align="left" class="cellrowborder" valign="top" width="28.000000000000004%" id="mcps1.3.4.3.2.4.1.1"><p id="nat_api_0013__p28731843165117">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38%" id="mcps1.3.4.3.2.4.1.2"><p id="nat_api_0013__p45577964165117">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="34%" id="mcps1.3.4.3.2.4.1.3"><p id="nat_api_0013__p67033414165117">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nat_api_0013__row60997448165117"><td class="cellrowborder" valign="top" width="28.000000000000004%" headers="mcps1.3.4.3.2.4.1.1 "><p id="nat_api_0013__p41846242165117">dnat_rule</p>
</td>
<td class="cellrowborder" valign="top" width="38%" headers="mcps1.3.4.3.2.4.1.2 "><p id="nat_api_0013__p34102461165117">Object</p>
</td>
<td class="cellrowborder" valign="top" width="34%" headers="mcps1.3.4.3.2.4.1.3 "><p id="nat_api_0013__p5298260165117">Specifies the DNAT rule object. For details, see <a href="#nat_api_0013__table9899152414719">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="nat_api_0013__table9899152414719"></a><a name="table9899152414719"></a><table cellpadding="4" cellspacing="0" summary="" id="nat_api_0013__table9899152414719" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of the <strong>dnat_rule</strong> field</caption><thead align="left"><tr id="nat_api_0013__row198997241973"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.4.2.4.1.1"><p id="nat_api_0013__p3368163219712">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.4.2.4.1.2"><p id="nat_api_0013__p23681832770">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.4.4.2.4.1.3"><p id="nat_api_0013__p23681432671">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="nat_api_0013__row88993241676"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p1136816321074">id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p1236803212715">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p636818322071">Specifies the DNAT rule ID.</p>
</td>
</tr>
<tr id="nat_api_0013__row198999241712"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p15368632273">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p6368132672">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p4368193211713">Specifies the project ID.</p>
</td>
</tr>
<tr id="nat_api_0013__row18993246715"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p10368143213712">nat_gateway_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p03681132579">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p0368163220715">Specifies the NAT gateway ID.</p>
</td>
</tr>
<tr id="nat_api_0013__row1899924074"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p0368183220715">port_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p12368932672">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p3368132676">Specifies the port ID of an ECS or a BMS.</p>
</td>
</tr>
<tr id="nat_api_0013__row38991524672"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p836823213715">private_ip</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p1636843210716">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p2036803210718">Specifies the private IP address, for example, the IP address of a Direct Connect connection.</p>
</td>
</tr>
<tr id="nat_api_0013__row48998241373"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p936811322076">internal_service_port</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p6368153211712">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p15368123218715">Specifies the port used by ECSs or BMSs to provide services for external systems.</p>
</td>
</tr>
<tr id="nat_api_0013__row1789914241878"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p43681532970">floating_ip_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p123684326717">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p93683323710">Specifies the EIP ID.</p>
</td>
</tr>
<tr id="nat_api_0013__row7899102413716"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p1336843213714">floating_ip_address</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p536820321572">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p193681532072">Specifies the EIP.</p>
</td>
</tr>
<tr id="nat_api_0013__row889916241373"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p73686321175">external_service_port</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p1836813210719">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p73683325711">Specifies the port for providing external services.</p>
</td>
</tr>
<tr id="nat_api_0013__row489932414710"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p17368232474">protocol</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p163683321719">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p336893219716">Specifies the protocol type. Currently, TCP, UDP, and ANY are supported.</p>
<p id="nat_api_0013__p9368432271">The protocol number of TCP, UDP, and ANY are 6, 17, and 0, respectively.</p>
</td>
</tr>
<tr id="nat_api_0013__row389917241879"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p1736833215711">status</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p736853214714">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><ul id="nat_api_0013__ul113681321476"><li id="nat_api_0013__li23686321677">Specifies the status of the DNAT rule.</li><li id="nat_api_0013__li73680321178">For details about all its values, see <a href="nat_api_0042.html#nat_api_0042__table1390614366107">Table 1</a>.</li></ul>
</td>
</tr>
<tr id="nat_api_0013__row1589910244715"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p1836883218715">admin_state_up</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p1764614265487">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><ul id="nat_api_0013__ul71858556358"><li id="nat_api_0013__li132051838164415">Specifies whether the DNAT rule is enabled or disabled.</li><li id="nat_api_0013__li12205203804411">The value can be:<ul id="nat_api_0013__ul16205638124410"><li id="nat_api_0013__li16206163884415"><strong id="nat_api_0013__b11463142018248">true</strong>: The DNAT rule is enabled.</li><li id="nat_api_0013__li102063382449"><strong id="nat_api_0013__b15330112114246">false</strong>: The DNAT rule is disabled.</li></ul>
</li></ul>
</td>
</tr>
<tr id="nat_api_0013__row28997241277"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.1 "><p id="nat_api_0013__p13368332977">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.2 "><p id="nat_api_0013__p136853217716">String</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.4.4.2.4.1.3 "><p id="nat_api_0013__p15924948201">Specifies when the DNAT rule is created (UTC time). Its value rounds to 6 decimal places for seconds. The format is yyyy-mm-dd hh:mm:ss.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="nat_api_0013__section24779297165121"><h4 class="sectiontitle">Examples</h4><ul id="nat_api_0013__ul154015313815"><li id="nat_api_0013__li14401173113815">Example request<pre class="screen" id="nat_api_0013__screen4581931716528">GET https://{Endpoint}/v2.0/dnat_rules/5b95c675-69c2-4656-ba06-58ff72e1d338</pre>
</li></ul>
</div>
<ul id="nat_api_0013__ul630711943817"><li id="nat_api_0013__li830741910389">Example response<pre class="screen" id="nat_api_0013__screen5823434163811">{
  "dnat_rule": {
  "floating_ip_id": "bf99c679-9f41-4dac-8513-9c9228e713e1",
   "status": "ACTIVE",
  "nat_gateway_id": "cda3a125-2406-456c-a11f-598e10578541",
   "admin_state_up": true,
   "port_id": "9a469561-daac-4c94-88f5-39366e5ea193",
  "internal_service_port": 993,
  "protocol": "TCP",
  "tenant_id": "abc",
  "created_at": "2017-11-15 15:44:42.595173",
  "id": "79195d50-0271-41f1-bded-4c089b2502ff",
  "floating_ip_address": "5.21.11.226",
   "external_service_port": 242
  "private_ip": ""
}
}</pre>
</li></ul>
<div class="section" id="nat_api_0013__section16249219165526"><h4 class="sectiontitle">Status Code</h4><p id="nat_api_0013__p6178266195956">See <a href="nat_api_0038.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="nat_api_0010.html">DNAT Rules</a></div>
</div>
</div>