Verb | URI | Description |
PUT | /fw/firewall_policies/firewall_policy-id /insert_rule |
Inserts a Firewall Rule in a Firewall Policy relative to the position of other rules. |
Normal Response Code: 200
Error Response Codes: Unauthorized (401), Bad Request (400), Not Found (404). Bad Request error is returned in the case the rule information is missing.
Example 4.136. Insert Firewall Rule in Firewall Policy: Request
PUT /v2.0/fw/firewall_policies/41bfef97-af4e-4f6b-a5d3-4678859d2485/insert_rule.json User-Agent: python-neutronclient Accept: application/json
{ "firewall_rule_id": "7bc34b8c-8d3b-4ada-a9c8-1f4c11c65692", "insert_after": "a08ef905-0ff6-4784-8374-175fffe7dade", "insert_before": "" }
Example 4.137. Insert Firewall Rule in Firewall Policy: Response
HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8
{ "audited": false, "description": "", "firewall_list": [], "firewall_rules": [ "a08ef905-0ff6-4784-8374-175fffe7dade", "7bc34b8c-8d3b-4ada-a9c8-1f4c11c65692", "8722e0e0-9cc9-4490-9660-8c9a5732fbb0" ], "id": "c69933c1-b472-44f9-8226-30dc4ffd454c", "name": "test-policy", "shared": false, "tenant_id": "45977fa2dbd7482098dd68d0d8970117" }
insert_before and insert_after parameters refer to firewall rule uuids already associated with the firewall policy. firewall_rule_id refers to uuid of the rule being inserted. insert_before takes precedence over insert_after and if neither is specified, firewall_rule_is is inserted at the first position.