功能介紹
更新網(wǎng)絡(luò)ACL規(guī)則。
調(diào)試
您可以在API Explorer中調(diào)試該接口。
URI
PUT /v2.0/fwaas/firewall_rules/{firewall_rule_id}
請求參數(shù)
|
屬性 |
是否必選 |
類型 |
說明 |
|---|---|---|---|
|
name |
否 |
String |
網(wǎng)絡(luò)ACL規(guī)則名稱。 使用說明:最長255個字符 |
|
description |
否 |
String |
網(wǎng)絡(luò)ACL規(guī)則描述。 使用說明:最長255個字符 |
|
protocol |
否 |
String |
IP協(xié)議。 取值范圍:支持TCP,UDP,ICMP, ICMPV6, 或者0-255 |
|
source_port |
否 |
String |
源端口號或者一段端口范圍。 取值范圍:位于[1,65535]中一個整數(shù)或者一段端口范圍a:b |
|
destination_port |
否 |
String |
目的端口號或者一段端口范圍。 取值范圍:位于[1,65535]中一個整數(shù)或者一段端口范圍a:b |
|
ip_version |
否 |
Integer |
IP協(xié)議版本。 取值范圍:4、6,分別表示創(chuàng)建ipv4和ipv6。 |
|
source_ip_address |
否 |
String |
源地址或者CIDR。 |
|
destination_ip_address |
否 |
String |
目的地址或者CIDR。 |
|
action |
否 |
String |
對通過網(wǎng)絡(luò)ACL的流量執(zhí)行的操作。 取值范圍:deny(拒絕)/allow(允許) |
|
enabled |
否 |
Boolean |
是否使能網(wǎng)絡(luò)ACL規(guī)則。 取值范圍:true/false |
請求示例
更新id為b94acf06-efc2-485d-ba67-a61acf2a7e28的ACL規(guī)則,action更新為deny。
PUT https://{Endpoint}/v2.0/fwaas/firewall_rules/b94acf06-efc2-485d-ba67-a61acf2a7e28
{
"firewall_rule": {
"action": "deny"
}
}
響應(yīng)參數(shù)
|
屬性 |
類型 |
說明 |
|---|---|---|
|
id |
String |
網(wǎng)絡(luò)ACL規(guī)則的uuid標(biāo)識。 |
|
name |
String |
網(wǎng)絡(luò)ACL規(guī)則名稱。 |
|
description |
String |
網(wǎng)絡(luò)ACL規(guī)則描述。 |
|
tenant_id |
String |
項(xiàng)目ID |
|
public |
Boolean |
是否支持跨租戶共享。 |
|
protocol |
String |
IP協(xié)議。 |
|
source_port |
String |
源端口號或者一段端口范圍。 |
|
destination_port |
String |
目的端口號或者一段端口范圍。 |
|
ip_version |
Integer |
IP協(xié)議版本。 |
|
source_ip_address |
String |
源地址或者CIDR。 |
|
destination_ip_address |
String |
目的地址或者CIDR。 |
|
action |
String |
對通過網(wǎng)絡(luò)ACL的流量執(zhí)行的操作。 |
|
enabled |
Boolean |
是否使能網(wǎng)絡(luò)ACL規(guī)則。 |
|
project_id |
String |
項(xiàng)目ID,請參見獲取項(xiàng)目ID。 |
響應(yīng)示例
{
"firewall_rule": {
"protocol": "tcp",
"description": "",
"source_ip_address": null,
"destination_ip_address": null,
"source_port": null,
"destination_port": "80",
"id": "b94acf06-efc2-485d-ba67-a61acf2a7e28",
"name": "ALLOW_HTTP",
"tenant_id": "23c8a121505047b6869edf39f3062712",
"enabled": true,
"action": "deny",
"ip_version": 4,
"public": false,
"project_id": "23c8a121505047b6869edf39f3062712"
}
}
狀態(tài)碼
請參見狀態(tài)碼。
錯誤碼
請參見錯誤碼。
