I am trying to deploy Azure Logic App through powershell. I created JSON template through Visual Studio 2017. I am getting following error: Any ideas, what is going on here?
New-AzureRmLogicApp : Unexpected character encountered while parsing value: h. Path '', line 0, position 0.
POWERSHELL COMMAND
New-AzureRmLogicApp -ResourceGroupName "resourcegroupforutptesting123" -Name "LogicApp05" -Location "West US 2" -State "Enabled" -DefinitionFilePath "C:\Powershell\Definition03.json" -ParameterFilePath "C:\Powershell\Parameters03.json"
Definition03.json
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {},
"triggers": {}
}
}
I suggest you to use Azure Resource Manager templates to deploy the Logic App.
Sign in to your Azure account.
Connect-AzureRmAccount
Create a file of the template and you can define the Logic App name and location.
{ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "variables": {}, "resources": [ { "name": "LogicApp4", "type": "Microsoft.Logic/workflows", "location": "Southeast Asia", "tags": { "displayName": "LogicApp" }, "apiVersion": "2016-06-01", "properties": { "definition": { "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "contentVersion": "1.0.0.0", "actions": {}, "outputs": {}, "parameters": {}, "triggers": {} }, "parameters": {} } } ], "outputs": {} }
Deploy to the resource group the template that defines the resources to create.
New-AzureRmResourceGroupDeployment -Name NorasForDeployment -ResourceGroupName NorasForTest -TemplateFile C:\\Users\\v-wehan\\source\\repos\\AzureResourceGroup1\\AzureResourceGroup1\\LogicApp.json
It is useful for me. For more details, you can refer to the doc .
REPLACE the content in json file with
{"$schema":"https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", "actions": {}, "contentVersion":"1.0.0.0","outputs": {},"parameters": {},"triggers": {}}
It will add the blank logic app. Please note, your json string in json file shouldn't have any spaces in it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.