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

402 lines
33 KiB
HTML

<a name="vpc_sg02_0006"></a><a name="vpc_sg02_0006"></a>
<h1 class="topictitle1">Querying Security Group Rules</h1>
<div id="body1495612692297"><div class="section" id="vpc_sg02_0006__section6306987516218"><h4 class="sectiontitle">Function</h4><p id="vpc_sg02_0006__p2012610217114">This API is used to query all security group rules accessible to the tenant submitting the request. </p>
</div>
<div class="section" id="vpc_sg02_0006__section2319473516218"><h4 class="sectiontitle">URI</h4><p id="vpc_sg02_0006__p19107112471112">GET /v2.0/security-group-rules</p>
<p id="vpc_sg02_0006__p119017265588">Example:</p>
<pre class="screen" id="vpc_sg02_0006__screen990192655814">GET https://{Endpoint}/v2.0/security-group-rules?security_group_id={security_group_id}&amp;remote_group_id={remote_group_id}&amp;direction={direction}&amp;remote_ip_prefix={remote_ip_prefix}&amp;protocol={protocol}&amp;port_range_max={port_range_max}&amp;port_range_min={port_range_min}&amp;ethertype={ethertype}&amp;tenant_id ={tenant_id}</pre>
<p id="vpc_sg02_0006__p1851634019591">Example of querying security group rules by page</p>
<pre class="screen" id="vpc_sg02_0006__screen6349039695144">GET https://{Endpoint}/v2.0/networks?limit=2&amp;marker=07adc044-3f21-4eeb-bd57-5e5eb6024b7f&amp;page_reverse=False</pre>
<p id="vpc_sg02_0006__p1545024219277"><a href="#vpc_sg02_0006__table15294154210275">Table 1</a> describes the parameters.</p>
<div class="tablenoborder"><a name="vpc_sg02_0006__table15294154210275"></a><a name="table15294154210275"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0006__table15294154210275" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_sg02_0006__row8451124252717"><th align="left" class="cellrowborder" valign="top" width="22.222222222222225%" id="mcps1.3.2.8.2.5.1.1"><p id="vpc_sg02_0006__p645120423277"><strong id="vpc_sg02_0006__b125771223193318">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14141414141414%" id="mcps1.3.2.8.2.5.1.2"><p id="vpc_sg02_0006__p24511142152710"><strong id="vpc_sg02_0006__b13287102463314">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.27272727272727%" id="mcps1.3.2.8.2.5.1.3"><p id="vpc_sg02_0006__p17451442102719"><strong id="vpc_sg02_0006__b1827342533316">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="36.36363636363636%" id="mcps1.3.2.8.2.5.1.4"><p id="vpc_sg02_0006__p1645112424279"><strong id="vpc_sg02_0006__b1199314257338">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_sg02_0006__row10451154219278"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p13451144214279">id</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p2451642122711">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p4451194272719">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p114511842142710">Specifies that the security group rule ID is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row3451142122716"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p194511542112719">description</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p15451154292711">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p204510428279">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p645194262717">Specifies that the description is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row164511942132715"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p54511242122712">remote_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p74516424272">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p17451142132717">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p16451942152711">Specifies the ID of the remote security group associated with the security group rule is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row745164215276"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p11451104232718">security_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p17451124262716">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p194511142102719">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p2451942182719">Specifies the ID of the corresponding security group is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row1045124217278"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p645124222713">direction</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p14451042142711">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p19451942192716">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p14511542162714">Specifies the security group rule direction is used as the filtering condition. The value can be <strong id="vpc_sg02_0006__b157495414355">ingress</strong> or <strong id="vpc_sg02_0006__b030761111351">egress</strong>.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row24511342152711"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p194511142102720">protocol</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p15451542172719">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p184512042132717">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p18451124213275">Specifies that the IP protocol is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row1745294262718"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p104526429271">remote_ip_prefix</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p104521042112718">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p1545213425276">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p16452154210273">Specifies the remote IP address range matching the security group rule is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row104521742152718"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p11452142112719">ethertype</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p845215426274">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p2045214222711">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p1845264217271">Specifies that the network type is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row1452174213279"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p4452642162710">port_range_max</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p1445217422279">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p14452154218270">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p64521942122711">Specifies that the maximum port is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row445219429276"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p10452144292710">port_range_min</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p045224232717">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p445210420271">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p9452184219278">Specifies that the minimum port is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row645284216274"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p54521142172719">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p1445254242711">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p1945216424276">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__p1445210424277">Specifies that the project ID is used as the filtering condition.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row24521342112710"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p04521942152711">marker</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p1945224214277">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p845210426276">String</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__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_sg02_0006__p538818488578">This parameter can work together with the parameter <strong id="vpc_sg02_0006__vpc_api01_0003_b650614119446">limit</strong>.</p>
<ul id="vpc_sg02_0006__ul12704811125810"><li id="vpc_sg02_0006__vpc_api01_0003_li325418407124">If parameters <strong id="vpc_sg02_0006__vpc_api01_0003_b736582413514">marker</strong> and <strong id="vpc_sg02_0006__vpc_api01_0003_b17435293518">limit</strong> are not passed, resource records on the first page will be returned.</li><li id="vpc_sg02_0006__vpc_api01_0003_li1923817171338">If the parameter <strong id="vpc_sg02_0006__vpc_api01_0003_b1505159195414">marker</strong> is not passed and the value of parameter <strong id="vpc_sg02_0006__vpc_api01_0003_b14146122925417">limit</strong> is set to <strong id="vpc_sg02_0006__vpc_api01_0003_b13594516546">10</strong>, the first 10 resource records will be returned.</li><li id="vpc_sg02_0006__vpc_api01_0003_li2076741203417">If the value of the parameter <strong id="vpc_sg02_0006__vpc_api01_0003_b13589356163415">marker</strong> is set to the resource ID of the 10th record and the value of parameter <strong id="vpc_sg02_0006__vpc_api01_0003_b1557415118357">limit</strong> is set to <strong id="vpc_sg02_0006__vpc_api01_0003_b10574171193511">10</strong>, the 11th to 20th resource records will be returned.</li><li id="vpc_sg02_0006__vpc_api01_0003_li108512113551">If the value of the parameter <strong id="vpc_sg02_0006__vpc_api01_0003_b9403193716543">marker</strong> is set to the resource ID of the 10th record and the parameter <strong id="vpc_sg02_0006__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_sg02_0006__row845214252719"><td class="cellrowborder" valign="top" width="22.222222222222225%" headers="mcps1.3.2.8.2.5.1.1 "><p id="vpc_sg02_0006__p0452144232714">limit</p>
</td>
<td class="cellrowborder" valign="top" width="14.14141414141414%" headers="mcps1.3.2.8.2.5.1.2 "><p id="vpc_sg02_0006__p7452154218275">No</p>
</td>
<td class="cellrowborder" valign="top" width="27.27272727272727%" headers="mcps1.3.2.8.2.5.1.3 "><p id="vpc_sg02_0006__p154521142182717">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="36.36363636363636%" headers="mcps1.3.2.8.2.5.1.4 "><p id="vpc_sg02_0006__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_sg02_0006__p125192338584"><strong id="vpc_sg02_0006__vpc_api01_0003_b7164124258">limit</strong> can be used together with <strong id="vpc_sg02_0006__vpc_api01_0003_b15985310854">marker</strong>. For details, see the parameter description of <strong id="vpc_sg02_0006__vpc_api01_0003_b193281854847">marker</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_sg02_0006__section4004032316218"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_sg02_0006__p3956402316218">None</p>
</div>
<div class="section" id="vpc_sg02_0006__section1811585818120"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_sg02_0006__screen0678255217">GET https://{Endpoint}/v2.0/security-group-rules</pre>
</div>
<div class="section" id="vpc_sg02_0006__section4154959916218"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0006__table5126909016218" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_sg02_0006__row4406312316218"><th align="left" class="cellrowborder" valign="top" width="23.169999999999998%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_sg02_0006__p130340816218">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.61%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_sg02_0006__p23005316218">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.22%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_sg02_0006__p1954037216218">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_sg02_0006__row25691016218"><td class="cellrowborder" valign="top" width="23.169999999999998%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_sg02_0006__p5925871816218">security_group_rules</p>
</td>
<td class="cellrowborder" valign="top" width="25.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_sg02_0006__p263715271607">Array of <a href="#vpc_sg02_0006__table655457801607">Security Group Rule</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_sg02_0006__p732393116218">Specifies the security group rule list. For details, see <a href="#vpc_sg02_0006__table655457801607">Table 3</a>.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row23061544207"><td class="cellrowborder" valign="top" width="23.169999999999998%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_sg02_0006__p281361251816">security_group_rules_links</p>
</td>
<td class="cellrowborder" valign="top" width="25.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_sg02_0006__p16813141216189">Array of <a href="#vpc_sg02_0006__table1318194661915">SecurityGroupRulesLink</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_sg02_0006__p1813612171815">Shows pagination information about security group rules.</p>
<p id="vpc_sg02_0006__p103354918134">Only when <strong id="vpc_sg02_0006__b111710135233">limit</strong> is used for filtering and the number of resources exceeds the value of <strong id="vpc_sg02_0006__b7241713122319">limit</strong> or 2000 (default value of <strong id="vpc_sg02_0006__b1825151332315">limit</strong>), value <strong id="vpc_sg02_0006__b172510131232">next</strong> will be returned for <strong id="vpc_sg02_0006__b925101332310">rel</strong> and a link for <strong id="vpc_sg02_0006__b18251513172310">href</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_sg02_0006__table655457801607"></a><a name="table655457801607"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0006__table655457801607" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="vpc_sg02_0006__b842352706151318">Security Group Rule</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0006__row54478641607"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_sg02_0006__p389969021607"><strong id="vpc_sg02_0006__b195868418291">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.330000000000002%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_sg02_0006__p36789391607"><strong id="vpc_sg02_0006__b582815515290">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_sg02_0006__p433861031607"><strong id="vpc_sg02_0006__b198338642916">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_sg02_0006__row134774871607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p269083981607">id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p630670281607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p334792201607">Specifies the security group rule ID.</p>
<p id="vpc_sg02_0006__p529374054010">This parameter is not mandatory when you query security group rules.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row250554771607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p254411021607">description</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p505368621607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p480145951607">Provides supplementary information about the security group rule.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row569401671607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p115724181607">security_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p615991711607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p587796621607">Specifies the ID of the belonged security group.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row654332091607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p113008931607">remote_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p170542961607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p141218971607">Specifies the peer ID of the belonged security group.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row9932071607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p657989401607">direction</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p507988391607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p570991491607">Specifies the direction of the traffic for which the security group rule takes effect.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row97529031607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p478834691607">remote_ip_prefix</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p622759951607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p146708701607">Specifies the peer IP address segment.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row315033981607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p163656291607">protocol</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p628340441607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p99902671607">Specifies the protocol type or the IP protocol number.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row551583771607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p97886331607">port_range_max</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p343603851607">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p188144701607">Specifies the maximum port number. When ICMP is used, the value is the ICMP code.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row456604071607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p630384091607">port_range_min</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p337362901607">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p258562691607">Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type.</p>
<p id="vpc_sg02_0006__p5690808615417">When the TCP or UDP protocol is used, both <strong id="vpc_sg02_0006__b84235270621055">port_range_max</strong> and <strong id="vpc_sg02_0006__b8423527062112">port_range_min</strong> must be specified, and the <strong id="vpc_sg02_0006__b43870256421149">port_range_max</strong> value must be greater than the <strong id="vpc_sg02_0006__b70589128621159">port_range_min</strong> value.</p>
<p id="vpc_sg02_0006__p4241072615417">When the ICMP protocol is used, if you specify the ICMP code (<strong id="vpc_sg02_0006__b84235270621317">port_range_max</strong>), you must also specify the ICMP type (<strong id="vpc_sg02_0006__b84235270621326">port_range_min</strong>).</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row360773491607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p364292801607">ethertype</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p339523071607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p34728681607">Specifies the network type.</p>
<p id="vpc_sg02_0006__p568898621607">IPv4 and IPv6 are supported.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row532124261607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p593368391607">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p130282191607">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p10487112">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_sg02_0006__row226972613121"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p114291339201219">remote_address_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p6429183913122">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0006__ul871718283154"><li id="vpc_sg02_0006__vpc_sg01_0001_li106781571627">Specifies the remote IP address group ID.</li><li id="vpc_sg02_0006__vpc_sg01_0001_li767815571025">The value is mutually exclusive with parameters <strong id="vpc_sg02_0006__vpc_sg01_0001_b1185142797">remote_ip_prefix</strong> and <strong id="vpc_sg02_0006__vpc_sg01_0001_b64611932598">remote_group_id</strong>.</li></ul>
</td>
</tr>
<tr id="vpc_sg02_0006__row11992111863317"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p169261732143314">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p69311132153317">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p13646103310">Specifies the project ID. </p>
</td>
</tr>
<tr id="vpc_sg02_0006__row10903153923318"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p6634195714335">created_at</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p12638157153319">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p1364635713332">Specifies the time (UTC) when the security group rule is created.</p>
<p id="vpc_sg02_0006__p65980291419">Format: <em id="vpc_sg02_0006__i1034411227245">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
<tr id="vpc_sg02_0006__row1797311427338"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0006__p1725445103416">updated_at</p>
</td>
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0006__p192601514345">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0006__p1127018513343">Specifies the time (UTC) when the security group rule is updated.</p>
<p id="vpc_sg02_0006__p19850105451210">Format: <em id="vpc_sg02_0006__i1647183316242">yyyy-MM-ddTHH:mm:ss</em></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_sg02_0006__table1318194661915"></a><a name="table1318194661915"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0006__table1318194661915" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_sg02_0006__b19210148323">SecurityGroupRulesLink</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0006__row12181246101911"><th align="left" class="cellrowborder" valign="top" width="26.87%" id="mcps1.3.5.4.2.4.1.1"><p id="vpc_sg02_0006__p19181646101917">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="23.41%" id="mcps1.3.5.4.2.4.1.2"><p id="vpc_sg02_0006__p718124661912">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.72%" id="mcps1.3.5.4.2.4.1.3"><p id="vpc_sg02_0006__p719134621911">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_sg02_0006__row191974671910"><td class="cellrowborder" valign="top" width="26.87%" headers="mcps1.3.5.4.2.4.1.1 "><p id="vpc_sg02_0006__p1919946151916">href</p>
</td>
<td class="cellrowborder" valign="top" width="23.41%" headers="mcps1.3.5.4.2.4.1.2 "><p id="vpc_sg02_0006__p71994671918">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.72%" headers="mcps1.3.5.4.2.4.1.3 "><p id="vpc_sg02_0006__p1919184631917">Specifies the API link.</p>
</td>
</tr>
<tr id="vpc_sg02_0006__row519846181910"><td class="cellrowborder" valign="top" width="26.87%" headers="mcps1.3.5.4.2.4.1.1 "><p id="vpc_sg02_0006__p519646121916">rel</p>
</td>
<td class="cellrowborder" valign="top" width="23.41%" headers="mcps1.3.5.4.2.4.1.2 "><p id="vpc_sg02_0006__p19191464193">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.72%" headers="mcps1.3.5.4.2.4.1.3 "><p id="vpc_sg02_0006__p101954681914">Specifies the relationship between the API link and the API version.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_sg02_0006__section2229785216218"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_sg02_0006__screen175531046122">{
"security_group_rules": [
{
"remote_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
"direction": "ingress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
"port_range_max": null,
"security_group_id": "1d8b19c7-7c56-48f7-a99b-4b40eb390967",
"port_range_min": null,
"ethertype": "IPv6",
"description": null,
"id": "07adc044-3f21-4eeb-bd57-5e5eb6024b7f",
"project_id": "6c9298ec8c874f7f99688489ab65f90e",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
},
{
"remote_group_id": null,
"direction": "egress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
"port_range_max": null,
"security_group_id": "328fb454-a2ee-4a11-bdb1-ee19bbdfde43",
"port_range_min": null,
"ethertype": "IPv6",
"description": null,
"id": "09358f83-f4a5-4386-9563-a1e3c373d655",
"project_id": "6c9298ec8c874f7f99688489ab65f90e",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
},
{
"remote_group_id": "4c763030-366e-428c-be2b-d48f6baf5297",
"direction": "ingress",
"remote_ip_prefix": null,
"protocol": null,
"tenant_id": "6c9298ec8c874f7f99688489ab65f90e",
"port_range_max": null,
"security_group_id": "4c763030-366e-428c-be2b-d48f6baf5297",
"port_range_min": null,
"ethertype": "IPv6",
"description": null,
"id": "219a6f56-1069-458b-bec0-df9270e7a074",
"project_id": "6c9298ec8c874f7f99688489ab65f90e",
"created_at": "2018-09-20T02:15:34",
"updated_at": "2018-09-20T02:15:34",
"remote_address_group_id": null
}
],
"security_group_rules_links": [
{ "rel": "previous",
"href": "https://{Endpoint}/v2.0/
security-group-rules?marker=07adc044-3f21-4eeb-bd57-5e5eb6024b7f&amp;page_reverse=True"
}
]
}</pre>
</div>
<p id="vpc_sg02_0006__p5582662216218"></p>
<div class="section" id="vpc_sg02_0006__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_sg02_0006__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_sg02_0006__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_sg02_0006__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_sg02_0000.html">Security Group</a></div>
</div>
</div>