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>
163 lines
12 KiB
HTML
163 lines
12 KiB
HTML
<a name="antiddos_02_0021"></a><a name="antiddos_02_0021"></a>
|
|
|
|
<h1 class="topictitle1">Updating Anti-DDoS Defense Policies</h1>
|
|
<div id="body6622601"><div class="section" id="antiddos_02_0021__section40911390"><h4 class="sectiontitle">Functions</h4><p id="antiddos_02_0021__p66668712">This API enables you to update the Anti-DDoS defense policy of a specified EIP. Successfully invoking this API only means that the service node has received the update 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_0021__section32658192"><h4 class="sectiontitle">URI</h4><ul id="antiddos_02_0021__ul14674162"><li id="antiddos_02_0021__li64958600">URI format<p id="antiddos_02_0021__p13273221144657"><a name="antiddos_02_0021__li64958600"></a><a name="li64958600"></a>PUT /v1/{project_id}/antiddos/{floating_ip_id}</p>
|
|
</li><li id="antiddos_02_0021__li27155224">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0021__table52089545" frame="border" border="1" rules="all"><thead align="left"><tr id="antiddos_02_0021__row17201705"><th align="left" class="cellrowborder" valign="top" width="27.167283271672826%" id="mcps1.3.2.2.2.1.1.5.1.1"><p id="antiddos_02_0021__p51160835">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.28787121287871%" id="mcps1.3.2.2.2.1.1.5.1.2"><p id="antiddos_02_0021__p50386953">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.617938206179375%" id="mcps1.3.2.2.2.1.1.5.1.3"><p id="antiddos_02_0021__p54811429">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="30.92690730926907%" id="mcps1.3.2.2.2.1.1.5.1.4"><p id="antiddos_02_0021__p10540732">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="antiddos_02_0021__row48492984"><td class="cellrowborder" valign="top" width="27.167283271672826%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="antiddos_02_0021__p35617665">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.28787121287871%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="antiddos_02_0021__p66458622">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.617938206179375%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="antiddos_02_0021__p14439320">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.92690730926907%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="antiddos_02_0021__p28734262">User ID</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0021__row57281770"><td class="cellrowborder" valign="top" width="27.167283271672826%" headers="mcps1.3.2.2.2.1.1.5.1.1 "><p id="antiddos_02_0021__p9311818">floating_ip_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.28787121287871%" headers="mcps1.3.2.2.2.1.1.5.1.2 "><p id="antiddos_02_0021__p16059811">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.617938206179375%" headers="mcps1.3.2.2.2.1.1.5.1.3 "><p id="antiddos_02_0021__p25776284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="30.92690730926907%" headers="mcps1.3.2.2.2.1.1.5.1.4 "><p id="antiddos_02_0021__p7504221">ID corresponding to the EIP of a user</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0021__section25488274"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0021__table1660410" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="antiddos_02_0021__row30785969"><th align="left" class="cellrowborder" valign="top" width="30.3%" id="mcps1.3.3.2.2.5.1.1"><p id="antiddos_02_0021__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_0021__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_0021__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_0021__p1269896">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="antiddos_02_0021__row35752731"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0021__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_0021__p28189346">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0021__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_0021__p65381771">Whether to enable L7 defense</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0021__row51565033"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0021__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_0021__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_0021__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_0021__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_0021__row19577827"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0021__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_0021__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_0021__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_0021__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_0021__row41056841"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0021__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_0021__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_0021__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_0021__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_0021__row4581796"><td class="cellrowborder" valign="top" width="30.3%" headers="mcps1.3.3.2.2.5.1.1 "><p id="antiddos_02_0021__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_0021__p63507614">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.3.2.2.5.1.3 "><p id="antiddos_02_0021__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_0021__p2630238915650">Application type ID. Possible values:<ul id="antiddos_02_0021__ul2584619815657"><li id="antiddos_02_0021__li4894818415657">0</li><li id="antiddos_02_0021__li546197471571">1</li></ul>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div class="note" id="antiddos_02_0021__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_0021__p1004464">If values of <strong id="antiddos_02_0021__b12588132418562">traffic_pos_id</strong>, <strong id="antiddos_02_0021__b105922024115614">http_request_pos_id</strong>, <strong id="antiddos_02_0021__b1659619247569">cleaning_access_pos_id</strong> are set between <strong id="antiddos_02_0021__b759914243564">33 to 36</strong>, their values must be the same.</p>
|
|
</div></div>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0021__section28067877"><h4 class="sectiontitle">Response</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="antiddos_02_0021__table12060815" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="antiddos_02_0021__row44341874"><th align="left" class="cellrowborder" valign="top" width="23.23%" id="mcps1.3.4.2.2.4.1.1"><p id="antiddos_02_0021__p34922074">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_0021__p10115730">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_0021__p14067778">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="antiddos_02_0021__row65748243"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.4.2.2.4.1.1 "><p id="antiddos_02_0021__p24007468">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_0021__p65556790">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.2.4.1.3 "><p id="antiddos_02_0021__p8499801">Internal error code</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0021__row9389347"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.4.2.2.4.1.1 "><p id="antiddos_02_0021__p22339613">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_0021__p64678211">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.2.4.1.3 "><p id="antiddos_02_0021__p4443775">Internal error description</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="antiddos_02_0021__row39993975"><td class="cellrowborder" valign="top" width="23.23%" headers="mcps1.3.4.2.2.4.1.1 "><p id="antiddos_02_0021__p18286572">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_0021__p4817386">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="62.629999999999995%" headers="mcps1.3.4.2.2.4.1.3 "><p id="antiddos_02_0021__p3932656116241">ID of a task. This ID can be used to query the status of the task.</p>
|
|
<p id="antiddos_02_0021__p54663960">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_0021__section1834824974510"><h4 class="sectiontitle">Example</h4><ul id="antiddos_02_0021__ul4689762461"><li id="antiddos_02_0021__li1268910664619">Example request<pre class="codeblock" id="antiddos_02_0021__codeblock33608498458">PUT /v1/67641fe6886f43fcb78edbbf0ad0b99f/antiddos/ee0c854e-082f-499e-b7d8-1b42c22781af</pre>
|
|
<pre class="screen" id="antiddos_02_0021__screen1361184954512">{
|
|
"enable_L7":false,
|
|
"traffic_pos_id":2,
|
|
"http_request_pos_id":1,
|
|
"cleaning_access_pos_id":1,
|
|
"app_type_id":1
|
|
}</pre>
|
|
</li><li id="antiddos_02_0021__li76891962464">Example response<pre class="screen" id="antiddos_02_0021__screen636164918456">{
|
|
"error_code": "10000000",
|
|
"error_description": "Task has been received and is being processed.",
|
|
"task_id": "4a4fefe7-34a1-40e2-a87c-16932af3ac4a"
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="antiddos_02_0021__section51284307"><h4 class="sectiontitle">Status Code</h4><p id="antiddos_02_0021__p6046518">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>
|
|
|