Forum Discussion
MSZ
Nimbostratus
Mar 23, 2016How to add/remove virtual server in existing ASM Policy?
I need to know the procedure of addition/removal of virtual server from existing ASM Security Policy. Please suggest.
2 Replies
- Kris_20135
Nimbostratus
Do you know how to do this via the API?
- cjunior
Nacreous
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-formatI hope it helps.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects