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>
198 lines
16 KiB
HTML
198 lines
16 KiB
HTML
<a name="BatchUpdateAclRuleActions"></a><a name="BatchUpdateAclRuleActions"></a>
|
|
|
|
<h1 class="topictitle1">Updating Rule Actions in Batches</h1>
|
|
<div id="body1708331107508"><div class="section" id="BatchUpdateAclRuleActions__section476975720289"><h4 class="sectiontitle">Function</h4><p id="BatchUpdateAclRuleActions__p147706571285">This API is used to update rule actions in batches.</p>
|
|
</div>
|
|
<div class="section" id="BatchUpdateAclRuleActions__section147701457152815"><h4 class="sectiontitle">URI</h4><p id="BatchUpdateAclRuleActions__p127704570285">PUT /v1/{project_id}/acl-rule/action</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="BatchUpdateAclRuleActions__table1577175712288" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="BatchUpdateAclRuleActions__row1977055718288"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="BatchUpdateAclRuleActions__p477111575283">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="BatchUpdateAclRuleActions__p16771195716282">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="BatchUpdateAclRuleActions__p777145792810">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="BatchUpdateAclRuleActions__p1477125752815">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="BatchUpdateAclRuleActions__row157708570288"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p2077125712818">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p177115722815">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p11771185715280">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p1777219573282">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="BatchUpdateAclRuleActions__table17772175732814" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Query Parameters</caption><thead align="left"><tr id="BatchUpdateAclRuleActions__row1377215577288"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.1"><p id="BatchUpdateAclRuleActions__p977255712811">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.2"><p id="BatchUpdateAclRuleActions__p17772557132817">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.4.2.5.1.3"><p id="BatchUpdateAclRuleActions__p137722575286">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.4.2.5.1.4"><p id="BatchUpdateAclRuleActions__p177731357112817">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="BatchUpdateAclRuleActions__row177724572282"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p1677365762818">enterprise_project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p1777385732815">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p177731457182814">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p977325715283">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="BatchUpdateAclRuleActions__b7773105713280">0</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="BatchUpdateAclRuleActions__row16772125715283"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p5773145715285">fw_instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p777314577287">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.4.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p1177316576284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.4.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p7774157122811">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="BatchUpdateAclRuleActions__section5774185792812"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="BatchUpdateAclRuleActions__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request header parameters</caption><thead align="left"><tr id="BatchUpdateAclRuleActions__row2774457202815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="BatchUpdateAclRuleActions__p577445742814">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="BatchUpdateAclRuleActions__p127756574286">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="BatchUpdateAclRuleActions__p6775165762813">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="BatchUpdateAclRuleActions__p1477516576283">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="BatchUpdateAclRuleActions__row12774357112817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p1775157202813">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p97751157102812">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p17775175732817">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p19775135711285">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="BatchUpdateAclRuleActions__row952920194294"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p16987185572214">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p1453216872313">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p598785514223">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="BatchUpdateAclRuleActions__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="BatchUpdateAclRuleActions__request_UpdateSecurityPolciesActionDto" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Request body parameters</caption><thead align="left"><tr id="BatchUpdateAclRuleActions__row4776757182819"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="BatchUpdateAclRuleActions__p16776105792819">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="BatchUpdateAclRuleActions__p1277615713289">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="BatchUpdateAclRuleActions__p12776135711288">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="BatchUpdateAclRuleActions__p577612571289">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="BatchUpdateAclRuleActions__row11776185732816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p3776185712813">object_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p4777357152816">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p10777857202816">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p377735722811">Protected object ID, which is used to distinguish between Internet border protection and VPC border protection after a cloud firewall is created. You can obtain the ID by calling the <a href="ListFirewallDetail.html">API for querying firewall instances</a>. In the return value, find the ID in <strong id="BatchUpdateAclRuleActions__b1377725712281">data.records.protect_objects.object_id</strong> (The period [.] is used to separate different levels of objects). If the value of <strong id="BatchUpdateAclRuleActions__b16777757102820">type</strong> is <strong id="BatchUpdateAclRuleActions__b12777145712280">0</strong>, the protected object ID belongs to the Internet border. If the value of <strong id="BatchUpdateAclRuleActions__b177710577289">type</strong> is <strong id="BatchUpdateAclRuleActions__b87771957162820">1</strong>, the protected object ID belongs to the VPC border. You can obtain the value of <strong id="BatchUpdateAclRuleActions__b10777457102813">type</strong> from <strong id="BatchUpdateAclRuleActions__b177778579286">data.records.protect_objects.type</strong> (The period [.] is used to separate different levels of objects).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="BatchUpdateAclRuleActions__row1377695792811"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p37771579285">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p577716574283">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p137771257132811">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p27782057192817">Rule action: <strong id="BatchUpdateAclRuleActions__b977845718286">enable</strong> (permit), <strong id="BatchUpdateAclRuleActions__b5778557162815">disable</strong> (deny).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="BatchUpdateAclRuleActions__row1677605782817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="BatchUpdateAclRuleActions__p107787574287">rule_ids</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="BatchUpdateAclRuleActions__p17778257162812">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="BatchUpdateAclRuleActions__p377855752814">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="BatchUpdateAclRuleActions__p977855720281">List of rule IDs. You can obtain the rule IDs by calling the <a href="ListAclRules.html">API for querying protection rules</a>. Find the value in <strong id="BatchUpdateAclRuleActions__b18778155720282">data.records.rule_id</strong> (The period [.] is used to separate different levels of objects).</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="BatchUpdateAclRuleActions__section177819572289"><h4 class="sectiontitle">Response Parameters</h4><p id="BatchUpdateAclRuleActions__p18778135717288"><strong id="BatchUpdateAclRuleActions__b2778145752811">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="BatchUpdateAclRuleActions__response_BatchUpdateAclRuleActionsResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="BatchUpdateAclRuleActions__row67791357192812"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="BatchUpdateAclRuleActions__p16779175719281">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="BatchUpdateAclRuleActions__p1779115711288">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="BatchUpdateAclRuleActions__p27799571283">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="BatchUpdateAclRuleActions__row9779457102817"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="BatchUpdateAclRuleActions__p1577955742815">data</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="BatchUpdateAclRuleActions__p7779857122814">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="BatchUpdateAclRuleActions__p977955716281">IDs of ACL rules to be updated in batches. The value is the rule IDs transferred from the request body.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="BatchUpdateAclRuleActions__section167801575286"><h4 class="sectiontitle">Example Requests</h4><p id="BatchUpdateAclRuleActions__p178014575280">Update the statuses of rules 4e12d889-c1d3-491b-8470-3d1b3dadc1fd and f798a6a8-c4c5-42b4-838c-c922c9908cb4 of firewall 546af3f8-88e9-47f2-a205-2346d7090925 in project 14181c1245cf4fd786824efe1e2b9388 to enabled.</p>
|
|
<pre class="screen" id="BatchUpdateAclRuleActions__screen177806572284">https://{Endpoint}/v1/14181c1245cf4fd786824efe1e2b9388/acl-rule/action?fw_instance_id=546af3f8-88e9-47f2-a205-2346d7090925&enterprise_project_id=default
|
|
|
|
{
|
|
"action" : "enable",
|
|
"rule_ids" : [ "4e12d889-c1d3-491b-8470-3d1b3dadc1fd", "f798a6a8-c4c5-42b4-838c-c922c9908cb4" ],
|
|
"object_id" : "ae42418e-f077-41a0-9d3b-5b2f5ad9102b"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="BatchUpdateAclRuleActions__section17781125792813"><h4 class="sectiontitle">Example Responses</h4><p id="BatchUpdateAclRuleActions__p578125718282"><strong id="BatchUpdateAclRuleActions__b778119579285">Status code: 200</strong></p>
|
|
<p id="BatchUpdateAclRuleActions__p1078145711286">Returned value for batch ACL rule update.</p>
|
|
<pre class="screen" id="BatchUpdateAclRuleActions__screen778114578287">{
|
|
"data" : [ "4e12d889-c1d3-491b-8470-3d1b3dadc1fd", "f798a6a8-c4c5-42b4-838c-c922c9908cb4" ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="BatchUpdateAclRuleActions__section16907165713286"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="BatchUpdateAclRuleActions__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="BatchUpdateAclRuleActions__row97951857142817"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="BatchUpdateAclRuleActions__p11907155782813">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="BatchUpdateAclRuleActions__p169072057192815">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="BatchUpdateAclRuleActions__row879555712815"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="BatchUpdateAclRuleActions__p1390755762819">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="BatchUpdateAclRuleActions__p1490775792810">Returned value for batch ACL rule update.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="BatchUpdateAclRuleActions__section1790795792814"><h4 class="sectiontitle">Error Codes</h4><p id="BatchUpdateAclRuleActions__p17907457172812">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>
|
|
|