doc-exports/docs/antiddos/api-ref/antiddos_02_0018.html
Li, Qiao fe55ee788f antiddos api 1115
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 13:51:25 +00:00

164 lines
12 KiB
HTML

<a name="antiddos_02_0018"></a><a name="antiddos_02_0018"></a>
<h1 class="topictitle1">Enabling Anti-DDoS</h1>
<div id="body31825997"><div class="section" id="antiddos_02_0018__section621837"><h4 class="sectiontitle">Functions</h4><p id="antiddos_02_0018__p27768935">This asynchronous API allows you to enable the Anti-DDoS traffic scrubbing. Successfully invoking this API only means that the service node has received the enabling request. You need to use the task querying API to check the task execution status. For details about the task querying API, see <a href="antiddos_02_0022.html">Querying Anti-DDoS Tasks</a>.</p>
</div>
<div class="section" id="antiddos_02_0018__section5596537"><h4 class="sectiontitle">URI</h4><ul id="antiddos_02_0018__ul43785757"><li id="antiddos_02_0018__li58527497">URI format<p id="antiddos_02_0018__p81738014315"><a name="antiddos_02_0018__li58527497"></a><a name="li58527497"></a>POST /v1/{project_id}/antiddos/{floating_ip_id}</p>
</li><li id="antiddos_02_0018__li43106784">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0018__table1988636" frame="border" border="1" rules="all"><thead align="left"><tr id="antiddos_02_0018__row48062879"><th align="left" class="cellrowborder" valign="top" width="25.85%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="antiddos_02_0018__p779118">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.6%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="antiddos_02_0018__p63108622">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.62%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="antiddos_02_0018__p11524775">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="30.930000000000003%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="antiddos_02_0018__p61091552">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="antiddos_02_0018__row49468641"><td class="cellrowborder" valign="top" width="25.85%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="antiddos_02_0018__p47536979">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.6%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="antiddos_02_0018__p25290077">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="antiddos_02_0018__p35230376">String</p>
</td>
<td class="cellrowborder" valign="top" width="30.930000000000003%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="antiddos_02_0018__p35088220">User ID</p>
</td>
</tr>
<tr id="antiddos_02_0018__row47358524"><td class="cellrowborder" valign="top" width="25.85%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="antiddos_02_0018__p10835231">floating_ip_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.6%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="antiddos_02_0018__p5238527">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20.62%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="antiddos_02_0018__p21667523">String</p>
</td>
<td class="cellrowborder" valign="top" width="30.930000000000003%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="antiddos_02_0018__p10238932">ID corresponding to the Elastic IP Address (EIP) of a user</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="antiddos_02_0018__section50368838"><h4 class="sectiontitle">Request</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0018__table1660410" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="antiddos_02_0018__row30785969"><th align="left" class="cellrowborder" valign="top" width="30.3%" id="mcps1.3.3.2.2.5.1.1"><p id="antiddos_02_0018__p10635570">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.23%" id="mcps1.3.3.2.2.5.1.2"><p id="antiddos_02_0018__p56174843">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.38%" id="mcps1.3.3.2.2.5.1.3"><p id="antiddos_02_0018__p53868469">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.09%" id="mcps1.3.3.2.2.5.1.4"><p id="antiddos_02_0018__p1269896">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="antiddos_02_0018__row35752731"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0018__p10290070">enable_L7</p>
</td>
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0018__p28189346">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0018__p1635686">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="38.09%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0018__p65381771">Whether to enable L7 defense</p>
</td>
</tr>
<tr id="antiddos_02_0018__row51565033"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0018__p16018178">traffic_pos_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0018__p22404047">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0018__p367798481566">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="38.09%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0018__p24544935">Position ID of traffic. The value ranges from 1 to 9 and 33 to 36.</p>
</td>
</tr>
<tr id="antiddos_02_0018__row19577827"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0018__p42300179">http_request_pos_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0018__p3762492">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0018__p2257395515612">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="38.09%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0018__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_0018__row41056841"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0018__p37269850">cleaning_access_pos_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0018__p66067912">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0018__p1659686615617">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="38.09%" headers="mcps1.3.3.2.2.5.1.4 "><p id="antiddos_02_0018__p15422169">Position ID of access limit during cleaning. The value ranges from 1 to 8 and 33 to 36.</p>
</td>
</tr>
<tr id="antiddos_02_0018__row4581796"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0018__p35581233">app_type_id</p>
</td>
<td class="cellrowborder" valign="top" width="18.23%" headers="mcps1.3.3.2.2.5.1.2 "><p id="antiddos_02_0018__p63507614">No</p>
</td>
<td class="cellrowborder" valign="top" width="13.38%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0018__p4066881915621">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="38.09%" headers="mcps1.3.3.2.2.5.1.4 "><div class="p" id="antiddos_02_0018__p2630238915650">Application type ID. Possible values:<ul id="antiddos_02_0018__ul2584619815657"><li id="antiddos_02_0018__li4894818415657">0</li><li id="antiddos_02_0018__li546197471571">1</li></ul>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="antiddos_02_0018__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_0018__p1004464">If values of <strong id="antiddos_02_0018__b155789371554">traffic_pos_id</strong>, <strong id="antiddos_02_0018__b1544242205518">http_request_pos_id</strong>, <strong id="antiddos_02_0018__b7936146195513">cleaning_access_pos_id</strong> are set between <strong id="antiddos_02_0018__b855765275511">33 to 36</strong>, their values must be the same.</p>
</div></div>
</div>
<div class="section" id="antiddos_02_0018__section50666366"><h4 class="sectiontitle">Response</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0018__table10229816" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="antiddos_02_0018__row54739329"><th align="left" class="cellrowborder" valign="top" width="23.23%" id="mcps1.3.4.2.2.4.1.1"><p id="antiddos_02_0018__p4700647">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.14%" id="mcps1.3.4.2.2.4.1.2"><p id="antiddos_02_0018__p45208163">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.629999999999995%" id="mcps1.3.4.2.2.4.1.3"><p id="antiddos_02_0018__p37982554">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="antiddos_02_0018__row56688054"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.4.2.2.4.1.1 "><p id="antiddos_02_0018__p28329695">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.2.2.4.1.2 "><p id="antiddos_02_0018__p13003964">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.2.4.1.3 "><p id="antiddos_02_0018__p46688182">Internal error code</p>
</td>
</tr>
<tr id="antiddos_02_0018__row17540457"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.4.2.2.4.1.1 "><p id="antiddos_02_0018__p11490904">error_description</p>
</td>
<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.2.2.4.1.2 "><p id="antiddos_02_0018__p58348056">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.2.4.1.3 "><p id="antiddos_02_0018__p28572113">Internal error description</p>
</td>
</tr>
<tr id="antiddos_02_0018__row55822426"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.4.2.2.4.1.1 "><p id="antiddos_02_0018__p25322618">task_id</p>
</td>
<td class="cellrowborder" valign="top" width="14.14%" headers="mcps1.3.4.2.2.4.1.2 "><p id="antiddos_02_0018__p37866150">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.2.4.1.3 "><p id="antiddos_02_0018__p48851566162148">ID of a task. This ID can be used to query the status of the task.</p>
<p id="antiddos_02_0018__p47259335">This field is reserved for use in task auditing later. It is temporarily unused.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="antiddos_02_0018__section1764823132517"><h4 class="sectiontitle">Example</h4><ul id="antiddos_02_0018__ul25933367"><li id="antiddos_02_0018__li32073719">Example request<pre class="codeblock" id="antiddos_02_0018__codeblock6023557611459">POST /v1/67641fe6886f43fcb78edbbf0ad0b99f/antiddos/1df977c2-fdc6-4483-bc1c-ba46829f57b8 </pre>
<pre class="screen" id="antiddos_02_0018__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_0018__ul10871523142519"><li id="antiddos_02_0018__li15871123192515">Example response<pre class="screen" id="antiddos_02_0018__screen387023152514">{
"error_code": "10000000",
"error_description": "Task has been received and is being processed.",
"task_id": "94e17e18-5b2c-40c6-a218-8ec5134e32a5"
}</pre>
</li></ul>
<div class="section" id="antiddos_02_0018__section53344112"><h4 class="sectiontitle">Status Code</h4><p id="antiddos_02_0018__p1135683">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>