iControl to assign iRule to VIP in partition other than Common
I have VIP on partition /DevOps. I’m trying to create a REST call to assign an iRule to an existing VIP that are not in /Common. When I use a call like the following, it gets an HTTP 404 not found because it defaults to thinking the VIP is in the /Common partition:
curl -k -X PUT -H Content-Type: application/json -H X-F5-Auth-Token: **** -d {"rules":["/Common/_sys_https_redirect"]} https://****.****.com/mgmt/tm/ltm/virtual/gary-dev.yrcw.com_vs
But, when I revise it as follows, it returns HTTP 400 “Found unexpected URI”:
curl -k -X PUT -H Content-Type: application/json -H X-F5-Auth-Token: **** -d {"rules":["/Common/_sys_https_redirect"]} https://****.****.com/mgmt/tm/ltm/virtual/DevOps/gary-dev.yrcw.com_vs
What is the proper way to direct it to my VIP in the /DevOps partition?
If I must use TMSH then please provide a working example and I’ll script it that way.
Thanks in advance for your assistance.
Hello Gary
Just try this instead
https://****.****.com/mgmt/tm/ltm/virtual/~DevOps~gary-dev.yrcw.com_vs
Hello Gary,
Use PATCH method instead of PUT.