SamCo
Mar 04, 2022Cirrus
List all VS and associated (or not) Dos profile
Hello All, I am currently looking for a way to list on our BigIp all the VS and the associated DoS Profile, and if there no DoS profile, I favor Rest API if possible. I already see I could make a f...
- Mar 04, 2022
Hi SamCo,
You should be able to obtain a full list of the virtual servers, and a full list of the DoS profiles fairly easily, then in a programming language iterate over each VIP and the list of DoS profiles to check if there are any matches.
So basically in some python pseudocode:
Get /mgmt/tm/ltm/virtual as virtuals Get /mgmt/tm/security/dos/profile as dosprofiles for vip in virtuals: # start by setting some variable to false, if there is no dos profile match it will stay false match = False for profile in dosprofiles: if profile['name'] in vip['profiles']: # found a profile match, set some variable to true match = True # return the requested data
You may also find it helpful to use the "expandSubcollections" flag, which can reduce the number of calls needed, but does increase the size of the response. More info is here: https://community.f5.com/t5/technical-articles/demystifying-icontrol-rest-part-3-how-to-pass-query-parameters/ta-p/286957
Hope this helps.