Revise Section With Rules
Modifies an existing firewall section along with its relative position among other firewall sections with rules. When invoked on a large number of rules, this API is supported only at low rates of invocation (not more than 2 times per minute). The typical latency of this API with about 1024 rules is about 15 seconds in a cluster setup. This API should not be invoked with large payloads at automation speeds.
Instead, to move a section above or below another section, use: POST /api/v1/firewall/sections/<section-id>?action=revise
To modify rules, use: PUT /api/v1/firewall/sections/<section-id>/rules/<rule-id>
Simultaneous update (modify) operations on same section are not allowed to prevent overwriting stale contents to firewall section. If a concurrent update is performed, HTTP response code 409 will be returned to the client operating on stale data. That client should retrieve the firewall section again and re-apply its update.
Use the following Policy API -
POST /policy/api/v1/infra/domains/<domain-id>/security-policies/<security-policy-id>?action=revise
section-id
Identifier of the anchor rule or section. This is a required field in case operation like 'insert_before' and 'insert_after'.
Operation
{
"_links": [
{
"action": "string",
"href": "string",
"rel": "string"
}
],
"_schema": "string",
"_self": {},
"_revision": 0,
"_create_time": 0,
"_create_user": "string",
"_last_modified_time": 0,
"_last_modified_user": "string",
"_protection": "string",
"_system_owned": false,
"description": "string",
"display_name": "string",
"id": "string",
"resource_type": "string",
"tags": [
{
"scope": "string",
"tag": "string"
}
],
"applied_tos": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
}
],
"is_default": false,
"rule_count": 0,
"section_type": "string",
"stateful": false,
"autoplumbed": false,
"category": "string",
"comments": "string",
"enforced_on": "string",
"firewall_schedule": {
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
},
"lock_modified_by": "string",
"lock_modified_time": 0,
"locked": false,
"priority": 0,
"tcp_strict": false,
"rules": [
{
"_links": [
{
"action": "string",
"href": "string",
"rel": "string"
}
],
"_schema": "string",
"_self": {},
"_revision": 0,
"_owner": {},
"description": "string",
"display_name": "string",
"id": "string",
"resource_type": "string",
"action": "string",
"applied_tos": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
}
],
"destinations": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
}
],
"destinations_excluded": false,
"direction": "string",
"disabled": false,
"ip_protocol": "string",
"is_default": false,
"logged": false,
"notes": "string",
"priority": 0,
"rule_tag": "string",
"sources": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
}
],
"sources_excluded": false,
"context_profiles": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
}
],
"extended_sources": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string"
}
],
"section_id": "string",
"services": [
{
"is_valid": false,
"target_display_name": "string",
"target_id": "string",
"target_type": "string",
"service": {
"resource_type": "string"
}
}
]
}
]
}
OK
"FirewallSectionRuleList Object"
Not Found
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"rules":[{}]}' https://{api_host}/api/v1/firewall/sections/{section-id}?action=revise_with_rules