forked from docs/doc-exports
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>
358 lines
32 KiB
HTML
358 lines
32 KiB
HTML
<a name="vpc_sg01_0003"></a><a name="vpc_sg01_0003"></a>
|
|
|
|
<h1 class="topictitle1">Querying Security Groups</h1>
|
|
<div id="body22986373"><div class="section" id="vpc_sg01_0003__section4195542395259"><h4 class="sectiontitle">Function</h4><p id="vpc_sg01_0003__p6584443995259">This API is used to query security groups using search criteria and to display the security groups in a list.</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section5844660495259"><h4 class="sectiontitle">URI</h4><p id="vpc_sg01_0003__p1834312346599">GET /v1/{project_id}/security-groups</p>
|
|
<div class="p" id="vpc_sg01_0003__p12687151114011">Example:<pre class="screen" id="vpc_sg01_0003__screen268712144011">GET https://{Endpoint}/v1/{project_id}/security-groups?limit=10&marker=4779ab1c-7c1a-44b1-a02e-93dfc361b32d&vpc_id=3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85</pre>
|
|
</div>
|
|
<div class="p" id="vpc_sg01_0003__p2059194315914"><a href="#vpc_sg01_0003__table1939240195259">Table 1</a> describes the parameters.
|
|
<div class="tablenoborder"><a name="vpc_sg01_0003__table1939240195259"></a><a name="table1939240195259"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg01_0003__table1939240195259" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="vpc_sg01_0003__row1961474195259"><th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.2.4.2.2.5.1.1"><p id="vpc_sg01_0003__p1035476495259">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.21%" id="mcps1.3.2.4.2.2.5.1.2"><p id="vpc_sg01_0003__p1553041195259">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.830000000000002%" id="mcps1.3.2.4.2.2.5.1.3"><p id="vpc_sg01_0003__p112673695259">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30.61%" id="mcps1.3.2.4.2.2.5.1.4"><p id="vpc_sg01_0003__p2600047695259">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg01_0003__row1253681595259"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_sg01_0003__p2796266695259">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_sg01_0003__p3612906795259">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.830000000000002%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_sg01_0003__p2573237195259">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.61%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_sg01_0003__p10487112">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__row4225519995259"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_sg01_0003__p137426195259">marker</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_sg01_0003__p3252720195259">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.830000000000002%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_sg01_0003__p308224595259">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.61%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_sg01_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_sg01_0003__p538818488578">This parameter can work together with the parameter <strong id="vpc_sg01_0003__vpc_api01_0003_b650614119446">limit</strong>.</p>
|
|
<ul id="vpc_sg01_0003__ul12704811125810"><li id="vpc_sg01_0003__vpc_api01_0003_li325418407124">If parameters <strong id="vpc_sg01_0003__vpc_api01_0003_b736582413514">marker</strong> and <strong id="vpc_sg01_0003__vpc_api01_0003_b17435293518">limit</strong> are not passed, resource records on the first page will be returned.</li><li id="vpc_sg01_0003__vpc_api01_0003_li1923817171338">If the parameter <strong id="vpc_sg01_0003__vpc_api01_0003_b1505159195414">marker</strong> is not passed and the value of parameter <strong id="vpc_sg01_0003__vpc_api01_0003_b14146122925417">limit</strong> is set to <strong id="vpc_sg01_0003__vpc_api01_0003_b13594516546">10</strong>, the first 10 resource records will be returned.</li><li id="vpc_sg01_0003__vpc_api01_0003_li2076741203417">If the value of the parameter <strong id="vpc_sg01_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_sg01_0003__vpc_api01_0003_b1557415118357">limit</strong> is set to <strong id="vpc_sg01_0003__vpc_api01_0003_b10574171193511">10</strong>, the 11th to 20th resource records will be returned.</li><li id="vpc_sg01_0003__vpc_api01_0003_li108512113551">If the value of the parameter <strong id="vpc_sg01_0003__vpc_api01_0003_b9403193716543">marker</strong> is set to the resource ID of the 10th record and the parameter <strong id="vpc_sg01_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_sg01_0003__row5868376895259"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_sg01_0003__p6257361795259">limit</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_sg01_0003__p439086695259">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.830000000000002%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_sg01_0003__p3106751395259">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.61%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_sg01_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_sg01_0003__p125192338584"><strong id="vpc_sg01_0003__vpc_api01_0003_b7164124258">limit</strong> can be used together with <strong id="vpc_sg01_0003__vpc_api01_0003_b15985310854">marker</strong>. For details, see the parameter description of <strong id="vpc_sg01_0003__vpc_api01_0003_b193281854847">marker</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__row2580668495259"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_sg01_0003__p2103752995259">vpc_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_sg01_0003__p5853666895259">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.830000000000002%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_sg01_0003__p6330151095259">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.61%" headers="mcps1.3.2.4.2.2.5.1.4 "><p id="vpc_sg01_0003__p3783295295259">Specifies that the VPC ID is used as the filtering condition.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__row65551142143913"><td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.2.5.1.1 "><p id="vpc_sg01_0003__p165021744193919">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.21%" headers="mcps1.3.2.4.2.2.5.1.2 "><p id="vpc_sg01_0003__p1150234413398">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.830000000000002%" headers="mcps1.3.2.4.2.2.5.1.3 "><p id="vpc_sg01_0003__p1650244412390">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.61%" headers="mcps1.3.2.4.2.2.5.1.4 "><ul id="vpc_sg01_0003__ul1752848102"><li id="vpc_sg01_0003__li1352174814019">Specifies the enterprise project ID. This field can be used to filter the security groups of an enterprise project.</li><li id="vpc_sg01_0003__li05212489016">The value is <strong id="vpc_sg01_0003__b177241554143418">0</strong> or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value <strong id="vpc_sg01_0003__b7255713347">0</strong> indicates the default enterprise project. To obtain the security groups bound to all enterprise projects of the user or to display the security group list for enterprise project member accounts, set <strong id="vpc_sg01_0003__b3632115384820">all_granted_eps</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section3936161695259"><h4 class="sectiontitle">Request Parameters</h4><p id="vpc_sg01_0003__p3740293395259">None</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section714011347181"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="vpc_sg01_0003__screen09631934105215">GET https://{Endpoint}/v1/{project_id}/security-groups</pre>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section3532656695259"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg01_0003__table3248515795259" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpc_sg01_0003__row1680595259"><th align="left" class="cellrowborder" valign="top" width="23.26%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_sg01_0003__p1326742895259">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.09%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_sg01_0003__p1250466195259">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="54.65%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_sg01_0003__p2003783295259">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg01_0003__row4409981195259"><td class="cellrowborder" valign="top" width="23.26%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_sg01_0003__p1222895259">security_groups</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.09%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_sg01_0003__p2797014095259">Array of <a href="#vpc_sg01_0003__table333218689520">security_group</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="54.65%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_sg01_0003__p3551241495259">Specifies the security group objects. For details, see <a href="#vpc_sg01_0003__table333218689520">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg01_0003__table333218689520"></a><a name="table333218689520"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg01_0003__table333218689520" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Description of <strong id="vpc_sg01_0003__b10775917151613">security_group</strong> fields</caption><thead align="left"><tr id="vpc_sg01_0003__vpc_sg01_0001_row158029169489"><th align="left" class="cellrowborder" valign="top" width="34.52%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_sg01_0003__vpc_sg01_0001_p581966039489">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.45%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_sg01_0003__vpc_sg01_0001_p166624639489">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.03%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_sg01_0003__vpc_sg01_0001_p278965559489">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg01_0003__vpc_sg01_0001_row643785269489"><td class="cellrowborder" valign="top" width="34.52%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p329359299489">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.45%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p230963549489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.03%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p410063869489">Specifies the security group name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row32100149489"><td class="cellrowborder" valign="top" width="34.52%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p522665169489">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.45%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p513285489489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.03%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p290727679489">Provides supplementary information about the security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row639972559489"><td class="cellrowborder" valign="top" width="34.52%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p634276169489">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.45%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p114487449489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.03%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p259109349489">Specifies the security group ID, which uniquely identifies the security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row422544629489"><td class="cellrowborder" valign="top" width="34.52%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p590727719489">vpc_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.45%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p10272179489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.03%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p303149719489">Specifies the resource ID of the VPC to which the security group belongs.</p>
|
|
<div class="note" id="vpc_sg01_0003__vpc_sg01_0001_note1071412434342"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="vpc_sg01_0003__p8456132417212">Currently, this parameter is not recommended because it is only used as a prompt and does not restrict that the security group must be associated with the VPC.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row30397199489"><td class="cellrowborder" valign="top" width="34.52%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p252491199489">security_group_rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.45%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p193798449489">Array of <a href="#vpc_sg01_0003__table488727239520">security_group_rule</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.03%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p643841019489">Specifies the default security group rules, which ensure that resources in the security group can communicate with one another.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row104191723103213"><td class="cellrowborder" valign="top" width="34.52%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p19326142511323">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.45%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p203266259325">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.03%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul15517142134714"><li id="vpc_sg01_0003__vpc_sg01_0001_li051772118474">Specifies the enterprise project ID. When creating a security group, associate the enterprise project ID with the security group.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li15517102117473">The value is <strong id="vpc_sg01_0003__b9386101618192">0</strong> or a string that contains a maximum of 36 characters in UUID format with hyphens (-). Value <strong id="vpc_sg01_0003__b10879151881918">0</strong> indicates the default enterprise project.</li></ul>
|
|
<div class="note" id="vpc_sg01_0003__vpc_sg01_0001_note428720710014"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="vpc_sg01_0003__vpc_sg01_0001_vpc_api01_0001_p182751511487">This parameter is unsupported. Do not use it.</p>
|
|
</div></div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="vpc_sg01_0003__p788374118214"></p>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg01_0003__table488727239520"></a><a name="table488727239520"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg01_0003__table488727239520" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_sg01_0003__vpc_sg01_0001_b897031316622">security_group_rule</strong> objects</caption><thead align="left"><tr id="vpc_sg01_0003__vpc_sg01_0001_row611024789489"><th align="left" class="cellrowborder" valign="top" width="34.143414341434145%" id="mcps1.3.5.5.2.4.1.1"><p id="vpc_sg01_0003__vpc_sg01_0001_p98931099489">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.732073207320735%" id="mcps1.3.5.5.2.4.1.2"><p id="vpc_sg01_0003__vpc_sg01_0001_p368367439489">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.124512451245124%" id="mcps1.3.5.5.2.4.1.3"><p id="vpc_sg01_0003__vpc_sg01_0001_p23523719489">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg01_0003__vpc_sg01_0001_row397690789489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p656951529489">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p307102169489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p216633359489">Specifies the security group rule ID, which uniquely identifies the security group rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row2447898388"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p432391116381">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p20328111163813">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul12329121935111"><li id="vpc_sg01_0003__vpc_sg01_0001_li93276198510">Provides supplementary information about the security group rule.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li5329141955114">The value can contain no more than 255 characters, including letters and digits.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row320377939489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p620577269489">security_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p644725909489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><p id="vpc_sg01_0003__vpc_sg01_0001_p260700169489">Specifies the security group rule ID, which uniquely identifies the security group rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row602307149489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p184092199489">direction</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p499849219489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul8415142317513"><li id="vpc_sg01_0003__vpc_sg01_0001_li124154235511">Specifies the direction of access control.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li6916104173512">Possible values are as follows:<ul id="vpc_sg01_0003__vpc_sg01_0001_ul6968104419355"><li id="vpc_sg01_0003__vpc_sg01_0001_li2082844743512"><strong id="vpc_sg01_0003__vpc_sg01_0001_b96381611133314">egress</strong></li><li id="vpc_sg01_0003__vpc_sg01_0001_li1415123145113"><strong id="vpc_sg01_0003__vpc_sg01_0001_b9979172133411">ingress</strong></li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row53906049489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p460392719489">ethertype</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p248464689489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul78261926205119"><li id="vpc_sg01_0003__vpc_sg01_0001_li178263267515">Specifies the IP protocol version.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li1882682615114">The value can be <strong id="vpc_sg01_0003__vpc_sg01_0001_b18421041195618">IPv4</strong> or <strong id="vpc_sg01_0003__vpc_sg01_0001_b1284244110568">IPv6</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row619098859489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p520137079489">protocol</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p17867349489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul585593011517"><li id="vpc_sg01_0003__vpc_sg01_0001_li15855430185119">Specifies the protocol type.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li18254635105816">The value can be <strong id="vpc_sg01_0003__vpc_sg01_0001_b1576775584012">icmp</strong>, <strong id="vpc_sg01_0003__vpc_sg01_0001_b20767455104015">tcp</strong>, <strong id="vpc_sg01_0003__vpc_sg01_0001_b1876714558408">udp</strong>, or an IP protocol number (0 to 255, for example, 47 for GRE)</li><li id="vpc_sg01_0003__vpc_sg01_0001_li14855183045113">If the parameter is left blank, all protocols are supported.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row29885099489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p424368709489">port_range_min</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p167549899489">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul1445493595119"><li id="vpc_sg01_0003__vpc_sg01_0001_li164541435125119">Specifies the start port number.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li1454635135113">The value ranges from 1 to 65535.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li1845415357516">The value cannot be greater than the <strong id="vpc_sg01_0003__vpc_sg01_0001_b842352706195750">port_range_max</strong> value. An empty value indicates all ports. If the protocol is <strong id="vpc_sg01_0003__vpc_sg01_0001_b842352706195910">icmp</strong>, the value range is shown in <a href="vpc_api_0009.html">ICMP-Port Range Relationship Table</a>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row330228649489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p239666849489">port_range_max</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p641378179489">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul23372407514"><li id="vpc_sg01_0003__vpc_sg01_0001_li233744065111">Specifies the end port number.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li933764019519">The value ranges from 1 to 65535.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li133371240165111">If the protocol is not <strong id="vpc_sg01_0003__vpc_sg01_0001_b842352706195730">icmp</strong>, the value cannot be smaller than the <strong id="vpc_sg01_0003__vpc_sg01_0001_b873792704">port_range_min</strong> value. An empty value indicates all ports. If the protocol is <strong id="vpc_sg01_0003__vpc_sg01_0001_b2077102465">icmp</strong>, the value range is shown in <a href="vpc_api_0009.html">ICMP-Port Range Relationship Table</a>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row1745649489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p144166029489">remote_ip_prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p139601239489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul42481344125119"><li id="vpc_sg01_0003__vpc_sg01_0001_li1424824420511">Specifies the remote IP address. If the access control direction is set to <strong id="vpc_sg01_0003__vpc_sg01_0001_b168443017227">egress</strong>, the parameter specifies the source IP address. If the access control direction is set to <strong id="vpc_sg01_0003__vpc_sg01_0001_b138411307223">ingress</strong>, the parameter specifies the destination IP address.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li2248184413517">The value can be in the CIDR format or IP addresses.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li9248644125119">The parameter is mutually exclusive with parameter <strong id="vpc_sg01_0003__vpc_sg01_0001_b286230152212">remote_group_id</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row436879079489"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p420105089489">remote_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p465213149489">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul12672447145118"><li id="vpc_sg01_0003__vpc_sg01_0001_li167216475516">Specifies the ID of the peer security group.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li20672147185110">The value is mutually exclusive with parameter <strong id="vpc_sg01_0003__vpc_sg01_0001_b28793017228">remote_ip_prefix</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row73928331228"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p1146204615214">remote_address_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p3469461328">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul967819571421"><li id="vpc_sg01_0003__vpc_sg01_0001_li106781571627">Specifies the remote IP address group ID.</li><li id="vpc_sg01_0003__vpc_sg01_0001_li767815571025">The value is mutually exclusive with parameters <strong id="vpc_sg01_0003__vpc_sg01_0001_b1185142797">remote_ip_prefix</strong> and <strong id="vpc_sg01_0003__vpc_sg01_0001_b64611932598">remote_group_id</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg01_0003__vpc_sg01_0001_row66316933510"><td class="cellrowborder" valign="top" width="34.143414341434145%" headers="mcps1.3.5.5.2.4.1.1 "><p id="vpc_sg01_0003__vpc_sg01_0001_p66339133513">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.732073207320735%" headers="mcps1.3.5.5.2.4.1.2 "><p id="vpc_sg01_0003__vpc_sg01_0001_p383982443618">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.124512451245124%" headers="mcps1.3.5.5.2.4.1.3 "><ul id="vpc_sg01_0003__vpc_sg01_0001_ul5694239163714"><li id="vpc_sg01_0003__vpc_sg01_0001_li1369413919374">Specifies the ID of the project to which the security group rule belongs.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section983411474466"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_sg01_0003__screen3503345592644">{
|
|
"security_groups": [
|
|
{
|
|
"id": "16b6e77a-08fa-42c7-aa8b-106c048884e6",
|
|
"name": "qq",
|
|
"description": "qq",
|
|
"vpc_id": "3ec3b33f-ac1c-4630-ad1c-7dba1ed79d85",
|
|
"enterprise_project_id": "0aad99bc-f5f6-4f78-8404-c598d76b0ed2",
|
|
"security_group_rules": [
|
|
{
|
|
"id": "f11a3824-ac19-4fad-b4f1-c5f4a6dd0a80",
|
|
"tenant_id": "060576782980d5762f9ec014dd2f1148",
|
|
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
|
|
"remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
|
|
"direction": "ingress",
|
|
"protocol": null,
|
|
"description": "",
|
|
"ethertype": "IPv6",
|
|
"remote_ip_prefix": null,
|
|
"remote_address_group_id": null,
|
|
"port_range_max": null,
|
|
"port_range_min": null
|
|
},
|
|
{
|
|
"id": "3d6480e8-9ea4-46dc-bb1b-8db190cd5677",
|
|
"tenant_id": "060576782980d5762f9ec014dd2f1148",
|
|
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
|
|
"remote_group_id": null,
|
|
"direction": "egress",
|
|
"protocol": null,
|
|
"description": "",
|
|
"ethertype": "IPv6",
|
|
"remote_ip_prefix": null,
|
|
"remote_address_group_id": null,
|
|
"port_range_max": null,
|
|
"port_range_min": null
|
|
},
|
|
{
|
|
"id": "9581f18c-1fdd-43da-ace9-7758a56ef28a",
|
|
"tenant_id": "060576782980d5762f9ec014dd2f1148",
|
|
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
|
|
"remote_group_id": null,
|
|
"direction": "egress",
|
|
"protocol": null,
|
|
"description": "",
|
|
"ethertype": "IPv4",
|
|
"remote_ip_prefix": null,
|
|
"remote_address_group_id": null,
|
|
"port_range_max": null,
|
|
"port_range_min": null
|
|
},
|
|
{
|
|
"id": "a3ba270e-e58b-432d-a912-aeb7eace9fb8",
|
|
"tenant_id": "060576782980d5762f9ec014dd2f1148",
|
|
"security_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
|
|
"remote_group_id": "69c999ad-d9ef-4d79-94fd-35e6ceb75325",
|
|
"direction": "ingress",
|
|
"protocol": null,
|
|
"description": "",
|
|
"ethertype": "IPv4",
|
|
"remote_ip_prefix": null,
|
|
"remote_address_group_id": null,
|
|
"port_range_max": null,
|
|
"port_range_min": null
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"id": "9c0f56be-a9ac-438c-8c57-fce62de19419",
|
|
"name": "default",
|
|
"description": "qq",
|
|
"vpc_id": "13551d6b-755d-4757-b956-536f674975c0",
|
|
"enterprise_project_id": "0",
|
|
"security_group_rules": [
|
|
{
|
|
"direction": "egress",
|
|
"ethertype": "IPv4",
|
|
"id": "95479e0a-e312-4844-b53d-a5e4541b783f",
|
|
"description": "",
|
|
"security_group_id": "9c0f56be-a9ac-438c-8c57-fce62de19419"
|
|
},
|
|
{
|
|
"direction": "ingress",
|
|
"ethertype": "IPv4",
|
|
"id": "0c4a2336-b036-4fa2-bc3c-1a291ed4c431",
|
|
"description": "",
|
|
"remote_group_id": "9c0f56be-a9ac-438c-8c57-fce62de19419",
|
|
"security_group_id": "9c0f56be-a9ac-438c-8c57-fce62de19419"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section31981619"><h4 class="sectiontitle">Status Code</h4><p id="vpc_sg01_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg01_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_sg01_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_sg01_0000.html">Security Group</a></div>
|
|
</div>
|
|
</div>
|
|
|