Update CNNS Container and Host Policy
PUT/api/v33.02/policies/firewall/network
x-prisma-cloud-target-env: {"permission":"policyCNNF"}
Updates all container and host CNNS rules in a single shot. Updating all rules at the same time makes it possible to maintain strict ordering between rules.
The procedure to add, edit, or remove rules is:
- Get all rules using the GET endpoint.
cURL Request
Refer to the following example cURL command that retrieves a list of all rules, pretty-print the JSON response, and save the results to a file:
$ curl -k \
-u <USER> \
-X PUT \
-H "Content-Type:application/json" \
-o <network_firewall_rules.json> \
"https://<CONSOLE>/api/v<VERSION>/policies/firewall/network/container"
-
Modify the JSON output according to your needs.
-
Update rules by pushing the new JSON payload.
cURL Request
Refer to the following example cURL command that installs the rules defined in your network_firewall_rules.json
file.
Do not forget to specify the @
symbol.
$ curl -k \
-u <USER> \
-X PUT \
-H "Content-Type:application/json" \
--data-binary "@network_firewall_rules.json" \
"https://<CONSOLE>/api/v<VERSION>/policies/firewall/network/container"
Any previously installed rules are overwritten.
Request
Responses
- 200
- default
OK