Skip to content

Latest commit

 

History

History
144 lines (117 loc) · 5.39 KB

logic-apps-create-deploy-azure-resource-manager-templates.md

File metadata and controls

144 lines (117 loc) · 5.39 KB
title description services documentationcenter author manager editor ms.assetid ms.service ms.workload ms.tgt_pltfrm ms.devlang ms.topic ms.date ms.author
Create logic apps from Azure Resource Manager templates | Microsoft Docs
Create and deploy logic app workflows with Azure Resource Manager templates
logic-apps
MandiOhlinger
anneta
7574cc7c-e5a1-4b7c-97f6-0cffb1a5d536
logic-apps
integration
na
na
article
10/15/2017
LADocs; mandia

Create and deploy logic apps with Azure Resource Manager templates

Azure Logic Apps provides Azure Resource Manager templates that you can use, not only to create logic apps for automating workflows, but also to define the resources and parameters that are used for deployment. You can use this template for your own business scenarios or customize the template to meet your requirements. Learn more about the Resource Manager template for logic apps and Azure Resource Manager template structure and syntax.

Define the logic app

This example logic app definition runs once an hour, and pings the location specified in the testUri parameter. The template uses parameter values for the logic app name (logicAppName) and the location to ping for testing (testUri). Learn more about defining these parameters in your template. The template also sets the location for the logic app to the same location as the Azure resource group.

{
    "type": "Microsoft.Logic/workflows",
    "apiVersion": "2016-06-01",
    "name": "[parameters('logicAppName')]",
    "location": "[resourceGroup().location]",
    "tags": {
        "displayName": "LogicApp"
    },
    "properties": {
        "definition": {
            "$schema": "http://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
            "contentVersion": "1.0.0.0",
            "parameters": {
                "testURI": {
                "type": "string",
                "defaultValue": "[parameters('testUri')]"
                }
            },
            "triggers": {
                "Recurrence": {
                    "type": "Recurrence",
                    "recurrence": {
                        "frequency": "Hour",
                        "interval": 1
                    }
                }
            },
            "actions": {
                "Http": {
                    "type": "Http",
                    "inputs": {
                        "method": "GET",
                        "uri": "@parameters('testUri')"
                    },
                    "runAfter": {}
                }
            },
            "outputs": {}
        },
        "parameters": {}
    }
}

Define parameters

[!INCLUDE app-service-logic-deploy-parameters]

Here are descriptions for the parameters in the template:

Parameter Description JSON definition example
logicAppName Defines the name of the logic app that template creates. "logicAppName": { "type": "string", "metadata": { "description": "myExampleLogicAppName" } }
testUri Defines the location to ping for testing. "testUri": { "type": "string", "defaultValue": "http://azure.microsoft.com/status/feed/"}

Learn more about REST API for Logic Apps Workflow definition and properties and building on logic app definitions with JSON.

Deploy logic apps automatically

To create and automatically deploy a logic app to Azure, choose Deploy to Azure here:

Deploy to Azure

This action signs you in to the Azure portal where you can provide your logic app's details and make any changes to the template or parameters. For example, the Azure portal prompts you for these details:

  • Azure subscription name
  • Resource group that you want to use
  • Logic app location
  • A name for your logic app
  • A test URI
  • Acceptance of the specified terms and conditions

Deploy logic apps with commands

[!INCLUDE app-service-deploy-commands]

PowerShell

New-AzureRmResourceGroupDeployment -TemplateUri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-logic-app-create/azuredeploy.json -ResourceGroupName ExampleDeployGroup

Azure CLI

azure group deployment create --template-uri https://raw.githubusercontent.com/Azure/azure-quickstart-templates/master/101-logic-app-create/azuredeploy.json -g ExampleDeployGroup

Get support

Next steps

[!div class="nextstepaction"] Monitor logic apps