doc-exports/docs/vpc/api-ref/vpc_privateip_0003.html
Qin Ying, Fan 310d2d9eb1 VPC API 20230106 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-02-06 08:38:37 +00:00

185 lines
18 KiB
HTML

<a name="vpc_privateip_0003"></a><a name="vpc_privateip_0003"></a>
<h1 class="topictitle1">Querying Private IP Addresses</h1>
<div id="body30539719"><div class="section" id="vpc_privateip_0003__section54434571"><h4 class="sectiontitle">Function</h4><p id="vpc_privateip_0003__p57798198">This API is used to query private IP addresses using search criteria and to display the private IP addresses in a list.</p>
</div>
<div class="section" id="vpc_privateip_0003__section20149094"><h4 class="sectiontitle">URI</h4><p id="vpc_privateip_0003__p5752161663512">GET /v1/{project_id}/subnets/{subnet_id}/privateips</p>
<div class="p" id="vpc_privateip_0003__p146707219355">Example:<pre class="screen" id="vpc_privateip_0003__screen20059395144856">GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips?limit=10&amp;marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d</pre>
</div>
<div class="p" id="vpc_privateip_0003__p1845872643517"><a href="#vpc_privateip_0003__table12098568">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="vpc_privateip_0003__table12098568"></a><a name="table12098568"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_privateip_0003__table12098568" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_privateip_0003__row42283611"><th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.2.4.2.2.5.1.1"><p id="vpc_privateip_0003__p2420499">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.54%" id="mcps1.3.2.4.2.2.5.1.2"><p id="vpc_privateip_0003__p61842715">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.61%" id="mcps1.3.2.4.2.2.5.1.3"><p id="vpc_privateip_0003__p18030025173211">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.120000000000005%" id="mcps1.3.2.4.2.2.5.1.4"><p id="vpc_privateip_0003__p43203995">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_privateip_0003__row9862716"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_privateip_0003__p60682533">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.54%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_privateip_0003__p16338175">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.61%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_privateip_0003__p51145882173211">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_privateip_0003__p10487112">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_privateip_0003__row32261252"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_privateip_0003__p63024590">subnet_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.54%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_privateip_0003__p4718148">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.61%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_privateip_0003__p49175772173211">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_privateip_0003__p44471500173244">Specifies the unique ID of the subnet to which the private IP address belongs.</p>
<p id="vpc_privateip_0003__p3938441164618">If you use the management console, the value of this parameter is the <strong id="vpc_privateip_0003__vpc_subnet01_0002_b195522519461">Network ID</strong> value.</p>
</td>
</tr>
<tr id="vpc_privateip_0003__row33082261"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_privateip_0003__p62417507">marker</p>
</td>
<td class="cellrowborder" valign="top" width="16.54%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_privateip_0003__p22653281">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.61%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_privateip_0003__p23814582173211">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_privateip_0003__p28526205175853">Specifies a resource ID for pagination query, indicating that the query starts from the next record of the specified resource ID.</p>
<p id="vpc_privateip_0003__p538818488578">This parameter can work together with the parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b650614119446">limit</strong>.</p>
<ul id="vpc_privateip_0003__ul12704811125810"><li id="vpc_privateip_0003__vpc_api01_0003_li325418407124">If parameters <strong id="vpc_privateip_0003__vpc_api01_0003_b736582413514">marker</strong> and <strong id="vpc_privateip_0003__vpc_api01_0003_b17435293518">limit</strong> are not passed, resource records on the first page will be returned.</li><li id="vpc_privateip_0003__vpc_api01_0003_li1923817171338">If the parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b1505159195414">marker</strong> is not passed and the value of parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b14146122925417">limit</strong> is set to <strong id="vpc_privateip_0003__vpc_api01_0003_b13594516546">10</strong>, the first 10 resource records will be returned.</li><li id="vpc_privateip_0003__vpc_api01_0003_li2076741203417">If the value of the parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b13589356163415">marker</strong> is set to the resource ID of the 10th record and the value of parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b1557415118357">limit</strong> is set to <strong id="vpc_privateip_0003__vpc_api01_0003_b10574171193511">10</strong>, the 11th to 20th resource records will be returned.</li><li id="vpc_privateip_0003__vpc_api01_0003_li108512113551">If the value of the parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b9403193716543">marker</strong> is set to the resource ID of the 10th record and the parameter <strong id="vpc_privateip_0003__vpc_api01_0003_b10358823165519">limit</strong> is not passed, resource records starting from the 11th records (including 11th) will be returned.</li></ul>
</td>
</tr>
<tr id="vpc_privateip_0003__row39717249"><td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_privateip_0003__p62980604">limit</p>
</td>
<td class="cellrowborder" valign="top" width="16.54%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_privateip_0003__p1155275">No</p>
</td>
<td class="cellrowborder" valign="top" width="18.61%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_privateip_0003__p49933009173211">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="48.120000000000005%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_privateip_0003__p2017153116589">Specifies the number of records that will be returned on each page. The value is from 0 to intmax (2^31-1). The default value is 2000.</p>
<p id="vpc_privateip_0003__p125192338584"><strong id="vpc_privateip_0003__vpc_api01_0003_b7164124258">limit</strong> can be used together with <strong id="vpc_privateip_0003__vpc_api01_0003_b15985310854">marker</strong>. For details, see the parameter description of <strong id="vpc_privateip_0003__vpc_api01_0003_b193281854847">marker</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="vpc_privateip_0003__section47124125"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_privateip_0003__p12766100204221">None</p>
</div>
<div class="section" id="vpc_privateip_0003__section1239113515812"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_privateip_0003__screen275911124121">GET https://{Endpoint}/v1/{project_id}/subnets/{subnet_id}/privateips</pre>
</div>
<div class="section" id="vpc_privateip_0003__section21463943"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_privateip_0003__table16726122155915" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter</caption><thead align="left"><tr id="vpc_privateip_0003__row50660459155915"><th align="left" class="cellrowborder" valign="top" width="18.34%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_privateip_0003__p9856497155915">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_privateip_0003__p42646948155915">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.15%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_privateip_0003__p31850784155915">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_privateip_0003__row29776745155915"><td class="cellrowborder" valign="top" width="18.34%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_privateip_0003__p63106150155915">privateips</p>
</td>
<td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_privateip_0003__p44872862155915">Array of <a href="#vpc_privateip_0003__table21538022">privateip</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="56.15%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_privateip_0003__p30300018155915">Specifies the private IP address objects. For details, see <a href="#vpc_privateip_0003__table21538022">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_privateip_0003__table21538022"></a><a name="table21538022"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_privateip_0003__table21538022" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of the <strong id="vpc_privateip_0003__b1891385519146">privateip</strong> field</caption><thead align="left"><tr id="vpc_privateip_0003__row33313579"><th align="left" class="cellrowborder" valign="top" width="22.17778222177782%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_privateip_0003__p14045344">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.477852214778522%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_privateip_0003__p42744433173254">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.34436556344365%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_privateip_0003__p11033160">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_privateip_0003__row21270730"><td class="cellrowborder" valign="top" width="22.17778222177782%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_privateip_0003__p45207585">status</p>
</td>
<td class="cellrowborder" valign="top" width="21.477852214778522%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_privateip_0003__p39747058173254">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.34436556344365%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_privateip_0003__ul13978236183119"><li id="vpc_privateip_0003__li18977036143113">Specifies the status of the private IP address.</li><li id="vpc_privateip_0003__li1464831917378">Possible values are as follows:<ul id="vpc_privateip_0003__ul948092312377"><li id="vpc_privateip_0003__li882113258373"><strong id="vpc_privateip_0003__b5445142382412">ACTIVE</strong></li><li id="vpc_privateip_0003__li109781336143111"><strong id="vpc_privateip_0003__b1250102492416">DOWN</strong></li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_privateip_0003__row44135236"><td class="cellrowborder" valign="top" width="22.17778222177782%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_privateip_0003__p18184391">id</p>
</td>
<td class="cellrowborder" valign="top" width="21.477852214778522%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_privateip_0003__p65395131173254">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.34436556344365%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_privateip_0003__p47453675">Specifies the ID of the private IP address, which uniquely identifies the private IP address.</p>
</td>
</tr>
<tr id="vpc_privateip_0003__row53320433"><td class="cellrowborder" valign="top" width="22.17778222177782%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_privateip_0003__p23987813">subnet_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.477852214778522%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_privateip_0003__p62514293173254">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.34436556344365%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_privateip_0003__p26383427">Specifies the ID of the subnet from which IP addresses are assigned.</p>
<p id="vpc_privateip_0003__p21021525477">If you use the management console, the value of this parameter is the <strong id="vpc_privateip_0003__vpc_subnet01_0002_b195522519461_1">Network ID</strong> value.</p>
</td>
</tr>
<tr id="vpc_privateip_0003__row8629350181540"><td class="cellrowborder" valign="top" width="22.17778222177782%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_privateip_0003__p22152840181542">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="21.477852214778522%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_privateip_0003__p54098843181542">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.34436556344365%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_privateip_0003__p126338192113">Specifies the project ID.</p>
</td>
</tr>
<tr id="vpc_privateip_0003__row40871974"><td class="cellrowborder" valign="top" width="22.17778222177782%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_privateip_0003__p22295564">device_owner</p>
</td>
<td class="cellrowborder" valign="top" width="21.477852214778522%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_privateip_0003__p30493000173254">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.34436556344365%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_privateip_0003__ul1878734133215"><li id="vpc_privateip_0003__vpc_privateip_0002_li17786143326">Specifies the resource using the private IP address. The parameter is left blank if it is not used.</li><li id="vpc_privateip_0003__vpc_privateip_0002_li1477918321708">The value can be:<p id="vpc_privateip_0003__vpc_privateip_0002_p10169439016"><a name="vpc_privateip_0003__vpc_privateip_0002_li1477918321708"></a><a name="vpc_privateip_0002_li1477918321708"></a><strong id="vpc_privateip_0003__vpc_privateip_0002_b14922833112817">network:dhcp</strong>: DHCP service IP address</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p9319114912010"><strong id="vpc_privateip_0003__vpc_privateip_0002_b516232719316">network:router_interface_distributed</strong>: Gateway IP address</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p13640135315014"><strong id="vpc_privateip_0003__vpc_privateip_0002_b1561710249340">compute:</strong><em id="vpc_privateip_0003__vpc_privateip_0002_i31822893419">xxx</em> (<em id="vpc_privateip_0003__vpc_privateip_0002_i8356152115410">xxx</em> indicates the AZ name. For example, <strong id="vpc_privateip_0003__vpc_privateip_0002_b15139182934119">compute:aa-bb-cc</strong> indicates that the IP address is used by an ECS in the AZ aa-bb-cc.): IP address of an ECS NIC</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p1114618386019"><strong id="vpc_privateip_0003__vpc_privateip_0002_b185025532441">neutron:VIP_PORT</strong>: Virtual IP address</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p118874561018"><strong id="vpc_privateip_0003__vpc_privateip_0002_b13903204615458">neutron:LOADBALANCERV2</strong>: IP address of a shared load balancer</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p132486301410"><strong id="vpc_privateip_0003__vpc_privateip_0002_b926314481472">neutron:LOADBALANCERV3</strong>: IP address of a dedicated load balancer</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p31101816152"><strong id="vpc_privateip_0003__vpc_privateip_0002_b11940171124817">network:endpoint_interface</strong>: IP address of a VPC endpoint</p>
<p id="vpc_privateip_0003__vpc_privateip_0002_p1686083795918"><strong id="vpc_privateip_0003__vpc_privateip_0002_b661815339816">network:nat_gateway</strong>: IP address used by a NAT gateway</p>
</li><li id="vpc_privateip_0003__vpc_privateip_0002_li1578718443216">The value range specifies only the type of private IP addresses supported by the current service.</li></ul>
</td>
</tr>
<tr id="vpc_privateip_0003__row35044283"><td class="cellrowborder" valign="top" width="22.17778222177782%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_privateip_0003__p20014644">ip_address</p>
</td>
<td class="cellrowborder" valign="top" width="21.477852214778522%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_privateip_0003__p54013915173254">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.34436556344365%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_privateip_0003__p57619553">Specifies the assigned private IP address.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_privateip_0003__section863918498811"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_privateip_0003__screen1391598414491">{
"privateips": [
{
"status": "DOWN",
"id": "d600542a-b231-45ed-af05-e9930cb14f78",
"subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd",
"tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
"device_owner": "",
"ip_address": "192.168.1.11"
},
{
"status": "DOWN",
"id": "d600542a-b231-45ed-af05-e9930cb14f79",
"subnet_id": "531dec0f-3116-411b-a21b-e612e42349fd",
"tenant_id": "8b7e35ad379141fc9df3e178bd64f55c",
"device_owner": "",
"ip_address": "192.168.1.12"
}
]
}</pre>
</div>
<div class="section" id="vpc_privateip_0003__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_privateip_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_privateip_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_privateip_0003__p7233105282813">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_privateip_0000.html">Private IP Address</a></div>
</div>
</div>