Forum Discussion
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
- Arnaud_Lemaire
Employee
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"] }
- Joshua_Beam_129
Nimbostratus
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?
- Arnaud_Lemaire
Employee
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
