Using iControlRest to modify LTM pools
Problem this snippet solves: I was recently asked how to use the REST API to add nodes to an existing LTM pool. The use case is one where the customer would spin up a new server in Amazon and wanted...
Published Mar 09, 2015
Version 1.0Baron_of_Strath
Historic F5 Account
Joined May 04, 2019
Baron_of_Strath
Historic F5 Account
Joined May 04, 2019
tkorn_180311
Apr 22, 2016Nimbostratus
I can't get the PUT to work for modifying an existing pool. It says there are updates below, but there are not.
"Updated: If you would like to add a member to an existing pool you can do so by specifying the name of the pool in the post to which a new member will be added. This will prepend to the new member to the existing pool. Examples below:"
I get the following error:
tim:~ tim$ curl -sk -u ':' -H "Content-Type: application/json" -X PUT https://ny-bigip01.bananna.com/mgmt/tm/ltm/pool/test-pool -d '{"members":{"name":"api02.bananna.com:80","address":"10.96.81.80"}}'
{"code":400,"message":"Found unexpected json string at configuration item /ltm/pool/test-pool/members/name. The json string is \"api02.bananna.com:80\".","errorStack":[]}