curl -X PUT \
'http://10.2.1.7/restapi/v11.0/Policies/SecurityPreRules?LOCATION=device-group&device-group=devicegroup-7&name=allow-dns' \
-H 'X-PAN-KEY: *******' \
-d '{
"entry": [
{
"@device-group": "devicegroup-7",
"@location": "device-group",
"@name": "allow-dns",
"action": "allow",
"application": {
"member": [
"dns"
]
},
"category": {
"member": [
"any"
]
},
"destination": {
"member": [
"any"
]
},
"from": {
"member": [
"any"
]
},
"source-hip": {
"member": [
"any"
]
},
"destination-hip": {
"member": [
"any"
]
},
"log-setting": "log-forwarding-LS",
"log-start": "yes",
"service": {
"member": [
"application-default"
]
},
"source": {
"member": [
"any"
]
},
"source-user": {
"member": [
"any"
]
},
"target": {
"negate": "no"
},
"to": {
"member": [
"any"
]
}
}
]
}
The response body indicates the success or failure of the request. If you reference a Security
policy Pre Rule that does not exist because the name of the rule is invalid or the
location is incorrect, the response displays as
{
"code": 5,
"details": [
{
"@type": "CauseInfo",
"causes": [
{
"code": 7,
"description": "Object Not Present: No object to edit.",
"module": "panui_mgmt"
}
]
}
],
"message": "Object Not Present"
}
.