doc-exports/docs/vpc/api-ref/vpc_api01_0002.html
Qin Ying, Fan 7e6f07b803 VPC API 20240320 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-09-05 12:25:23 +00:00

204 lines
17 KiB
HTML

<a name="vpc_api01_0002"></a><a name="vpc_api01_0002"></a>
<h1 class="topictitle1">Querying VPC Details</h1>
<div id="body36453319"><div class="section" id="vpc_api01_0002__section48604061"><h4 class="sectiontitle">Function</h4><p id="vpc_api01_0002__p67037712">This API is used to query details about a VPC.</p>
</div>
<div class="section" id="vpc_api01_0002__section34783366"><h4 class="sectiontitle">URI</h4><p id="vpc_api01_0002__p103851744193811">GET /v1/{project_id}/vpcs/{vpc_id}</p>
<div class="p" id="vpc_api01_0002__p18343856192114"><a href="#vpc_api01_0002__table26431778">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="vpc_api01_0002__table26431778"></a><a name="table26431778"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_api01_0002__table26431778" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_api01_0002__row38955607"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.2.2.4.1.1"><p id="vpc_api01_0002__p1287621">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.2.2.4.1.2"><p id="vpc_api01_0002__p37188451">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.2.2.4.1.3"><p id="vpc_api01_0002__p59474521">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_api01_0002__row52706896"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="vpc_api01_0002__p41400175">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="vpc_api01_0002__p65079903">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="vpc_api01_0002__p10487112">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_api01_0002__row64391817"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.1 "><p id="vpc_api01_0002__p48354649">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.2 "><p id="vpc_api01_0002__p24412469">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.2.2.4.1.3 "><p id="vpc_api01_0002__p31252998">Specifies the VPC ID, which uniquely identifies the VPC.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="vpc_api01_0002__section44614845"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_api01_0002__p60400126203515">None</p>
</div>
<div class="section" id="vpc_api01_0002__section465634702710"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_api01_0002__screen1429785374713">GET https://{Endpoint}/v1/{project_id}/vpcs/99d9d709-8478-4b46-9f3f-2206b1023fd3</pre>
</div>
<div class="section" id="vpc_api01_0002__section65989290"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_api01_0002__table574587231556" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_api01_0002__row118397001556"><th align="left" class="cellrowborder" valign="top" width="18.34%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_api01_0002__p194916751556">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.16%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_api01_0002__p424939721556">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.49999999999999%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_api01_0002__p194597361556">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_api01_0002__row327347841556"><td class="cellrowborder" valign="top" width="18.34%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_api01_0002__p342718611556">vpc</p>
</td>
<td class="cellrowborder" valign="top" width="24.16%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_api01_0002__p41691159213"><a href="#vpc_api01_0002__table1945411214515">vpc</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="57.49999999999999%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_api01_0002__p652911041556"><a href="#vpc_api01_0002__table1945411214515">Specifies the VPC objects.</a></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_api01_0002__table1945411214515"></a><a name="table1945411214515"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_api01_0002__table1945411214515" frame="border" border="1" rules="all"><caption><b>Table 3 </b>VPC objects</caption><thead align="left"><tr id="vpc_api01_0002__row15454222515"><th align="left" class="cellrowborder" valign="top" width="21.66%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_api01_0002__p164549255115"><strong id="vpc_api01_0002__b222394852013">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.32%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_api01_0002__p15454182165114">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.02%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_api01_0002__p1045413215513">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_api01_0002__row1945414213517"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p64541721513">id</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p134540217519">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_api01_0002__p17454223516">Specifies a resource ID in UUID format.</p>
</td>
</tr>
<tr id="vpc_api01_0002__row54543212511"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p1145412211516">name</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p645413265113">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul951112614463"><li id="vpc_api01_0002__li0511326144618">Specifies the VPC name.</li><li id="vpc_api01_0002__li1511202620460">The value can contain no more than 64 characters, including letters, digits, underscores (_), hyphens (-), and periods (.).</li><li id="vpc_api01_0002__li1751182634613">Each VPC name of a tenant must be unique if the VPC name is not left blank.</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row57274330378"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p572773313373">description</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p272783315379">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul621614305363"><li id="vpc_api01_0002__li821714307365">Provides supplementary information about the VPC.</li><li id="vpc_api01_0002__li699072618918">The value can contain no more than 255 characters and cannot contain angle brackets (&lt; or &gt;).</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row445515275116"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p545592185110">cidr</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p745592125117">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul10389173917465"><li id="vpc_api01_0002__li1389739194615">Specifies the available IP address ranges for subnets in the VPC.</li><li id="vpc_api01_0002__li10294123376">Possible values are as follows:<ul id="vpc_api01_0002__vpc_api01_0001_ul53161626155413"><li id="vpc_api01_0002__vpc_api01_0001_li19197628192317">10.0.0.0/8-24</li><li id="vpc_api01_0002__vpc_api01_0001_li181981528172314">172.16.0.0/12-24</li><li id="vpc_api01_0002__vpc_api01_0001_li51911853165015">192.168.0.0/16-24</li></ul>
</li><li id="vpc_api01_0002__li898228181014">If <strong id="vpc_api01_0002__b123151546173110">cidr</strong> is not specified, the default value is left blank.</li><li id="vpc_api01_0002__li138920394463">The value must be in CIDR format, for example, <strong id="vpc_api01_0002__b785094873120">192.168.0.0/16</strong>.</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row645513212511"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p124551621516">status</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p1545552115110">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul74552213513"><li id="vpc_api01_0002__li54552219516">Specifies the VPC status.</li><li id="vpc_api01_0002__li1638165285418">Possible values are as follows:<ul id="vpc_api01_0002__ul5890854165417"><li id="vpc_api01_0002__li1065610385510"><strong id="vpc_api01_0002__b11671325184317">CREATING</strong>: The VPC is being created.</li><li id="vpc_api01_0002__li1545513255116"><strong id="vpc_api01_0002__b7480226204319">OK</strong>: The VPC is created successfully.</li></ul>
</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row134563245111"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p145614219511">routes</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p539717333282">Array of <a href="#vpc_api01_0002__table3576833291556">route</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul34563265116"><li id="vpc_api01_0002__li64561021518">Specifies the route information.</li><li id="vpc_api01_0002__li1945615217515">For details, see the description of the <a href="#vpc_api01_0002__table3576833291556">route objects</a>.</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row14561326518"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p114561520515">enable_shared_snat</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p5456112185112">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_api01_0002__p204561128510">Specifies whether the shared SNAT function is enabled. The value <strong id="vpc_api01_0002__b84235270612178">true</strong> indicates that the function is enabled, and the value <strong id="vpc_api01_0002__b84235270614243">false</strong> indicates that the function is not enabled.</p>
</td>
</tr>
<tr id="vpc_api01_0002__row1345682125118"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p14456162195113">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p24567210516">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul44565215110"><li id="vpc_api01_0002__li84562027511">Enterprise project ID</li><li id="vpc_api01_0002__li6456132115115">The value is <strong id="vpc_api01_0002__b037494103616">0</strong> or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value <strong id="vpc_api01_0002__b11031465361">0</strong> indicates the default enterprise project.</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row183849182339"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p8425113511211">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p1342543532116">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul19395194813569"><li id="vpc_api01_0002__li139511483567">Project ID</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row2384518113311"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p106711441172119">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p867112418216">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul13463133512"><li id="vpc_api01_0002__li114610173513">Time (UTC) when the VPC is created.</li><li id="vpc_api01_0002__li84711133511">Format: <em id="vpc_api01_0002__i202621315142814">yyyy-MM-ddTHH:mm:ss</em></li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row11385131893312"><td class="cellrowborder" valign="top" width="21.66%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_api01_0002__p96711541192118">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="20.32%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_api01_0002__p1467116412217">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.02%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_api01_0002__ul9899124133520"><li id="vpc_api01_0002__li128991544351">Specifies the time (UTC) when the VPC is updated.</li><li id="vpc_api01_0002__li989913413351">Format: <em id="vpc_api01_0002__i431918532916">yyyy-MM-ddTHH:mm:ss</em></li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_api01_0002__table3576833291556"></a><a name="table3576833291556"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_api01_0002__table3576833291556" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_api01_0002__b188651704014">route</strong> objects</caption><thead align="left"><tr id="vpc_api01_0002__row921218691556"><th align="left" class="cellrowborder" valign="top" width="18.34%" id="mcps1.3.5.4.2.4.1.1"><p id="vpc_api01_0002__p798956991556">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.38%" id="mcps1.3.5.4.2.4.1.2"><p id="vpc_api01_0002__p754435891556">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.28%" id="mcps1.3.5.4.2.4.1.3"><p id="vpc_api01_0002__p711326791556">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_api01_0002__row3930377391556"><td class="cellrowborder" valign="top" width="18.34%" headers="mcps1.3.5.4.2.4.1.1 "><p id="vpc_api01_0002__p2948903591556">destination</p>
</td>
<td class="cellrowborder" valign="top" width="22.38%" headers="mcps1.3.5.4.2.4.1.2 "><p id="vpc_api01_0002__p270722191556">String</p>
</td>
<td class="cellrowborder" valign="top" width="59.28%" headers="mcps1.3.5.4.2.4.1.3 "><ul id="vpc_api01_0002__ul15801323493"><li id="vpc_api01_0002__li6801326495">Specifies the destination network segment of a route.</li><li id="vpc_api01_0002__li1780163264916">Constraints: The value must be in the CIDR format. IPv4 and IPv6 CIDR formats are supported.</li></ul>
</td>
</tr>
<tr id="vpc_api01_0002__row6565233911054"><td class="cellrowborder" valign="top" width="18.34%" headers="mcps1.3.5.4.2.4.1.1 "><p id="vpc_api01_0002__p1623922311054">nexthop</p>
</td>
<td class="cellrowborder" valign="top" width="22.38%" headers="mcps1.3.5.4.2.4.1.2 "><p id="vpc_api01_0002__p4377761311054">String</p>
</td>
<td class="cellrowborder" valign="top" width="59.28%" headers="mcps1.3.5.4.2.4.1.3 "><ul id="vpc_api01_0002__ul1344883624911"><li id="vpc_api01_0002__li1544853613498">Specifies the next hop of a route.</li><li id="vpc_api01_0002__li7448236164913">The value must be an IP address from the subnet of the VPC. IPv4 and IPv6 addresses are supported.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_api01_0002__section16623931936"><h4 class="sectiontitle">Example Response</h4><div class="p" id="vpc_api01_0002__p41419218319"><pre class="screen" id="vpc_api01_0002__screen86310181732">{
"vpc": {
"id": "99d9d709-8478-4b46-9f3f-2206b1023fd3",
"name": "vpc",
"description": "test",
"cidr": "192.168.0.0/16",
"status": "OK",
"enterprise_project_id": "0" ,
"routes": [],
"enable_shared_snat": false,
"tenant_id": "087679f0aa80d32a2f4ec0172f5e902b",
"created_at": "2022-12-15T02:25:11",
"updated_at": "2022-12-15T02:25:11"
}
}</pre>
</div>
</div>
<div class="section" id="vpc_api01_0002__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_api01_0002__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_api01_0002__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_api01_0002__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_api01_0000.html">Virtual Private Cloud</a></div>
</div>
</div>