doc-exports/docs/vpc/api-ref/vpc_firewall_0009.html
Qin Ying, Fan 310d2d9eb1 VPC API 20230106 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2024-02-06 08:38:37 +00:00

211 lines
16 KiB
HTML

<a name="vpc_firewall_0009"></a><a name="vpc_firewall_0009"></a>
<h1 class="topictitle1">Updating a <span id="text8410023193815">Firewall</span> Policy</h1>
<div id="body1495598977068"><div class="section" id="vpc_firewall_0009__section19593265132522"><h4 class="sectiontitle">Function</h4><p id="vpc_firewall_0009__p4565571132522">This API is used to update a <span id="vpc_firewall_0009__text1531752114318"></span><span id="vpc_firewall_0009__text193752174313">firewall</span> policy.</p>
</div>
<div class="section" id="vpc_firewall_0009__section46147480132522"><h4 class="sectiontitle">URI</h4><p id="vpc_firewall_0009__p76062240472">PUT /v2.0/fwaas/firewall_policies/{firewall_policy_id}</p>
</div>
<div class="section" id="vpc_firewall_0009__section36048911132522"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_firewall_0009__table8852370132522" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Request parameter</caption><thead align="left"><tr id="vpc_firewall_0009__row32357095132522"><th align="left" class="cellrowborder" valign="top" width="19.388061193880613%" id="mcps1.3.3.2.2.5.1.1"><p id="vpc_firewall_0009__p45580669132522">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.7981201879812%" id="mcps1.3.3.2.2.5.1.2"><p id="vpc_firewall_0009__p51498842132522">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.95810418958104%" id="mcps1.3.3.2.2.5.1.3"><p id="vpc_firewall_0009__p56072606132522">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="42.85571442855714%" id="mcps1.3.3.2.2.5.1.4"><p id="vpc_firewall_0009__p6648170132522">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_firewall_0009__row64881628132522"><td class="cellrowborder" valign="top" width="19.388061193880613%" headers="mcps1.3.3.2.2.5.1.1 "><p id="vpc_firewall_0009__p14588437132522">firewall_policy</p>
</td>
<td class="cellrowborder" valign="top" width="18.7981201879812%" headers="mcps1.3.3.2.2.5.1.2 "><p id="vpc_firewall_0009__p52664630132522"><a href="#vpc_firewall_0009__table17002720121127">firewall_policy </a>object</p>
</td>
<td class="cellrowborder" valign="top" width="18.95810418958104%" headers="mcps1.3.3.2.2.5.1.3 "><p id="vpc_firewall_0009__p43844189132522">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="42.85571442855714%" headers="mcps1.3.3.2.2.5.1.4 "><p id="vpc_firewall_0009__p50197883132340">Specifies the firewall policy objects. For details, see <a href="#vpc_firewall_0009__table17002720121127">Table 2</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_firewall_0009__table17002720121127"></a><a name="table17002720121127"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_firewall_0009__table17002720121127" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="vpc_firewall_0009__b1012714367171">Firewall Policy</strong> objects</caption><thead align="left"><tr id="vpc_firewall_0009__row16929792121127"><th align="left" class="cellrowborder" valign="top" width="23.21%" id="mcps1.3.3.3.2.5.1.1"><p id="vpc_firewall_0009__p18873879121127"><strong id="vpc_firewall_0009__b1087743721713">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.98%" id="mcps1.3.3.3.2.5.1.2"><p id="vpc_firewall_0009__p1187191018576"><strong id="vpc_firewall_0009__b764633831718">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.93%" id="mcps1.3.3.3.2.5.1.3"><p id="vpc_firewall_0009__p12638309121127"><strong id="vpc_firewall_0009__b05891639121718">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="41.88%" id="mcps1.3.3.3.2.5.1.4"><p id="vpc_firewall_0009__p61199938121127"><strong id="vpc_firewall_0009__b192981540181716">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_firewall_0009__row9858171121127"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_firewall_0009__p49865700121127">name</p>
</td>
<td class="cellrowborder" valign="top" width="13.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_firewall_0009__p287210165719">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_firewall_0009__p6225460121127">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.88%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_firewall_0009__p40337147121127">Specifies the name of the <span id="vpc_firewall_0009__text24122576436"></span><span id="vpc_firewall_0009__text124121357124314">firewall</span> policy.</p>
<p id="vpc_firewall_0009__p1606122895617">The value can contain a maximum of 255 characters.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row61803802121127"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_firewall_0009__p39621949121127">description</p>
</td>
<td class="cellrowborder" valign="top" width="13.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_firewall_0009__p087191011575">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_firewall_0009__p66053143121127">String</p>
</td>
<td class="cellrowborder" valign="top" width="41.88%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_firewall_0009__p15357220121127">Provides supplementary information about the <span id="vpc_firewall_0009__text551218214447"></span><span id="vpc_firewall_0009__text15126264413">firewall</span> policy.</p>
<p id="vpc_firewall_0009__p1267612575565">The value can contain a maximum of 255 characters.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row33369184121127"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_firewall_0009__p16940942121127">firewall_rules</p>
</td>
<td class="cellrowborder" valign="top" width="13.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_firewall_0009__p7871410165711">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_firewall_0009__p27024915121127">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="41.88%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_firewall_0009__p53455884121127">Specifies the firewall rules referenced by the <span id="vpc_firewall_0009__text5654173441"></span><span id="vpc_firewall_0009__text176517179446">firewall</span> policy.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row717167121127"><td class="cellrowborder" valign="top" width="23.21%" headers="mcps1.3.3.3.2.5.1.1 "><p id="vpc_firewall_0009__p30704110121127">audited</p>
</td>
<td class="cellrowborder" valign="top" width="13.98%" headers="mcps1.3.3.3.2.5.1.2 "><p id="vpc_firewall_0009__p17871310145717">No</p>
</td>
<td class="cellrowborder" valign="top" width="20.93%" headers="mcps1.3.3.3.2.5.1.3 "><p id="vpc_firewall_0009__p10804884121127">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="41.88%" headers="mcps1.3.3.3.2.5.1.4 "><p id="vpc_firewall_0009__p3925300121127">Specifies the audit flag.</p>
<p id="vpc_firewall_0009__p172123197567">The value can be <strong id="vpc_firewall_0009__b12839191619228">true</strong> or <strong id="vpc_firewall_0009__b16840161613221">false</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_firewall_0009__section1794317237017"><h4 class="sectiontitle">Example Request</h4><p id="vpc_firewall_0009__p157544522512">Associate the ACL policy whose ID is 2fb0e81f-9f63-44b2-9894-c13a3284594a to the ACL rule whose ID is 0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1.</p>
<pre class="screen" id="vpc_firewall_0009__screen83281627704">PUT https://{Endpoint}/v2.0/fwaas/firewall_policies/2fb0e81f-9f63-44b2-9894-c13a3284594a
{
"firewall_policy": {
"firewall_rules": [
"0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1"
]
}
}</pre>
</div>
<div class="section" id="vpc_firewall_0009__section41558848132522"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpc_firewall_0009__table35154237132522" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response parameter</caption><thead align="left"><tr id="vpc_firewall_0009__row52261665132522"><th align="left" class="cellrowborder" valign="top" width="23.169999999999998%" id="mcps1.3.5.2.2.4.1.1"><p id="vpc_firewall_0009__p65769625132522">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.61%" id="mcps1.3.5.2.2.4.1.2"><p id="vpc_firewall_0009__p12018727132522">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="51.22%" id="mcps1.3.5.2.2.4.1.3"><p id="vpc_firewall_0009__p17036810132522">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_firewall_0009__row43204254132522"><td class="cellrowborder" valign="top" width="23.169999999999998%" headers="mcps1.3.5.2.2.4.1.1 "><p id="vpc_firewall_0009__p40260041132522">firewall_policy</p>
</td>
<td class="cellrowborder" valign="top" width="25.61%" headers="mcps1.3.5.2.2.4.1.2 "><p id="vpc_firewall_0009__p26565290132522"><a href="#vpc_firewall_0009__table6763048152111">firewall_policy </a>object</p>
</td>
<td class="cellrowborder" valign="top" width="51.22%" headers="mcps1.3.5.2.2.4.1.3 "><p id="vpc_firewall_0009__p59164179132522">Specifies the firewall policy objects. For details, see <a href="#vpc_firewall_0009__table6763048152111">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="vpc_firewall_0009__table6763048152111"></a><a name="table6763048152111"></a><table cellpadding="4" cellspacing="0" summary="" id="vpc_firewall_0009__table6763048152111" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="vpc_firewall_0009__b7797034122215">Firewall Policy</strong> objects</caption><thead align="left"><tr id="vpc_firewall_0009__row18764194892115"><th align="left" class="cellrowborder" valign="top" width="32.083208320832085%" id="mcps1.3.5.3.2.4.1.1"><p id="vpc_firewall_0009__p3764194815213"><strong id="vpc_firewall_0009__b128516206257">Attribute</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="22.632263226322635%" id="mcps1.3.5.3.2.4.1.2"><p id="vpc_firewall_0009__p876474817212"><strong id="vpc_firewall_0009__b139481921202520">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45.28452845284529%" id="mcps1.3.5.3.2.4.1.3"><p id="vpc_firewall_0009__p1876484815214"><strong id="vpc_firewall_0009__b16746822172514">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpc_firewall_0009__row46402691121127"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p11805115121127">id</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p13006089121127">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p13152683121127">Specifies the UUID of the <span id="vpc_firewall_0009__text732543017442"></span><span id="vpc_firewall_0009__text173254306444">firewall</span> policy.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row376464814211"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p19764204872112">name</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p2764154815210">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p676474842118">Specifies the name of the <span id="vpc_firewall_0009__text11659172573919"></span><span id="vpc_firewall_0009__text8660325183912">firewall</span> policy.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row5764144892115"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p476424842118">description</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p147654481219">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p18765204812117">Provides supplementary information about the <span id="vpc_firewall_0009__text234582813396"></span><span id="vpc_firewall_0009__text134614284394">firewall</span> policy.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row3765184815214"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p11765848162113">tenant_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p4765548162116">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p10487112">Specifies the project ID.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row7766248182119"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p376624822116">firewall_rules</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p2070691313818">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p076694811218">Specifies the firewall rules referenced by the <span id="vpc_firewall_0009__text11656230193916"></span><span id="vpc_firewall_0009__text7657330143914">firewall</span> policy.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row376664817218"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p1376624892119">audited</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p197661748132118">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p1676694811214">Specifies the audit flag.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row1976619489210"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p1376694818214">public</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p576634816213">Boolean</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p19766748192115">Specifies whether the firewall policy can be shared by different tenants.</p>
</td>
</tr>
<tr id="vpc_firewall_0009__row109594223354"><td class="cellrowborder" valign="top" width="32.083208320832085%" headers="mcps1.3.5.3.2.4.1.1 "><p id="vpc_firewall_0009__p870051413911">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="22.632263226322635%" headers="mcps1.3.5.3.2.4.1.2 "><p id="vpc_firewall_0009__p17700201411911">String</p>
</td>
<td class="cellrowborder" valign="top" width="45.28452845284529%" headers="mcps1.3.5.3.2.4.1.3 "><p id="vpc_firewall_0009__p28021558142812">Specifies the project ID. </p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpc_firewall_0009__section41774729132522"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="vpc_firewall_0009__screen1444423817013">{
"firewall_policy": {
"description": "",
"firewall_rules": [
"0f82b221-8cd6-44bd-9dfc-0e118fa7b6b1"
],
"tenant_id": "23c8a121505047b6869edf39f3062712",
"public": false,
"id": "2fb0e81f-9f63-44b2-9894-c13a3284594a",
"audited": false,
"name": "test-policy",
"project_id": "23c8a121505047b6869edf39f3062712"
}
}</pre>
</div>
<div class="section" id="vpc_firewall_0009__section10470352390"><h4 class="sectiontitle">Status Code</h4><p id="vpc_firewall_0009__p18112112662914">See <a href="vpc_api_0002.html">Status Codes</a>.</p>
</div>
<div class="section" id="vpc_firewall_0009__section85821649202813"><h4 class="sectiontitle">Error Code</h4><p id="vpc_firewall_0009__p7233105282813">See <a href="vpc_api_0003.html">Error Codes</a>.</p>
</div>
<p id="vpc_firewall_0009__p8060118"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpc_firewall_0000.html">Firewall</a></div>
</div>
</div>