Forum Discussion
Bin_Qiu_195313
Apr 23, 2015Nimbostratus
How to use REST to create a Virtual Server with profile
I want to use REST to create a virtual server with profile. Below code is not work. The virtual server got created, but profiles are not set right def create_http_virtual(bigip, name, address, p...
Joel_Newton
Aug 26, 2015Cirrus
Hi, Bin,
I got this to work. I'm using PowerShell so my syntax is a little different, but the gist of the JSON is the same. For me, it worked with the below value for 'kind.' I also tested the value you used, and that worked as well.
$JSONBody = @{kind='tm:ltm:virtual:virtualstate';name='VirtualServerName';description='Description';partition='Common';destination='10.1.1.1:80';source='0.0.0.0';pool='PoolName';ipProtocol='tcp';mask='255.255.255.255';connectionLimit=0}
$ProfileItems = @()
$ProfileItems += @{kind='tm:ltm:virtual:profiles:profilesstate';name='ssl_profile'}
$ProfileItems += @{kind='tm:ltm:virtual:profiles:profilesstate';name='http'}
$JSONBody.profiles = $ProfileItems
What behavior are you seeing when you attempt to do it - an error or no profiles are set?
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