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>
417 lines
31 KiB
HTML
417 lines
31 KiB
HTML
<a name="ShowCustomRule"></a><a name="ShowCustomRule"></a>
|
|
|
|
<h1 class="topictitle1">Querying a Precise Protection Rule by ID</h1>
|
|
<div id="body1708331107508"><div class="section" id="ShowCustomRule__topic1301000000"><h4 class="sectiontitle">Function</h4><p id="ShowCustomRule__topic1301000002">This API is used to query a precise protection rule by ID.</p>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__atuogenerate_1"><h4 class="sectiontitle">URI</h4><p id="ShowCustomRule__topic1301000004">GET /v1/{project_id}/waf/policy/{policy_id}/custom/{rule_id}</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__topic1301000005" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="ShowCustomRule__topic1301000013"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="ShowCustomRule__topic1301000015">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="ShowCustomRule__topic1301000017">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="ShowCustomRule__topic1301000019">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="ShowCustomRule__topic1301000021">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000023"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowCustomRule__topic1301000025">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowCustomRule__topic1301000027">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowCustomRule__topic1301000029">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowCustomRule__topic1301000031">Project ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000032"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowCustomRule__topic1301000034">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowCustomRule__topic1301000036">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowCustomRule__topic1301000038">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowCustomRule__topic1301000040">Policy ID. It can be obtained by calling the <strong id="ShowCustomRule__topic1301000041">ListPolicy</strong> API.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000042"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="ShowCustomRule__topic1301000044">rule_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="ShowCustomRule__topic1301000046">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="ShowCustomRule__topic1301000048">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="ShowCustomRule__topic1301000050">ID of the precise protection rule. It can be obtained by calling the <strong id="ShowCustomRule__topic1301000051">ListCustomeRules</strong> API.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__topic1301000052"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="ShowCustomRule__topic1301000061"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="ShowCustomRule__topic1301000063">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="ShowCustomRule__topic1301000065">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="ShowCustomRule__topic1301000067">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="ShowCustomRule__topic1301000069">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000071"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ShowCustomRule__topic1301000073">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ShowCustomRule__topic1301000075">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ShowCustomRule__topic1301000077">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ShowCustomRule__topic1301000079">auth token</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000080"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="ShowCustomRule__topic1301000082">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="ShowCustomRule__topic1301000084">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="ShowCustomRule__topic1301000086">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="ShowCustomRule__topic1301000088">Content type</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__topic1301000089"><h4 class="sectiontitle">Response Parameters</h4><p id="ShowCustomRule__topic1301000091"><strong id="ShowCustomRule__topic1301000092">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__response_ShowCustomRuleResponseBody" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response body parameters</caption><thead align="left"><tr id="ShowCustomRule__topic1301000099"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="ShowCustomRule__topic1301000101">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="ShowCustomRule__topic1301000103">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="ShowCustomRule__topic1301000105">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000107"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000109">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000111">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000113">Rule ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000114"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000116">policyid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000118">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000120">Policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000121"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000123">description</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000125">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000127">Rule description</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000128"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000130">status</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000132">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000134">Rule status. The value can be <strong id="ShowCustomRule__topic1301000135">0</strong> or <strong id="ShowCustomRule__topic1301000136">1</strong>.</p>
|
|
<ul id="ShowCustomRule__topic1301000137"><li id="ShowCustomRule__topic1301000138"><p id="ShowCustomRule__topic1301000139"><a name="ShowCustomRule__topic1301000138"></a><a name="topic1301000138"></a><strong id="ShowCustomRule__topic1301000140">0</strong>: The rule is disabled.</p>
|
|
</li><li id="ShowCustomRule__topic1301000141"><p id="ShowCustomRule__topic1301000142"><a name="ShowCustomRule__topic1301000141"></a><a name="topic1301000141"></a><strong id="ShowCustomRule__topic1301000143">1</strong>: The rule is enabled.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000144"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000146">conditions</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000148">Array of <a href="#ShowCustomRule__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="ShowCustomRule__topic1301000151">List of matching conditions. All conditions must be met.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000152"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000154">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000156"><a href="#ShowCustomRule__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="ShowCustomRule__topic1301000159">Protective action of the precise protection rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000160"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000162">priority</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000164">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000166">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="ShowCustomRule__topic1301000167"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000169">timestamp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000171">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000173">Timestamp when the precise protection rule is created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000174"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000176">start</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000178">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000180">Timestamp (ms) when the precise protection rule takes effect. This parameter is returned only when time is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000181"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000183">terminal</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000185">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000187">Timestamp (ms) when the precise protection rule expires. This parameter is returned only when time is true.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000188"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000190">action_mode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000192">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000194">This parameter is reserved and can be ignored currently.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000195"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000197">aging_time</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000199">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000201">Rule aging time. This parameter is reserved and can be ignored currently.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000202"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="ShowCustomRule__topic1301000204">producer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="ShowCustomRule__topic1301000206">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="ShowCustomRule__topic1301000208">Rule creation object. This parameter is reserved and can be ignored currently.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="ShowCustomRule__response_conditions"></a><a name="response_conditions"></a><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__response_conditions" frame="border" border="1" rules="all"><caption><b>Table 4 </b>conditions</caption><thead align="left"><tr id="ShowCustomRule__topic1301000215"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.1"><p id="ShowCustomRule__topic1301000217">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.4.2.4.1.2"><p id="ShowCustomRule__topic1301000219">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.4.2.4.1.3"><p id="ShowCustomRule__topic1301000221">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000223"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowCustomRule__topic1301000225">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowCustomRule__topic1301000227">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowCustomRule__topic1301000229">Field type. The options are <strong id="ShowCustomRule__topic1301000230">url</strong>, <strong id="ShowCustomRule__topic1301000231">user-agent</strong>, <strong id="ShowCustomRule__topic1301000232">ip</strong>, <strong id="ShowCustomRule__topic1301000233">params</strong>, <strong id="ShowCustomRule__topic1301000234">cookie</strong>, <strong id="ShowCustomRule__topic1301000235">referer</strong>, <strong id="ShowCustomRule__topic1301000236">header</strong>, <strong id="ShowCustomRule__topic1301000237">request_line</strong>, <strong id="ShowCustomRule__topic1301000238">method</strong>, and <strong id="ShowCustomRule__topic1301000239">request</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000240"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowCustomRule__topic1301000242">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowCustomRule__topic1301000244">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowCustomRule__topic1301000246">Subfield</p>
|
|
<ul id="ShowCustomRule__topic1301000247"><li id="ShowCustomRule__topic1301000248"><p id="ShowCustomRule__topic1301000249"><a name="ShowCustomRule__topic1301000248"></a><a name="topic1301000248"></a>When the field type is <strong id="ShowCustomRule__topic1301000250">url</strong>, <strong id="ShowCustomRule__topic1301000251">user-agent</strong>, <strong id="ShowCustomRule__topic1301000252">ip</strong>, <strong id="ShowCustomRule__topic1301000253">refer</strong>, <strong id="ShowCustomRule__topic1301000254">request_line</strong>, <strong id="ShowCustomRule__topic1301000255">method</strong>, or <strong id="ShowCustomRule__topic1301000256">request</strong>, <strong id="ShowCustomRule__topic1301000257">index</strong> is not required.</p>
|
|
</li><li id="ShowCustomRule__topic1301000258"><p id="ShowCustomRule__topic1301000259"><a name="ShowCustomRule__topic1301000258"></a><a name="topic1301000258"></a>When the field type is <strong id="ShowCustomRule__topic1301000260">params</strong>, <strong id="ShowCustomRule__topic1301000261">header</strong>, or <strong id="ShowCustomRule__topic1301000262">cookie</strong>, and the subfield is customized, the value of <strong id="ShowCustomRule__topic1301000263">index</strong> is the customized subfield.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000264"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowCustomRule__topic1301000266">logic_operation</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowCustomRule__topic1301000268">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowCustomRule__topic1301000270">Logic for matching the condition.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000271"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowCustomRule__topic1301000273">contents</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowCustomRule__topic1301000275">Array of strings</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowCustomRule__topic1301000277">Content of the conditions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000278"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.1 "><p id="ShowCustomRule__topic1301000280">value_list_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.4.2.4.1.2 "><p id="ShowCustomRule__topic1301000282">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.4.2.4.1.3 "><p id="ShowCustomRule__topic1301000284">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="ShowCustomRule__response_CustomAction"></a><a name="response_CustomAction"></a><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__response_CustomAction" frame="border" border="1" rules="all"><caption><b>Table 5 </b>CustomAction</caption><thead align="left"><tr id="ShowCustomRule__topic1301000291"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="ShowCustomRule__topic1301000293">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="ShowCustomRule__topic1301000295">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="ShowCustomRule__topic1301000297">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000299"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="ShowCustomRule__topic1301000301">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="ShowCustomRule__topic1301000303">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="ShowCustomRule__topic1301000305">Operation type</p>
|
|
<ul id="ShowCustomRule__topic1301000306"><li id="ShowCustomRule__topic1301000307"><p id="ShowCustomRule__topic1301000308"><a name="ShowCustomRule__topic1301000307"></a><a name="topic1301000307"></a><strong id="ShowCustomRule__topic1301000309">block</strong>: WAF blocks attacks.</p>
|
|
</li><li id="ShowCustomRule__topic1301000310"><p id="ShowCustomRule__topic1301000311"><a name="ShowCustomRule__topic1301000310"></a><a name="topic1301000310"></a><strong id="ShowCustomRule__topic1301000312">pass</strong>: WAF allows requests.</p>
|
|
</li><li id="ShowCustomRule__topic1301000313"><p id="ShowCustomRule__topic1301000314"><a name="ShowCustomRule__topic1301000313"></a><a name="topic1301000313"></a><strong id="ShowCustomRule__topic1301000315">log</strong>: WAF only logs detected attacks.</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000316"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="ShowCustomRule__topic1301000318">followed_action_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="ShowCustomRule__topic1301000320">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="ShowCustomRule__topic1301000322">ID of a known attack source rule. This parameter can be configured only when <strong id="ShowCustomRule__topic1301000323">category</strong> is set to <strong id="ShowCustomRule__topic1301000324">block</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ShowCustomRule__topic1301000325"><strong id="ShowCustomRule__topic1301000326">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__response_RestErrorResponse" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="ShowCustomRule__topic1301000333"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="ShowCustomRule__topic1301000335">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="ShowCustomRule__topic1301000337">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="ShowCustomRule__topic1301000339">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000341"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="ShowCustomRule__topic1301000343">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="ShowCustomRule__topic1301000345">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="ShowCustomRule__topic1301000347">Error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000348"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="ShowCustomRule__topic1301000350">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="ShowCustomRule__topic1301000352">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="ShowCustomRule__topic1301000354">Error message</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ShowCustomRule__topic1301000355"><strong id="ShowCustomRule__topic1301000356">Status code: 401</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__response_RestErrorResponse_1" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="ShowCustomRule__topic1301000363"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.1"><p id="ShowCustomRule__topic1301000365">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.2"><p id="ShowCustomRule__topic1301000367">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.9.2.4.1.3"><p id="ShowCustomRule__topic1301000369">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000371"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="ShowCustomRule__topic1301000373">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="ShowCustomRule__topic1301000375">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="ShowCustomRule__topic1301000377">Error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000378"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="ShowCustomRule__topic1301000380">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="ShowCustomRule__topic1301000382">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="ShowCustomRule__topic1301000384">Error message</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="ShowCustomRule__topic1301000385"><strong id="ShowCustomRule__topic1301000386">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__response_RestErrorResponse_2" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="ShowCustomRule__topic1301000393"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.1"><p id="ShowCustomRule__topic1301000395">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.2"><p id="ShowCustomRule__topic1301000397">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.11.2.4.1.3"><p id="ShowCustomRule__topic1301000399">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000401"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="ShowCustomRule__topic1301000403">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="ShowCustomRule__topic1301000405">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="ShowCustomRule__topic1301000407">Error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000408"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="ShowCustomRule__topic1301000410">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="ShowCustomRule__topic1301000412">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="ShowCustomRule__topic1301000414">Error message</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__topic1301000415"><h4 class="sectiontitle">Example Requests</h4><pre class="screen" id="ShowCustomRule__topic1301000417">GET https://{Endpoint}/v1/{project_id}/waf/policy/{policy_id}/custom/{rule_id}?</pre>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__topic1301000418"><h4 class="sectiontitle">Example Responses</h4><p id="ShowCustomRule__topic1301000420"><strong id="ShowCustomRule__topic1301000421">Status code: 200</strong></p>
|
|
<p id="ShowCustomRule__topic1301000422">Request succeeded.</p>
|
|
<pre class="screen" id="ShowCustomRule__topic1301000423">{
|
|
"action" : {
|
|
"category" : "block"
|
|
},
|
|
"action_mode" : false,
|
|
"conditions" : [ {
|
|
"category" : "header",
|
|
"index" : "demo",
|
|
"logic_operation" : "contain",
|
|
"content" : [ "demo" ]
|
|
} ],
|
|
"description" : "",
|
|
"id" : "2a3caa2bc9814c09ad73d02e3485b4a4",
|
|
"policyid" : "1f016cde588646aca3fb19f277c44d03",
|
|
"priority" : 50,
|
|
"status" : 1,
|
|
"time" : false,
|
|
"aging_time" : 0,
|
|
"producer" : 1,
|
|
"timestamp" : 1656495488880
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__topic1301000424"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="ShowCustomRule__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="ShowCustomRule__topic1301000430"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="ShowCustomRule__topic1301000432">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="ShowCustomRule__topic1301000434">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="ShowCustomRule__topic1301000436"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowCustomRule__topic1301000438">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowCustomRule__topic1301000440">Request succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000441"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowCustomRule__topic1301000443">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowCustomRule__topic1301000445">Request failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000446"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowCustomRule__topic1301000448">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowCustomRule__topic1301000450">The token does not have required permissions.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="ShowCustomRule__topic1301000451"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="ShowCustomRule__topic1301000453">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="ShowCustomRule__topic1301000455">Internal server error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="ShowCustomRule__topic1301000456"><h4 class="sectiontitle">Error Codes</h4><p id="ShowCustomRule__topic1301000458">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>
|
|
|