This is what I get now... Everything seems correct...
PS > $jsonBody = $ActionsBody | ConvertTo-Json
PS > $jsonBody
{
"conditions": {
"name": "0",
"request": true,
"httpHost": true,
"equals": true,
"values": "www.mydomain.net"
}
}
PS > Invoke-RestMethod -Uri https://$url/mgmt/tm/ltm/policy/~Common~Drafts~$Policy/rules/Testing -Method PUT -Headers $Header -Body $jsonBody -ContentType 'application/json'
Invoke-RestMethod : {"code":400,"message":"Found unexpected json string at configuration item /ltm/policy/~Common~Drafts~TEST_POLICY_AUTOMATION/rules/Testing/conditions/name. The json string is