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>
155 lines
11 KiB
HTML
155 lines
11 KiB
HTML
<a name="antiddos_02_0038"></a><a name="antiddos_02_0038"></a>
|
|
|
|
<h1 class="topictitle1">Configuring the Default Protection Policy for Newly Purchased Public IP Addresses</h1>
|
|
<div id="body1594344820125"><div class="section" id="antiddos_02_0038__section621837"><h4 class="sectiontitle">Functions</h4><p id="antiddos_02_0038__p27768935">This API enables you to configure the default protection policy. After a protection policy is configured, it applies to the newly purchased public IP addresses.</p>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0038__section5596537"><h4 class="sectiontitle">URI</h4><ul id="antiddos_02_0038__ul43785757"><li id="antiddos_02_0038__li58527497">URI format<p id="antiddos_02_0038__p81738014315"><a name="antiddos_02_0038__li58527497"></a><a name="li58527497"></a>POST /v1/{project_id}/antiddos/default-config</p>
|
|
</li><li id="antiddos_02_0038__li43106784">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0038__table1988636" frame="border" border="1" rules="all"><thead align="left"><tr id="antiddos_02_0038__row48062879"><th align="left" class="cellrowborder" valign="top" width="22.467753224677534%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="antiddos_02_0038__p779118">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.537946205379463%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="antiddos_02_0038__p63108622">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.038596140385962%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="antiddos_02_0038__p11524775">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="42.955704429557045%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="antiddos_02_0038__p61091552">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="antiddos_02_0038__row49468641"><td class="cellrowborder" valign="top" width="22.467753224677534%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="antiddos_02_0038__p47536979">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.537946205379463%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="antiddos_02_0038__p25290077">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.038596140385962%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="antiddos_02_0038__p35230376">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="42.955704429557045%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="antiddos_02_0038__p35088220">User ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0038__section50368838"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0038__table1660410" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="antiddos_02_0038__row30785969"><th align="left" class="cellrowborder" valign="top" width="30.3%" id="mcps1.3.3.2.2.5.1.1"><p id="antiddos_02_0038__p10635570">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.98%" id="mcps1.3.3.2.2.5.1.2"><p id="antiddos_02_0038__p56174843">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.94%" id="mcps1.3.3.2.2.5.1.3"><p id="antiddos_02_0038__p53868469">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="36.78%" id="mcps1.3.3.2.2.5.1.4"><p id="antiddos_02_0038__p1269896">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="antiddos_02_0038__row35752731"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0038__p10290070">enable_L7</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.98%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0038__p28189346">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0038__p1635686">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.78%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0038__p65381771">Whether to enable layer-7 protection.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0038__row51565033"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0038__p16018178">traffic_pos_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.98%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0038__p22404047">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0038__p367798481566">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.78%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0038__p24544935">Position ID of traffic. The value ranges from 1 to 9, or 99, or 33 to 36.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0038__row19577827"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0038__p42300179">http_request_pos_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.98%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0038__p3762492">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0038__p2257395515612">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.78%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0038__p56757654">Position ID of number of HTTP requests. The value ranges from 1 to 15 and 33 to 36.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0038__row41056841"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0038__p37269850">cleaning_access_pos_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.98%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0038__p66067912">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0038__p1659686615617">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.78%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0038__p15422169">Position ID of access limit during cleaning. The value ranges from 1 to 8, or 99, or 33 to 36.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0038__row4581796"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0038__p35581233">app_type_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.98%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0038__p63507614">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0038__p4066881915621">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="36.78%" headers="mcps1.3.3.2.2.5.1.4 "><div class="p" id="antiddos_02_0038__p2630238915650">Application type ID. Possible values:<ul id="antiddos_02_0038__ul2584619815657"><li id="antiddos_02_0038__li4894818415657">0</li><li id="antiddos_02_0038__li546197471571">1</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="antiddos_02_0038__note111607"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="antiddos_02_0038__p1004464">If values of <strong id="antiddos_02_0038__b516619119539">traffic_pos_id</strong>, <strong id="antiddos_02_0038__b371205135312">http_request_pos_id</strong>, <strong id="antiddos_02_0038__b6837815185316">cleaning_access_pos_id</strong> are set between <strong id="antiddos_02_0038__b0906154295317">33 to 36</strong>, their values must be the same.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0038__section50666366"><h4 class="sectiontitle">Response</h4><ul id="antiddos_02_0038__ul49836563"><li id="antiddos_02_0038__li45875888">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0038__table10229816" frame="border" border="1" rules="all"><thead align="left"><tr id="antiddos_02_0038__row54739329"><th align="left" class="cellrowborder" valign="top" width="25.490000000000002%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="antiddos_02_0038__p4700647">Name</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="14.89%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="antiddos_02_0038__p45208163">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="59.62%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="antiddos_02_0038__p37982554">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="antiddos_02_0038__row56688054"><td class="cellrowborder" valign="top" width="25.490000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="antiddos_02_0038__p28329695">statusCode</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.89%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="antiddos_02_0038__p13003964">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.62%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="antiddos_02_0038__p46688182">Internal error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0038__row17540457"><td class="cellrowborder" valign="top" width="25.490000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="antiddos_02_0038__p11490904">body</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.89%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="antiddos_02_0038__p58348056">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.62%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="antiddos_02_0038__p28572113">Internal error description</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0038__row55822426"><td class="cellrowborder" valign="top" width="25.490000000000002%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="antiddos_02_0038__p25322618">header</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="14.89%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="antiddos_02_0038__p37866150">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="59.62%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="antiddos_02_0038__p47259335">Internal error code header</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0038__section1487315209019"><h4 class="sectiontitle">Example</h4><ul id="antiddos_02_0038__ul25933367"><li id="antiddos_02_0038__li32073719">Example request<pre class="codeblock" id="antiddos_02_0038__codeblock6023557611459">POST /v1/67641fe6886f43fcb78edbbf0ad0b99f/antiddos/default/config </pre>
|
|
<pre class="screen" id="antiddos_02_0038__screen43109556114535">{
|
|
"enable_L7":true,
|
|
"traffic_pos_id":1,
|
|
"http_request_pos_id":1,
|
|
"cleaning_access_pos_id":1,
|
|
"app_type_id":1
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<ul id="antiddos_02_0038__ul16882122012012"><li id="antiddos_02_0038__li1988214201708">Example response<pre class="screen" id="antiddos_02_0038__screen168821220605">{
|
|
"statusCode": 0,
|
|
"body": null,
|
|
"header": null
|
|
}</pre>
|
|
</li></ul>
|
|
<div class="section" id="antiddos_02_0038__section53344112"><h4 class="sectiontitle">Status Code</h4><p id="antiddos_02_0038__p1135683">For details, see <a href="antiddos_02_0031.html">Status Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="antiddos_02_0016.html">Anti-DDoS APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|