Files
doc-exports/docs/cfw/api-ref/CreateEastWestFirewall.html
qiaoli 9776db0ee8 First version of the CFW API
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>
2025-01-21 07:59:01 +00:00

356 lines
26 KiB
HTML

<a name="CreateEastWestFirewall"></a><a name="CreateEastWestFirewall"></a>
<h1 class="topictitle1">Creating an East-West Firewall</h1>
<div id="body1708331107508"><div class="section" id="CreateEastWestFirewall__section113711442202218"><h4 class="sectiontitle">Function</h4><p id="CreateEastWestFirewall__p10371942132213">This API is used to create an east-west firewall.</p>
</div>
<div class="section" id="CreateEastWestFirewall__section73719427222"><h4 class="sectiontitle">URI</h4><p id="CreateEastWestFirewall__p1237194222210">POST /v1/{project_id}/firewall/east-west</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__table18372164214221" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateEastWestFirewall__row937115421223"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreateEastWestFirewall__p4372134262217">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreateEastWestFirewall__p6372742132212">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreateEastWestFirewall__p1637284222213">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreateEastWestFirewall__p1037214217227">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row337104211225"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreateEastWestFirewall__p10372134262215">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreateEastWestFirewall__p8372114212226">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreateEastWestFirewall__p1137214423224">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreateEastWestFirewall__p16373104216227">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 class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__table037384217228" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="CreateEastWestFirewall__row103732042122212"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="CreateEastWestFirewall__p437394220227">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="CreateEastWestFirewall__p1637310426224">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="CreateEastWestFirewall__p93731042142213">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="CreateEastWestFirewall__p53741429222">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row11373124210229"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="CreateEastWestFirewall__p16374842172217">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="CreateEastWestFirewall__p4374542172219">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="CreateEastWestFirewall__p5374194218221">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="CreateEastWestFirewall__p19374114220229">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="CreateEastWestFirewall__b163741423221">0</strong>.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row9373154219223"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="CreateEastWestFirewall__p12374134282212">fw_instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="CreateEastWestFirewall__p537410429222">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="CreateEastWestFirewall__p33749421222">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="CreateEastWestFirewall__p1437444282220">Firewall ID, which can be obtained by referring to <a href="cfw_02_0028.html">Obtaining a Firewall ID</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEastWestFirewall__section18375204213223"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="CreateEastWestFirewall__row11375164215222"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreateEastWestFirewall__p10375342182220">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreateEastWestFirewall__p7375184232214">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreateEastWestFirewall__p93751042142213">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreateEastWestFirewall__p143761042172219">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row437584214228"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateEastWestFirewall__p237694272214">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateEastWestFirewall__p63761242172220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateEastWestFirewall__p19376542192210">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateEastWestFirewall__p1937684212215">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="CreateEastWestFirewall__row15745155117273"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateEastWestFirewall__p16987185572214">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateEastWestFirewall__p1453216872313">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateEastWestFirewall__p598785514223">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateEastWestFirewall__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="CreateEastWestFirewall__request_CreateEastWestFirewallRequestBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Request body parameters</caption><thead align="left"><tr id="CreateEastWestFirewall__row12376104282213"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateEastWestFirewall__p16377194272219">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateEastWestFirewall__p113774427222">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateEastWestFirewall__p19377642142213">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateEastWestFirewall__p15377124252214">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row163761142122210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateEastWestFirewall__p12377184219222">er_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateEastWestFirewall__p1837704219225">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateEastWestFirewall__p1037712429221">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateEastWestFirewall__p19378204214229">ID of the associated enterprise router in the outbound direction, which can be obtained by calling the API for querying the enterprise router list of the Enterprise Router service. Find the enterprise router ID in <strong id="CreateEastWestFirewall__b1437864232219">instances.id</strong> (The period [.] is used to separate different levels of objects).</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row14376174222213"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateEastWestFirewall__p15378442142214">inspection_vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateEastWestFirewall__p193788426220">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateEastWestFirewall__p9378242142219">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateEastWestFirewall__p13781542172219">Traffic diversion VPC ID.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row18376194212216"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateEastWestFirewall__p18378942132216">er_associated_subnet</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateEastWestFirewall__p6378542142218">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateEastWestFirewall__p1378144212214"><a href="#CreateEastWestFirewall__request_AssociatedSubnet">AssociatedSubnet</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateEastWestFirewall__p2378144219221">Subnet associated with an enterprise router.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row7377114212210"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateEastWestFirewall__p0378842192213">firewall_associated_subnets</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateEastWestFirewall__p16379942132213">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateEastWestFirewall__p1937944282212">Array of <a href="#CreateEastWestFirewall__request_AssociatedSubnet">AssociatedSubnet</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateEastWestFirewall__p8379104242211">List of subnets associated with a firewall.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateEastWestFirewall__request_AssociatedSubnet"></a><a name="request_AssociatedSubnet"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__request_AssociatedSubnet" frame="border" border="1" rules="all"><caption><b>Table 5 </b>AssociatedSubnet</caption><thead align="left"><tr id="CreateEastWestFirewall__row5379114214222"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="CreateEastWestFirewall__p1837934216229">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="CreateEastWestFirewall__p1380194215224">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="CreateEastWestFirewall__p1380742172214">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="CreateEastWestFirewall__p123801742192218">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row183792425224"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateEastWestFirewall__p1938004213221">az</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateEastWestFirewall__p5380242142212">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateEastWestFirewall__p103801442132218">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateEastWestFirewall__p838094214228">AZ.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row15379442192217"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateEastWestFirewall__p19380134218220">subnet_segment</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateEastWestFirewall__p1338034282217">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateEastWestFirewall__p18381104212215">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateEastWestFirewall__p738174252211">Subnet CIDR block.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row137924216227"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateEastWestFirewall__p1738164212220">subnet_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateEastWestFirewall__p17381124211228">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateEastWestFirewall__p438154218229">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateEastWestFirewall__p6381542192216">Subnet name.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEastWestFirewall__section15381104262212"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateEastWestFirewall__p2381114211226"><strong id="CreateEastWestFirewall__b163811542112214">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__response_CreateEastWestFirewallResponseBody" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="CreateEastWestFirewall__row11381142112217"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="CreateEastWestFirewall__p1538214429229">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="CreateEastWestFirewall__p1238212429222">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="CreateEastWestFirewall__p173821542122215">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row19381184232215"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateEastWestFirewall__p0382144292217">data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateEastWestFirewall__p14382942142210"><a href="#CreateEastWestFirewall__response_CreateEWFirewallResp">CreateEWFirewallResp</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateEastWestFirewall__p438294211228">Return value for creating an east-west firewall.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateEastWestFirewall__response_CreateEWFirewallResp"></a><a name="response_CreateEWFirewallResp"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__response_CreateEWFirewallResp" frame="border" border="1" rules="all"><caption><b>Table 7 </b>CreateEWFirewallResp</caption><thead align="left"><tr id="CreateEastWestFirewall__row13382144219222"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="CreateEastWestFirewall__p638314252214">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="CreateEastWestFirewall__p6383114212225">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="CreateEastWestFirewall__p19383104215226">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row11382942182214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateEastWestFirewall__p143831642112215">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateEastWestFirewall__p15383164213226">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateEastWestFirewall__p438324211223">East-west protection ID, corresponding to the <strong id="CreateEastWestFirewall__b12384154252212">object_id</strong> field.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row238374218224"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateEastWestFirewall__p17384144215221">er</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateEastWestFirewall__p93841042182217"><a href="#CreateEastWestFirewall__response_ER">ER</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateEastWestFirewall__p83845420227">Enterprise router information.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row10383144211220"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="CreateEastWestFirewall__p6384174210227">inspertion_vpc</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="CreateEastWestFirewall__p1938410428227"><a href="#CreateEastWestFirewall__response_CreateEWFirewallInspectVpcResp">CreateEWFirewallInspectVpcResp</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="CreateEastWestFirewall__p103841542142210">Information about the traffic diversion VPC.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateEastWestFirewall__response_ER"></a><a name="response_ER"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__response_ER" frame="border" border="1" rules="all"><caption><b>Table 8 </b>ER</caption><thead align="left"><tr id="CreateEastWestFirewall__row138412426220"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="CreateEastWestFirewall__p73851242192217">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="CreateEastWestFirewall__p3385114212211">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="CreateEastWestFirewall__p738554252215">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row33841242102214"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateEastWestFirewall__p938513429228">er_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateEastWestFirewall__p123851142102220">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateEastWestFirewall__p43851942132215">Enterprise router ID, which is referenced when east-west protection is created.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row1838414211224"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateEastWestFirewall__p14386442142217">er_attach_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateEastWestFirewall__p838664215221">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateEastWestFirewall__p3386114215229">Connection ID of an enterprise router. This connection is used to connect the firewall and the enterprise router. This field can be used to obtain the connection details on the connection management page after querying a specified enterprise router by its ID on the Enterprise Router page.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateEastWestFirewall__response_CreateEWFirewallInspectVpcResp"></a><a name="response_CreateEWFirewallInspectVpcResp"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__response_CreateEWFirewallInspectVpcResp" frame="border" border="1" rules="all"><caption><b>Table 9 </b>CreateEWFirewallInspectVpcResp</caption><thead align="left"><tr id="CreateEastWestFirewall__row12386184211225"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="CreateEastWestFirewall__p1038684272218">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="CreateEastWestFirewall__p23869421222">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="CreateEastWestFirewall__p338710422226">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row1638664202211"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreateEastWestFirewall__p13871042122211">vpc_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreateEastWestFirewall__p15387204262211">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreateEastWestFirewall__p10387134219225">ID of a traffic diversion VPC.</p>
</td>
</tr>
<tr id="CreateEastWestFirewall__row538612422228"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="CreateEastWestFirewall__p173871642182219">subnet_ids</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="CreateEastWestFirewall__p03872042172220">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="CreateEastWestFirewall__p338784214229">Subnet ID list of the created traffic diversion VPC.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEastWestFirewall__section153875422229"><h4 class="sectiontitle">Example Requests</h4><p id="CreateEastWestFirewall__p123871942102214">Under firewall 55b26ab5-e4b0-40e8-941c-a1778fe2a500 in project 09bb24e6f280d23d0f9fc0104b901480, create a firewall in enterprise router mode. The enterprise router ID is 0eb296a4-aa9b-493e-b58a-ce993a16edfc, the traffic diversion VPC is 0eb296a4-aa9b-493e-b58a-ce993a16edfd, the subnets associated with the firewall are fw-subnet and cfw-subnet, and the subnet associated with the enterprise router is er-subnet.</p>
<pre class="screen" id="CreateEastWestFirewall__screen173882042192216">https://{Endpoint}/v1/09bb24e6f280d23d0f9fc0104b901480/firewall/east-west?fw_instance_id=55b26ab5-e4b0-40e8-941c-a1778fe2a500&amp;enterprise_project_id=default
{
"er_associated_subnet" : {
"cidr" : "192.168.2.0/24",
"name" : "er-subnet",
"vpc_id" : "0eb296a4-aa9b-493e-b58a-ce993a16edfd"
},
"er_id" : "0eb296a4-aa9b-493e-b58a-ce993a16edfc",
"firewall_associated_subnets" : [ {
"cidr" : "192.168.1.0/24",
"name" : "fw-subnet",
"vpc_id" : "0eb296a4-aa9b-493e-b58a-ce993a16edfd"
}, {
"cidr" : "192.168.3.0/24",
"name" : "cfw-subnet",
"vpc_id" : "0eb296a4-aa9b-493e-b58a-ce993a16edfd"
} ],
"inspection_vpc_id" : "0eb296a4-aa9b-493e-b58a-ce993a16edfd"
}</pre>
</div>
<div class="section" id="CreateEastWestFirewall__section12389742112212"><h4 class="sectiontitle">Example Responses</h4><p id="CreateEastWestFirewall__p14389114218222"><strong id="CreateEastWestFirewall__b183899426221">Status code: 200</strong></p>
<p id="CreateEastWestFirewall__p23891642152217">Return value for creating an east-west firewall.</p>
<pre class="screen" id="CreateEastWestFirewall__screen1389184222211">{
"data" : {
"id" : "acc86ca7-818b-4c3d-8a9a-3915a2b21651",
"er" : {
"er_id" : "f0f5275a-40aa-4d1e-ac78-2550f7818d43",
"er_attach_id" : "bd62ddd3-5e20-482b-aefa-9e2940e2b1a9"
},
"inspertion_vpc" : {
"vpc_id" : "00672633-0466-4c35-99ef-5e3f5c813a4b",
"subnet_ids" : [ "294682a0-1e85-45f5-92c8-e52bee09c204", "a86277bb-35d5-4442-bc0b-2e9d4e6a9080", "95829240-14e0-47e6-b9e7-2ac228e7b00f" ]
}
}
}</pre>
</div>
<div class="section" id="CreateEastWestFirewall__section4591124212223"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateEastWestFirewall__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateEastWestFirewall__row19399124242212"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreateEastWestFirewall__p11591154262218">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreateEastWestFirewall__p55915421227">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateEastWestFirewall__row1339994219227"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateEastWestFirewall__p3591442102215">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateEastWestFirewall__p145911542112214">Return value for creating an east-west firewall.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateEastWestFirewall__section1959144213224"><h4 class="sectiontitle">Error Codes</h4><p id="CreateEastWestFirewall__p459154212228">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>