Forum Discussion
Rudra_Mahapatra
Nimbostratus
Sep 25, 2017How to change persist value (in F5 LB) to "None" using rest api
Using rest api I am able to change default persistence profile from None to dest_addr / source_addr. But I am not able to change it back to "None" (using rest API) from dest_addr / source_addr.
...
webguy96
Nimbostratus
Aug 28, 2018I would agree the behavior on this seems to not follow some other API calls, however, the code below should work if you don't mind seeing it in PowerShell.
$link = "https://${bigip}/ltm/virtual/~${partition}~${vs}" $hash = @{} $hash.Add("name", ${vs}) $hash.Add("partition", ${partition}) $hash.Add("tmDefault", "yes") $hash.Add("persist", $null)
$json = $hash | ConvertTo-Json
Invoke-RestMethod -Method Patch -Uri ${link} -Credential ${cred} -Body ${json} -ContentType 'application/json' -ErrorAction Stop
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects