forked from docs/doc-exports
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>
186 lines
14 KiB
HTML
186 lines
14 KiB
HTML
<a name="waf_02_0055"></a><a name="waf_02_0055"></a>
|
|
|
|
<h1 class="topictitle1">Adding a Data Masking Rule</h1>
|
|
<div id="body48348646"><div class="section" id="waf_02_0055__section59927491"><h4 class="sectiontitle">Function Description</h4><p class="msonormal" id="waf_02_0055__p23926252">This API is used to add a data masking rule.</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0055__section2476512"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0055__ul58978230"><li id="waf_02_0055__li61042024">URI format<p id="waf_02_0055__p12507308"><a name="waf_02_0055__li61042024"></a><a name="li61042024"></a>POST /v1/{project_id}/waf/policy/{policy_id}/privacy</p>
|
|
</li><li id="waf_02_0055__li45456916">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0055__table6459064" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0055__row4905225"><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_0055__p61778911"><strong id="waf_02_0055__b3820456104216">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_0055__p38035894"><strong id="waf_02_0055__b1123845811426">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_0055__p61008565"><strong id="waf_02_0055__b5623165934211">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_0055__p42746757"><strong id="waf_02_0055__b910316124312">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0055__row39935310"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0055__p13534647">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_0055__p22564584">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_0055__p15792010">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_0055__p4084420">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row36759786"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="waf_02_0055__p24752700">policy_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_0055__p58811707">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_0055__p66127822">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_0055__p54753374">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0055__section22288612"><h4 class="sectiontitle">Request</h4><div class="p" id="waf_02_0055__p237619525818">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0055__table3139475" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0055__row936368"><th align="left" class="cellrowborder" valign="top" width="25.507449255074494%" id="mcps1.3.3.2.1.2.5.1.1"><p id="waf_02_0055__p8736968"><strong id="waf_02_0055__b3900161615438">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.348265173482652%" id="mcps1.3.3.2.1.2.5.1.2"><p id="waf_02_0055__p36605784"><strong id="waf_02_0055__b519819187438">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_0055__p12278537"><strong id="waf_02_0055__b572132054311">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_0055__p55037442"><strong id="waf_02_0055__b6223023104316">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0055__row28847852"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="waf_02_0055__p54974703">path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="waf_02_0055__p23765938">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_0055__p45992797">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_0055__p34429081">Specifies the URL to which the data masking rule applies (exact match by default).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row41426277"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="waf_02_0055__p85244">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="waf_02_0055__p6904824">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_0055__p22419905">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_0055__p4073022">Specifies the masked field. The options are <strong id="waf_02_0055__b178611332123212">params</strong> and <strong id="waf_02_0055__b17861173215329">header</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row36657204"><td class="cellrowborder" valign="top" width="25.507449255074494%" headers="mcps1.3.3.2.1.2.5.1.1 "><p id="waf_02_0055__p16443547">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.348265173482652%" headers="mcps1.3.3.2.1.2.5.1.2 "><p id="waf_02_0055__p56858922">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_0055__p42169994">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_0055__p60326371">Specifies the masked subfield.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0055__section66379784"><h4 class="sectiontitle">Response</h4><div class="p" id="waf_02_0055__p933102365818">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0055__table13671625" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0055__row54208027"><th align="left" class="cellrowborder" valign="top" width="30.386961303869608%" id="mcps1.3.4.2.1.2.4.1.1"><p id="waf_02_0055__p28774047"><strong id="waf_02_0055__b07451564451">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.81701829817018%" id="mcps1.3.4.2.1.2.4.1.2"><p id="waf_02_0055__p48996464"><strong id="waf_02_0055__b7487688457">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.7960203979602%" id="mcps1.3.4.2.1.2.4.1.3"><p id="waf_02_0055__p9290613"><strong id="waf_02_0055__b157377911456">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0055__row16506654"><td class="cellrowborder" valign="top" width="30.386961303869608%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0055__p61970637">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81701829817018%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0055__p53565733">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0055__p43857101">Specifies the ID of a data masking rule.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row59169590"><td class="cellrowborder" valign="top" width="30.386961303869608%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0055__p28007514">policy_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81701829817018%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0055__p54016162">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0055__p13233015">Specifies the policy ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row51988273"><td class="cellrowborder" valign="top" width="30.386961303869608%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0055__p50300612">path</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81701829817018%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0055__p47817751">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0055__p48032594">Specifies the URL to which the data masking rule applies (exact match by default).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row29640166"><td class="cellrowborder" valign="top" width="30.386961303869608%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0055__p52043282">category</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81701829817018%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0055__p54756281">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0055__p6073797">Specifies the masked field. The options are <strong id="waf_02_0055__b10165124613211">params</strong> and <strong id="waf_02_0055__b7165154693217">header</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row54664181"><td class="cellrowborder" valign="top" width="30.386961303869608%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0055__p65722515">index</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81701829817018%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0055__p21923465">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0055__p30970240">Specifies the masked subfield.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0055__row10296707"><td class="cellrowborder" valign="top" width="30.386961303869608%" headers="mcps1.3.4.2.1.2.4.1.1 "><p id="waf_02_0055__p28726942">timestamp</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.81701829817018%" headers="mcps1.3.4.2.1.2.4.1.2 "><p id="waf_02_0055__p45180941">Long</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.7960203979602%" headers="mcps1.3.4.2.1.2.4.1.3 "><p id="waf_02_0055__p12128762">Specifies the time when a data masking rule is added.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0055__section140302775820"><h4 class="sectiontitle">Examples</h4><p id="waf_02_0055__p063105485819"></p>
|
|
<ul id="waf_02_0055__ul164231127165817"><li id="waf_02_0055__li1642316273588">Request example<pre class="screen" id="waf_02_0055__screen2423427175814">{
|
|
"path": "/login",
|
|
"category": "params",
|
|
"index": "name"
|
|
}</pre>
|
|
</li></ul>
|
|
<ul id="waf_02_0055__ul042402795816"><li id="waf_02_0055__li4424142718582">Response example<pre class="screen" id="waf_02_0055__screen17424192765817">{
|
|
"id": "e1c0e55865544d1f8c95cf71df108c6b",
|
|
"policy_id": "yuc0e55865544d1f8c95cf71df108c6b",
|
|
"path": "/login",
|
|
"category":"params",
|
|
"index": "name",
|
|
"timestamp": 123243414132
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0055__section60547149"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0055__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0055__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 4</a> describes the normal status code returned by the API.
|
|
<div class="tablenoborder"><a name="waf_02_0055__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0055__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="waf_02_0055__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_0055__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_0055__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_0055__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0055__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_0055__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_0055__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_0055__waf_02_0012_en-us_topic_0144911667_p369874114414">The request has succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="waf_02_0055__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_0053.html">Data Masking Rules</a></div>
|
|
</div>
|
|
</div>
|
|
|