Forum Discussion
Assign ASM policy to VS via iControl/REST
Hello everyone,
I batch create virtual servers using the iControl/REST interface. Only thing missing now is assigning a pre-existing ASM policy.
My version is 11.5.1, will upgrade to 11.5.3 later. Does someone know how to do this? Thank you.
- Fred_WittenbergHistoric F5 Account
Alternatively, you could do something like this, within the policy:
PATCH - https://10.128.1.245/mgmt/tm/asm/policies/SZ-bD4Tgcq2AMKgqzV9LVw
{"virtualServers": ["/Common/test","/Common/hackazon"]}
This is useful if you are adding multiple virtuals to the same policy.
Hello,
I think that before v12.0.0, it's not easy to attach an existing ASM profile to a VS. But you can try using the following icontrol urls :
First create an ltm policy with a POST to
/mgmt/tm/ltm/policy
Then you will need to add conditions and actions in your policy. Here the url to add an action which will tell the policy to use an existing asm profile :
/mgmt/tm/ltm/policy/my_policy_name/rules/default/actions
And finally, you need to assign the ltm policy to your VS by using the following url
/mgmt/tm/ltm/virtual/vs-auction/policies
I don't find any other easier way to achieve your need
Recent Discussions
Related Content
* 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