forked from docs/doc-exports
move doc sources to other location Reviewed-by: OpenTelekomCloud Bot <None>
161 lines
12 KiB
HTML
161 lines
12 KiB
HTML
<a name="EN-US_TOPIC_0020212661"></a><a name="EN-US_TOPIC_0020212661"></a>
|
|
|
|
<h1 class="topictitle1">Querying <span id="text19627182014913">ECS</span> NICs</h1>
|
|
<div id="body17780525"><div class="section" id="EN-US_TOPIC_0020212661__section36073588"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212661__p30936422">This API is used to query information about <span id="EN-US_TOPIC_0020212661__text10195172294913">ECS</span> NICs.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212661__section56226836"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212661__p3644418132711">GET /v2.1/{project_id}/servers/{server_id}/os-interface</p>
|
|
<p id="EN-US_TOPIC_0020212661__p1940618356508">GET /v2/{project_id}/servers/{server_id}/os-interface</p>
|
|
<div class="p" id="EN-US_TOPIC_0020212661__p20712133642715"><a href="#EN-US_TOPIC_0020212661__table38523909">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212661__table38523909"></a><a name="table38523909"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212661__table38523909" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212661__row15247616"><th align="left" class="cellrowborder" valign="top" width="16.61%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0020212661__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.54%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0020212661__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.85%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0020212661__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212661__row23712525"><td class="cellrowborder" valign="top" width="16.61%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p41666396">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p19534911">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.85%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212661__row45459464114812"><td class="cellrowborder" valign="top" width="16.61%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p6481999114812">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.54%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p55279920114812">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.85%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p48488537114812">Specifies the <span id="EN-US_TOPIC_0020212661__text129311722194914">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212661__section36279478"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0020212661__p49840382">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212661__section58079852"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0020212661__p205361229162813"><a href="#EN-US_TOPIC_0020212661__table25276401">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212661__table25276401"></a><a name="table25276401"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212661__table25276401" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212661__row30840926"><th align="left" class="cellrowborder" valign="top" width="16.57%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0020212661__p137113478283">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.440000000000001%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0020212661__p748676">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="67.99%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0020212661__p60642794">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212661__row13119252"><td class="cellrowborder" valign="top" width="16.57%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p56026474">interfaceAttachments</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.440000000000001%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p34453949">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="67.99%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p18214233">Specifies <span id="EN-US_TOPIC_0020212661__text0692122316499">ECS</span> NICs. For details, see <a href="#EN-US_TOPIC_0020212661__table49805933">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212661__table49805933"></a><a name="table49805933"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212661__table49805933" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212661__b48938124331">interfaceAttachments</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212661__row9026257"><th align="left" class="cellrowborder" valign="top" width="16.42%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0020212661__p0275155662814">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.479999999999999%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0020212661__p15275145672813">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68.10000000000001%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0020212661__p182751256102814">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212661__row10727144"><td class="cellrowborder" valign="top" width="16.42%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p63592346">port_state</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p13579756">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.10000000000001%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p34639550">Specifies the NIC port status.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212661__row43320496"><td class="cellrowborder" valign="top" width="16.42%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p19299281">fixed_ips</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p55265559">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.10000000000001%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p23274750">Specifies private IP addresses for NICs. For details, see <a href="#EN-US_TOPIC_0020212661__table19750463">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212661__row8146160"><td class="cellrowborder" valign="top" width="16.42%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p55859239">net_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p10966323">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.10000000000001%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p8495130">Specifies the network ID to which the NIC port belongs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212661__row9347313"><td class="cellrowborder" valign="top" width="16.42%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p18934887">port_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p13287175">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.10000000000001%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p22674843">Specifies the ID of the NIC port.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212661__row2747002"><td class="cellrowborder" valign="top" width="16.42%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p21180630">mac_addr</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.479999999999999%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p50770908">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.10000000000001%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p35008393">Specifies the MAC address of the NIC.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212661__table19750463"></a><a name="table19750463"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212661__table19750463" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong>fixed_ips</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212661__row60761195"><th align="left" class="cellrowborder" valign="top" width="16.35%" id="mcps1.3.4.2.4.2.4.1.1"><p id="EN-US_TOPIC_0020212661__p1495811588288">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.6%" id="mcps1.3.4.2.4.2.4.1.2"><p id="EN-US_TOPIC_0020212661__p5958105810282">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="68.05%" id="mcps1.3.4.2.4.2.4.1.3"><p id="EN-US_TOPIC_0020212661__p1495816587288">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212661__row61624137"><td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p25499238">subnet_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.6%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p65213800">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.05%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p27784979">Specifies the subnet of the NIC private IP address.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212661__row48738220"><td class="cellrowborder" valign="top" width="16.35%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212661__p55481787">ip_address</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.6%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212661__p17532027">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="68.05%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212661__p30163672">Specifies the NIC private IP address.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212661__section10941134193415"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0020212661__screen48151939151718">GET https://{endpoint}/v2/{project_id}/servers/{server_id}/os-interface
|
|
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-interface</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212661__section1829831018292"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212661__screen5160296420260">{
|
|
"interfaceAttachments": [
|
|
{
|
|
"port_state": "ACTIVE",
|
|
"fixed_ips": [
|
|
{
|
|
"subnet_id": "f8a6e8f8-c2ec-497c-9f23-da9616de54ef",
|
|
"ip_address": "192.168.1.3"
|
|
}
|
|
],
|
|
"net_id": "3cb9bc59-5699-4588-a4b1-b87f96708bc6",
|
|
"port_id": "ce531f90-199f-48c0-816c-13e38010b442",
|
|
"mac_addr": "fa:16:3e:4c:2c:30"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212661__section52956621"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212661__p44718725">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0020212660.html">NIC Management</a></div>
|
|
</div>
|
|
</div>
|
|
|