Forum Discussion
How to change persist value (in F5 LB) to "None" using rest api
I 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
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
