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>
332 lines
26 KiB
HTML
332 lines
26 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 "><p id="vpc_sg02_0008__p141218971607">Specifies the peer ID of the belonged security group.</p>
|
|
<p id="vpc_sg02_0008__p1511685411396">This parameter is mutually exclusive with <strong id="vpc_sg02_0008__b11481113341318">remote_ip_prefix</strong>.</p>
|
|
</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 "><p id="vpc_sg02_0008__p570991491607">Specifies the direction of the traffic for which the security group rule takes effect.</p>
|
|
<p id="vpc_sg02_0008__p13943922124015">The value can be <strong id="vpc_sg02_0008__b550743319110">ingress</strong> or <strong id="vpc_sg02_0008__b97031637212">egress</strong>.</p>
|
|
</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 "><p id="vpc_sg02_0008__p146708701607">Specifies the peer IP address segment.</p>
|
|
<p id="vpc_sg02_0008__p1238771033815">This parameter is mutually exclusive with <strong id="vpc_sg02_0008__b201782396138">remote_group_id</strong>.</p>
|
|
</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 "><p id="vpc_sg02_0008__p99902671607">Specifies the protocol type or the IP protocol number.</p>
|
|
<p id="vpc_sg02_0008__p6125143124117">The value can be <strong id="vpc_sg02_0008__b191601956161314">tcp</strong>, <strong id="vpc_sg02_0008__b3825301144">udp</strong>, <strong id="vpc_sg02_0008__b193416516143">icmp</strong> or an IP protocol number</p>
|
|
</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 "><p id="vpc_sg02_0008__p188144701607">Specifies the maximum port number. When ICMP is used, the value is the ICMP code.</p>
|
|
<p id="vpc_sg02_0008__p1354926164118">The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.)</p>
|
|
</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 "><p id="vpc_sg02_0008__p258562691607">Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type.</p>
|
|
<p id="vpc_sg02_0008__p5690808615417">When the TCP or UDP protocol is used, both <strong id="vpc_sg02_0008__b73511626179">port_range_max</strong> and <strong id="vpc_sg02_0008__b133669241718">port_range_min</strong> must be specified, and the <strong id="vpc_sg02_0008__b123671729178">port_range_max</strong> value must be greater than the <strong id="vpc_sg02_0008__b33681231715">port_range_min</strong> value.</p>
|
|
<p id="vpc_sg02_0008__p4241072615417">When the ICMP protocol is used, if you specify the ICMP code (<strong id="vpc_sg02_0008__b172802494244">port_range_max</strong>), you must also specify the ICMP type (<strong id="vpc_sg02_0008__b192811249112415">port_range_min</strong>).</p>
|
|
<p id="vpc_sg02_0008__p543313212446">The value ranges from 1 to 65535. (The value ranges from 0 to 255 when it indicates the code.)</p>
|
|
</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 "><p id="vpc_sg02_0008__p34728681607">Specifies the network type.</p>
|
|
<p id="vpc_sg02_0008__p668771714614">The value can be <strong id="vpc_sg02_0008__b16467068257">IPv4</strong> or <strong id="vpc_sg02_0008__b44695618259">IPv6</strong>.</p>
|
|
</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">This parameter is mutually exclusive with parameters <strong id="vpc_sg02_0008__vpc_sg01_0005_b123041425141111">remote_ip_prefix</strong> and <strong id="vpc_sg02_0008__vpc_sg01_0005_b930519252110">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 "><p id="vpc_sg02_0008__p334792201607">Specifies the security group rule ID.</p>
|
|
<p id="vpc_sg02_0008__p529374054010">This parameter is not mandatory when you query security group rules.</p>
|
|
</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 the traffic for which the security group rule takes effect.</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 "><p id="vpc_sg02_0008__p8948417135013">Specifies the maximum port number. When ICMP is used, the value is the ICMP code.</p>
|
|
</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 "><p id="vpc_sg02_0008__p4949191713509">Specifies the minimum port number. If the ICMP protocol is used, this parameter indicates the ICMP type.</p>
|
|
<p id="vpc_sg02_0008__p594916176501">When the TCP or UDP protocol is used, both <strong id="vpc_sg02_0008__b143321341153211">port_range_max</strong> and <strong id="vpc_sg02_0008__b2333174111326">port_range_min</strong> must be specified, and the <strong id="vpc_sg02_0008__b133474120328">port_range_max</strong> value must be greater than the <strong id="vpc_sg02_0008__b633510416321">port_range_min</strong> value.</p>
|
|
<p id="vpc_sg02_0008__p189494172509">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>).</p>
|
|
</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 "><p id="vpc_sg02_0008__p1894915178504">Specifies the network type.</p>
|
|
<p id="vpc_sg02_0008__p568898621607">IPv4 and IPv6 are supported.</p>
|
|
</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 "><p id="vpc_sg02_0008__p1364635713332">Specifies the time (UTC) when the security group rule is created.</p>
|
|
<p id="vpc_sg02_0008__p65980291419">Format: <em id="vpc_sg02_0008__i56988266348">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</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 "><p id="vpc_sg02_0008__p1127018513343">Specifies the time (UTC) when the security group rule is updated.</p>
|
|
<p id="vpc_sg02_0008__p11481521141510">Format: <em id="vpc_sg02_0008__i1368510366348">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</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>
|
|
|