doc-exports/docs/ecs/api-ref/en-us_topic_0020212662.html
Artem Goncharov 3196b64bfc
move doc sources to other location (#3)
move doc sources to other location

Reviewed-by: OpenTelekomCloud Bot <None>
2022-04-27 16:24:25 +00:00

167 lines
12 KiB
HTML

<a name="EN-US_TOPIC_0020212662"></a><a name="EN-US_TOPIC_0020212662"></a>
<h1 class="topictitle1">Querying NICs of an <span id="text1973402413494">ECS</span></h1>
<div id="body9540645"><div class="section" id="EN-US_TOPIC_0020212662__section44739342"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212662__p34594790">This API is used to query NICs of an <span id="EN-US_TOPIC_0020212662__text1275011137506">ECS</span> based on the NIC ID.</p>
</div>
<div class="section" id="EN-US_TOPIC_0020212662__section901"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212662__p3994129182710">GET /v2.1/{project_id}/servers/{server_id}/os-interface/{id}</p>
<p id="EN-US_TOPIC_0020212662__p1465518385113">GET /v2/{project_id}/servers/{server_id}/os-interface/{id}</p>
<div class="p" id="EN-US_TOPIC_0020212662__p314332920296"><a href="#EN-US_TOPIC_0020212662__table25654779">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212662__table25654779"></a><a name="table25654779"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212662__table25654779" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212662__row30661937"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0020212662__p5187119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.36%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0020212662__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_0020212662__p8497414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212662__row52467932"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p22044110">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p40742509">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_0020212662__p37593705">Specifies the project ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row3850232617435"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p3575612917451">server_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p1056536017451">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_0020212662__p5048782717451">Specifies the <span id="EN-US_TOPIC_0020212662__text145733214343">ECS</span> ID.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row39171493"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p18774354">id</p>
</td>
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p44327687">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_0020212662__p21064308">Specifies the port ID of the NIC.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020212662__section8117"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0020212662__p58606859">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0020212662__section73053"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0020212662__p1085318159307"><a href="#EN-US_TOPIC_0020212662__table59131099">Table 2</a> describes the response parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212662__table59131099"></a><a name="table59131099"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212662__table59131099" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212662__row30342446"><th align="left" class="cellrowborder" valign="top" width="17.1%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0020212662__p41819089">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.48%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0020212662__p34008447">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="65.42%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0020212662__p3220827">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212662__row59560431"><td class="cellrowborder" valign="top" width="17.1%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p59665636">interfaceAttachment</p>
</td>
<td class="cellrowborder" valign="top" width="17.48%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p20239120">Object</p>
</td>
<td class="cellrowborder" valign="top" width="65.42%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p86059257225">Specifies <span id="EN-US_TOPIC_0020212662__text1101936153412">ECS</span> NICs. For details, see <a href="#EN-US_TOPIC_0020212662__table24005299">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212662__table24005299"></a><a name="table24005299"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212662__table24005299" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212662__b11430954153420">interfaceAttachment</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212662__row46441279"><th align="left" class="cellrowborder" valign="top" width="17.04%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0020212662__p174601748143018">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.419999999999998%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0020212662__p15460748163010">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="65.53999999999999%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0020212662__p10460248123010">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212662__row64586077"><td class="cellrowborder" valign="top" width="17.04%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p64089786">port_state</p>
</td>
<td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p56055356">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.53999999999999%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p62165703">Specifies the NIC port status.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row22620416"><td class="cellrowborder" valign="top" width="17.04%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p20314447">fixed_ips</p>
</td>
<td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p4888719">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="65.53999999999999%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p7106508">Specifies IP addresses for NICs. For details, see <a href="#EN-US_TOPIC_0020212662__table53180163">Table 4</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row63958576"><td class="cellrowborder" valign="top" width="17.04%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p13262169">net_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p40009126">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.53999999999999%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p41406050">Specifies the network ID to which the NIC port belongs.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row37110132"><td class="cellrowborder" valign="top" width="17.04%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p53130720">port_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p27217289">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.53999999999999%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p44289360">Specifies the ID of the NIC port.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row63059925"><td class="cellrowborder" valign="top" width="17.04%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p7580267">mac_addr</p>
</td>
<td class="cellrowborder" valign="top" width="17.419999999999998%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p6466753">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.53999999999999%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p16643039">Specifies the MAC address of the NIC.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212662__table53180163"></a><a name="table53180163"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212662__table53180163" 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_0020212662__row34896342"><th align="left" class="cellrowborder" valign="top" width="17.169999999999998%" id="mcps1.3.4.2.4.2.4.1.1"><p id="EN-US_TOPIC_0020212662__p10906155214308">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.36%" id="mcps1.3.4.2.4.2.4.1.2"><p id="EN-US_TOPIC_0020212662__p1490615524301">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="65.47%" id="mcps1.3.4.2.4.2.4.1.3"><p id="EN-US_TOPIC_0020212662__p129069520307">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212662__row66523006"><td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p64293480112230">subnet_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p40389402112230">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.47%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p50192196112230">Specifies the ID of the subnet used by the NIC. </p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212662__row12592542"><td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212662__p15780700112230">ip_address</p>
</td>
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212662__p3168304112230">String</p>
</td>
<td class="cellrowborder" valign="top" width="65.47%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212662__p27992537112230">Specifies the NIC IP address.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020212662__section132471610203513"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0020212662__screen0751239171811">GET https://{endpoint}/v2/{project_id}/servers/{server_id}/os-interface/{id}
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-interface/{id}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0020212662__section1032435683014"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212662__screen29667905202623">{
"interfaceAttachment":
{
"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_0020212662__section657479"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212662__p59206997">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>