doc-exports/docs/vpc/api-ref/vpc_peering_0004.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

160 lines
13 KiB
HTML

<a name="vpc_peering_0004"></a><a name="vpc_peering_0004"></a>
<h1 class="topictitle1">Accepting a VPC Peering Connection</h1>
<div id="body1504753416893"><div class="section" id="vpc_peering_0004__section33324291770"><h4 class="sectiontitle">Function</h4><p id="vpc_peering_0004__p44722291071">After tenant A requests to create a VPC peering connection with a VPC of tenant B, the VPC peering connection takes effect only after tenant B accepts the request. This API is used by a tenant to accept a VPC peering connection request initiated by another tenant.</p>
</div>
<div class="section" id="vpc_peering_0004__section93331298714"><h4 class="sectiontitle">URI</h4><p id="vpc_peering_0004__p1183874691917">PUT /v2.0/vpc/peerings/{peering_id}/accept</p>
<div class="p" id="vpc_peering_0004__p1399515108616"><a href="#vpc_peering_0004__table18880184689">Table 1</a> describes the parameters.
<div class="tablenoborder"><a name="vpc_peering_0004__table18880184689"></a><a name="table18880184689"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_peering_0004__table18880184689" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_peering_0004__row13968641385"><th align="left" class="cellrowborder" valign="top" width="22.222222222222225%" id="mcps1.3.2.3.2.2.5.1.1"><p id="vpc_peering_0004__p209684410817"><strong id="vpc_peering_0004__b842352706195711">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14141414141414%" id="mcps1.3.2.3.2.2.5.1.2"><p id="vpc_peering_0004__p69681441386"><strong id="vpc_peering_0004__b84235270615219">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.27272727272727%" id="mcps1.3.2.3.2.2.5.1.3"><p id="vpc_peering_0004__p1096813412811"><strong id="vpc_peering_0004__b842352706145623">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.36363636363636%" id="mcps1.3.2.3.2.2.5.1.4"><p id="vpc_peering_0004__p139686416813"><strong id="vpc_peering_0004__b8423527061645">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_peering_0004__row19681041189"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.3.2.2.5.1.1 "><p id="vpc_peering_0004__p1013244217196">peering_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.3.2.2.5.1.2 "><p id="vpc_peering_0004__p1797015416817">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.3.2.2.5.1.3 "><p id="vpc_peering_0004__p19701411813">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.3.2.2.5.1.4 "><p id="vpc_peering_0004__p109701641488">Specifies the VPC peering connection ID, which uniquely identifies the VPC peering connection.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="vpc_peering_0004__section933915291717"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_peering_0004__p34023142112">None</p>
</div>
<div class="section" id="vpc_peering_0004__section468721172414"><h4 class="sectiontitle">Example Request</h4><ul id="vpc_peering_0004__ul107041325102412"><li id="vpc_peering_0004__li5704172512245">Accept the VPC peering connection request from 22b76469-08e3-4937-8c1d-7aad34892be1.<pre class="screen" id="vpc_peering_0004__screen184741298712">PUT https://{Endpoint}/v2.0/vpc/peerings/22b76469-08e3-4937-8c1d-7aad34892be1/accept</pre>
</li></ul>
</div>
<div class="section" id="vpc_peering_0004__section334002913710"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_peering_0004__table14258131481112" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_peering_0004__row1525861441116"><th align="left" class="cellrowborder" valign="top" width="32.81%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_peering_0004__p625881431111"><strong id="vpc_peering_0004__b4438831711">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.43%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_peering_0004__p325891414115"><strong id="vpc_peering_0004__b122511157177">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.76%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_peering_0004__p1325811410110"><strong id="vpc_peering_0004__b4673191801718">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_peering_0004__row195391034944"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p1053943410414">id</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p753963414417">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p17539123411413">Specifies the VPC peering connection ID.</p>
</td>
</tr>
<tr id="vpc_peering_0004__row6258114111117"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p2258514141119">name</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p172581414111119">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p225811149115">Specifies the VPC peering connection name.</p>
</td>
</tr>
<tr id="vpc_peering_0004__row45401734847"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p354083416417">status</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p11540034946">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p11298143785016">Specifies the VPC peering connection status. Possible values are as follows:</p>
<ul id="vpc_peering_0004__ul6640134318521"><li id="vpc_peering_0004__li146411343125218"><strong id="vpc_peering_0004__b91082154229">PENDING_ACCEPTANCE</strong></li><li id="vpc_peering_0004__li186411432525"><strong id="vpc_peering_0004__b454961722215">REJECTED</strong></li><li id="vpc_peering_0004__li1164164315525"><strong id="vpc_peering_0004__b6625121892211">EXPIRED</strong></li><li id="vpc_peering_0004__li146411643165213"><strong id="vpc_peering_0004__b18918121962210">DELETED</strong></li><li id="vpc_peering_0004__li10641443115215"><strong id="vpc_peering_0004__b1087352072210">ACTIVE</strong></li></ul>
</td>
</tr>
<tr id="vpc_peering_0004__row925801431119"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p825911451110">request_vpc_info</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p1425911414113"><a href="#vpc_peering_0004__table1125991417114">vpc_info</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p12259181441112">Specifies information about the local VPC. For details, see <a href="#vpc_peering_0004__table1125991417114">Table 3</a>.</p>
</td>
</tr>
<tr id="vpc_peering_0004__row0259161401118"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p725941415110">accept_vpc_info</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p14259111441119"><a href="#vpc_peering_0004__table1125991417114">vpc_info</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p1225921416112">Specifies information about the peer VPC. For details, see <a href="#vpc_peering_0004__table1125991417114">Table 3</a>.</p>
</td>
</tr>
<tr id="vpc_peering_0004__row17791105316527"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p9792195385219">description</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p3792205365218">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p10792953155215">Provides supplementary information about the VPC peering connection.</p>
</td>
</tr>
<tr id="vpc_peering_0004__row4121155915218"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p1312155914528">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p201218597524">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p1395374115919">Specifies the time (UTC) when the VPC peering connection is created.</p>
<p id="vpc_peering_0004__p65980291419">Format: <em id="vpc_peering_0004__i357718228239">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
<tr id="vpc_peering_0004__row15465113115319"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_peering_0004__p74651838533">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_peering_0004__p8465203125315">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_peering_0004__p271618182568">Specifies the time (UTC) when the VPC peering connection is updated.</p>
<p id="vpc_peering_0004__p187161918125617">Format: <em id="vpc_peering_0004__i224573272512">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_peering_0004__table1125991417114"></a><a name="table1125991417114"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_peering_0004__table1125991417114" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_peering_0004__b11112153342515">vpc_info</strong> objects</caption><thead align="left"><tr id="vpc_peering_0004__row1725931413118"><th align="left" class="cellrowborder" valign="top" width="32.81%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_peering_0004__p122592014121114"><strong id="vpc_peering_0004__b12293434152513">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.43%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_peering_0004__p11259121417111"><strong id="vpc_peering_0004__b108591536162512">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="43.76%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_peering_0004__p17259191412115"><strong id="vpc_peering_0004__b1716163714255">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_peering_0004__row4259191411115"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_peering_0004__p1125911141118">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_peering_0004__p1026031417117">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_peering_0004__p926061418117">Specifies the ID of a VPC involved in a VPC peering connection.</p>
</td>
</tr>
<tr id="vpc_peering_0004__row1326013145116"><td class="cellrowborder" valign="top" width="32.81%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_peering_0004__p72601514191115">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.43%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_peering_0004__p3260171410114">String</p>
</td>
<td class="cellrowborder" valign="top" width="43.76%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_peering_0004__p326071415115">Specifies the ID of the project that a VPC involved in the VPC peering connection belongs to.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_peering_0004__section12302184462410"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_peering_0004__screen5474152911720">{
"name": "test",
"id": "22b76469-08e3-4937-8c1d-7aad34892be1",
"request_vpc_info": {
"vpc_id": "9daeac7c-a98f-430f-8e38-67f9c044e299",
"tenant_id": "f65e9ebc-ed5d-418b-a931-9a723718ba4e"
},
"accept_vpc_info": {
"vpc_id": "f583c072-0bb8-4e19-afb2-afb7c1693be5",
"tenant_id": "059a737356594b41b447b557bf0aae56"
},
"status": "ACTIVE"
}</pre>
</div>
<div class="section" id="vpc_peering_0004__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_peering_0004__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_peering_0004__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_peering_0004__p17281622133910">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_peering_0000.html">VPC Peering Connection</a></div>
</div>
</div>