我在Azure中有一个Logic App,它使用Liquid map来转换JSON内容 . 我正在尝试使用New-AzureRmIntegrationAccountMap命令行开关和Set-AzureRmIntegrationAccountMap命令行开关来部署映射 .
调用 Set-AzureRmIntegrationAccountMap
命令行开关时出现以下错误:
Set-AzureRmIntegrationAccountMap:无法反序列化响应 .
使用此脚本:
Try
{
Write-Host -ForegroundColor Green "Creating $baseName..."
$mapContent = Get-Content -Path $fullName | Out-String
Write-Host -ForegroundColor Cyan "$mapContent"
New-AzureRmIntegrationAccountMap -ResourceGroupName $resourceGroupName -Name $iacName -MapName $baseName -MapDefinition $mapContent -ErrorAction Stop
Write-Host -ForegroundColor Green "Successfully created $baseName"
}
Catch
{
Write-Host -ForegroundColor Red "Error creating $baseName, trying update..."
Set-AzureRmIntegrationAccountMap -ResourceGroupName $resourceGroupName -Name $iacName -MapName $baseName -MapDefinition $mapContent -Force
if ($?) {
Write-Host -ForegroundColor Green "Successfully updated $baseName"
} else {
Write-Host -ForegroundColor Red "Error updating $baseName"
exit 1
}
}
在一些搜索之后,两个命令行开关接受 MapType
参数,但只允许一个值(XSLT) .
有没有办法在Azure的集成帐户中自动部署Liquid map(PowerShell,ARM模板...)?
1 回答
是的,我可以使用以下代码在PowerShell上创建Liquid map .
从天蓝色门户网站查看 .