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>
319 lines
27 KiB
HTML
319 lines
27 KiB
HTML
<a name="vpc_sg02_0008"></a><a name="vpc_sg02_0008"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Security Group Rule</h1>
|
|
<div id="body1495612692297"><div class="section" id="vpc_sg02_0008__section5958580616319"><h4 class="sectiontitle">Function</h4><p id="vpc_sg02_0008__p3797143316319">This API is used to create a security group rule. </p>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section6291358016319"><h4 class="sectiontitle">URI</h4><p id="vpc_sg02_0008__p96298385148">POST /v2.0/security-group-rules</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section3953869316319"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0008__table981991416319" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_sg02_0008__row191482716319"><th align="left" class="cellrowborder" valign="top" width="26.529999999999998%" id="mcps1.3.3.2.2.5.1.1"><p id="vpc_sg02_0008__p2280026616319">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.73%" id="mcps1.3.3.2.2.5.1.2"><p id="vpc_sg02_0008__p1835529716319">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.7%" id="mcps1.3.3.2.2.5.1.3"><p id="vpc_sg02_0008__p3464228716319">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.04%" id="mcps1.3.3.2.2.5.1.4"><p id="vpc_sg02_0008__p3284526816319">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0008__row3793835116319"><td class="cellrowborder" valign="top" width="26.529999999999998%" headers="mcps1.3.3.2.2.5.1.1 "><p id="vpc_sg02_0008__p4303593816319">security_group_rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.73%" headers="mcps1.3.3.2.2.5.1.2 "><p id="vpc_sg02_0008__p3852346816319"><a href="#vpc_sg02_0008__table655457801607">security_group_rule</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.7%" headers="mcps1.3.3.2.2.5.1.3 "><p id="vpc_sg02_0008__p6530542116319">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.04%" headers="mcps1.3.3.2.2.5.1.4 "><p id="vpc_sg02_0008__p732393116218">Specifies the security group rule. For details, see <a href="#vpc_sg02_0008__table655457801607">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg02_0008__table655457801607"></a><a name="table655457801607"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0008__table655457801607" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_sg02_0008__b17214251593">Security Group Rule</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0008__row54478641607"><th align="left" class="cellrowborder" valign="top" width="23.54%" id="mcps1.3.3.3.2.5.1.1"><p id="vpc_sg02_0008__p389969021607"><strong id="vpc_sg02_0008__b1588315265591">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.72%" id="mcps1.3.3.3.2.5.1.2"><p id="vpc_sg02_0008__p07415175392"><strong id="vpc_sg02_0008__b12441102716597">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.599999999999998%" id="mcps1.3.3.3.2.5.1.3"><p id="vpc_sg02_0008__p36789391607"><strong id="vpc_sg02_0008__b1934115288598">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.14%" id="mcps1.3.3.3.2.5.1.4"><p id="vpc_sg02_0008__p433861031607"><strong id="vpc_sg02_0008__b16123829125919">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0008__row250554771607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p254411021607">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p27411717193910">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p505368621607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_sg02_0008__p480145951607">Provides supplementary information about the security group rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row569401671607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p115724181607">security_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p10741111717399">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p615991711607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_sg02_0008__p587796621607">Specifies the ID of the belonged security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row654332091607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p113008931607">remote_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p374111793919">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p170542961607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul1626515813530"><li id="vpc_sg02_0008__li726510845315">Specifies the peer ID of the belonged security group.</li><li id="vpc_sg02_0008__li5931110175310">This parameter is mutually exclusive with <strong id="vpc_sg02_0008__b775516468710">remote_ip_prefix</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row9932071607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p657989401607">direction</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p19741111723910">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p507988391607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul4240101915317"><li id="vpc_sg02_0008__li10240141985319">Specifies the direction of a security group rule.</li><li id="vpc_sg02_0008__li738810234536">The value can be <strong id="vpc_sg02_0008__b1571322164216">ingress</strong> (inbound) or <strong id="vpc_sg02_0008__b271315214218">egress</strong> (outbound).</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row97529031607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p478834691607">remote_ip_prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p1574110175393">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p622759951607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul91431145115912"><li id="vpc_sg02_0008__li191433456597">Specifies the peer IP address segment.</li><li id="vpc_sg02_0008__li161431645175917">This parameter is mutually exclusive with <strong id="vpc_sg02_0008__b425282613811">remote_group_id</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row315033981607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p163656291607">protocol</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p07411217183920">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p628340441607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul19143194511599"><li id="vpc_sg02_0008__li614364515594">Specifies the protocol type or the IP protocol number.</li><li id="vpc_sg02_0008__li214317451595">The value can be <strong id="vpc_sg02_0008__b16181957134214">tcp</strong>, <strong id="vpc_sg02_0008__b18186573429">udp</strong>, <strong id="vpc_sg02_0008__b61895784217">icmp</strong> or an IP protocol number.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row551583771607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p97886331607">port_range_max</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p8741717103914">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p343603851607">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul7143104518598"><li id="vpc_sg02_0008__li17143445105916">Specifies the maximum port number. When ICMP is used, the value is the ICMP code.</li><li id="vpc_sg02_0008__li161441845145919">The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.)</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row456604071607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p630384091607">port_range_min</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p137411517143913">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p337362901607">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul1414434515912"><li id="vpc_sg02_0008__li191441045115914">Specifies the minimum port number. When ICMP is used, the value is the ICMP type.</li><li id="vpc_sg02_0008__li5207129048">Constraints:<ul id="vpc_sg02_0008__ul811793215411"><li id="vpc_sg02_0008__li17262151811419">When the TCP or UDP protocol is used, both <strong id="vpc_sg02_0008__b1296954315534">port_range_max</strong> and <strong id="vpc_sg02_0008__b139697436530">port_range_min</strong> must be specified, and the <strong id="vpc_sg02_0008__b1970114315316">port_range_max</strong> value must be greater than the <strong id="vpc_sg02_0008__b597014325317">port_range_min</strong> value.</li><li id="vpc_sg02_0008__li1214464575913">When the ICMP protocol is used, if you specify the ICMP code (<strong id="vpc_sg02_0008__b779213019545">port_range_max</strong>), you must also specify the ICMP type (<strong id="vpc_sg02_0008__b179219015545">port_range_min</strong>).</li></ul>
|
|
</li><li id="vpc_sg02_0008__li71441345175915">The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.)</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row360773491607"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p364292801607">ethertype</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p15741131719393">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p339523071607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul3144134515915"><li id="vpc_sg02_0008__li16144134510597">Specifies the network type.</li><li id="vpc_sg02_0008__li5144945145919">The value can be <strong id="vpc_sg02_0008__b5139173685414">IPv4</strong> or <strong id="vpc_sg02_0008__b7139183625420">IPv6</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row226972613121"><td class="cellrowborder" valign="top" width="23.54%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0008__p114291339201219">remote_address_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.72%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0008__p14292039101217">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.599999999999998%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0008__p6429183913122">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.14%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="vpc_sg02_0008__ul9135193810161"><li id="vpc_sg02_0008__vpc_sg01_0005_vpc_sg01_0003_li106781571627">Specifies the remote IP address group ID. You can log in to the management console and view the ID on the IP address group page.</li><li id="vpc_sg02_0008__vpc_sg01_0005_vpc_sg01_0003_li767815571025">The value is mutually exclusive with parameters <strong id="vpc_sg02_0008__vpc_sg01_0005_b19289134151117">remote_ip_prefix</strong> and <strong id="vpc_sg02_0008__vpc_sg01_0005_b1329083411111">remote_group_id</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section1377232212382"><h4 class="sectiontitle">Example Request</h4><p id="vpc_sg02_0008__p792115526262">Create an outbound rule in the security group whose ID is 5cb9c1ee-00e0-4d0f-9623-55463cd26ff8. Set <strong id="vpc_sg02_0008__b11553195551412">protocol</strong> to <strong id="vpc_sg02_0008__b15134165351418">tcp</strong>, and <strong id="vpc_sg02_0008__b1128215186151">remote_ip_prefix</strong> to 10.10.0.0/24.</p>
|
|
<pre class="screen" id="vpc_sg02_0008__screen14959133220382">POST https://{Endpoint}/v2.0/security-group-rules
|
|
|
|
{
|
|
"security_group_rule": {
|
|
"security_group_id": "5cb9c1ee-00e0-4d0f-9623-55463cd26ff8",
|
|
"direction": "egress",
|
|
"protocol": "tcp",
|
|
"remote_ip_prefix": "10.10.0.0/24"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section2023987716319"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0008__table676552316319" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter</caption><thead align="left"><tr id="vpc_sg02_0008__row5032047016319"><th align="left" class="cellrowborder" valign="top" width="31.7%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_sg02_0008__p4182747116319">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.080000000000002%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_sg02_0008__p4264467116319">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_0008__p4267558716319">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0008__row60629616319"><td class="cellrowborder" valign="top" width="31.7%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_sg02_0008__p2428304416319">security_group_rule</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.080000000000002%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_sg02_0008__p2724314316319"><a href="#vpc_sg02_0008__table1794215178501">security_group_rule</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_sg02_0008__p5745755316319">Specifies the security group rule. For details, see <a href="#vpc_sg02_0008__table1794215178501">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg02_0008__table1794215178501"></a><a name="table1794215178501"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0008__table1794215178501" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_sg02_0008__b83411478296">Security Group Rule</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0008__row594401765012"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_sg02_0008__p79441917145016"><strong id="vpc_sg02_0008__b723315491294">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_0008__p189449173501"><strong id="vpc_sg02_0008__b8145054192919">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_0008__p14944151714502"><strong id="vpc_sg02_0008__b15244658122912">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0008__row134774871607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__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_0008__p630670281607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul3852132611613"><li id="vpc_sg02_0008__li20852526564">Specifies the security group rule ID.</li><li id="vpc_sg02_0008__li885212261615">This parameter is not mandatory when you query security group rules.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row15944617165015"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p149461217195012">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0008__p294641745013">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p19946917105019">Provides supplementary information about the security group rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row894618172509"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p149461917175015">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_0008__p179460179503">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p59471117115010">Specifies the ID of the belonged security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row494711765015"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p5947517135014">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_0008__p18947817175013">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p194821775015">Specifies the peer ID of the belonged security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row1394891775017"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p189481171504">direction</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0008__p99481417185012">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p1694851720506">Specifies the direction of a security group rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row1994812173503"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p1294831745014">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_0008__p19948171725018">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p694881717507">Specifies the peer IP address segment.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row3948181714504"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p59488172505">protocol</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0008__p69481317155019">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p1094871718506">Specifies the protocol type or the IP protocol number.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row189481317185015"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p14948417155013">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_0008__p29484172505">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul7653113141013"><li id="vpc_sg02_0008__li14653103117101">Specifies the maximum port number. When ICMP is used, the value is the ICMP code.</li><li id="vpc_sg02_0008__li6653193117105">The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.)</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row10948131795018"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p13948191705018">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_0008__p89497176506">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul2622212911"><li id="vpc_sg02_0008__li16622161998">Specifies the minimum port number. When ICMP is used, the value is the ICMP type.</li><li id="vpc_sg02_0008__li655719383915">Constraints:<ul id="vpc_sg02_0008__ul721519431296"><li id="vpc_sg02_0008__li962217111914">When the TCP or UDP protocol is used, both <strong id="vpc_sg02_0008__b184941457141212">port_range_max</strong> and <strong id="vpc_sg02_0008__b1249455771219">port_range_min</strong> must be specified, and the <strong id="vpc_sg02_0008__b17494657141218">port_range_max</strong> value must be greater than the <strong id="vpc_sg02_0008__b194956575126">port_range_min</strong> value.</li><li id="vpc_sg02_0008__li1062211791">When the ICMP protocol is used, if you specify the ICMP code (<strong id="vpc_sg02_0008__b77795410321">port_range_max</strong>), you must also specify the ICMP type (<strong id="vpc_sg02_0008__b37935416325">port_range_min</strong>).</li></ul>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row159491817195016"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p89491817165011">ethertype</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_sg02_0008__p5949617125012">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul123381957188"><li id="vpc_sg02_0008__li183387571489">Specifies the IP version.</li><li id="vpc_sg02_0008__li93382574813">The value can be <strong id="vpc_sg02_0008__b107484562575">IPv4</strong> or <strong id="vpc_sg02_0008__b753115135812">IPv6</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row532124261607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__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_0008__p130282191607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p10487112">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row594941715016"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__p5949101765013">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_0008__p19491017175017">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul1991881619175"><li id="vpc_sg02_0008__vpc_sg01_0001_li106781571627">Specifies the remote IP address group ID.</li><li id="vpc_sg02_0008__vpc_sg01_0001_li767815571025">The value is mutually exclusive with parameters <strong id="vpc_sg02_0008__vpc_sg01_0001_b1185142797">remote_ip_prefix</strong> and <strong id="vpc_sg02_0008__vpc_sg01_0001_b64611932598">remote_group_id</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row11992111863317"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__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_0008__p69311132153317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_sg02_0008__p103844191312">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row10903153923318"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__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_0008__p12638157153319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul1451513269815"><li id="vpc_sg02_0008__li16515182611814">Time when the security group rule is created</li><li id="vpc_sg02_0008__li20515172617818">UTC time in the format of yyyy-MM-ddTHH:mm:ssZ</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0008__row1797311427338"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_sg02_0008__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_0008__p192601514345">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><ul id="vpc_sg02_0008__ul75151526889"><li id="vpc_sg02_0008__li1951511263811">Time when the security group rule is updated</li><li id="vpc_sg02_0008__li195153267819">UTC time in the format of yyyy-MM-ddTHH:mm:ssZ</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section5025263616319"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_sg02_0008__screen1048919598382">{
|
|
"security_group_rule": {
|
|
"remote_group_id": null,
|
|
"direction": "egress",
|
|
"remote_ip_prefix": "10.10.0.0/24",
|
|
"protocol": "tcp",
|
|
"tenant_id": "6fbe9263116a4b68818cf1edce16bc4f",
|
|
"port_range_max": null,
|
|
"security_group_id": "5cb9c1ee-00e0-4d0f-9623-55463cd26ff8",
|
|
"port_range_min": null,
|
|
"ethertype": "IPv4",
|
|
"description": null,
|
|
"id": "7c336b04-1603-4911-a6f4-f2af1d9a0488",
|
|
"project_id": "6fbe9263116a4b68818cf1edce16bc4f",
|
|
"created_at": "2018-09-20T02:15:34",
|
|
"updated_at": "2018-09-20T02:15:34",
|
|
"remote_address_group_id": null
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_sg02_0008__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0008__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_sg02_0008__p7233105282813">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
|
|
</div>
|
|
<p id="vpc_sg02_0008__p8060118"></p>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_sg02_0000.html">Security Group</a></div>
|
|
</div>
|
|
</div>
|
|
|