Changing Virtual Server's Access Profile with TMSH w/o Knowing Its Current Value
I am trying to use tmsh to change the Access Profile that is assigned to a given virtual server without knowing its current value. In the f5 Console GUI this is straightforward. When you navigate to Local traffic -> Virtual Servers -> Virtual Server List and click on a given virtual server, you can then scroll down and change the Access Profile assigned to that virtual server in the dropdown next to "Access Profile", click update, and you're done ... no need to know what the access profile was set to beforehang, you can just change the dropdown next to the "Access Profile" label. However, when I'm performing the same action using a tmsh command, I seem to have to know the value that assigned Access Profile is currently set to in order to be able to delete the profile out of that virtual server's properties and add in my new one. Here is the tmsh command I'm using ...
modify ltm virtual MY_VIRTUAL_SERVER profiles add {ACCESS_PROFILE_NEW} profiles delete {ACCESS_PROFILE_ORIG}
My point is that I need to know that the access profile is set to
ACCESS_PROFILE_ORIG
before issuing this command to reassign the access profile value. Is there any way to just have tmsh somehow detect what the access profile is set to and then delete it?