Forum Discussion
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?