Forum Discussion

mkozak_166878's avatar
mkozak_166878
Icon for Nimbostratus rankNimbostratus
May 28, 2015

Rest add member to gtm pool

I'm trying to add a member to a GTM pool using rest. Is there something wrong with my syntax?

 

curl -k -u admin:admin -H "Content-Type:application/json" -X PUT -d '{"name":"audit_pool", "members":[{"name":"DC4_audit","fullPath":"KC-F5:DC4_audit"}]}'

 

This is the response I get: {"code":403,"message":"Operation is not supported on component /gtm/pool.","errorStack":[]}

 

6 Replies

  • I figured out it should of been

     

    curl -k -u admin:admin -H "Content-Type:application/json" -X PUT -d '{"name":"audit_pool", "members":[{"name":"DC4_audit","fullPath":"KC-F5:DC4_audit"}]}' /audit_pool

     

    but now I get the error "Pool Member DC4_audit references a nonexistent Virtual Server"

     

  • Did you resolve this ?
    I got it working using this:
    
    curl -sk --max-time 5 -u admin:admin https://X.X.X.X/mgmt/tm/gtm/pool/{GTM-Pool-Name}/members -H 'Content-Type: application/json' -X POST -d '{"name":"{F5-LTM-name}:/Common/{virtual-server-on-LTM"}'
    
    HTH's
    
    Steve
    
    • ying_vang_28374's avatar
      ying_vang_28374
      Icon for Nimbostratus rankNimbostratus

      Has anyone attempted adding members to the GTM pool on version 12.1.0? I cannot seem to get the correct syntax to add a pool member via iControl Rest. Any help would be appreciated.

       

      Thanks,

       

      Ying

       

    • steve_laffan_11's avatar
      steve_laffan_11
      Icon for Cirrus rankCirrus

      I don't expect it to have changed significantly since I last did this so hopefully this will help:

       

      Here are my variables:

       

      GTM Pool Name = l72xxengx2external

       

      F5 LTM Name = f5l2eng02ppew1b.testing.com

       

      Virtual Server from F5 LTM = dvxxdatx2

       

      This is the rest command from Curl:

       

      curl -sk --max-time 5 -u {administrative-username}:{administrative-password} https://{F5 Management IP}/mgmt/tm/gtm/pool/l72xxengx2external/members -H 'Content-Type: application/json' -X POST -d '{"name":"f5l2eng02ppew1b.testing.com:/Common/dvxxdatx2"}'

       

      HTH

       

      Steve

       

    • ying_vang_28374's avatar
      ying_vang_28374
      Icon for Nimbostratus rankNimbostratus

      Steve,

       

      Thanks for the help. The param's you sent pointed me to where I needed to be. The only gotcha I ran into with that was that I needed to add "/Common" to the F5 LTM Name so it looked like: "/Common/f5l2eng02ppew1b.testing.com" for it to work without any errors.

       

      Without the "/Common/", it would work but also error out with "404 Not Found: Object not found".