bmoreira2000
Feb 17, 2021Nimbostratus
How to add members to a pool - ControlRestAPI
I'm trying to add three members to a pool object, i have the following code and the following rest api output method.
curl -k -X POST \
-u "${USER}:${PASS}" \
"https://bip.server/mgmt/tm/ltm/pool/~Common~${HOST_FILTER}/members/" \
-H 'Accept: */*' \
-H 'Content-Type: application/json' \
-d '{
"kind": "tm:ltm:pool:members:memberscollectionstate", "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~'${HOST_FILTER}'/members?ver=13.1.3.5", "items": [ { "kind": "tm:ltm:pool:members:membersstate", "name": "serverswarm0:'${TMB_RESULT}'", "partition": "Common", "fullPath": "/Common/serverswarm0.servers:'${TMB_RESULT}'", "generation": 270491, "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~'${HOST_FILTER}'/members/~Common~serverswarm0:'${TMB_RESULT}'?ver=13.1.3.5", "address": "127.0.0.1", "connectionLimit": 0, "dynamicRatio": 1, "ephemeral": "false", "fqdn": { "autopopulate": "disabled" }, "inheritProfile": "enabled", "logging": "disabled", "monitor": "default", "priorityGroup": 0, "rateLimit": "disabled", "ratio": 1, "session": "monitor-enabled", "state": "up" },
{ "kind": "tm:ltm:pool:members:membersstate", "name": "serverswarm:'${TMB_RESULT}'", "partition": "Common", "fullPath": "/Common/serverswarm1:'${TMB_RESULT}'", "generation": 270491, "selfLink": "https://localhost/mgmt/tm/ltm/pool/~Common~'${HOST_FILTER}'/members/~Common~serverswarm1:'${TMB_RESULT}'?ver=13.1.3.5", "address": "127.0.0.1", "connectionLimit": 0, "dynamicRatio": 1, "ephemeral": "false", "fqdn": { "autopopulate": "disabled" }, "inheritProfile": "enabled", "logging": "disabled", "monitor": "default", "priorityGroup": 0, "rateLimit": "disabled", "ratio": 1, "session": "monitor-enabled", "state": "up" } ]
}'
Output Method:
{"code":403,"message":"Operation is not supported on property /ltm/pool/~Common~test_host/members.","errorStack":[],"apiError":1}