Forum Discussion

Joshua_Beam_129's avatar
Joshua_Beam_129
Icon for Nimbostratus rankNimbostratus
Apr 13, 2015

iControl REST - SNAT TRANSLATION

I'm trying to remove a snat translation from a SNAT POOL LIST using the RESTful API. 
Returning error :

{"code":403,"message":"Operation is not supported on component /ltm/snat-translation.","errorStack":[]}

curl -k -u xyz:xyz https://$lbip/mgmt/tm/ltm/snat-translation -H "Content-Type: application/json" -X DELETE "{\`"name\`":\`"$snatdest\`"}"

Also have tried going directly to the member:

curl -k -u xyz:xyz https://$lbip/mgmt/tm/ltm/snat-translation/$snatdest -H "Content-Type: application/json" -X DELETE "{\`"name\`":\`"$snatdest\`"}"


First I was trying to remove the address from the SNAT LIST itself but it was deleting my entire list:

curl -k -u xyz:xyz https://$lbip/mgmt/tm/ltm/snatpool/$snat -H "Content-Type: application/json" -X DELETE "{\`"members\`":[\`"$snatdest\`"]}" 

Anything would help, running 11.5.1, thanks!

3 Replies

  • Hi Josh,

     

    you cannot address directly snat-translation, if you do that in the gui, you will have an error telling you the adress is used by a snatpool.

     

    What you need to do is to send a PUT request to snatpool/$snat and submit a new member table directly with your new values (ie minus the one you want to remove).

     

    for example if your table was:

     

    { "members":["/Common/1.1.1.1","/Common/1.1.1.2"] } and you want to remove 1.1.1.2 you will send :

     

    { "members":["/Common/1.1.1.1"] }

     

  • Ok so just to be clear in the GUI when you have a snat pool with 100 addresses and you chose one, remove, update. You are in fact just posting 99 addresses not deleting 1?

     

  • gui is quiete different, as for the tmsh you may have an add/remove members.

     

    On the other hand with REST API you have put/patch methods to modifiy a collection of value pais, but no method to modify part of value of a name/value pair.