Add Section With Rules
Creates a new firewall section with rules. The limit on the number of rules is defined by maxItems in collection types for FirewallRule (FirewallRuleXXXList types). When invoked on a section with a large number of rules, this API is supported only at low rates of invocation (not more than 4-5 times per minute). The typical latency of this API with about 1024 rules is about 4-5 seconds. This API should not be invoked with large payloads at automation speeds. More than 50 rules with a large number of rule references is not supported.
Instead, to create sections, use: POST /api/v1/firewall/sections
To create rules, use: POST /api/v1/firewall/sections/<section-id>/rules
Use the following Policy API -
PUT|PATCH /policy/api/v1/infra/domains/<domain-id>/security-policies/<security-policy-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"
}
}
]
}
]
}
Created
"FirewallSectionRuleList Object"
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"rules":[{}]}' https://{api_host}/api/v1/firewall/sections?action=create_with_rules