I need to know the procedure of addition/removal of virtual server from existing ASM Security Policy. Please suggest.
Do you know how to do this via the API?
If you are using a default policy association like screen above, you probably have an ASM policy started by an LTM policy. This is an example using iControlREST and cURL, to remove ASM policy from vs_https.
curl -kv -u "admin:admin" -H 'Content-Type: application/json' -X GET https://192.168.1.245/mgmt/tm/ltm/virtual/~Common~vs_https/policies?\$select=fullPath |json-format
{
"kind": "tm:ltm:virtual:policies:policiescollectionstate",
"selfLink": "https://localhost/mgmt/tm/ltm/virtual/~Common~vs_https/policies?$select\u003dfullPath\u0026ver\u003d13.0.0",
"items": [
{
"fullPath": "/Common/asm_auto_l7_policy__vs_https"
}
]
}
curl -kv -u "admin:admin" -H 'Content-Type: application/json' -X DELETE https://192.168.1.245/mgmt/tm/ltm/virtual/~Common~vs_https/policies/~Common~asm_auto_l7_policy__vs_https |json-format
I hope it helps.