Forum Discussion
REST - Any way to add multiple pool members in the same request in BIG-IP 13.0.0 Build 2.0.1671 Hotfix HF2
To replace all the existing pool members in the pool
pl
with one of the existing nodes (CentOS-vmnet80
here), run the following:
curl -sku admin: https:///mgmt/tm/ltm/pool/pl \
-X PATCH -H "Content-type: application/json" \
-d '{
"membersReference":{
"items":[
{ "name":"CentOS-vmnet3:80","partition":"Common" }
]
}
}'
The method also works for a pool with no member. Similarly, to replace all with new IP addresses:
curl -sku admin: https:///mgmt/tm/ltm/pool/pl \
-X PATCH -H "Content-type: application/json" \
-d '{
"membersReference":{
"items":[
{"name":"10.10.10.1:80"},
{"name":"10.10.10.2:80"}
]
}
}'
They work on all versions (tested on 12.1.3, 13.0.0 and 13.1.0).
Note that the iControl REST calls above overwrite the existing pool members (irrespective of BIG-IP versions): i.e., they are equivalent to
tmsh modify ltm pool pl members replace-all-with { ... }
. No 'add' command is supported.
If you want to do 'add', you need to first get the list of pool members, modify the list with additional member(s), and put that back to the pool. The following command will get you the list of the pool
pl
:
curl -sku admin: https:///mgmt/tm/ltm/pool/pl/members
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