Files
doc-exports/docs/cfw/api-ref/DeleteAclRule.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

247 lines
17 KiB
HTML

<a name="DeleteAclRule"></a><a name="DeleteAclRule"></a>
<h1 class="topictitle1">Deleting an ACL Rule</h1>
<div id="body1708331107508"><div class="section" id="DeleteAclRule__section143105390284"><h4 class="sectiontitle">Function</h4><p id="DeleteAclRule__p113106398281">This API is used to delete an ACL rule.</p>
</div>
<div class="section" id="DeleteAclRule__section73117395281"><h4 class="sectiontitle">URI</h4><p id="DeleteAclRule__p7312193982810">DELETE /v1/{project_id}/acl-rule/{acl_rule_id}</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__table531310393288" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="DeleteAclRule__row13123392285"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="DeleteAclRule__p1231323919286">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="DeleteAclRule__p1031410395282">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="DeleteAclRule__p1031414393287">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="DeleteAclRule__p5314639102816">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row1131353914286"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="DeleteAclRule__p193154392288">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="DeleteAclRule__p193158395282">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="DeleteAclRule__p1431563914285">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="DeleteAclRule__p1731613932818">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>
<tr id="DeleteAclRule__row9313163914286"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="DeleteAclRule__p9316103912819">acl_rule_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="DeleteAclRule__p1231793942818">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="DeleteAclRule__p0317153962813">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="DeleteAclRule__p6318339142814">Rule ID, which can be obtained by calling the <a href="ListAclRules.html">API for querying protection rules</a>. Find the value in <strong id="DeleteAclRule__b1131873932818">data.records.rule_id</strong> (The period [.] is used to separate different levels of objects).</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__table17319639152818" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="DeleteAclRule__row13318183922820"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="DeleteAclRule__p123191839142811">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="DeleteAclRule__p6319439142810">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="DeleteAclRule__p9319113914289">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="DeleteAclRule__p10320163922813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row18318183912817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="DeleteAclRule__p143201839172812">enterprise_project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="DeleteAclRule__p7320039192816">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="DeleteAclRule__p113211139172819">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="DeleteAclRule__p10321163912287">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="DeleteAclRule__b1132223910284">0</strong>.</p>
</td>
</tr>
<tr id="DeleteAclRule__row73187392281"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="DeleteAclRule__p632233922812">fw_instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="DeleteAclRule__p17322739102810">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="DeleteAclRule__p10322639182813">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="DeleteAclRule__p1932318396289">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="DeleteAclRule__section932333922817"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="DeleteAclRule__row1732463992815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="DeleteAclRule__p13324123942818">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="DeleteAclRule__p1132593917289">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="DeleteAclRule__p6325193972813">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="DeleteAclRule__p143251939152814">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row2324139112816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="DeleteAclRule__p4326153972812">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="DeleteAclRule__p163261839162813">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="DeleteAclRule__p1532643962814">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="DeleteAclRule__p11327183972819">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="DeleteAclRule__row11552145602817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="DeleteAclRule__p16987185572214">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="DeleteAclRule__p1453216872313">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="DeleteAclRule__p598785514223">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="DeleteAclRule__p1821149193417">Content type. It can only be set to application/json.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="DeleteAclRule__section532763922819"><h4 class="sectiontitle">Response Parameters</h4><p id="DeleteAclRule__p832813972817"><strong id="DeleteAclRule__b732853913285">Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__response_DeleteRuleAclResponse" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameters</caption><thead align="left"><tr id="DeleteAclRule__row14328539192811"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="DeleteAclRule__p73293391282">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="DeleteAclRule__p1332993912816">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="DeleteAclRule__p632923982816">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row632813982812"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="DeleteAclRule__p173301339192813">data</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="DeleteAclRule__p12330103972819"><a href="#DeleteAclRule__response_RuleId">RuleId</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="DeleteAclRule__p1330173914289">Rule ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="DeleteAclRule__response_RuleId"></a><a name="response_RuleId"></a><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__response_RuleId" frame="border" border="1" rules="all"><caption><b>Table 5 </b>RuleId</caption><thead align="left"><tr id="DeleteAclRule__row16331173917288"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.1"><p id="DeleteAclRule__p18331939162814">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.4.2.4.1.2"><p id="DeleteAclRule__p1633293910288">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.4.2.4.1.3"><p id="DeleteAclRule__p143321339102817">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row4331173972818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="DeleteAclRule__p3333193932817">id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="DeleteAclRule__p1033343982810">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="DeleteAclRule__p43341839192817">Rule ID.</p>
</td>
</tr>
<tr id="DeleteAclRule__row53315395289"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.1 "><p id="DeleteAclRule__p1133423962811">name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.4.2.4.1.2 "><p id="DeleteAclRule__p63347397289">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.4.2.4.1.3 "><p id="DeleteAclRule__p1933543917288">Rule name.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="DeleteAclRule__p43351839192813"><strong id="DeleteAclRule__b233519397280">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__response_ErrorRsp" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="DeleteAclRule__row15335539172812"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.1"><p id="DeleteAclRule__p1933613952810">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.6.2.4.1.2"><p id="DeleteAclRule__p1733619395286">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.6.2.4.1.3"><p id="DeleteAclRule__p13337133952813">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row1533583982819"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="DeleteAclRule__p13371839122813">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="DeleteAclRule__p203371839162820">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="DeleteAclRule__p153371399284">Error code.</p>
</td>
</tr>
<tr id="DeleteAclRule__row1433573919288"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.1 "><p id="DeleteAclRule__p10338123912288">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.6.2.4.1.2 "><p id="DeleteAclRule__p183381639192817">String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.6.2.4.1.3 "><p id="DeleteAclRule__p193381239172811">Error description.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="DeleteAclRule__section15339143972819"><h4 class="sectiontitle">Example Requests</h4><p id="DeleteAclRule__p1233993942817">Delete the rule ceaa0407-b9c8-4dfd-9eca-b6ead2dfd031 from project 9d80d070b6d44942af73c9c3d38e0429.</p>
<pre class="screen" id="DeleteAclRule__screen83392396288">https://{Endpoint}/v1/9d80d070b6d44942af73c9c3d38e0429/acl-rule/ceaa0407-b9c8-4dfd-9eca-b6ead2dfd031</pre>
</div>
<div class="section" id="DeleteAclRule__section103401539182818"><h4 class="sectiontitle">Example Responses</h4><p id="DeleteAclRule__p234063919282"><strong id="DeleteAclRule__b234093972812">Status code: 200</strong></p>
<p id="DeleteAclRule__p113402039142819">Data returned for rule deletion.</p>
<pre class="screen" id="DeleteAclRule__screen133412394285">{
"data" : {
"id" : "ceaa0407-b9c8-4dfd-9eca-b6ead2dfd031",
"name" : "name"
}
}</pre>
<p id="DeleteAclRule__p33421639132819"><strong id="DeleteAclRule__b13342123910289">Status code: 400</strong></p>
<p id="DeleteAclRule__p834313392284">Bad Request</p>
<pre class="screen" id="DeleteAclRule__screen934333942811">{
"error_code" : "CFW.00900016",
"error_msg" : "Import is in progress. Please wait until it is complete."
}</pre>
</div>
<div class="section" id="DeleteAclRule__section549293952814"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="DeleteAclRule__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="DeleteAclRule__row837610395282"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="DeleteAclRule__p249223922811">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="DeleteAclRule__p44926391288">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="DeleteAclRule__row10376103920285"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="DeleteAclRule__p449216391280">200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="DeleteAclRule__p1049293992813">Data returned for rule deletion.</p>
</td>
</tr>
<tr id="DeleteAclRule__row637653962814"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="DeleteAclRule__p24921239112813">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="DeleteAclRule__p1149218395287">Bad Request</p>
</td>
</tr>
<tr id="DeleteAclRule__row1337663932816"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="DeleteAclRule__p1949273920287">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="DeleteAclRule__p64921039122813">Unauthorized</p>
</td>
</tr>
<tr id="DeleteAclRule__row63763396283"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="DeleteAclRule__p549233912288">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="DeleteAclRule__p1549283952817">Forbidden</p>
</td>
</tr>
<tr id="DeleteAclRule__row113761439202814"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="DeleteAclRule__p14921239182810">404</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="DeleteAclRule__p34921839192816">Not Found</p>
</td>
</tr>
<tr id="DeleteAclRule__row437693918288"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="DeleteAclRule__p549273942816">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="DeleteAclRule__p1749383932811">Internal Server Error</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="DeleteAclRule__section1049312395284"><h4 class="sectiontitle">Error Codes</h4><p id="DeleteAclRule__p174931839172817">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_300000002.html">ACL Rule Management</a></div>
</div>
</div>