doc-exports/docs/waf/api-ref/waf_02_0030.html
Li, Qiao 914011d51b waf_api_1109
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Li, Qiao <qiaoli@huawei.com>
Co-committed-by: Li, Qiao <qiaoli@huawei.com>
2022-11-16 15:31:27 +00:00

336 lines
28 KiB
HTML

<a name="waf_02_0030"></a><a name="waf_02_0030"></a>
<h1 class="topictitle1">Creating a Policy</h1>
<div id="body2673759"><div class="section" id="waf_02_0030__section36087531"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0030__p15247915">This API is used to create a policy.</p>
</div>
<div class="section" id="waf_02_0030__section56352327"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0030__ul27121563"><li id="waf_02_0030__li42767476">URI format<p id="waf_02_0030__p49362967"><a name="waf_02_0030__li42767476"></a><a name="li42767476"></a>POST /v1/{project_id}/waf/policy</p>
</li><li id="waf_02_0030__li41613526">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0030__table38977416" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0030__row23967586"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="waf_02_0030__p62326351"><strong id="waf_02_0030__b1395672019421">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="waf_02_0030__p15269660"><strong id="waf_02_0030__b118925227429">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="waf_02_0030__p28882929"><strong id="waf_02_0030__b179558232421">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.796020397960206%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="waf_02_0030__p57815927"><strong id="waf_02_0030__b171782584215">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0030__row52578517"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0030__p31001524">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="waf_02_0030__p28095548">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="waf_02_0030__p61146900">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="waf_02_0030__p53951844">Specifies the project ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="waf_02_0030__section37408898"><h4 class="sectiontitle">Request</h4><div class="p" id="waf_02_0030__p75331445113911">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0030__table45903758" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0030__row10772591"><th align="left" class="cellrowborder" valign="top" width="26.52734726527347%" id="mcps1.3.3.2.1.2.5.1.1"><p id="waf_02_0030__p164661"><strong id="waf_02_0030__b7337434124216">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.328367163283673%" id="mcps1.3.3.2.1.2.5.1.2"><p id="waf_02_0030__p13337617"><strong id="waf_02_0030__b8180236154215">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.3.2.1.2.5.1.3"><p id="waf_02_0030__p6605160"><strong id="waf_02_0030__b0399153704213">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.796020397960206%" id="mcps1.3.3.2.1.2.5.1.4"><p id="waf_02_0030__p65255972"><strong id="waf_02_0030__b1968114443421">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0030__row51242413"><td class="cellrowborder" valign="top" width="26.52734726527347%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="waf_02_0030__p56994794">name</p>
</td>
<td class="cellrowborder" valign="top" width="16.328367163283673%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="waf_02_0030__p53175620">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.3 "><p id="waf_02_0030__p12257954">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.796020397960206%" headers="mcps1.3.3.2.1.2.5.1.4 "><p id="waf_02_0030__p53370221">Specifies the policy name. The maximum length is 256 characters. Only digits, letters, underscores (_), and hyphens (-) are allowed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="waf_02_0030__section1135765"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0030__p1856752320400">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0030__table32111592" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0030__row35186131"><th align="left" class="cellrowborder" valign="top" width="24.490000000000002%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0030__p31504373"><strong id="waf_02_0030__b1796265564210">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0030__p1717444"><strong id="waf_02_0030__b38371056194211">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.160000000000004%" id="mcps1.3.4.2.1.2.4.1.3"><p id="waf_02_0030__p4895271"><strong id="waf_02_0030__b441525834215">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0030__row44057444"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p11883201">id</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p23015206">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p52292412">Specifies the instance ID.</p>
</td>
</tr>
<tr id="waf_02_0030__row869665"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p3334018">name</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p1620073">String</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p64117051">Specifies the policy name.</p>
</td>
</tr>
<tr id="waf_02_0030__row40182553"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p33561337">options</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p34113786"><a href="#waf_02_0030__table1272813819259">Table 4</a></p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p53051151171910">Specifies whether a protection rule is enabled.</p>
</td>
</tr>
<tr id="waf_02_0030__row38670691"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p45318252">action</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p46899794"><a href="#waf_02_0030__table1231716412312">Table 5</a></p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p40786940">Specifies the mode of Basic Web Protection. The default value is <strong id="waf_02_0030__b54379299012">log</strong>.</p>
<ul id="waf_02_0030__ul796714441001"><li id="waf_02_0030__li836931317112"><span class="parmvalue" id="waf_02_0030__parmvalue1930613911303"><b>block</b></span>: WAF blocks and logs detected attacks.</li><li id="waf_02_0030__li1967844901"><span class="parmvalue" id="waf_02_0030__parmvalue17791124503213"><b>log</b></span>: WAF logs detected attacks only.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row31538142"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p4452714">level</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p25125550">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p834117720118">Specifies the protection level.</p>
<ul id="waf_02_0030__ul14573610126"><li id="waf_02_0030__li10573910829"><span class="parmvalue" id="waf_02_0030__parmvalue125051145122118"><b>1</b></span>: low</li><li id="waf_02_0030__li557312103218"><span class="parmvalue" id="waf_02_0030__parmvalue0716114852113"><b>2</b></span>: medium</li><li id="waf_02_0030__li10573131014219"><span class="parmvalue" id="waf_02_0030__parmvalue7398135211218"><b>3</b></span>: high</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row62915569"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p62996362">full_detection</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p2431703">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p18194437725">Specifies the detection mode in Precise Protection.</p>
</td>
</tr>
<tr id="waf_02_0030__row27881548"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p43812907">hosts</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p59184603">Array</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p29223556">Specifies the domain IDs.</p>
</td>
</tr>
<tr id="waf_02_0030__row61685413"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0030__p30462517">timestamp</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0030__p51544785">Long</p>
</td>
<td class="cellrowborder" valign="top" width="58.160000000000004%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0030__p14378082">Specifies the time when a policy is created.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="tablenoborder"><a name="waf_02_0030__table1272813819259"></a><a name="table1272813819259"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0030__table1272813819259" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="waf_02_0030__b5271048125018">options</strong></caption><thead align="left"><tr id="waf_02_0030__row14733082258"><th align="left" class="cellrowborder" valign="top" width="33.086691330866906%" id="mcps1.3.4.3.2.4.1.1"><p id="waf_02_0030__p873817812512"><strong id="waf_02_0030__b967247139">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.117288271172878%" id="mcps1.3.4.3.2.4.1.2"><p id="waf_02_0030__p137404817256"><strong id="waf_02_0030__b141423299">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.7960203979602%" id="mcps1.3.4.3.2.4.1.3"><p id="waf_02_0030__p6742198152512"><strong id="waf_02_0030__b307458053">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0030__row1177747172812"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p33504133">webattack</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p29480242">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p2415193218263">Specifies whether Basic Web Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul1778444132612"><li id="waf_02_0030__li1678115440265"><strong id="waf_02_0030__b103131014234">true</strong>: enabled.</li><li id="waf_02_0030__li1378544482616"><strong id="waf_02_0030__b1954741362319">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row1577720732819"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p42476939">common</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p18080074">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p8672433268">Specifies whether General Check in Basic Web Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul4842171218268"><li id="waf_02_0030__li65215555299"><strong id="waf_02_0030__b6741152452311">true</strong>: enabled.</li><li id="waf_02_0030__li1558185582916"><strong id="waf_02_0030__b1070132812236">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row8777157112811"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p47260058">crawler</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p2859499">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p825744922615">Specifies whether the master crawler detection switch in Basic Web Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul2993535262"><li id="waf_02_0030__li810115342614"><strong id="waf_02_0030__b682853652311">true</strong>: enabled.</li><li id="waf_02_0030__li7106145312265"><strong id="waf_02_0030__b112811940192314">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row1177515762814"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p42166705">crawler_engine</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p60059924">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p1718417589268">Specifies whether the Search Engine switch in Basic Web Protection is enabled. By default, this function is disabled.</p>
<ul id="waf_02_0030__ul172713111276"><li id="waf_02_0030__li133019142713"><strong id="waf_02_0030__b31444814232">true</strong>: enabled.</li><li id="waf_02_0030__li632911271"><strong id="waf_02_0030__b141321751132310">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row177751776289"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p55359439">crawler_scanner</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p54929604">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p20112962">Specifies whether the Scanner switch in Basic Web Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul851114810278"><li id="waf_02_0030__li55133813278"><strong id="waf_02_0030__b6559460241">true</strong>: enabled.</li><li id="waf_02_0030__li951619811273"><strong id="waf_02_0030__b767579192419">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row177577172811"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p25118198">crawler_script</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p21308157">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p48239148">Specifies whether the Script Tool switch in Basic Web Protection is enabled. By default, this function is disabled.</p>
<ul id="waf_02_0030__ul1296981219278"><li id="waf_02_0030__li1971101217270"><strong id="waf_02_0030__b19932163315246">true</strong>: enabled.</li><li id="waf_02_0030__li1297411292712"><strong id="waf_02_0030__b161438376244">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row1773576281"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p11652645">crawler_other</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p4340158">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p16008479">Specifies whether detection of other crawlers in Basic Web Protection is enabled. By default, this function is disabled.</p>
<ul id="waf_02_0030__ul8824161782711"><li id="waf_02_0030__li18269173273"><strong id="waf_02_0030__b208542465242">true</strong>: enabled.</li><li id="waf_02_0030__li15830417112712"><strong id="waf_02_0030__b19283650192418">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row1177357102817"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p6261339">webshell</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p37406470">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p10025242">Specifies whether webshell detection in Basic Web Protection is enabled. By default, this function is disabled.</p>
<ul id="waf_02_0030__ul20574202914279"><li id="waf_02_0030__li16574102917275"><strong id="waf_02_0030__b188347592248">true</strong>: enabled.</li><li id="waf_02_0030__li257772972712"><strong id="waf_02_0030__b57959310259">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row47721722816"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p8926362">cc</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p51946711">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p46934044">Specifies whether CC Attack Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul8527033142710"><li id="waf_02_0030__li1252923332710"><strong id="waf_02_0030__b749112239257">true</strong>: enabled.</li><li id="waf_02_0030__li165321133112714"><strong id="waf_02_0030__b61515271259">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row1977218711283"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p38799072">custom</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p55717167">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p16796711">Specifies whether Precise Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul1043194117270"><li id="waf_02_0030__li74754142718"><strong id="waf_02_0030__b2538153512519">true</strong>: enabled.</li><li id="waf_02_0030__li175084162710"><strong id="waf_02_0030__b10913113813251">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row97728782819"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p10468143">whiteblackip</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p42613264">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p29122361">Specifies whether Blacklist and Whitelist is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul1621718455274"><li id="waf_02_0030__li182183459278"><strong id="waf_02_0030__b1982124832515">true</strong>: enabled.</li><li id="waf_02_0030__li1522294592713"><strong id="waf_02_0030__b14960165132512">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row10772157172818"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p51392996">privacy</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p2083177">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p34519671">Specifies whether Data Masking is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul2712175332710"><li id="waf_02_0030__li157141535274"><strong id="waf_02_0030__b96825042617">true</strong>: enabled.</li><li id="waf_02_0030__li11717145312278"><strong id="waf_02_0030__b182717442618">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row14770678287"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p58255435">Ignore</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p21069794">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p28931745">Specifies whether False Alarm Masking is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul1371357192720"><li id="waf_02_0030__li1671155782712"><strong id="waf_02_0030__b8714191492620">true</strong>: enabled.</li><li id="waf_02_0030__li147415782716"><strong id="waf_02_0030__b109641802612">false</strong>: disabled.</li></ul>
</td>
</tr>
<tr id="waf_02_0030__row167707717287"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.3.2.4.1.1 "><p id="waf_02_0030__p37316794">antitamper</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.3.2.4.1.2 "><p id="waf_02_0030__p2761443">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.3.2.4.1.3 "><p id="waf_02_0030__p22350292">Specifies whether Web Tamper Protection is enabled. By default, this function is enabled.</p>
<ul id="waf_02_0030__ul5509133182819"><li id="waf_02_0030__li35108316281"><strong id="waf_02_0030__b19113192617266">true</strong>: enabled.</li><li id="waf_02_0030__li15515735289"><strong id="waf_02_0030__b175932902614">false</strong>: disabled.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="waf_02_0030__table1231716412312"></a><a name="table1231716412312"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0030__table1231716412312" frame="border" border="1" rules="all"><caption><b>Table 5 </b><strong id="waf_02_0030__b179671858195015">action</strong></caption><thead align="left"><tr id="waf_02_0030__row153241848236"><th align="left" class="cellrowborder" valign="top" width="33.086691330866906%" id="mcps1.3.4.4.2.4.1.1"><p id="waf_02_0030__p1532615432319"><strong id="waf_02_0030__b1952892726">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="27.117288271172878%" id="mcps1.3.4.4.2.4.1.2"><p id="waf_02_0030__p333054192311"><strong id="waf_02_0030__b1890379669">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="39.7960203979602%" id="mcps1.3.4.4.2.4.1.3"><p id="waf_02_0030__p193322492311"><strong id="waf_02_0030__b486979498">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0030__row19763216142319"><td class="cellrowborder" valign="top" width="33.086691330866906%" headers="mcps1.3.4.4.2.4.1.1 "><p id="waf_02_0030__p1576317163239">category</p>
</td>
<td class="cellrowborder" valign="top" width="27.117288271172878%" headers="mcps1.3.4.4.2.4.1.2 "><p id="waf_02_0030__p117631516182318">String</p>
</td>
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.4.2.4.1.3 "><p id="waf_02_0030__p676312167234">Specifies the mode of Basic Web Protection. The default value is <strong id="waf_02_0030__b1978312016217">log</strong>.</p>
<ul id="waf_02_0030__ul1133117412364"><li id="waf_02_0030__li9333154111369"><span class="parmvalue" id="waf_02_0030__parmvalue18902142662620"><b>block</b></span>: WAF blocks and logs detected attacks.</li><li id="waf_02_0030__li5336134103610"><span class="parmvalue" id="waf_02_0030__parmvalue313811433316"><b>log</b></span>: WAF logs detected attacks only.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="waf_02_0030__section10449017401"><h4 class="sectiontitle">Examples</h4><p id="waf_02_0030__p11499201612322">A policy named <strong id="waf_02_0030__b1716015944317">policy_1</strong> is used as an example.</p>
<ul id="waf_02_0030__ul1573800409"><li id="waf_02_0030__li12731601405">Request example<pre class="screen" id="waf_02_0030__screen07315013404">{
"name": "policy_1"
}</pre>
</li></ul>
<ul id="waf_02_0030__ul127410164010"><li id="waf_02_0030__li574904409">Response example<pre class="screen" id="waf_02_0030__screen1374305404">{
"id": "xxxxxxxxxxxxxxxxxxxxxxxxx",
"name": "policy_1",
"action": {
"category": "block"
},
"options": {
"webattack": true,
"common": true,
"crawler": true,
"crawler_engine": true,
"crawler_scanner": true,
"crawler_script": true,
"crawler_other": true,
"webshell": true,
"cc": true,
"custom": true,
"whiteblackip": true,
"ignore": true,
"privacy": true,
"antitamper": true
},
"level": 1,
"full_detection": false,
"hosts": [],
"timestamp": 1499817612
}</pre>
</li></ul>
</div>
<div class="section" id="waf_02_0030__section10221889"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0030__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0030__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 6</a> describes the normal status code returned by the API.
<div class="tablenoborder"><a name="waf_02_0030__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0030__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Status code</caption><thead align="left"><tr id="waf_02_0030__waf_02_0012_r3d6e2f205c444705bdbb9daaac74e575"><th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.6.2.2.2.4.1.1"><p id="waf_02_0030__waf_02_0012_af3c4073076f24eca88d94e3fa1effdc6">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.41%" id="mcps1.3.6.2.2.2.4.1.2"><p id="waf_02_0030__waf_02_0012_en-us_topic_0144911667_p4531342288">Description</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="58.589999999999996%" id="mcps1.3.6.2.2.2.4.1.3"><p id="waf_02_0030__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
</th>
</tr>
</thead>
<tbody><tr id="waf_02_0030__waf_02_0012_rc7b2adc390904a1ba79e303017797786"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="waf_02_0030__waf_02_0012_a93f3895d44bb4226934cc626ac50e37b">200</p>
</td>
<td class="cellrowborder" valign="top" width="19.41%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="waf_02_0030__waf_02_0012_en-us_topic_0144911667_p7538425819">OK</p>
</td>
<td class="cellrowborder" valign="top" width="58.589999999999996%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="waf_02_0030__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<p id="waf_02_0030__waf_02_0012_en-us_topic_0144911667_p482819399522">For details about error status codes, see <a href="waf_02_0085.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="waf_02_0028.html">Policies</a></div>
</div>
</div>