Forum Discussion
Chris_Olson
Jan 08, 2021Nimbostratus
Icontrol RestAPI enable/disable multiple pool members/multiple pools
We moved data centers and no longer have CL access to the F5. The only option is Rest API. We need the ability to remove enable or disable multiple servers from multiple pools. The syntax I have is b...
Satoshi_Toyosa1
Jan 11, 2021Ret. Employee
You can disable all the pool members that belong to a certain node by disabling the node: e.g.,
curl -sku $PASS https://$HOST/mgmt/tm/ltm/node/<NODE> -X PATCH -H 'Content-type: application/json' -d '{"state":"user-down"}'
If you need to disable individual pool members (e.g., test_node:80 and test_node:443 but not test_node:8080), then you need to write a loop: e.g.,
for member in test_node:80 test_node:443: do
curl -sku $PASS https://$HOST/mgmt/tm/ltm/pool/members/$member -X PATCH -H 'Content-type: application/json' -d '{"state":"user-down"}'
done
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