forked from docs/doc-exports
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: qiaoli <qiaoli@huawei.com> Co-committed-by: qiaoli <qiaoli@huawei.com>
472 lines
32 KiB
HTML
472 lines
32 KiB
HTML
<a name="CreateFirewall"></a><a name="CreateFirewall"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Firewall</h1>
|
|
<div id="body1708331107508"><div class="section" id="CreateFirewall__section18818241162218"><h4 class="sectiontitle">Function</h4><p id="CreateFirewall__p5818141132215">This API is used to create a firewall.</p>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section1481894162220"><h4 class="sectiontitle">URI</h4><p id="CreateFirewall__p2081964118226">POST /v2/{project_id}/firewall</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__table9820154112212" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateFirewall__row581913416228"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreateFirewall__p1382010416223">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreateFirewall__p11820341102217">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreateFirewall__p882164192212">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreateFirewall__p14821114114222">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row1820134115223"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreateFirewall__p17821641172212">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreateFirewall__p13821154182215">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreateFirewall__p982219414222">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreateFirewall__p3822241132219">Project ID, which can be obtained by calling an API or from the console. For details, see <a href="cfw_02_0015.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section18221241182215"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="CreateFirewall__row20823041162214"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreateFirewall__p15824134182213">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreateFirewall__p1382484142214">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreateFirewall__p198241341162215">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreateFirewall__p11824841142218">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row148236412225"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateFirewall__p68258416222">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateFirewall__p198258414222">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateFirewall__p8825114172214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateFirewall__p1482511412226">User token. You can obtain the token by referring to <a href="cfw_02_0029.html">Obtaining a User Token</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row4824741122218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateFirewall__p13826184112228">X-Client-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateFirewall__p12826174152217">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateFirewall__p16826174142214">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateFirewall__p12826184182213">Identifier that ensures idempotency of client requests.</p>
|
|
<p id="CreateFirewall__p4827114152210">It is a 32-bit UUID and is generated by the client. The value must be unique.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row098645515225"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateFirewall__p16987185572214">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateFirewall__p1453216872313">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateFirewall__p598785514223">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateFirewall__p1821149193417">Content type. It can only be set to application/json.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__request_CreateFirewallReq" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="CreateFirewall__row128271141192217"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateFirewall__p158298418229">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateFirewall__p15829184110224">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateFirewall__p2829124115227">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateFirewall__p9829194142216">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row17828124122217"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateFirewall__p882914418228">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateFirewall__p483019416229">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateFirewall__p168301741162210">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateFirewall__p1683024132215">Firewall name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row138281141162211"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateFirewall__p2830114112226">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateFirewall__p1183017418223">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateFirewall__p20831194118224">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateFirewall__p583134112228">Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to <a href="cfw_02_0027.html">Obtaining an Enterprise Project ID</a>. If the enterprise project function is not enabled, the value is <strong id="CreateFirewall__b1783111415221">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row1182813414222"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateFirewall__p683184152210">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateFirewall__p1583164118224">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateFirewall__p68311341192220">Array of <a href="#CreateFirewall__request_tags">tags</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateFirewall__p4831141132210">List of service resource tags. After tags are added to firewall resources, you can query resources and combine CDRs by key and value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row14828194110229"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateFirewall__p11831341182218">flavor</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateFirewall__p283294192215">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateFirewall__p13832241152214"><a href="#CreateFirewall__request_flavor">flavor</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateFirewall__p1283284182213">Firewall specifications.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row88281541182211"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateFirewall__p1583264112225">charge_info</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateFirewall__p183234112225">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateFirewall__p13832174112221"><a href="#CreateFirewall__request_charge_info">charge_info</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateFirewall__p68321241192217">Billing type, which can be yearly/monthly or pay-per-use (default setting).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__request_tags"></a><a name="request_tags"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__request_tags" frame="border" border="1" rules="all"><caption><b>Table 4 </b>tags</caption><thead align="left"><tr id="CreateFirewall__row18832114192219"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="CreateFirewall__p8833194118228">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="CreateFirewall__p1483315416225">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="CreateFirewall__p283313419221">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="CreateFirewall__p1683344162218">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row7833104122218"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateFirewall__p183319414227">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateFirewall__p68342419229">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateFirewall__p158349410227">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateFirewall__p8834141142216">Resource tag key.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row1483354102214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateFirewall__p883494110223">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateFirewall__p1834114114228">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateFirewall__p68341041122217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateFirewall__p11834641172212">Resource tag value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__request_flavor"></a><a name="request_flavor"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__request_flavor" frame="border" border="1" rules="all"><caption><b>Table 5 </b>flavor</caption><thead align="left"><tr id="CreateFirewall__row12834134119223"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.1"><p id="CreateFirewall__p18835184152217">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.2"><p id="CreateFirewall__p2835184192216">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.3"><p id="CreateFirewall__p1683515412222">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.5.2.5.1.4"><p id="CreateFirewall__p1835144113221">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row13834114116225"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="CreateFirewall__p483518418221">version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="CreateFirewall__p11835541102212">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="CreateFirewall__p18351641142219">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="CreateFirewall__p188361441142215">Firewall edition. Only the professional edition is supported.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__request_charge_info"></a><a name="request_charge_info"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__request_charge_info" frame="border" border="1" rules="all"><caption><b>Table 6 </b>charge_info</caption><thead align="left"><tr id="CreateFirewall__row138361241172216"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.1"><p id="CreateFirewall__p183634111222">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.2"><p id="CreateFirewall__p8836194192220">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.6.2.5.1.3"><p id="CreateFirewall__p10837141112218">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.6.2.5.1.4"><p id="CreateFirewall__p5837144114222">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row8836241112210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.1 "><p id="CreateFirewall__p18371941122216">charge_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.2 "><p id="CreateFirewall__p783724162218">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.6.2.5.1.3 "><p id="CreateFirewall__p1983774132216">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.6.2.5.1.4 "><p id="CreateFirewall__p0837204152211">Billing mode. The value can only be <strong id="CreateFirewall__b1283774116226">postPaid</strong>, indicating pay-per-use billing.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section183714182211"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateFirewall__p583784172212"><strong id="CreateFirewall__b283715411221">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__response_CreateFirewallResp" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="CreateFirewall__row483817415229"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="CreateFirewall__p1883814115224">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="CreateFirewall__p9838114112214">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="CreateFirewall__p18838124142215">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row0838194114222"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateFirewall__p7838114122211">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateFirewall__p17838134117224">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateFirewall__p20839104102213">Instance creation task ID. This parameter is returned only when pay-per-use instances are created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row38381241202210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateFirewall__p98391641192215">order_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateFirewall__p48396415225">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateFirewall__p28399412225">Order ID. This parameter is returned only when yearly/monthly instances are created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row3838204172214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateFirewall__p168391441102213">data</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateFirewall__p138392041102220"><a href="#CreateFirewall__response_CreateFirewallReq">CreateFirewallReq</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateFirewall__p383918416223">Request body for creating a firewall.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__response_CreateFirewallReq"></a><a name="response_CreateFirewallReq"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__response_CreateFirewallReq" frame="border" border="1" rules="all"><caption><b>Table 8 </b>CreateFirewallReq</caption><thead align="left"><tr id="CreateFirewall__row683914119223"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="CreateFirewall__p1984024119221">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="CreateFirewall__p1784054112226">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="CreateFirewall__p108403416226">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row3839184122215"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateFirewall__p9840164112221">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateFirewall__p20840104152212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateFirewall__p10840154114225">Firewall name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row18839144112225"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateFirewall__p1584019414228">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateFirewall__p1684174111227">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateFirewall__p1584110417228">Enterprise project ID, which is the ID of a project planned based on organizations. You can obtain the enterprise project ID by referring to <a href="cfw_02_0027.html">Obtaining an Enterprise Project ID</a>. If the enterprise project function is not enabled, the value is <strong id="CreateFirewall__b10841164119222">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row11839341162214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateFirewall__p98411041202210">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateFirewall__p0841841102210">Array of <a href="#CreateFirewall__response_tags">tags</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateFirewall__p108411841192214">List of service resource tags. After tags are added to firewall resources, you can query resources and combine CDRs by key and value.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row1984034110227"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateFirewall__p1884144111221">flavor</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateFirewall__p1784114117229"><a href="#CreateFirewall__response_flavor">flavor</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateFirewall__p1484110414220">Firewall specifications.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row18840124117229"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateFirewall__p58411541152217">charge_info</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateFirewall__p18421241102218"><a href="#CreateFirewall__response_charge_info">charge_info</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateFirewall__p2084210413229">Billing type, which can be yearly/monthly or pay-per-use (default setting).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__response_tags"></a><a name="response_tags"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__response_tags" frame="border" border="1" rules="all"><caption><b>Table 9 </b>tags</caption><thead align="left"><tr id="CreateFirewall__row198422041142211"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="CreateFirewall__p1584254152216">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="CreateFirewall__p14843154111222">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="CreateFirewall__p6843154142218">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row68424417228"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateFirewall__p2843641122213">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateFirewall__p7843154192212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateFirewall__p1843164142212">Resource tag key.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row6842341112217"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateFirewall__p118433410226">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateFirewall__p684384117221">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateFirewall__p1184314172213">Resource tag value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__response_flavor"></a><a name="response_flavor"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__response_flavor" frame="border" border="1" rules="all"><caption><b>Table 10 </b>flavor</caption><thead align="left"><tr id="CreateFirewall__row1584494116229"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="CreateFirewall__p1084484112222">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="CreateFirewall__p13844104113226">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="CreateFirewall__p3844641172210">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row484412416224"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreateFirewall__p16844341182219">version</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreateFirewall__p8844241122211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreateFirewall__p10844241132212">Firewall edition. Only the professional edition is supported.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="CreateFirewall__response_charge_info"></a><a name="response_charge_info"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__response_charge_info" frame="border" border="1" rules="all"><caption><b>Table 11 </b>charge_info</caption><thead align="left"><tr id="CreateFirewall__row10845341162212"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p id="CreateFirewall__p1084564132217">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p id="CreateFirewall__p18845114112224">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p id="CreateFirewall__p1084524182217">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row184584117227"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateFirewall__p138451641192215">charge_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateFirewall__p19845184192217">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateFirewall__p12846114116225">Billing mode. The value can only be <strong id="CreateFirewall__b208469414229">postPaid</strong>, indicating pay-per-use billing.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="CreateFirewall__p18846194110224"><strong id="CreateFirewall__b16846241172219">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__response_ErrorRsp" frame="border" border="1" rules="all"><caption><b>Table 12 </b>Response body parameters</caption><thead align="left"><tr id="CreateFirewall__row19846341132216"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.4.1.1"><p id="CreateFirewall__p2084674113224">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.4.1.2"><p id="CreateFirewall__p16846204110226">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.9.2.4.1.3"><p id="CreateFirewall__p18461841172219">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row6846114122213"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateFirewall__p158471141122220">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateFirewall__p1684719417220">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateFirewall__p1084724142214">Error code.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row1784684120222"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateFirewall__p12847184115226">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateFirewall__p12847194110229">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateFirewall__p7847541102220">Error description.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section78471441152216"><h4 class="sectiontitle">Example Requests</h4><p id="CreateFirewall__p19847104152216">The customer whose project ID is 124147da-5b08-471a-93d2-bc82acc290c6 subscribes to the standard firewall. The firewall name is <strong id="CreateFirewall__b6847741142217">CFW-Test</strong>, the enterprise project ID is <strong id="CreateFirewall__b584724113227">0</strong>, the resource tag is a key-value pair, the key is <strong id="CreateFirewall__b1784718412227">TagKey</strong>, the value is <strong id="CreateFirewall__b1984720413220">TagValue</strong>, the added number of protected EIPs is 2000, the added protection bandwidth is 5000 Mbit/s, and the added number of protected VPCs is 100. The yearly/monthly billing mode is used. Auto-renewal and auto-payment are enabled. The usage duration is one month.</p>
|
|
<pre class="screen" id="CreateFirewall__screen16848164142210">https://{Endpoint}/v2/124147da-5b08-471a-93d2-bc82acc290c6/firewall
|
|
|
|
{
|
|
"name" : "CFW-TEST",
|
|
"enterprise_project_id" : "0",
|
|
"tags" : [ {
|
|
"key" : "TagKey",
|
|
"value" : "TagVal"
|
|
} ],
|
|
"flavor" : {
|
|
"version" : "standard",
|
|
"extend_eip_count" : 2000,
|
|
"extend_bandwidth" : 5000,
|
|
"extend_vpc_count" : 100
|
|
},
|
|
"charge_info" : {
|
|
"charge_mode" : "prePaid",
|
|
"period_type" : "month",
|
|
"period_num" : 1,
|
|
"is_auto_renew" : true,
|
|
"is_auto_pay" : true
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section148491141162212"><h4 class="sectiontitle">Example Responses</h4><p id="CreateFirewall__p11849194142210"><strong id="CreateFirewall__b98491941132211">Status code: 200</strong></p>
|
|
<p id="CreateFirewall__p198498413225">Information returned when the firewall is purchased successfully.</p>
|
|
<pre class="screen" id="CreateFirewall__screen1685016418223">{
|
|
"data" : {
|
|
"charge_info" : {
|
|
"charge_mode" : "prePaid",
|
|
"is_auto_pay" : true,
|
|
"is_auto_renew" : true,
|
|
"period_num" : 1,
|
|
"period_type" : "month"
|
|
},
|
|
"enterprise_project_id" : "0",
|
|
"flavor" : {
|
|
"extend_bandwidth" : 5000,
|
|
"extend_eip_count" : 2000,
|
|
"extend_vpc_count" : 100,
|
|
"version" : "Standard"
|
|
},
|
|
"name" : "CFW-TEST",
|
|
"tags" : [ {
|
|
"key" : "TagKey",
|
|
"value" : "TagVal"
|
|
} ]
|
|
},
|
|
"job_id" : "CS2403271050ZEM0L"
|
|
}</pre>
|
|
<p id="CreateFirewall__p1186742162210"><strong id="CreateFirewall__b386184215228">Status code: 400</strong></p>
|
|
<p id="CreateFirewall__p13868429220">Returned error information.</p>
|
|
<pre class="screen" id="CreateFirewall__screen20861942182217">{
|
|
"error_code" : "CFW.00100001",
|
|
"error_msg" : "System busy. Try again later."
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section7921742202217"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateFirewall__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateFirewall__row7863104152219"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreateFirewall__p12923428224">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreateFirewall__p9928427226">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="CreateFirewall__row128631241172210"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateFirewall__p592134215221">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateFirewall__p169244242214">Information returned when the firewall is purchased successfully.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="CreateFirewall__row686334132219"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateFirewall__p1692342182217">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateFirewall__p17926426220">Returned error information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="CreateFirewall__section179294212224"><h4 class="sectiontitle">Error Codes</h4><p id="CreateFirewall__p169294262220">See <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000000.html">Firewall Management</a></div>
|
|
</div>
|
|
</div>
|
|
|