forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
178 lines
14 KiB
HTML
178 lines
14 KiB
HTML
<a name="EN-US_TOPIC_0020212663"></a><a name="EN-US_TOPIC_0020212663"></a>
|
|
|
|
<h1 class="topictitle1">Adding NICs to an <span id="text37715422316">ECS</span> in a Batch</h1>
|
|
<div id="body35960896"><div class="section" id="EN-US_TOPIC_0020212663__section36695198"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212663__p27151449">This API is used to add one or multiple NICs to an <span id="EN-US_TOPIC_0020212663__text15477134303113">ECS</span>.</p>
|
|
<p id="EN-US_TOPIC_0020212663__p37691068166">This API is an asynchronous API. After the NIC adding request is successfully delivered, a job ID is returned. This does not mean the NIC adding is complete. You need to call the API by referring to <a href="en-us_topic_0022225398.html">Querying Task Execution Status</a> to query the job status. The SUCCESS status indicates that the NIC adding is successful.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__section61821327"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212663__p26146718161035">POST /v1/{project_id}/cloudservers/{server_id}/nics</p>
|
|
<div class="p" id="EN-US_TOPIC_0020212663__p1654115371603"><a href="#EN-US_TOPIC_0020212663__table54800025">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212663__table54800025"></a><a name="table54800025"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212663__table54800025" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212663__row14870565"><th align="left" class="cellrowborder" valign="top" width="16.6%" id="mcps1.3.2.3.2.2.4.1.1"><p id="EN-US_TOPIC_0020212663__p63665103">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.16%" id="mcps1.3.2.3.2.2.4.1.2"><p id="EN-US_TOPIC_0020212663__p56599738">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="66.24%" id="mcps1.3.2.3.2.2.4.1.3"><p id="EN-US_TOPIC_0020212663__p21176078">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212663__row37540721"><td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212663__p20899598">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.16%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212663__p15145867">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="66.24%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212663__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212663__row35483542"><td class="cellrowborder" valign="top" width="16.6%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212663__p55594619">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.16%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212663__p6870268">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="66.24%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212663__p19620867">Specifies the <span id="EN-US_TOPIC_0020212663__text18219155491319">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__section19521038"><h4 class="sectiontitle">Request</h4><div class="p" id="EN-US_TOPIC_0020212663__p9206111517113"><a href="#EN-US_TOPIC_0020212663__table23831236">Table 2</a> describes the request parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212663__table23831236"></a><a name="table23831236"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212663__table23831236" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212663__row62644428"><th align="left" class="cellrowborder" valign="top" width="16.54%" id="mcps1.3.3.2.2.2.5.1.1"><p id="EN-US_TOPIC_0020212663__p41033878">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.3.2.2.2.5.1.2"><p id="EN-US_TOPIC_0020212663__p35409804">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.71%" id="mcps1.3.3.2.2.2.5.1.3"><p id="EN-US_TOPIC_0020212663__p49621912">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.459999999999994%" id="mcps1.3.3.2.2.2.5.1.4"><p id="EN-US_TOPIC_0020212663__p59951903">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212663__row24265995"><td class="cellrowborder" valign="top" width="16.54%" headers="mcps1.3.3.2.2.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__p19388612">nics</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.3.2.2.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__p26973745">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.71%" headers="mcps1.3.3.2.2.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__p37389755">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.459999999999994%" headers="mcps1.3.3.2.2.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__p10932885">Specifies the NICs to be added. For details, see <a href="#EN-US_TOPIC_0020212663__table58396974">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212663__table58396974"></a><a name="table58396974"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212663__table58396974" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212663__b5707105113328">nics</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212663__row66803900"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.3.2.3.2.5.1.1"><p id="EN-US_TOPIC_0020212663__p1423511508114">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.3.2.3.2.5.1.2"><p id="EN-US_TOPIC_0020212663__p142352508112">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.3.2.3.2.5.1.3"><p id="EN-US_TOPIC_0020212663__p12235450218">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53%" id="mcps1.3.3.2.3.2.5.1.4"><p id="EN-US_TOPIC_0020212663__p10235165010113">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212663__row19299134"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__p19726002">subnet_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__p54302323">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__p36412008">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__p52170790174229">Specifies the information about the NICs to be added to an <span id="EN-US_TOPIC_0020212663__text920551183115">ECS</span>.</p>
|
|
<p id="EN-US_TOPIC_0020212663__p43287089174217">The value must be the ID of a created network in UUID format.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212663__row58738960"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__p60235282">security_groups</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__p47219689">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__p66698493">Array of objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__p36384226">Specifies the security groups for NICs. For details, see <a href="#EN-US_TOPIC_0020212663__table16100147">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212663__row29643385104818"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__p65463874104818">ip_address</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__p973617104818">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__p11754185104818">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__p12564913104818">Specifies the IP address. If this parameter is unavailable, the IP address is automatically assigned.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212663__row12951125773012"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p12341419175713">ipv6_enable</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p677791510531">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p47771915145316">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p17772182665418">Indicates whether to support IPv6 addresses.</p>
|
|
<p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p1400636175415">If this parameter is set to <strong id="EN-US_TOPIC_0020212663__b842352706145641">true</strong>, the NIC supports IPv6 addresses.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212663__row119501357103010"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p136741056145715">ipv6_bandwidth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p76741256185711">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p1267412565578">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__en-us_topic_0020212668_p4674125655719">Specifies the bound shared bandwidth. For details, see <a href="en-us_topic_0167957246.html#EN-US_TOPIC_0167957246__section2872318176">ipv6_bandwidth Field Description</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212663__table16100147"></a><a name="table16100147"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212663__table16100147" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="EN-US_TOPIC_0020212663__b16421623816">security_groups</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212663__row24331897"><th align="left" class="cellrowborder" valign="top" width="16.54%" id="mcps1.3.3.2.4.2.5.1.1"><p id="EN-US_TOPIC_0020212663__p93384531019">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.3.2.4.2.5.1.2"><p id="EN-US_TOPIC_0020212663__p16355135315116">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.719999999999999%" id="mcps1.3.3.2.4.2.5.1.3"><p id="EN-US_TOPIC_0020212663__p16355953418">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.449999999999996%" id="mcps1.3.3.2.4.2.5.1.4"><p id="EN-US_TOPIC_0020212663__p103559531511">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212663__row8500244"><td class="cellrowborder" valign="top" width="16.54%" headers="mcps1.3.3.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0020212663__p17431163">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.3.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0020212663__p2638090">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.719999999999999%" headers="mcps1.3.3.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0020212663__p12358762">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.449999999999996%" headers="mcps1.3.3.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0020212663__p16950236">Specifies the ID of the security group.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__section41471619"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0020212663__p8691069">See <a href="en-us_topic_0022067714.html">Responses (Task)</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__section1912511011213"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0020212663__p3100181652418">Add the NIC whose ID is <strong id="EN-US_TOPIC_0020212663__b47232663413">d32019d3-bc6e-4319-9c1d-6722fc136a23</strong> and security group ID is <strong id="EN-US_TOPIC_0020212663__b183731712173414">f0ac4394-7e4a-4409-9701-ba8be283dbc3</strong> to an ECS.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0020212663__screen7049587202642">POST https://{endpoint}/v1/{project_id}/cloudservers/{server_id}/nics
|
|
|
|
{
|
|
"nics": [
|
|
{
|
|
"subnet_id": "d32019d3-bc6e-4319-9c1d-6722fc136a23",
|
|
"security_groups": [
|
|
{
|
|
"id": "f0ac4394-7e4a-4409-9701-ba8be283dbc3"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__section120154513611"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212663__screen319614174326">{
|
|
"job_id": "ff80808288d41e1b018990260955686a"
|
|
} </pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__en-us_topic_0092803065_en-us_topic_0020212692_section22960139"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212663__en-us_topic_0092803065_en-us_topic_0020212692_p23670760">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212663__en-us_topic_0092803065_en-us_topic_0067161469_en-us_topic_0057973179_section23611955"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0020212663__p1132210331265">See <a href="en-us_topic_0022067717.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0124385012.html">NIC Management</a></div>
|
|
</div>
|
|
</div>
|
|
|