Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

165 lines (165 sloc) 6.99 KB
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"location": {
"type": "string",
"metadata": {
"description": "Azure Logic App Region"
},
"defaultValue": "[resourceGroup().location]"
},
"logicAppName": {
"type": "string",
"metadata": {
"description": "Name of Azure Logic App"
}
},
"tenantId": {
"type": "string",
"metadata": {
"description": "Tenant (Directory) ID"
}
},
"clientId": {
"type": "string",
"metadata": {
"description": "Application (Client) ID"
}
},
"clientSecret": {
"type": "string",
"metadata": {
"description": "Application (Client) Secret"
}
}
},
"variables": {},
"resources": [
{
"type": "Microsoft.Logic/workflows",
"apiVersion": "2017-07-01",
"name": "[parameters('logicAppName')]",
"location": "[parameters('location')]",
"properties": {
"state": "Enabled",
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"parameters": {},
"triggers": {
"Recurrence": {
"recurrence": {
"frequency": "Minute",
"interval": 3
},
"type": "Recurrence"
}
},
"actions": {
"HTTP": {
"runAfter": {},
"type": "Http",
"inputs": {
"authentication": {
"audience": "https://*.asazure.windows.net",
"clientId": "[parameters('clientId')]",
"secret": "[parameters('clientSecret')]",
"tenant": "[parameters('tenantId')]",
"type": "ActiveDirectoryOAuth"
},
"body": {
"CommitMode": "transactional",
"MaxParallelism": 2,
"Objects": [],
"RetryCount": 2,
"Type": "Full"
},
"headers": {
"Content-Type": "application/json"
},
"method": "POST",
"uri": "https://northeurope.asazure.windows.net/servers/marczakioaas/models/aas-refresh-model/refreshes"
},
"operationOptions": "DisableAsyncPattern"
},
"Initialize_variable": {
"runAfter": {
"HTTP": [
"Succeeded"
]
},
"type": "InitializeVariable",
"inputs": {
"variables": [
{
"name": "refreshStatus",
"type": "String"
}
]
}
},
"Until": {
"actions": {
"Delay": {
"runAfter": {},
"type": "Wait",
"inputs": {
"interval": {
"count": 30,
"unit": "Second"
}
}
},
"HTTP_2": {
"runAfter": {
"Delay": [
"Succeeded"
]
},
"type": "Http",
"inputs": {
"authentication": {
"audience": "https://*.asazure.windows.net",
"clientId": "[parameters('clientId')]",
"secret": "[parameters('clientSecret')]",
"tenant": "[parameters('tenantId')]",
"type": "ActiveDirectoryOAuth"
},
"method": "GET",
"uri": "@{outputs('HTTP')['headers']['location']}"
}
},
"Set_variable": {
"runAfter": {
"HTTP_2": [
"Succeeded"
]
},
"type": "SetVariable",
"inputs": {
"name": "refreshStatus",
"value": "@{body('HTTP_2')['status']}"
}
}
},
"runAfter": {
"Initialize_variable": [
"Succeeded"
]
},
"expression": "@or(equals(variables('refreshStatus'), 'succeeded'), equals(variables('refreshStatus'), 'failed'))",
"limit": {
"count": 60,
"timeout": "PT1H"
},
"type": "Until"
}
},
"outputs": {}
},
"parameters": {}
}
}
]
}
You can’t perform that action at this time.