forked from docs/doc-exports
Reviewed-by: Belejkanic, Lukas <lukas.belejkanic@t-systems.com> Co-authored-by: qinweiwei <qinweiwei@huawei.com> Co-committed-by: qinweiwei <qinweiwei@huawei.com>
615 lines
50 KiB
HTML
615 lines
50 KiB
HTML
<a name="UpdateCustomRule"></a><a name="UpdateCustomRule"></a>
|
|
|
|
<h1 class="topictitle1">Updating a Precise Protection Rule</h1>
|
|
<div id="body1708331107508"><div class="section" id="UpdateCustomRule__topic1311000000"><h4 class="sectiontitle">Function</h4><p id="UpdateCustomRule__topic1311000002">This API is used to update a precise protection rule.</p>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__section1660495262616"><h4 class="sectiontitle">URI</h4><p id="UpdateCustomRule__topic1311000004">PUT /v1/{project_id}/waf/policy/{policy_id}/custom/{rule_id}</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__topic1311000005" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000013"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="UpdateCustomRule__topic1311000015">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="UpdateCustomRule__topic1311000017">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="UpdateCustomRule__topic1311000019">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="UpdateCustomRule__topic1311000021">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000023"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000025">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000027">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000029">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000031">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000032"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000034">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000036">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000038">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000040">Policy ID. It can be obtained by calling the <strong id="UpdateCustomRule__topic1311000041">ListPolicy</strong> API.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000042"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000044">rule_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000046">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000048">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000050">ID of the precise protection rule. It can be obtained by calling the <strong id="UpdateCustomRule__topic1311000051">ListCustomeRules</strong> API.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__topic1311000052"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000061"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="UpdateCustomRule__topic1311000063">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="UpdateCustomRule__topic1311000065">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="UpdateCustomRule__topic1311000067">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="UpdateCustomRule__topic1311000069">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000071"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateCustomRule__topic1311000073">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateCustomRule__topic1311000075">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateCustomRule__topic1311000077">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateCustomRule__topic1311000079">auth token</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000080"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="UpdateCustomRule__topic1311000082">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="UpdateCustomRule__topic1311000084">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="UpdateCustomRule__topic1311000086">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="UpdateCustomRule__topic1311000088">Content type</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__request_UpdateCustomRuleRequestBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000096"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="UpdateCustomRule__topic1311000098">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="UpdateCustomRule__topic1311000100">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="UpdateCustomRule__topic1311000102">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="UpdateCustomRule__topic1311000104">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000106"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000108">time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000110">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000112">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000114">Time the precise protection rule takes effect.</p>
|
|
<ul id="UpdateCustomRule__topic1311000115"><li id="UpdateCustomRule__topic1311000116"><p id="UpdateCustomRule__topic1311000117"><a name="UpdateCustomRule__topic1311000116"></a><a name="topic1311000116"></a>false: The rule takes effect immediately.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000118"><p id="UpdateCustomRule__topic1311000119"><a name="UpdateCustomRule__topic1311000118"></a><a name="topic1311000118"></a>true: The effective time is customized.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000120"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000122">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000124">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000126">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000128">Timestamp (ms) when the precise protection rule takes effect. This parameter is returned only when time is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000129"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000131">terminal</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000133">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000135">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000137">Timestamp (ms) when the precise protection rule expires. This parameter is returned only when time is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000138"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000140">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000142">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000144">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000146">Rule description</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000147"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000149">conditions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000151">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000153">Array of <a href="#UpdateCustomRule__request_CustomConditions">CustomConditions</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000156">Match condition List</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000157"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000159">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000161">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000163"><a href="#UpdateCustomRule__request_CustomAction">CustomAction</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000166">Protective action of the precise protection rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000167"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="UpdateCustomRule__topic1311000169">priority</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="UpdateCustomRule__topic1311000171">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="UpdateCustomRule__topic1311000173">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="UpdateCustomRule__topic1311000175">Priority of a rule. A small value indicates a high priority. If two rules are assigned with the same priority, the rule added earlier has higher priority. Value range: 0 to 1000.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="UpdateCustomRule__request_CustomConditions"></a><a name="request_CustomConditions"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__request_CustomConditions" frame="border" border="1" rules="all"><caption><b>Table 4 </b>CustomConditions</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000183"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="UpdateCustomRule__topic1311000185">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="UpdateCustomRule__topic1311000187">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="UpdateCustomRule__topic1311000189">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="UpdateCustomRule__topic1311000191">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000193"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateCustomRule__topic1311000195">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateCustomRule__topic1311000197">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateCustomRule__topic1311000199">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateCustomRule__topic1311000201">Field type. The options are <strong id="UpdateCustomRule__topic1311000202">url</strong>, <strong id="UpdateCustomRule__topic1311000203">user-agent</strong>, <strong id="UpdateCustomRule__topic1311000204">ip</strong>, <strong id="UpdateCustomRule__topic1311000205">params</strong>, <strong id="UpdateCustomRule__topic1311000206">cookie</strong>, <strong id="UpdateCustomRule__topic1311000207">referer</strong>, <strong id="UpdateCustomRule__topic1311000208">header</strong>, <strong id="UpdateCustomRule__topic1311000209">request_line</strong>, <strong id="UpdateCustomRule__topic1311000210">method</strong>, and <strong id="UpdateCustomRule__topic1311000211">request</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000212"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateCustomRule__topic1311000214">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateCustomRule__topic1311000216">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateCustomRule__topic1311000218">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateCustomRule__topic1311000220">Subfield</p>
|
|
<ul id="UpdateCustomRule__topic1311000221"><li id="UpdateCustomRule__topic1311000222"><p id="UpdateCustomRule__topic1311000223"><a name="UpdateCustomRule__topic1311000222"></a><a name="topic1311000222"></a>When the field type is <strong id="UpdateCustomRule__topic1311000224">url</strong>, <strong id="UpdateCustomRule__topic1311000225">user-agent</strong>, <strong id="UpdateCustomRule__topic1311000226">ip</strong>, <strong id="UpdateCustomRule__topic1311000227">refer</strong>, <strong id="UpdateCustomRule__topic1311000228">request_line</strong>, <strong id="UpdateCustomRule__topic1311000229">method</strong>, or <strong id="UpdateCustomRule__topic1311000230">request</strong>, <strong id="UpdateCustomRule__topic1311000231">index</strong> is not required.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000232"><p id="UpdateCustomRule__topic1311000233"><a name="UpdateCustomRule__topic1311000232"></a><a name="topic1311000232"></a>When the field type is <strong id="UpdateCustomRule__topic1311000234">params</strong>, <strong id="UpdateCustomRule__topic1311000235">header</strong>, or <strong id="UpdateCustomRule__topic1311000236">cookie</strong>, and the subfield is customized, the value of <strong id="UpdateCustomRule__topic1311000237">index</strong> is the customized subfield.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000238"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateCustomRule__topic1311000240">logic_operation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateCustomRule__topic1311000242">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateCustomRule__topic1311000244">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateCustomRule__topic1311000246">Logic for matching the condition.</p>
|
|
<ul id="UpdateCustomRule__topic1311000247"><li id="UpdateCustomRule__topic1311000248"><p id="UpdateCustomRule__topic1311000249"><a name="UpdateCustomRule__topic1311000248"></a><a name="topic1311000248"></a>If the category is <strong id="UpdateCustomRule__topic1311000250">url</strong>, <strong id="UpdateCustomRule__topic1311000251">user-agent</strong> or <strong id="UpdateCustomRule__topic1311000252">referer</strong> , the optional operations are contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, not_suffix, contain_any, not_contain_all, equal_any, not_equal_all, equal_any, not_equal_all, prefix_any, not_prefix_all, suffix_any, not_suffix_all, len_greater, len_less, len_equal and len_not_equal</p>
|
|
</li><li id="UpdateCustomRule__topic1311000253"><p id="UpdateCustomRule__topic1311000254"><a name="UpdateCustomRule__topic1311000253"></a><a name="topic1311000253"></a>If the category is <strong id="UpdateCustomRule__topic1311000255">ip</strong>, the optional operations are: equal, not_equal, equal_any and not_equal_all</p>
|
|
</li><li id="UpdateCustomRule__topic1311000256"><p id="UpdateCustomRule__topic1311000257"><a name="UpdateCustomRule__topic1311000256"></a><a name="topic1311000256"></a>If the category is <strong id="UpdateCustomRule__topic1311000258">method</strong>, the optional operations are: equal and not_equal</p>
|
|
</li><li id="UpdateCustomRule__topic1311000259"><p id="UpdateCustomRule__topic1311000260"><a name="UpdateCustomRule__topic1311000259"></a><a name="topic1311000259"></a>If the category is <strong id="UpdateCustomRule__topic1311000261">request_line</strong> and <strong id="UpdateCustomRule__topic1311000262">request</strong>, the optional operations are: len_greater, len_less, len_equal and len_not_equal</p>
|
|
</li><li id="UpdateCustomRule__topic1311000263"><p id="UpdateCustomRule__topic1311000264"><a name="UpdateCustomRule__topic1311000263"></a><a name="topic1311000263"></a>If the category is <strong id="UpdateCustomRule__topic1311000265">params</strong>, <strong id="UpdateCustomRule__topic1311000266">header</strong>, and <strong id="UpdateCustomRule__topic1311000267">cookie</strong>, the optional operations are: contain, not_contain, equal, not_equal, prefix, not_prefix, suffix, not_suffix, contain_any, not_contain_all, equal_any, not_equal_all, equal_any, not_equal_all, prefix_any, not_prefix_all, suffix_any, not_suffix_all, len_greater, len_less, len_equal, len_not_equal, num_greater, num_less, num_equal, num_not_equal, exist and not_exist</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000268"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateCustomRule__topic1311000270">contents</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateCustomRule__topic1311000272">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateCustomRule__topic1311000274">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateCustomRule__topic1311000276">Content of the conditions. This parameter is mandatory when the suffix of <strong id="UpdateCustomRule__topic1311000277">logic_operation</strong> is not any or all.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000278"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="UpdateCustomRule__topic1311000280">value_list_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="UpdateCustomRule__topic1311000282">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="UpdateCustomRule__topic1311000284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="UpdateCustomRule__topic1311000286">Reference table ID. It can be obtained by calling the API Querying the Reference Table List. This parameter is mandatory when the suffix of <strong id="UpdateCustomRule__topic1311000287">logic_operation</strong> is any or all. The reference table type must be the same as the category type.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="UpdateCustomRule__request_CustomAction"></a><a name="request_CustomAction"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__request_CustomAction" frame="border" border="1" rules="all"><caption><b>Table 5 </b>CustomAction</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000295"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.1"><p id="UpdateCustomRule__topic1311000297">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.2"><p id="UpdateCustomRule__topic1311000299">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.5.2.5.1.3"><p id="UpdateCustomRule__topic1311000301">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.5.2.5.1.4"><p id="UpdateCustomRule__topic1311000303">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000305"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="UpdateCustomRule__topic1311000307">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="UpdateCustomRule__topic1311000309">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="UpdateCustomRule__topic1311000311">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="UpdateCustomRule__topic1311000313">Operation type</p>
|
|
<ul id="UpdateCustomRule__topic1311000314"><li id="UpdateCustomRule__topic1311000315"><p id="UpdateCustomRule__topic1311000316"><a name="UpdateCustomRule__topic1311000315"></a><a name="topic1311000315"></a><strong id="UpdateCustomRule__topic1311000317">block</strong>: WAF blocks attacks.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000318"><p id="UpdateCustomRule__topic1311000319"><a name="UpdateCustomRule__topic1311000318"></a><a name="topic1311000318"></a><strong id="UpdateCustomRule__topic1311000320">pass</strong>: WAF allows requests.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000321"><p id="UpdateCustomRule__topic1311000322"><a name="UpdateCustomRule__topic1311000321"></a><a name="topic1311000321"></a><strong id="UpdateCustomRule__topic1311000323">log</strong>: WAF only logs detected attacks.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000324"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.1 "><p id="UpdateCustomRule__topic1311000326">followed_action_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.2 "><p id="UpdateCustomRule__topic1311000328">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.5.2.5.1.3 "><p id="UpdateCustomRule__topic1311000330">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.5.2.5.1.4 "><p id="UpdateCustomRule__topic1311000332">ID of a known attack source rule. This parameter can be configured only when <strong id="UpdateCustomRule__topic1311000333">category</strong> is set to <strong id="UpdateCustomRule__topic1311000334">block</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__topic1311000335"><h4 class="sectiontitle">Response Parameters</h4><p id="UpdateCustomRule__topic1311000337"><strong id="UpdateCustomRule__topic1311000338">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__response_UpdateCustomRuleResponseBody" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000345"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="UpdateCustomRule__topic1311000347">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="UpdateCustomRule__topic1311000349">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="UpdateCustomRule__topic1311000351">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000353"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000355">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000357">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000359">Rule ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000360"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000362">policyid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000364">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000366">Policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000367"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000369">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000371">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000373">Rule description</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000374"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000376">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000378">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000380">Rule status. The value can be <strong id="UpdateCustomRule__topic1311000381">0</strong> or <strong id="UpdateCustomRule__topic1311000382">1</strong>.</p>
|
|
<ul id="UpdateCustomRule__topic1311000383"><li id="UpdateCustomRule__topic1311000384"><p id="UpdateCustomRule__topic1311000385"><a name="UpdateCustomRule__topic1311000384"></a><a name="topic1311000384"></a><strong id="UpdateCustomRule__topic1311000386">0</strong>: The rule is disabled.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000387"><p id="UpdateCustomRule__topic1311000388"><a name="UpdateCustomRule__topic1311000387"></a><a name="topic1311000387"></a><strong id="UpdateCustomRule__topic1311000389">1</strong>: The rule is enabled.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000390"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000392">conditions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000394">Array of <a href="#UpdateCustomRule__response_conditions">conditions</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000397">List of matching conditions. All conditions must be met.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000398"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000400">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000402"><a href="#UpdateCustomRule__response_CustomAction">CustomAction</a> object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000405">Protective action of the precise protection rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000406"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000408">priority</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000410">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000412">Priority of a rule. A small value indicates a high priority. If two rules are assigned with the same priority, the rule added earlier has higher priority. Value range: 0 to 1000.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000413"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000415">timestamp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000417">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000419">Timestamp when the precise protection rule is created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000420"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000422">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000424">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000426">Timestamp (ms) when the precise protection rule takes effect. This parameter is returned only when time is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000427"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000429">terminal</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000431">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000433">Timestamp (ms) when the precise protection rule expires. This parameter is returned only when time is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000434"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000436">action_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000438">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000440">This parameter is reserved and can be ignored currently.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000441"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000443">aging_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000445">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000447">Rule aging time. This parameter is reserved and can be ignored currently.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000448"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="UpdateCustomRule__topic1311000450">producer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="UpdateCustomRule__topic1311000452">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="UpdateCustomRule__topic1311000454">Rule creation object. This parameter is reserved and can be ignored currently.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="UpdateCustomRule__response_conditions"></a><a name="response_conditions"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__response_conditions" frame="border" border="1" rules="all"><caption><b>Table 7 </b>conditions</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000461"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="UpdateCustomRule__topic1311000463">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="UpdateCustomRule__topic1311000465">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="UpdateCustomRule__topic1311000467">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000469"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateCustomRule__topic1311000471">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateCustomRule__topic1311000473">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateCustomRule__topic1311000475">Field type. The options are <strong id="UpdateCustomRule__topic1311000476">url</strong>, <strong id="UpdateCustomRule__topic1311000477">user-agent</strong>, <strong id="UpdateCustomRule__topic1311000478">ip</strong>, <strong id="UpdateCustomRule__topic1311000479">params</strong>, <strong id="UpdateCustomRule__topic1311000480">cookie</strong>, <strong id="UpdateCustomRule__topic1311000481">referer</strong>, <strong id="UpdateCustomRule__topic1311000482">header</strong>, <strong id="UpdateCustomRule__topic1311000483">request_line</strong>, <strong id="UpdateCustomRule__topic1311000484">method</strong>, and <strong id="UpdateCustomRule__topic1311000485">request</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000486"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateCustomRule__topic1311000488">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateCustomRule__topic1311000490">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateCustomRule__topic1311000492">Subfield</p>
|
|
<ul id="UpdateCustomRule__topic1311000493"><li id="UpdateCustomRule__topic1311000494"><p id="UpdateCustomRule__topic1311000495"><a name="UpdateCustomRule__topic1311000494"></a><a name="topic1311000494"></a>When the field type is <strong id="UpdateCustomRule__topic1311000496">url</strong>, <strong id="UpdateCustomRule__topic1311000497">user-agent</strong>, <strong id="UpdateCustomRule__topic1311000498">ip</strong>, <strong id="UpdateCustomRule__topic1311000499">refer</strong>, <strong id="UpdateCustomRule__topic1311000500">request_line</strong>, <strong id="UpdateCustomRule__topic1311000501">method</strong>, or <strong id="UpdateCustomRule__topic1311000502">request</strong>, <strong id="UpdateCustomRule__topic1311000503">index</strong> is not required.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000504"><p id="UpdateCustomRule__topic1311000505"><a name="UpdateCustomRule__topic1311000504"></a><a name="topic1311000504"></a>When the field type is <strong id="UpdateCustomRule__topic1311000506">params</strong>, <strong id="UpdateCustomRule__topic1311000507">header</strong>, or <strong id="UpdateCustomRule__topic1311000508">cookie</strong>, and the subfield is customized, the value of <strong id="UpdateCustomRule__topic1311000509">index</strong> is the customized subfield.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000510"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateCustomRule__topic1311000512">logic_operation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateCustomRule__topic1311000514">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateCustomRule__topic1311000516">Logic for matching the condition.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000517"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateCustomRule__topic1311000519">contents</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateCustomRule__topic1311000521">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateCustomRule__topic1311000523">Content of the conditions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000524"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="UpdateCustomRule__topic1311000526">value_list_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="UpdateCustomRule__topic1311000528">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="UpdateCustomRule__topic1311000530">Reference table ID. It can be obtained by calling the API Querying the Reference Table List. This parameter is available only when a reference table is used when a protection rule is created.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="UpdateCustomRule__response_CustomAction"></a><a name="response_CustomAction"></a><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__response_CustomAction" frame="border" border="1" rules="all"><caption><b>Table 8 </b>CustomAction</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000537"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="UpdateCustomRule__topic1311000539">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="UpdateCustomRule__topic1311000541">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="UpdateCustomRule__topic1311000543">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000545"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateCustomRule__topic1311000547">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateCustomRule__topic1311000549">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateCustomRule__topic1311000551">Operation type</p>
|
|
<ul id="UpdateCustomRule__topic1311000552"><li id="UpdateCustomRule__topic1311000553"><p id="UpdateCustomRule__topic1311000554"><a name="UpdateCustomRule__topic1311000553"></a><a name="topic1311000553"></a><strong id="UpdateCustomRule__topic1311000555">block</strong>: WAF blocks attacks.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000556"><p id="UpdateCustomRule__topic1311000557"><a name="UpdateCustomRule__topic1311000556"></a><a name="topic1311000556"></a><strong id="UpdateCustomRule__topic1311000558">pass</strong>: WAF allows requests.</p>
|
|
</li><li id="UpdateCustomRule__topic1311000559"><p id="UpdateCustomRule__topic1311000560"><a name="UpdateCustomRule__topic1311000559"></a><a name="topic1311000559"></a><strong id="UpdateCustomRule__topic1311000561">log</strong>: WAF only logs detected attacks.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000562"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="UpdateCustomRule__topic1311000564">followed_action_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="UpdateCustomRule__topic1311000566">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="UpdateCustomRule__topic1311000568">ID of a known attack source rule. This parameter can be configured only when <strong id="UpdateCustomRule__topic1311000569">category</strong> is set to <strong id="UpdateCustomRule__topic1311000570">block</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="UpdateCustomRule__topic1311000571"><strong id="UpdateCustomRule__topic1311000572">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__response_RestErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000579"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="UpdateCustomRule__topic1311000581">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="UpdateCustomRule__topic1311000583">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="UpdateCustomRule__topic1311000585">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000587"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateCustomRule__topic1311000589">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateCustomRule__topic1311000591">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateCustomRule__topic1311000593">Error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000594"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="UpdateCustomRule__topic1311000596">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="UpdateCustomRule__topic1311000598">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="UpdateCustomRule__topic1311000600">Error message</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="UpdateCustomRule__topic1311000601"><strong id="UpdateCustomRule__topic1311000602">Status code: 401</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__table166281852192610" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000609"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.1"><p id="UpdateCustomRule__topic1311000611">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.2"><p id="UpdateCustomRule__topic1311000613">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.9.2.4.1.3"><p id="UpdateCustomRule__topic1311000615">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000617"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="UpdateCustomRule__topic1311000619">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="UpdateCustomRule__topic1311000621">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="UpdateCustomRule__topic1311000623">Error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000624"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="UpdateCustomRule__topic1311000626">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="UpdateCustomRule__topic1311000628">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="UpdateCustomRule__topic1311000630">Error message</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="UpdateCustomRule__topic1311000631"><strong id="UpdateCustomRule__topic1311000632">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__table7629185210263" frame="border" border="1" rules="all"><caption><b>Table 11 </b>Response body parameters</caption><thead align="left"><tr id="UpdateCustomRule__topic1311000639"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.1"><p id="UpdateCustomRule__topic1311000641">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.2"><p id="UpdateCustomRule__topic1311000643">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.11.2.4.1.3"><p id="UpdateCustomRule__topic1311000645">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000647"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="UpdateCustomRule__topic1311000649">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="UpdateCustomRule__topic1311000651">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="UpdateCustomRule__topic1311000653">Error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000654"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="UpdateCustomRule__topic1311000656">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="UpdateCustomRule__topic1311000658">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="UpdateCustomRule__topic1311000660">Error message</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__topic1311000661"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="UpdateCustomRule__topic1311000663">PUT https://{Endpoint}/v1/{project_id}/waf/policy/{policy_id}/custom/{rule_id}?
|
|
|
|
{
|
|
"action" : {
|
|
"category" : "block"
|
|
},
|
|
"time" : false,
|
|
"priority" : 50,
|
|
"description" : "",
|
|
"conditions" : [ {
|
|
"category" : "url",
|
|
"logic_operation" : "contain",
|
|
"index" : null,
|
|
"contents" : [ "test" ]
|
|
} ]
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__topic1311000664"><h4 class="sectiontitle">Example Responses</h4><p id="UpdateCustomRule__topic1311000666"><strong id="UpdateCustomRule__topic1311000667">Status code: 200</strong></p>
|
|
<p id="UpdateCustomRule__topic1311000668">Request succeeded.</p>
|
|
<pre class="screen" id="UpdateCustomRule__topic1311000669">{
|
|
"id" : "88e8bf4158324b2d9a233e7ffb95516d",
|
|
"policyid" : "dde63c25e8394b21b16a2a49a99e659b",
|
|
"timestamp" : 1678799936830,
|
|
"description" : "",
|
|
"status" : 1,
|
|
"time" : false,
|
|
"priority" : 50,
|
|
"action_mode" : false,
|
|
"conditions" : [ {
|
|
"category" : "url",
|
|
"contents" : [ "test" ],
|
|
"logic_operation" : "contain"
|
|
} ],
|
|
"action" : {
|
|
"category" : "block"
|
|
},
|
|
"producer" : 1,
|
|
"aging_time" : 0
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__topic1311000670"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="UpdateCustomRule__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="UpdateCustomRule__topic1311000676"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="UpdateCustomRule__topic1311000678">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="UpdateCustomRule__topic1311000680">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="UpdateCustomRule__topic1311000682"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateCustomRule__topic1311000684">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateCustomRule__topic1311000686">Request succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000687"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateCustomRule__topic1311000689">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateCustomRule__topic1311000691">Request failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000692"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateCustomRule__topic1311000694">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateCustomRule__topic1311000696">The token does not have required permissions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="UpdateCustomRule__topic1311000697"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="UpdateCustomRule__topic1311000699">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="UpdateCustomRule__topic1311000701">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="UpdateCustomRule__topic1311000702"><h4 class="sectiontitle">Error Codes</h4><p id="UpdateCustomRule__topic1311000704">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_300000003.html">Rule Management</a></div>
|
|
</div>
|
|
</div>
|
|
|