Forum Discussion
MarioMeas
Nimbostratus
Dec 20, 2016TMSH command to assign ASM policy to a vip.
Hello. To assign an ASM security policy to a virtual server via the GUI I would go to Local Traffic -> Virtual Servers -> Virtual Server List, click on the Virtual Server, click Security -> Policies...
MarioMeas
Nimbostratus
Jan 03, 2017Thank you Nazir. What's the best way to accomplish the above steps using Rest? Thanks.
- Nazir_52641Jan 05, 2017
Cirrus
Get the ID of the existing ASM policy:
curl -sku admin:admin | ./jq '.items[] | "pol_name:" + .fullPath + ";api_id:" + .id'
Assign ASM policy with id ZsKuSt3CrOF9LBMAapLOkg to VS HTTP_VS1:
curl -sku admin:admin -X PATCH -H "Content-Type: application/json" -d '{ "virtualServers" : ["/Common/HTTP_VS1"] }' | ./jq
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