forked from docs/doc-exports
Reviewed-by: Kucerak, Kristian <kristian.kucerak@t-systems.com> Co-authored-by: gtema <artem.goncharov@gmail.com> Co-committed-by: gtema <artem.goncharov@gmail.com>
340 lines
26 KiB
HTML
340 lines
26 KiB
HTML
<a name="vpc_sg02_0003"></a><a name="vpc_sg02_0003"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Security Group</h1>
|
|
<div id="body1495612692297"><div class="section" id="vpc_sg02_0003__section3720668916116"><h4 class="sectiontitle">Function</h4><p id="vpc_sg02_0003__p2857236516116">This API is used to create a security group.</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0003__section745182516116"><h4 class="sectiontitle">URI</h4><p id="vpc_sg02_0003__p8543133111613">POST /v2.0/security-groups</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0003__section4818631316116"><h4 class="sectiontitle">Request Message</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0003__table3697372616116" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_sg02_0003__row2546787016116"><th align="left" class="cellrowborder" valign="top" width="14.44%" id="mcps1.3.3.2.2.5.1.1"><p id="vpc_sg02_0003__p5679273516116"><strong id="vpc_sg02_0003__b203501313101718">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="9.9%" id="mcps1.3.3.2.2.5.1.2"><p id="vpc_sg02_0003__p1571843716116"><strong id="vpc_sg02_0003__b8510121601719">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.549999999999999%" id="mcps1.3.3.2.2.5.1.3"><p id="vpc_sg02_0003__p805282316116"><strong id="vpc_sg02_0003__b18161419181712">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="61.11%" id="mcps1.3.3.2.2.5.1.4"><p id="vpc_sg02_0003__p5322986716116"><strong id="vpc_sg02_0003__b0736152110171">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0003__row1360551216116"><td class="cellrowborder" valign="top" width="14.44%" headers="mcps1.3.3.2.2.5.1.1 "><p id="vpc_sg02_0003__p5104828416116">security_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="9.9%" headers="mcps1.3.3.2.2.5.1.2 "><p id="vpc_sg02_0003__p3558909616116">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.549999999999999%" headers="mcps1.3.3.2.2.5.1.3 "><p id="vpc_sg02_0003__p714515916116"><a href="#vpc_sg02_0003__table513726041607">security_group </a>object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="61.11%" headers="mcps1.3.3.2.2.5.1.4 "><p id="vpc_sg02_0003__p4305865716116">Specifies the security group. For details, see <a href="#vpc_sg02_0003__table513726041607">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg02_0003__table513726041607"></a><a name="table513726041607"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0003__table513726041607" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_sg02_0003__b770120377179">Security Group</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0003__row72893461607"><th align="left" class="cellrowborder" valign="top" width="14.31%" id="mcps1.3.3.3.2.5.1.1"><p id="vpc_sg02_0003__p647825491607"><strong id="vpc_sg02_0003__b1226015407179">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="8.959999999999999%" id="mcps1.3.3.3.2.5.1.2"><p id="vpc_sg02_0003__p1075015422371"><strong id="vpc_sg02_0003__b232715425174">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.66%" id="mcps1.3.3.3.2.5.1.3"><p id="vpc_sg02_0003__p245230881607"><strong id="vpc_sg02_0003__b4542134411173">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="62.07%" id="mcps1.3.3.3.2.5.1.4"><p id="vpc_sg02_0003__p4542071607"><strong id="vpc_sg02_0003__b1879315479173">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0003__row356666781607"><td class="cellrowborder" valign="top" width="14.31%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0003__p270644691607">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.959999999999999%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0003__p87501142163712">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.66%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0003__p426717071607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.07%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_sg02_0003__p29740751607">Specifies the security group name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row5261561607"><td class="cellrowborder" valign="top" width="14.31%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_sg02_0003__p76095411607">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="8.959999999999999%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_sg02_0003__p11750124243714">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.66%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_sg02_0003__p597100051607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.07%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_sg02_0003__p40269061607">Provides supplementary information about the security group.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0003__section2285655116116"><h4 class="sectiontitle">Response Message</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0003__table6597002216116" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter</caption><thead align="left"><tr id="vpc_sg02_0003__row3852245716116"><th align="left" class="cellrowborder" valign="top" width="23.169999999999998%" id="mcps1.3.4.2.2.4.1.1"><p id="vpc_sg02_0003__p5239237116116">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25.61%" id="mcps1.3.4.2.2.4.1.2"><p id="vpc_sg02_0003__p5702934716116">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.22%" id="mcps1.3.4.2.2.4.1.3"><p id="vpc_sg02_0003__p5255764216116">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0003__row1989548816116"><td class="cellrowborder" valign="top" width="23.169999999999998%" headers="mcps1.3.4.2.2.4.1.1 "><p id="vpc_sg02_0003__p3843802816116">security_group</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25.61%" headers="mcps1.3.4.2.2.4.1.2 "><p id="vpc_sg02_0003__p4806907216116"><a href="#vpc_sg02_0003__table32081555104215">security_group </a>object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.4.2.2.4.1.3 "><p id="vpc_sg02_0003__p944057316116">Specifies the security group. For details, see <a href="#vpc_sg02_0003__table32081555104215">Table 4</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg02_0003__table32081555104215"></a><a name="table32081555104215"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0003__table32081555104215" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_sg02_0003__b19922020191818">Security Group</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0003__row11209155574211"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.4.3.2.4.1.1"><p id="vpc_sg02_0003__p8209855204216"><strong id="vpc_sg02_0003__b18343122361815">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.330000000000002%" id="mcps1.3.4.3.2.4.1.2"><p id="vpc_sg02_0003__p6209455164212"><strong id="vpc_sg02_0003__b167351424191814">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="vpc_sg02_0003__p220935519423"><strong id="vpc_sg02_0003__b1465842581819">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0003__row284118681607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p6322881607">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p206339641607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p538811831607">Specifies the security group ID.</p>
|
|
<p id="vpc_sg02_0003__p7631141813810">This parameter is not mandatory when you query security groups.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row487759591607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p499705331607">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p26621541607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p10487112">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row202102055194211"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p0210165544220">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p9210155544212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p921095512423">Specifies the security group name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row20210455144220"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p121012559426">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p1221011557421">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p521018559423">Provides supplementary information about the security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row141788771607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p574773991607">security_group_rules</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p263715271607">Array of <a href="#vpc_sg02_0003__table655457801607">Security Group Rule</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p577222241607">Specifies the security group rule list. For details, see <a href="#vpc_sg02_0003__table655457801607">Table 5</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row19560720141817"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p870051413911">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p15700614790">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p13953143814304">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row5768162761818"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p1953114119914">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p595318416919">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p1395374115919">Specifies the time (UTC) when the security group is created.</p>
|
|
<p id="vpc_sg02_0003__p65980291419">Format: <em id="vpc_sg02_0003__i13381624191919">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__row4242824111816"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.3.2.4.1.1 "><p id="vpc_sg02_0003__p139719548912">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.3.2.4.1.2 "><p id="vpc_sg02_0003__p53971154594">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="vpc_sg02_0003__p1339713549918">Specifies the time (UTC) when the security group is updated.</p>
|
|
<p id="vpc_sg02_0003__p48631659131118">Format: <em id="vpc_sg02_0003__i18746192915197">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="vpc_sg02_0003__table655457801607"></a><a name="table655457801607"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_sg02_0003__table655457801607" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="vpc_sg02_0003__vpc_sg02_0006_b842352706151318">Security Group Rule</strong> objects</caption><thead align="left"><tr id="vpc_sg02_0003__vpc_sg02_0006_row54478641607"><th align="left" class="cellrowborder" valign="top" width="26.669999999999998%" id="mcps1.3.4.4.2.4.1.1"><p id="vpc_sg02_0003__vpc_sg02_0006_p389969021607"><strong id="vpc_sg02_0003__vpc_sg02_0006_b195868418291">Attribute</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.330000000000002%" id="mcps1.3.4.4.2.4.1.2"><p id="vpc_sg02_0003__vpc_sg02_0006_p36789391607"><strong id="vpc_sg02_0003__vpc_sg02_0006_b582815515290">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="vpc_sg02_0003__vpc_sg02_0006_p433861031607"><strong id="vpc_sg02_0003__vpc_sg02_0006_b198338642916">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="vpc_sg02_0003__vpc_sg02_0006_row134774871607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p269083981607">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p630670281607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p334792201607">Specifies the security group rule ID.</p>
|
|
<p id="vpc_sg02_0003__vpc_sg02_0006_p529374054010">This parameter is not mandatory when you query security group rules.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row250554771607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p254411021607">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p505368621607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p480145951607">Provides supplementary information about the security group rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row569401671607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p115724181607">security_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p615991711607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p587796621607">Specifies the ID of the belonged security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row654332091607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p113008931607">remote_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p170542961607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p141218971607">Specifies the peer ID of the belonged security group.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row9932071607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p657989401607">direction</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p507988391607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__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_0003__vpc_sg02_0006_row97529031607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p478834691607">remote_ip_prefix</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p622759951607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p146708701607">Specifies the peer IP address segment.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row315033981607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p163656291607">protocol</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p628340441607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p99902671607">Specifies the protocol type or the IP protocol number.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row551583771607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p97886331607">port_range_max</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p343603851607">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__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_0003__vpc_sg02_0006_row456604071607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p630384091607">port_range_min</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p337362901607">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__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_0003__vpc_sg02_0006_p5690808615417">When the TCP or UDP protocol is used, both <strong id="vpc_sg02_0003__vpc_sg02_0006_b84235270621055">port_range_max</strong> and <strong id="vpc_sg02_0003__vpc_sg02_0006_b8423527062112">port_range_min</strong> must be specified, and the <strong id="vpc_sg02_0003__vpc_sg02_0006_b43870256421149">port_range_max</strong> value must be greater than the <strong id="vpc_sg02_0003__vpc_sg02_0006_b70589128621159">port_range_min</strong> value.</p>
|
|
<p id="vpc_sg02_0003__vpc_sg02_0006_p4241072615417">When the ICMP protocol is used, if you specify the ICMP code (<strong id="vpc_sg02_0003__vpc_sg02_0006_b84235270621317">port_range_max</strong>), you must also specify the ICMP type (<strong id="vpc_sg02_0003__vpc_sg02_0006_b84235270621326">port_range_min</strong>).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row360773491607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p364292801607">ethertype</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p339523071607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p34728681607">Specifies the network type.</p>
|
|
<p id="vpc_sg02_0003__vpc_sg02_0006_p568898621607">IPv4 and IPv6 are supported.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row532124261607"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p593368391607">tenant_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p130282191607">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p10487112">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row226972613121"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p114291339201219">remote_address_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p6429183913122">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><ul id="vpc_sg02_0003__vpc_sg02_0006_ul871718283154"><li id="vpc_sg02_0003__vpc_sg02_0006_vpc_sg01_0001_li106781571627">Specifies the remote IP address group ID.</li><li id="vpc_sg02_0003__vpc_sg02_0006_vpc_sg01_0001_li767815571025">The value is exclusive with parameters <strong id="vpc_sg02_0003__vpc_sg02_0006_vpc_sg01_0001_b1185142797">remote_ip_prefix</strong> and <strong id="vpc_sg02_0003__vpc_sg02_0006_vpc_sg01_0001_b64611932598">remote_group_id</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row11992111863317"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p169261732143314">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p69311132153317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p13646103310">Specifies the project ID. </p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row10903153923318"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p6634195714335">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p12638157153319">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p1364635713332">Specifies the time (UTC) when the security group rule is created.</p>
|
|
<p id="vpc_sg02_0003__vpc_sg02_0006_p65980291419">Format: <em id="vpc_sg02_0003__vpc_sg02_0006_i1034411227245">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="vpc_sg02_0003__vpc_sg02_0006_row1797311427338"><td class="cellrowborder" valign="top" width="26.669999999999998%" headers="mcps1.3.4.4.2.4.1.1 "><p id="vpc_sg02_0003__vpc_sg02_0006_p1725445103416">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.330000000000002%" headers="mcps1.3.4.4.2.4.1.2 "><p id="vpc_sg02_0003__vpc_sg02_0006_p192601514345">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="vpc_sg02_0003__vpc_sg02_0006_p1127018513343">Specifies the time (UTC) when the security group rule is updated.</p>
|
|
<p id="vpc_sg02_0003__vpc_sg02_0006_p19850105451210">Format: <em id="vpc_sg02_0003__vpc_sg02_0006_i1647183316242">yyyy-MM-ddTHH:mm:ss</em></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0003__section6015182016116"><h4 class="sectiontitle">Example:</h4><p id="vpc_sg02_0003__p939318336719">Example request</p>
|
|
<pre class="screen" id="vpc_sg02_0003__screen85725413370">POST https://{Endpoint}/v2.0/security-groups
|
|
|
|
{
|
|
"security_group": {
|
|
"name": "sg-test"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<p id="vpc_sg02_0003__p15924104716717">Example response</p>
|
|
<pre class="screen" id="vpc_sg02_0003__screen8418719103812">{
|
|
"security_group": {
|
|
"id": "d29ae17d-f355-4992-8747-1fb66cc9afd2",
|
|
"name": "sg-test",
|
|
"description": "",
|
|
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
|
|
"project_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
|
|
"security_group_rules": [
|
|
{
|
|
"id": "3f51e52c-0e85-40f7-a137-85927392e436",
|
|
"direction": "egress",
|
|
"protocol": null,
|
|
"ethertype": "IPv4",
|
|
"description": null,
|
|
"remote_group_id": null,
|
|
"remote_ip_prefix": null,
|
|
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
|
|
"port_range_max": null,
|
|
"port_range_min": null,
|
|
"security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2",
|
|
"remote_address_group_id": null
|
|
},
|
|
{
|
|
"id": "6332de3e-98fb-4f8c-b44a-fcb8ff09881e",
|
|
"direction": "egress",
|
|
"protocol": null,
|
|
"ethertype": "IPv6",
|
|
"description": null,
|
|
"remote_group_id": null,
|
|
"remote_ip_prefix": null,
|
|
"tenant_id": "bbfe8c41dd034a07bebd592bf03b4b0c",
|
|
"port_range_max": null,
|
|
"port_range_min": null,
|
|
"security_group_id": "d29ae17d-f355-4992-8747-1fb66cc9afd2",
|
|
"remote_address_group_id": null
|
|
}
|
|
],
|
|
"created_at": "2018-09-20T02:15:34",
|
|
"updated_at": "2018-09-20T02:15:34"
|
|
}
|
|
}</pre>
|
|
<div class="section" id="vpc_sg02_0003__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_sg02_0003__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="vpc_sg02_0003__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_sg02_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_sg02_0000.html">Security Group</a></div>
|
|
</div>
|
|
</div>
|
|
|