"
5 | }
6 | }
--------------------------------------------------------------------------------
/codeful-workflows/samples/recommend-coffee/codeful-logicapp-recommendcoffee/test-recommendcoffee-sample-http/RecommendCoffee.http:
--------------------------------------------------------------------------------
1 | POST http://localhost:7071/api/RecommendCoffee HTTP/1.1
2 | content-type: application/json
3 |
4 | {
5 | "orderID": "10234",
6 | "customer": {
7 | "name": "Jane Doe",
8 | "address": "123 Main Street",
9 | "contact": "janedoe@contoso.com"
10 | },
11 | "items": [
12 | {
13 | "productName": "Light Roast",
14 | "qty": 1,
15 | "price": 16.99
16 | },
17 | {
18 | "productName": "Medium Blend",
19 | "qty": 1,
20 | "price": 16.99
21 | },
22 | {
23 | "productName": "Morning Blend",
24 | "qty": 1,
25 | "price": 14.99
26 | }
27 | ],
28 | "total": 46.52
29 | }
--------------------------------------------------------------------------------
/connectors/AzureVM/README.md:
--------------------------------------------------------------------------------
1 | # Azure VM Connector
2 |
3 | This is a logic app custom connector for Azure Virtual Machines. It provides the following actions:
4 |
5 | |Action|Description|
6 | |--|--|
7 | |Restart|Restart a VM|
8 | |Start|Start a VM|
9 | |Deallocate|Deallocate and Stop a VM|
10 | |Power Off|Stop a VM (does not deallocate)|
11 | |Capture Image|Capture an image of a VM|
12 |
13 | ## Pre-Requisites
14 |
15 | This connector does require authentication to Azure Active Directory. As such, deployment will require the client ID and client Secret for an AAD Application. [These instructions](https://docs.microsoft.com/azure/azure-resource-manager/resource-manager-api-authentication) will walk through how to register an Azure Active Directory application with **User + app access** so the connector can act on-behalf-of the authenticated user. Be sure to set your application up to get delegate access to the Windows Azure application.
16 |
17 | After deploying, you will need to open the connector (named `azure-vm-connector` in whichever resource group and location selected) and copy the redirect URL from the security tab. Update your Azure AD Application reply URLs to support the logic app consent flow.
18 |
19 | 
20 |
21 | ## Deploying
22 |
23 | You can deploy with the [azuredeploy.json](azuredeploy.json) or by clicking the button below:
24 |
25 |
26 |
27 |
28 |
29 | After deployment you can view the connector `Azure VM` in any of the logic apps in the region you deployed the connector to. You can deploy this connector to as many regions as you require.
--------------------------------------------------------------------------------
/connectors/AzureVM/images/aad-reply-ux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/connectors/AzureVM/images/aad-reply-ux.png
--------------------------------------------------------------------------------
/connectors/Microsoft Graph/README.md:
--------------------------------------------------------------------------------
1 | # Microsoft Graph Connector
2 |
3 | This is a logic app custom connector for a few operations on the Microsoft Graph. It provides the following actions:
4 |
5 | |Action|Description|
6 | |--|--|
7 | |AddUser|Add a user into the graph|
8 | |AssignManager|Assign a manager to a user|
9 | |AssignLicense|Assign a license to a user|
10 | |ListPlansGroup|List all plans in a group|
11 |
12 | ## Pre-Requisites
13 |
14 | This connector does require authentication to Azure Active Directory. As such, deployment will require the client ID and client Secret for an AAD Application. You'll need to a register an Azure Active Directory application with **User + app access** so the connector can act on-behalf-of the authenticated user. Be sure to give your application delegate permissions to the Microsoft Graph.
15 |
16 | After deploying, you will need to open the connector (named `microsoft-graph-connector` in whichever resource group and location selected) and copy the redirect URL from the security tab. Update your Azure AD Application reply URLs to support the logic app consent flow.
17 |
18 | 
19 |
20 | ## Deploying
21 |
22 | You can deploy with the [azuredeploy.json](azuredeploy.json) or by clicking the button below:
23 |
24 |
25 |
26 |
27 |
28 | After deployment you can view the connector `Microsoft Graph` in any of the logic apps in the region you deployed the connector to. You can deploy this connector to as many regions as you require.
--------------------------------------------------------------------------------
/connectors/Microsoft Graph/images/aad-reply-ux.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/connectors/Microsoft Graph/images/aad-reply-ux.png
--------------------------------------------------------------------------------
/github-sample/.funcignore:
--------------------------------------------------------------------------------
1 | .debug
2 | .git*
3 | .vscode
4 | local.settings.json
5 | test
6 | workflow-designtime/
--------------------------------------------------------------------------------
/github-sample/.github/workflows/logicapp_deploy.yml:
--------------------------------------------------------------------------------
1 | # Docs for the Azure Web Apps Deploy action: https://github.com/azure/functions-action
2 | # More GitHub Actions for Azure: https://github.com/Azure/actions
3 |
4 | name: (classic) Build and Deploy Logic App.
5 |
6 | env:
7 | LA_NAME: 'la-name-324234'
8 |
9 | on:
10 | workflow_dispatch:
11 | # Trigger the workflow every time the build workflow ran to completion
12 | workflow_run:
13 | workflows:
14 | - (classic) Logic App Infrastructure as Code Pipeline.
15 | types:
16 | - completed
17 | # Triggers when an environment file has been changed
18 | push:
19 | paths:
20 | - "logic/**"
21 | - ".github/workflows/logicapp_deploy.yml"
22 |
23 | jobs:
24 | logic_app_build:
25 | name: Build
26 | runs-on: ubuntu-latest
27 | steps:
28 | - name: Checkout
29 | uses: actions/checkout@v1
30 | - name: Package logic
31 | run: (cd logic; mkdir -p ../output; zip -r ../output/logic.zip .)
32 | - name: Upload app zip package
33 | uses: actions/upload-artifact@v2
34 | with:
35 | name: logic
36 | path: ./output/
37 | retention-days: 1
38 |
39 | logic_app_deploy:
40 | name: Deploy
41 | runs-on: ubuntu-latest
42 | needs: [logic_app_build]
43 | environment:
44 | name: Dev
45 | steps:
46 | - name: Checkout
47 | uses: actions/checkout@v1
48 | - name: Login via Az module
49 | uses: azure/login@v1
50 | with:
51 | creds: ${{secrets.AZURE_CREDENTIALS}}
52 | enable-AzPSSession: true
53 | - uses: actions/download-artifact@master
54 | with:
55 | name: logic
56 | path: ./output/
57 |
58 | - name: Get publish Profile
59 | id: publishprofile
60 | uses: azure/powershell@v1
61 | with:
62 | inlineScript: |
63 | $profile = Get-AzWebAppPublishingProfile `
64 | -ResourceGroupName ${{ secrets.RG_LA }} `
65 | -Name ${{ env.LA_NAME }}
66 | $profile = $profile.Replace("`r", "").Replace("`n", "")
67 | Write-Output "::set-output name=profile::$profile"
68 | azPSVersion: latest
69 |
70 | - name: Deploy to Azure Logic App
71 | uses: Azure/functions-action@v1.3.1
72 | id: la
73 | with:
74 | app-name: ${{secrets.RG_LA}}
75 | package: './output/logic.zip'
76 | publish-profile: ${{steps.publishprofile.outputs.profile}}
77 |
78 | - name: Swap parameter files
79 | id: params
80 | uses: azure/CLI@v1
81 | with:
82 | inlineScript: |
83 | az functionapp deploy --resource-group ${{ secrets.RG_LA }} --name ${{ env.LA_NAME }} --src-path logic/azure.parameters.json --type static --target-path parameters.json
84 |
--------------------------------------------------------------------------------
/github-sample/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | appsettings.json
4 | local.settings.json
5 | workflow-designtime/
6 |
--------------------------------------------------------------------------------
/github-sample/.vscode/extensions.json:
--------------------------------------------------------------------------------
1 | {
2 | "recommendations": [
3 | "ms-azuretools.vscode-azurefunctions"
4 | ]
5 | }
6 |
--------------------------------------------------------------------------------
/github-sample/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "Attach to .NET Functions",
6 | "type": "coreclr",
7 | "request": "attach",
8 | "processId": "${command:azureLogicAppsStandard.pickProcess}"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/github-sample/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "azureLogicAppsStandard.deploySubpath": ".",
3 | "azureLogicAppsStandard.projectLanguage": "JavaScript",
4 | "azureLogicAppsStandard.projectRuntime": "~3",
5 | "debug.internalConsoleOptions": "neverOpen",
6 | "azureLogicAppsStandard.projectSubpath": "logic"
7 | }
8 |
--------------------------------------------------------------------------------
/github-sample/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "generateDebugSymbols",
6 | "command": "dotnet",
7 | "args": [
8 | "${input:getDebugSymbolDll}"
9 | ],
10 | "type": "process",
11 | "problemMatcher": "$msCompile",
12 | "options": {
13 | "cwd": "${workspaceFolder}/logic"
14 | }
15 | },
16 | {
17 | "type": "func",
18 | "command": "host start",
19 | "problemMatcher": "$func-watch",
20 | "isBackground": true,
21 | "dependsOn": "generateDebugSymbols",
22 | "options": {
23 | "cwd": "${workspaceFolder}/logic"
24 | }
25 | }
26 | ],
27 | "inputs": [
28 | {
29 | "id": "getDebugSymbolDll",
30 | "type": "command",
31 | "command": "azureLogicAppsStandard.getDebugSymbolDll"
32 | }
33 | ]
34 | }
35 |
--------------------------------------------------------------------------------
/github-sample/ARM/connectors-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "value": "westus2"
7 | },
8 | "logicAppSystemAssignedIdentityTenantId": {
9 | "value": "__1__"
10 | },
11 | "logicAppSystemAssignedIdentityObjectId": {
12 | "value": "__2__"
13 | },
14 | "sa_name": {
15 | "value": "your-sa-name"
16 | },
17 | "connections_azureblob_name": {
18 | "value":"azureblob"
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/github-sample/ARM/connectors-template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "type": "string",
7 | "metadata": {
8 | "description": "The datacenter to use for the deployment."
9 | }
10 | },
11 | "logicAppSystemAssignedIdentityTenantId": {
12 | "type": "string"
13 | },
14 | "logicAppSystemAssignedIdentityObjectId": {
15 | "type": "string"
16 | },
17 | "sa_name": {
18 | "defaultValue": "storage name",
19 | "type": "string"
20 | },
21 | "connections_azureblob_name": {
22 | "defaultValue": "azureblob",
23 | "type": "string"
24 | }
25 | },
26 | "variables": {
27 | "storage_account": "[concat(toLower(parameters('sa_name')), uniqueString(resourceGroup().id))]"
28 | },
29 | "resources": [
30 | {
31 | "type": "Microsoft.Storage/storageAccounts",
32 | "apiVersion": "2021-09-01",
33 | "name": "[variables('storage_account')]",
34 | "location": "[parameters('location')]",
35 | "sku": {
36 | "name": "Standard_LRS",
37 | "tier": "Standard"
38 | },
39 | "kind": "Storage",
40 | "properties": {
41 | "networkAcls": {
42 | "bypass": "AzureServices",
43 | "virtualNetworkRules": [],
44 | "ipRules": [],
45 | "defaultAction": "Allow"
46 | },
47 | "supportsHttpsTrafficOnly": true,
48 | "encryption": {
49 | "services": {
50 | "file": {
51 | "keyType": "Account",
52 | "enabled": true
53 | },
54 | "blob": {
55 | "keyType": "Account",
56 | "enabled": true
57 | }
58 | },
59 | "keySource": "Microsoft.Storage"
60 | }
61 | }
62 | },
63 | {
64 | "type": "Microsoft.Storage/storageAccounts/blobServices/containers",
65 | "apiVersion": "2021-09-01",
66 | "name": "[format('{0}/default/blobs', variables('storage_account'))]",
67 | "dependsOn": [
68 | "[resourceId('Microsoft.Storage/storageAccounts', variables('storage_account'))]"
69 | ],
70 | "properties": {
71 | "defaultEncryptionScope": "$account-encryption-key",
72 | "denyEncryptionScopeOverride": false,
73 | "publicAccess": "Container"
74 | }
75 | },
76 | {
77 | "type": "Microsoft.Web/connections",
78 | "apiVersion": "2016-06-01",
79 | "name": "[parameters('connections_azureblob_name')]",
80 | "location": "[parameters('location')]",
81 | "kind": "V2",
82 | "dependsOn": [
83 | "[resourceId('Microsoft.Storage/storageAccounts', variables('storage_account'))]"
84 | ],
85 | "properties": {
86 | "displayName": "privatestorage",
87 | "parameterValues": {
88 | "accountName": "[variables('storage_account')]",
89 | "accessKey": "[listKeys(resourceId('Microsoft.Storage/storageAccounts/', variables('storage_account')), '2019-06-01').keys[0].value]"
90 | },
91 | "api": {
92 | "id": "[subscriptionResourceId('Microsoft.Web/locations/managedApis', parameters('location'), 'azureblob')]"
93 | }
94 | }
95 | },
96 | {
97 | "type": "Microsoft.Web/connections/accessPolicies",
98 | "apiVersion": "2016-06-01",
99 | "name": "[format('{0}/{1}', parameters('connections_azureblob_name'), parameters('logicAppSystemAssignedIdentityObjectId'))]",
100 | "location": "[parameters('location')]",
101 | "dependsOn": [
102 | "[resourceId('Microsoft.Web/connections', parameters('connections_azureblob_name'))]"
103 | ],
104 | "properties": {
105 | "principal": {
106 | "type": "ActiveDirectory",
107 | "identity": {
108 | "tenantId": "[parameters('logicAppSystemAssignedIdentityTenantId')]",
109 | "objectId": "[parameters('logicAppSystemAssignedIdentityObjectId')]"
110 | }
111 | }
112 | }
113 | }
114 |
115 | ],
116 | "outputs": {
117 | "blobendpointurl": {
118 | "type": "string",
119 | "value": "[reference(resourceId('Microsoft.Web/connections', parameters('connections_azureblob_name')), '2016-06-01', 'full').properties.connectionRuntimeUrl]"
120 | }
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/github-sample/ARM/la-parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
3 | "contentVersion": "1.0.0.0",
4 | "parameters": {
5 | "location": {
6 | "value": "westus2"
7 | },
8 | "environmentName": {
9 | "value": "env-name"
10 | },
11 | "projectName": {
12 | "value": "project-name"
13 | },
14 | "logicAppName": {
15 | "value": "la-name"
16 | },
17 | "appServicePlanName": {
18 | "value": "asp-name"
19 | },
20 | "storageName": {
21 | "value": "storage-name"
22 | },
23 | "kind": {
24 | "value": "StorageV2"
25 | },
26 | "skuName": {
27 | "value": "Standard_LRS"
28 | },
29 | "skuTier": {
30 | "value": "Standard"
31 | }
32 | }
33 | }
--------------------------------------------------------------------------------
/github-sample/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM mcr.microsoft.com/azure-functions/node:3.0
2 |
3 | ENV AzureWebJobsScriptRoot=/home/site/wwwroot \
4 | AzureFunctionsJobHost__Logging__Console__IsEnabled=true \
5 | FUNCTIONS_V2_COMPATIBILITY_MODE=true
6 |
7 | COPY . /home/site/wwwroot
8 |
9 | RUN cd /home/site/wwwroot
--------------------------------------------------------------------------------
/github-sample/logic/.funcignore:
--------------------------------------------------------------------------------
1 | workflow-designtime/
--------------------------------------------------------------------------------
/github-sample/logic/EventProcessor/workflow.json:
--------------------------------------------------------------------------------
1 | {
2 | "definition": {
3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
4 | "actions": {
5 | "Response": {
6 | "type": "Response",
7 | "kind": "http",
8 | "inputs": {
9 | "statusCode": 200
10 | },
11 | "runAfter": {
12 | "Create_blob_(V2)": [
13 | "Succeeded"
14 | ]
15 | }
16 | },
17 | "Create_blob_(V2)": {
18 | "type": "ApiConnection",
19 | "inputs": {
20 | "host": {
21 | "connection": {
22 | "referenceName": "azureblob"
23 | }
24 | },
25 | "method": "post",
26 | "body": "@triggerBody()",
27 | "headers": {
28 | "ReadFileMetadataFromServer": true
29 | },
30 | "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('sacb34ucffd7en6'))}/files",
31 | "queries": {
32 | "folderPath": "/blobs",
33 | "name": "@{utcNow()}",
34 | "queryParametersSingleEncoded": true
35 | }
36 | },
37 | "runAfter": {},
38 | "runtimeConfiguration": {
39 | "contentTransfer": {
40 | "transferMode": "Chunked"
41 | }
42 | }
43 | }
44 | },
45 | "triggers": {
46 | "manual": {
47 | "type": "Request",
48 | "kind": "Http",
49 | "inputs": {}
50 | }
51 | },
52 | "contentVersion": "1.0.0.0",
53 | "outputs": {}
54 | },
55 | "kind": "Stateful"
56 | }
--------------------------------------------------------------------------------
/github-sample/logic/EventTrigger/workflow.json:
--------------------------------------------------------------------------------
1 | {
2 | "definition": {
3 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
4 | "actions": {
5 | "Invoke_a_workflow_in_this_workflow_app": {
6 | "inputs": {
7 | "body": "demo content",
8 | "host": {
9 | "workflow": {
10 | "id": "eventprocessor"
11 | }
12 | }
13 | },
14 | "runAfter": {},
15 | "type": "Workflow"
16 | }
17 | },
18 | "contentVersion": "1.0.0.0",
19 | "outputs": {},
20 | "triggers": {
21 | "Recurrence": {
22 | "recurrence": {
23 | "frequency": "Day",
24 | "interval": 1
25 | },
26 | "type": "Recurrence"
27 | }
28 | }
29 | },
30 | "kind": "Stateful"
31 | }
--------------------------------------------------------------------------------
/github-sample/logic/azure.parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "blob_auth": {
3 | "type":"object",
4 | "value": {
5 | "type": "ManagedServiceIdentity"
6 | }
7 | }
8 |
9 | }
--------------------------------------------------------------------------------
/github-sample/logic/connections.json:
--------------------------------------------------------------------------------
1 | {
2 | "managedApiConnections": {
3 | "azureblob": {
4 | "api": {
5 | "id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/providers/Microsoft.Web/locations/@appsetting('WORKFLOWS_LOCATION_NAME')/managedApis/azureblob"
6 | },
7 | "connection": {
8 | "id": "/subscriptions/@appsetting('WORKFLOWS_SUBSCRIPTION_ID')/resourceGroups/@appsetting('WORKFLOWS_RESOURCE_GROUP_NAME')/providers/Microsoft.Web/connections/azureblob"
9 | },
10 | "connectionRuntimeUrl": "@appsetting('BLOB_CONNECTION_RUNTIMEURL')",
11 | "authentication": "@parameters('blob_auth')"
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/github-sample/logic/host.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0",
3 | "extensionBundle": {
4 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
5 | "version": "[1.*, 2.0.0)"
6 | }
7 | }
8 |
--------------------------------------------------------------------------------
/github-sample/logic/parameters.json:
--------------------------------------------------------------------------------
1 | {
2 | "blob_auth": {
3 | "type":"object",
4 | "value": {
5 | "type": "Raw",
6 | "scheme": "Key",
7 | "parameter": "@appsetting('azureblob-connectionKey')"
8 | }
9 | }
10 |
11 | }
--------------------------------------------------------------------------------
/labs/twitter-to-powerbi/images/functionConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/labs/twitter-to-powerbi/images/functionConfig.png
--------------------------------------------------------------------------------
/labs/twitter-to-powerbi/images/powerbiConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/labs/twitter-to-powerbi/images/powerbiConfig.png
--------------------------------------------------------------------------------
/labs/twitter-to-powerbi/images/twitterConfig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/labs/twitter-to-powerbi/images/twitterConfig.png
--------------------------------------------------------------------------------
/preview/Images/DisableUpdate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/DisableUpdate.png
--------------------------------------------------------------------------------
/preview/Images/InstallVsix.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/InstallVsix.png
--------------------------------------------------------------------------------
/preview/Images/RuntimeVersion.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/RuntimeVersion.png
--------------------------------------------------------------------------------
/preview/Images/logicapp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/Images/logicapp.png
--------------------------------------------------------------------------------
/preview/LogicAppsV2Demo.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/preview/LogicAppsV2Demo.mp4
--------------------------------------------------------------------------------
/preview/readme.md:
--------------------------------------------------------------------------------
1 | # Logic Apps Preview
2 |
3 | This early release includes a number of exciting new features to test out including:
4 |
5 | Local development on your dev machine
6 |
7 | * Designer support in a new VS Code add-in
8 | * Docker container support
9 | * Choice of stateless or stateful operating mode
10 | * Additional ‘built-in’ connectors
11 | * Running on the Azure functions runtime, with support for deployment to App Service
12 |
13 | ## Get started
14 |
15 | Getting started guide is found in the wiki here: [getting started wiki](https://github.com/Azure/logicapps/wiki/1.-Preview-notes-for-participants).
16 | A video walking through the user experience of using VS Code can be found here: [Demo video](LogicAppsV2Demo.mp4).
17 |
18 | ## Region support
19 |
20 | Currently the following regions are supportd for Function App deployment:
21 |
22 | * West Central US (cloud connectors are only supported in this region)
23 | * West US 2
24 | * North Central US
25 | * West Europe
26 |
27 | More regions will open up very soon.
28 |
29 | ## Notes on changes/updates
30 |
31 | 5/28/2020: This is the base preview release, this is an early preview so expect to see regular updates as we identify and fix issues
32 | [VSIX package 0.22.1-alpha](https://workflowscdn.azureedge.net/2020-05-preview/VsExtension/LogicAppsVSCodeExtension-0.22.1-alpha.zip)
33 |
34 | ## Issues
35 |
36 | Please report issues on this repo's issue board.
37 |
38 | ## Contributing
39 |
40 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
41 |
--------------------------------------------------------------------------------
/scripts/README.md:
--------------------------------------------------------------------------------
1 | # Useful Scripts
2 |
3 | This folder contains useful Logic Apps scripts for your reference. Please note that while we try to genericize the scripts, you will most likely have to modify them to fit your specific needs.
--------------------------------------------------------------------------------
/scripts/cancel-all-runs/cancel-runs.ps1:
--------------------------------------------------------------------------------
1 | # Max number of pages to follow when retriving runs
2 | # Each page contains up to 30 runs
3 | $maxPage = 10
4 |
5 | # Logic Apps to cancel
6 | $subscriptionName = 'Subscription Name'
7 | $resourceGroup = 'Resource Group Name'
8 | $logicAppsName = 'Logic Apps Name'
9 |
10 |
11 | #####
12 |
13 | $subscription = Get-AzSubscription -SubscriptionName $subscriptionName
14 |
15 | $cotnext = $subscription | Set-AzContext
16 |
17 | # Get token from context for use when making REST call to run API
18 | $tokens = $cotnext.TokenCache.ReadItems() | where { $_.TenantId -eq $cotnext.Subscription.TenantId } | Sort-Object -Property ExpiresOn -Descending
19 |
20 | $token = $tokens[0].AccessToken
21 |
22 | $logicApps = Get-AzResource -ResourceType Microsoft.Logic/workflows -ResourceGroupName $resourceGroup -Name $logicAppsName
23 |
24 | Foreach ($la in $logicApps) {
25 | # Get-AzLogicAppRunHistory does not follow nextLink when retriving runs
26 | # https://github.com/Azure/azure-powershell/issues/9141
27 | # $runs = Get-AzLogicAppRunHistory -ResourceGroupName $la.ResourceGroupName -Name $la.name | where { $_.Status -eq 'Running' }
28 |
29 | $headers = @{
30 | 'Authorization' = 'Bearer ' + $token
31 | }
32 |
33 | # GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Logic/workflows/{workflowName}/runs?api-version=2016-06-01&$top={$top}&$filter={$filter}
34 | $nextLink = 'https://management.azure.com/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Logic/workflows/{2}/runs?api-version=2016-06-01&$filter=status eq ''Running''' -f $subscription.Id, $la.ResourceGroupName, $la.Name
35 | $runs = @()
36 | $page = 0
37 |
38 | Do {
39 | $data = Invoke-RestMethod -Method 'GET' -Uri $nextLink -Headers $headers
40 |
41 | $runs += $data.value
42 | $nextLink = if ($data.nextLink) { $data.nextLink } else { '' }
43 |
44 | $page++
45 | } Until ($nextLink -eq "" -or $page -ge $maxPage)
46 |
47 |
48 | Foreach($run in $runs) {
49 | Stop-AzLogicAppRun -ResourceGroupName $la.ResourceGroupName -Name $la.name -RunName $run.name -Force
50 | }
51 | }
--------------------------------------------------------------------------------
/scripts/recurrence-jobs/README.md:
--------------------------------------------------------------------------------
1 | # Recurrence jobs
2 |
3 | If you have a large number of recurrence jobs, instead of creating one Logic App per schedule, you can use this template to dramatically reduce the number of Logic Apps needed.
4 |
5 | `deploy.ps1`
6 |
7 | This script will find all the failed runs for Logic Apps under a subscription or resource group, and resubmit them.
8 |
9 | `schedulesWithConn.json`
10 |
11 | This ARM deployment template contains three Logic Apps, together they will be able to handle multiple schedules.
12 |
13 | This script also shows off a few other tricks:
14 |
15 | * Define multiple connections and randomly choose one at run time for higher throughput
16 | * Deploy Logic Apps with circular references by deploy blank Logic App first then redeploy with actual reference
17 | * Deploy multiple copies of the Logic Apps
--------------------------------------------------------------------------------
/scripts/recurrence-jobs/deploy.ps1:
--------------------------------------------------------------------------------
1 | $copies = 1
2 |
3 | $deploymentName = "recurrentLogicAppDeployment"
4 |
5 | $resourceGroupName = "recurrentLogicAppsRGxyz16"
6 |
7 | $ServiceBusConnConnectionString = "Endpoint=sb://{service-bus-namespace}.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey={SAS-key}"
8 |
9 | $location = "eastus"
10 |
11 | # Create a single resource group for all sets
12 | New-AzResourceGroup -Name $resourceGroupName -Location $location
13 |
14 | For($i = 0; $i -lt $copies; $i++) {
15 | $createRecurrenceJobLogicAppName = "CreateRecurrenceJob" + "_set" + $i
16 | $executeRecurrenceJobLogicAppName = "ExecuteRecurrenceJob" + "_set" + $i
17 | $rescheduleRecurrenceJobLogicAppName = "RescheduleRecurrenceJob" + "_set" + $i
18 | $ServiceBusConnName = "ServiceBusConn" + "_set" + $i + "_"
19 |
20 | New-AzResourceGroupDeployment -Name $deploymentName -ResourceGroupName $resourceGroupName -TemplateFile "C:\Desktop\schedulesWithConn.json" -location $location -CreateRecurrenceJobLogicAppName $createRecurrenceJobLogicAppName -ExecuteRecurrenceJobLogicAppName $executeRecurrenceJobLogicAppName -RescheduleRecurrenceJobLogicAppName $rescheduleRecurrenceJobLogicAppName -ServiceBusConnName $ServiceBusConnName -ServiceBusConnConnectionString $ServiceBusConnConnectionString
21 | }
22 | # End of create a single resource group for all sets
--------------------------------------------------------------------------------
/scripts/resubmit-all-failed-runs/README.md:
--------------------------------------------------------------------------------
1 | # Resubmit all failed runs
2 |
3 | `resubmit-all-failed-runs.ps1`
4 |
5 | This script will find all the failed runs for Logic Apps under a subscription or resource group, and resubmit them.
--------------------------------------------------------------------------------
/scripts/resubmit-all-failed-runs/resubmit-all-failed-runs.ps1:
--------------------------------------------------------------------------------
1 | $startDateTime = Get-Date -Date '11/21/2018 5:00:00 PM'
2 |
3 | $endDateTime = Get-Date -Date '11/21/2018 6:00:00 PM'
4 |
5 | $subscription = Get-AzSubscription -SubscriptionName "Name of the subscription"
6 |
7 | $cotnext = $subscription | Set-AzContext
8 |
9 | $tokens = $cotnext.TokenCache.ReadItems() | where { $_.TenantId -eq $cotnext.Subscription.TenantId } | Sort-Object -Property ExpiresOn -Descending
10 |
11 | $token = $tokens[0].AccessToken
12 |
13 | $logicApps = Get-AzResource -ResourceType Microsoft.Logic/workflows <# | where { $_.ResourceGroupName -eq 'LoremIpsum'} #>
14 |
15 | Foreach ($la in $logicApps) {
16 | $runs = Get-AzLogicAppRunHistory -ResourceGroupName $la.ResourceGroupName -Name $la.name | where { $_.Status -eq 'Failed' } | where { $_.StartTime -gt $startDateTime -and $_.StartTime -lt $endDateTime }
17 |
18 | $headers = @{
19 | 'Authorization' = 'Bearer ' + $token
20 | }
21 |
22 | Foreach($run in $runs) {
23 | $uri = 'https://management.azure.com/subscriptions/{0}/resourceGroups/{1}/providers/Microsoft.Logic/workflows/{2}/triggers/{3}/histories/{4}/resubmit?api-version=2016-06-01' -f $subscription.Id, $la.ResourceGroupName, $la.Name, $run.Trigger.Name, $run.Name
24 |
25 | Invoke-RestMethod -Method 'POST' -Uri $uri -Headers $headers
26 | }
27 | }
--------------------------------------------------------------------------------
/scripts/scheduler-migration/README.md:
--------------------------------------------------------------------------------
1 | # Migrate Azure Scheduler jobs to Logic Apps
2 |
3 | `run-once-handler.json`
4 |
5 | A Logic App definition that will be responsible for all run-once schedules.
6 |
7 | `scheduler-migration.ps1`
8 |
9 | This script will find all the failed runs for Logic Apps under a subscription or resource group, and resubmit them.
--------------------------------------------------------------------------------
/scripts/scheduler-migration/run-once-handler.json:
--------------------------------------------------------------------------------
1 | {
2 | "$connections": {
3 | "value": {
4 | "servicebus_1": {
5 | "connectionId": "/subscriptions/{subscription}/resourceGroups/{resourceGroup}/providers/Microsoft.Web/connections/servicebus-1",
6 | "connectionName": "servicebus-11",
7 | "id": "/subscriptions/{subscription}/providers/Microsoft.Web/locations/{location}/managedApis/servicebus"
8 | }
9 | }
10 | },
11 | "definition": {
12 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
13 | "actions": {
14 | "Delay_until": {
15 | "inputs": {
16 | "until": {
17 | "timestamp": "@{convertToUtc(triggerBody()?['timestamp'],triggerBody()?['sourceTimeZone'])}"
18 | }
19 | },
20 | "runAfter": {},
21 | "type": "Wait"
22 | },
23 | "Send_message": {
24 | "inputs": {
25 | "body": {
26 | "ContentData": "@{base64(triggerBody()?['content'])}"
27 | },
28 | "host": {
29 | "connection": {
30 | "name": "@parameters('$connections')['servicebus_1']['connectionId']"
31 | }
32 | },
33 | "method": "post",
34 | "path": "/@{encodeURIComponent(triggerBody()?['queue'])}/messages",
35 | "queries": {
36 | "systemProperties": "None"
37 | }
38 | },
39 | "runAfter": {
40 | "Delay_until": [
41 | "Succeeded"
42 | ]
43 | },
44 | "type": "ApiConnection"
45 | }
46 | },
47 | "contentVersion": "1.0.0.0",
48 | "outputs": {},
49 | "parameters": {
50 | "$connections": {
51 | "defaultValue": {},
52 | "type": "Object"
53 | }
54 | },
55 | "triggers": {
56 | "manual": {
57 | "inputs": {
58 | "schema": {}
59 | },
60 | "kind": "Http",
61 | "type": "Request"
62 | }
63 | }
64 | }
65 | }
66 |
--------------------------------------------------------------------------------
/scripts/scheduler-migration/scheduler-migration.ps1:
--------------------------------------------------------------------------------
1 | Login-AzureRmAccount
2 | Get-AzureRmSubscription
3 | Select-AzureRmSubscription -SubscriptionId {subscriptionId}
4 |
5 | $runOnceHandlerCallbackUrl = Get-AzureRmLogicAppTriggerCallbackUrl -Name 'RunOnceHandler' -ResourceGroupName 'DeliRG' -TriggerName 'manual'
6 |
7 | $nextDaylightSavingEnd = Get-Date -Date '2018-11-04'
8 | $nextDaylightSavingStart = Get-Date -Date '2019-03-10'
9 |
10 | <#
11 | Get all the Scheduler Job Collections, then all the jobs within each job collection.
12 | #>
13 | $jobCollections = Get-AzureRmSchedulerJobCollection
14 |
15 | $jobs = @()
16 |
17 | Foreach ($jobCollection in $jobCollections) {
18 | $jobs += Get-AzureRmSchedulerJob -ResourceGroupName $jobCollection.ResourceGroupName -JobCollectionName $jobCollection.JobCollectionName
19 | }
20 |
21 | <#
22 | Iterate over all run-once jobs and create corresponding Logic App runs
23 | Scheduler jobs stores time in UTC w/o timezone information, so sourceTimeZone will be hardcoded to UTC
24 | #>
25 | Foreach ($job in $jobs) {
26 | If ($job.EndSchedule -eq 'Run once') {
27 | $newTimestamp = $job.StartTime
28 |
29 | <#
30 | Assume all jobs are in DST zones, therefore shifting back one hour
31 | It also only checks for the next two DST switches
32 | #>
33 | If ($job.StartTime -gt $nextDaylightSavingEnd -and $job.StartTime -lt $nextDaylightSavingStart) {
34 | $newTimestamp = $job.StartTime.AddHours(-1)
35 | }
36 |
37 | $payload = @{
38 | timestamp = $newTimestamp.ToString()
39 | sourceTimeZone = 'UTC'
40 | queue = $job.JobAction.ServiceBusQueueName
41 | content = $job.JobAction.ServiceBusMessage} | ConvertTo-Json
42 |
43 | Invoke-RestMethod -Method Post -Uri $runOnceHandlerCallbackUrl.Value -ContentType 'application/json' -Body $payload
44 | } Else {
45 | #ToDo
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/templates/_sample.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/{Guid}",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "{Guid}",
5 | "properties": {
6 | "author": {
7 | "displayName": "{Your name}"
8 | },
9 | "categoryNames": [
10 | "enterprise_integration",
11 | "schedule",
12 | "producitivity",
13 | "social",
14 | "sync",
15 | "general"
16 | ],
17 | "description": "{Description of the template}",
18 | "displayName": "{Name of the template}",
19 | "definition": {
20 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
21 | "actions": {
22 | },
23 | "contentVersion": "1.0.0.0",
24 | "outputs": {},
25 | "parameters": {
26 | "$connections": {
27 | "defaultValue": {},
28 | "type": "Object"
29 | }
30 | },
31 | "triggers": {
32 | }
33 | },
34 | "connectionReferences": {
35 | },
36 | "apiSummaries": [
37 | {
38 | "type": "{Type of the API}",
39 | "displayName": "{Name of the API}",
40 | "iconUri": "{Icon of the API}",
41 | "brandColor": "{Brand color of the API}"
42 | }
43 | ],
44 | "changedTime": "2000-01-01T00:00:00.000Z",
45 | "createdTime": "2000-01-01T00:00:00.000Z",
46 | "popularity": 99
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/templates/asc-regulatoryCompliance-send-notification-email.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/b846cc4b-7393-4ac5-a470-994b8b530458",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "b846cc4b-7393-4ac5-a470-994b8b530458",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "general",
11 | "security"
12 | ],
13 | "description": "Send an email notification with the regulatory compliance assessment details. Note: automated running of this trigger requires enabling automation in Microsoft Defender for Cloud",
14 | "displayName": "Get a notification email when Microsoft Defender for Cloud creates a regulatory compliance assessment",
15 | "definition": {
16 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
17 | "actions": {
18 | "Send_an_email_(V2)": {
19 | "type": "ApiConnection",
20 | "inputs": {
21 | "host": {
22 | "connection": {
23 | "name": "@parameters('$connections')['office365']['connectionId']"
24 | }
25 | },
26 | "method": "post",
27 | "body": {
28 | "To": null,
29 | "Subject": "New Microsoft Defender for Cloud regulatory compliance assessment has been created for your environment",
30 | "Body": "Microsoft Defender for Cloud regulatory compliance assessment has been created for your environment - assessment details below:
\n
\nAssessment Id: @{triggerBody()?['id']}
\n
\nAssessment name: @{triggerBody()?['name']}
\n
\nResource provider type: @{triggerBody()?['type']}
\n
\nAssessment description: @{triggerBody()?['properties']?['description']}
\n
\nAssessment type: @{triggerBody()?['properties']?['assessmentType']}
\n
\nAssessment state: @{triggerBody()?['properties']?['state']}
\n
\nAssessment's related resources count with passed state: @{triggerBody()?['properties']?['passedResources']}
\n
\nAssessment's related resources count with failed state: @{triggerBody()?['properties']?['failedResources']}
\n
\nAssessment's related resources count with skipped state: @{triggerBody()?['properties']?['skippedResources']}
\n
\nLink to more detailed assessment results data: @{triggerBody()?['properties']?['assessmentDetailsLink']}
\n
\nPowered by Microsoft Defender for Cloud Logic Apps regulatory compliance connector.
"
31 | },
32 | "path": "/v2/Mail"
33 | },
34 | "runAfter": {}
35 | }
36 | },
37 | "parameters": {
38 | "$connections": {
39 | "defaultValue": {},
40 | "type": "Object"
41 | }
42 | },
43 | "triggers": {
44 | "When_a_Security_Center_Regulatory_Compliance_Assessment_is_created_or_triggered": {
45 | "type": "ApiConnectionWebhook",
46 | "inputs": {
47 | "body": {
48 | "callback_url": "@{listCallbackUrl()}"
49 | },
50 | "host": {
51 | "connection": {
52 | "name": "@parameters('$connections')['ascregulatorycomplianceassessment']['connectionId']"
53 | }
54 | },
55 | "path": "/Microsoft.Security/RegulatoryComplianceAssessment/subscribe"
56 | }
57 | }
58 | },
59 | "contentVersion": "1.0.0.0",
60 | "outputs": {}
61 | },
62 | "connectionReferences": {
63 | "office365": {
64 | "connection": {
65 | "id": ""
66 | },
67 | "api": {
68 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/office365"
69 | }
70 | },
71 | "ascregulatorycomplianceassessment": {
72 | "connection": {
73 | "id": ""
74 | },
75 | "api": {
76 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/ascregulatorycomplianceassessment"
77 | }
78 | }
79 | },
80 | "apiSummaries": [{
81 | "type": "apiconnection",
82 | "displayName": "Microsoft Defender for Cloud Regulatory Compliance",
83 | "iconUri": "https://connectoricons-df.azureedge.net/ascassessment/icon_1.0.1221.1620.png",
84 | "brandColor": "#99c419"
85 | },
86 | {
87 | "type": "apiconnection",
88 | "displayName": "${Resources.OUTLOOK}",
89 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/office365.png",
90 | "brandColor": "#0078D4"
91 | }
92 | ],
93 | "changedTime": "2020-12-15T00:00:00.000Z",
94 | "createdTime": "2019-12-15T00:00:00.000Z",
95 | "popularity": 99
96 | }
97 | }
--------------------------------------------------------------------------------
/templates/benchmarks/burst/functionAppCode.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Linq;
4 | using Microsoft.AspNetCore.Mvc;
5 | using System.Collections.Generic;
6 | using Microsoft.Extensions.Primitives;
7 | using Newtonsoft.Json;
8 | using System.Threading.Tasks;
9 | using Microsoft.Azure.WebJobs;
10 | using Microsoft.Azure.WebJobs.Extensions.Http;
11 | using Microsoft.AspNetCore.Http;
12 | using Microsoft.Extensions.Logging;
13 |
14 | namespace Company.Function
15 | {
16 | public static class retail_stubdp
17 | {
18 | [FunctionName("retail_stubdp")]
19 | public static async Task Run(
20 | [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req,
21 | ILogger log)
22 | {
23 | string ean = req.Query["ean"];
24 |
25 | return new OkObjectResult(new RetailStubResponse
26 | {
27 | Skus = new List{ $"sku-{ean}" }
28 | });
29 | }
30 | }
31 | public class RetailStubResponse
32 | {
33 | public List Skus { get; set; }
34 | }
35 |
36 | }
--------------------------------------------------------------------------------
/templates/benchmarks/burst/readme.md:
--------------------------------------------------------------------------------
1 | # Instructions on how to execute these benchmarks and gather results
2 |
3 | 1. Create three Logic Apps with the three SKUs (WS1, WS2, WS3). Make sure Application Insights is enabled. Note that Application Insights incurrs a small performance penalty but it is needed to log performance metrics. These results will be slightly worse than those obtained in the blog post, which used internal metrics instead of Application Insights to gather results.
4 | 2. Create a dotnet Function App with the provided source code. The Enricher workflow will make outbound calls to it.
5 | 3. In each Logic App, create the stateful Dispatcher workflow and the stateless Enricher workflow with the provided workflow definitions.
6 | 4. Add these app settings to each of the Logic Apps
7 | * Enricher.Cosmos.DefaultTtl: 86400
8 | * Enricher.MaxMappingValidUntil: 3
9 | * Enricher.RetailApiUrl: \&ean=
10 | 5. Modify host.json with these settings to enable verbose logging and disable Application Insights sampling (to improve metric accuracy).
11 | ```
12 | {
13 | "version": "2.0",
14 | "extensionBundle": {
15 | "id": "Microsoft.Azure.Functions.ExtensionBundle.Workflows",
16 | "version": "[1.*, 2.0.0)"
17 | },
18 | "logging": {
19 | "logLevel":{
20 | "default": "Error"
21 | },
22 | "applicationInsights": {
23 | "samplingSettings": {
24 | "isEnabled": false
25 | }
26 | }
27 | }
28 | }
29 | ```
30 | 6. Using Postman (or your favorite HTTP tool), invoke the Dispatcher workflow of each Logic App with a POST request using the following JSON request body:
31 | ```
32 | {
33 | "orders": [1, 2, 3]
34 | }
35 | ```
36 | - Make the orders array as large as the desired batch size. For example, to send a burst load of 100k messages, the array should have 100k elements.
37 | 7. Wait until all the runs finish. Then the below Application Insights queries can be used to obtain the data described in the results section of the blog post. Be sure to set the time range for the queries to correspond to the duration of the test run.
38 |
39 | # Application Insight Queries
40 |
41 | ## Scaling
42 | ```
43 | performanceCounters
44 | | summarize dcount(cloud_RoleInstance) by bin(timestamp, 1m)
45 | | render timechart
46 | ```
47 |
48 | ## Actions per minute per instance
49 | ```
50 | customMetrics
51 | |where name contains "Actions Completed"
52 | |summarize sum(value) by bin(timestamp, 1m)
53 | |render timechart
54 | ```
55 |
56 | ## Runs per minute per instance
57 | ```
58 | customMetrics
59 | |where name in ("Runs Completed")
60 | |summarize sum(value) by bin(timestamp, 1m)
61 | |render timechart
62 | ```
63 |
64 | ## Average execution delay (in seconds)
65 | ```
66 | customMetrics
67 | |where name == "Job Execution Delay"
68 | |summarize avg(valueSum/valueCount) by bin(timestamp, 1m)
69 | |render timechart
70 | ```
71 |
72 | ## CPU
73 | ```
74 | performanceCounters
75 | | where name == "% Processor Time"
76 | | summarize percentile(value, 90) by bin(timestamp, 1m), cloud_RoleInstance
77 | | render timechart
78 | ```
79 |
80 | ## Memory
81 | ```
82 | performanceCounters
83 | | summarize avgif(value, name=="Private Bytes") by bin(timestamp, 1m), cloud_RoleInstance
84 | | render timechart
85 | ```
86 |
87 | ## Storage requests
88 | Requires trace level logging. Change the logLevel in host.json from "Error" to "Trace" to log this data.
89 | ````
90 | traces
91 | | where message startswith "storage operation completed"
92 | | count
93 | ````
94 |
--------------------------------------------------------------------------------
/templates/blockchain-dataworkflow.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/2EFD17EDCC1E4C1D91DFB0AAF06267A3",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "2EFD17EDCC1E4C1D91DFB0AAF06267A3",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "blockchain"
11 | ],
12 | "displayName": "Publish smart contract event data to SQL DB",
13 | "description": "When an event occurs on a smart contract, this Logic App will be triggered and post the message to SQL DB. Once the template is configured with the smart contract detail, this will insert a row in a database table that has column names that map to the properties of the event.",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "contentVersion": "1.0.0.0",
19 | "parameters": {
20 | "$connections": {
21 | "defaultValue": {},
22 | "type": "Object"
23 | }
24 | },
25 | "triggers": {
26 | "When_a_smart_contract_event_occurs": {
27 | "inputs": {
28 | "host": {
29 | "connection": {
30 | "name": "@parameters('$connections')['blockchainethereum']['connectionId']"
31 | }
32 | },
33 | "method": "get",
34 | "path": "/contract/OnNewEvent",
35 | "queries": {
36 | "abi": "",
37 | "contractAddress": "",
38 | "eventName": ""
39 | }
40 | },
41 | "recurrence": {
42 | "frequency": "Minute",
43 | "interval": 3
44 | },
45 | "type": "ApiConnection"
46 | }
47 | },
48 | "actions": {
49 | "Insert_row": {
50 | "inputs": {
51 | "body": {
52 | "message": "@triggerBody()?['message']"
53 | },
54 | "host": {
55 | "connection": {
56 | "name": "@parameters('$connections')['sql']['connectionId']"
57 | }
58 | },
59 | "method": "post",
60 | "path": "/datasets/default/tables/@{encodeURIComponent(encodeURIComponent(''))}/items"
61 | },
62 | "runAfter": {},
63 | "type": "ApiConnection"
64 | }
65 | }
66 | },
67 | "connectionReferences": {
68 | "blockchainethereum": {
69 | "connection": {
70 | "id": ""
71 | },
72 | "api": {
73 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/blockchainethereum"
74 | }
75 | },
76 | "sql": {
77 | "connection": {
78 | "id": ""
79 | },
80 | "api": {
81 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sql"
82 | }
83 | }
84 | },
85 | "apiSummaries": [
86 | {
87 | "type": "apiconnection",
88 | "displayName": "Ethereum Connector",
89 | "iconUri": "https://connectoricons-prod.azureedge.net/blockchainethereum/icon_1.0.1118.1361.png",
90 | "brandColor": "#ffffff"
91 | },
92 | {
93 | "type": "apiconnection",
94 | "displayName": "SQL Server",
95 | "iconUri": "https://connectoricons-prod.azureedge.net/sql/icon_1.0.1002.1175.png",
96 | "brandColor": "#ba141a"
97 | }
98 | ],
99 | "changedTime": "2019-05-01T23:33:32Z",
100 | "createdTime": "2019-05-01T23:33:32Z",
101 | "popularity": 10
102 | }
103 | }
104 |
--------------------------------------------------------------------------------
/templates/blockchain-messagingworkflow-servicebus.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/633F7D174009451DBFD880DCD503602F",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "633F7D174009451DBFD880DCD503602F",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "blockchain"
11 | ],
12 | "displayName": "Publish smart contract event data to Service Bus",
13 | "description": "When an event occurs on a smart contract, this Logic App will be triggered and post the message to Service Bus. Once the template is configured with the smart contract detail, there is the option to publish all of the event detail or specific properties of the event.",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "contentVersion": "1.0.0.0",
19 | "parameters": {
20 | "$connections": {
21 | "defaultValue": {},
22 | "type": "Object"
23 | }
24 | },
25 | "triggers": {
26 | "When_a_smart_contract_event_occurs": {
27 | "inputs": {
28 | "host": {
29 | "connection": {
30 | "name": "@parameters('$connections')['blockchainethereum']['connectionId']"
31 | }
32 | },
33 | "method": "get",
34 | "path": "/contract/OnNewEvent",
35 | "queries": {
36 | "abi": "",
37 | "contractAddress": "",
38 | "eventName": ""
39 | }
40 | },
41 | "recurrence": {
42 | "frequency": "Minute",
43 | "interval": 3
44 | },
45 | "type": "ApiConnection"
46 | }
47 | },
48 | "actions": {
49 | "Send_message": {
50 | "inputs": {
51 | "body": {
52 | "ContentType": "application/json",
53 | "SessionId": "@{guid()}",
54 | "ContentData": "@triggerBody()"
55 | },
56 | "host": {
57 | "connection": {
58 | "name": "@parameters('$connections')['servicebus']['connectionId']"
59 | }
60 | },
61 | "method": "post",
62 | "path": "/@{encodeURIComponent(encodeURIComponent(''))}/messages",
63 | "queries": {
64 | "systemProperties": "None"
65 | }
66 | },
67 | "runAfter": {},
68 | "type": "ApiConnection"
69 | }
70 | }
71 | },
72 | "connectionReferences": {
73 | "blockchainethereum": {
74 | "connection": {
75 | "id": ""
76 | },
77 | "api": {
78 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/blockchainethereum"
79 | }
80 | },
81 | "servicebus": {
82 | "connection": {
83 | "id": ""
84 | },
85 | "api": {
86 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/servicebus"
87 | }
88 | }
89 | },
90 | "apiSummaries": [
91 | {
92 | "type": "apiconnection",
93 | "displayName": "Ethereum Connector",
94 | "iconUri": "https://connectoricons-prod.azureedge.net/blockchainethereum/icon_1.0.1118.1361.png",
95 | "brandColor": "#ffffff"
96 | },
97 | {
98 | "type": "apiconnection",
99 | "displayName": "Service Bus",
100 | "iconUri": "https://connectoricons-prod.azureedge.net/servicebus/icon_1.0.1019.1195.png",
101 | "brandColor": "#59B4D9"
102 | }
103 | ],
104 | "changedTime": "2019-05-01T23:33:32Z",
105 | "createdTime": "2019-05-01T23:33:32Z",
106 | "popularity": 30
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/templates/blockchain-serviceworkflow-withgas.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/588352CB63AF44099339D334C4CED773",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "588352CB63AF44099339D334C4CED773",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "blockchain"
11 | ],
12 | "displayName": "Expose a smart contract function that requires a signature as a microservice",
13 | "description": "When the Logic App is configured with details for the smart contract function, these values from the REST endpoint can be assigned to the parameters of the function. When the function is submitted, it will send the transaction hash to the caller of the service.",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "contentVersion": "1.0.0.0",
19 | "parameters": {
20 | "$connections": {
21 | "defaultValue": {},
22 | "type": "Object"
23 | }
24 | },
25 | "triggers": {
26 | "manual": {
27 | "type": "Request",
28 | "kind": "Http",
29 | "inputs": {
30 | "schema": {}
31 | }
32 | }
33 | },
34 | "actions": {
35 | "Call_smart_contract_function": {
36 | "runAfter": {},
37 | "type": "ApiConnection",
38 | "inputs": {
39 | "body": {
40 | "text": ""
41 | },
42 | "host": {
43 | "connection": {
44 | "name": "@parameters('$connections')['blockchainethereum']['connectionId']"
45 | }
46 | },
47 | "method": "post",
48 | "path": "/contract/functions/@{encodeURIComponent(encodeURIComponent(''))}/execute",
49 | "queries": {
50 | "abi": "",
51 | "contractAddress": ""
52 | }
53 | }
54 | },
55 | "Response": {
56 | "runAfter": {
57 | "Call_smart_contract_function": [
58 | "Succeeded"
59 | ]
60 | },
61 | "type": "Response",
62 | "kind": "Http",
63 | "inputs": {
64 | "body": "@body('Call_smart_contract_function')",
65 | "statusCode": 200
66 | }
67 | }
68 | },
69 | "outputs": {}
70 | },
71 | "connectionReferences": {
72 | "blockchainethereum": {
73 | "connection": {
74 | "id": ""
75 | },
76 | "api": {
77 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/blockchainethereum"
78 | }
79 | }
80 | },
81 | "apiSummaries": [
82 | {
83 | "type": "request",
84 | "displayName": "${Resources.REQUEST_TRIGGER_DISPLAYNAME}",
85 | "iconUri": "${Images.RequestIcon}",
86 | "brandColor": "#009DA5"
87 | },
88 | {
89 | "type": "apiconnection",
90 | "displayName": "Ethereum Connector",
91 | "iconUri": "https://connectoricons-prod.azureedge.net/blockchainethereum/icon_1.0.1118.1361.png",
92 | "brandColor": "#ffffff"
93 | },
94 | {
95 | "type": "response",
96 | "displayName": "${Resources.RESPONSE_DISPLAYNAME}",
97 | "iconUri": "${Images.ResponseIcon}",
98 | "brandColor": "#009DA5"
99 | }
100 | ],
101 | "changedTime": "2019-05-01T23:33:32Z",
102 | "createdTime": "2019-05-01T23:33:32Z",
103 | "popularity": 60
104 | }
105 | }
106 |
--------------------------------------------------------------------------------
/templates/dropbox-onedrive.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/6472fdfd-2e21-4e08-b071-1a7c34e91ad3",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "6472fdfd-2e21-4e08-b071-1a7c34e91ad3",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "productivity"
11 | ],
12 | "description": "${Resources.TEMPLATE_DROPBOX_ONEDRIVE_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_DROPBOX_ONEDRIVE_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Create_file": {
20 | "inputs": {
21 | "body": "@triggerBody()",
22 | "host": {
23 | "connection": {
24 | "name": "@parameters('$connections')['onedrive']['connectionId']"
25 | }
26 | },
27 | "method": "post",
28 | "path": "/datasets/default/files",
29 | "queries": {
30 | "folderPath": "/backup from Dropbox",
31 | "name": "@{triggerOutputs()['headers']?['x-ms-file-name-encoded']}"
32 | }
33 | },
34 | "runAfter": {},
35 | "type": "ApiConnection"
36 | }
37 | },
38 | "contentVersion": "1.0.0.0",
39 | "outputs": {},
40 | "parameters": {
41 | "$connections": {
42 | "defaultValue": {},
43 | "type": "Object"
44 | }
45 | },
46 | "triggers": {
47 | "When_a_file_is_created": {
48 | "inputs": {
49 | "host": {
50 | "connection": {
51 | "name": "@parameters('$connections')['dropbox']['connectionId']"
52 | }
53 | },
54 | "method": "get",
55 | "path": "/datasets/default/triggers/onnewfile",
56 | "queries": {
57 | "folderId": ""
58 | }
59 | },
60 | "recurrence": {
61 | "frequency": "Minute",
62 | "interval": 3
63 | },
64 | "type": "ApiConnection"
65 | }
66 | }
67 | },
68 | "connectionReferences": {
69 | "dropbox": {
70 | "connection": {
71 | "id": ""
72 | },
73 | "api": {
74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/dropbox"
75 | }
76 | },
77 | "onedrive": {
78 | "connection": {
79 | "id": ""
80 | },
81 | "api": {
82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/onedrive"
83 | }
84 | }
85 | },
86 | "apiSummaries": [
87 | {
88 | "type": "apiconnection",
89 | "displayName": "${Resources.DROPBOX}",
90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/dropbox.png",
91 | "brandColor": "#007ee5"
92 | },
93 | {
94 | "type": "apiconnection",
95 | "displayName": "${Resources.ONEDRIVE}",
96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/onedriveforbusiness.png",
97 | "brandColor": "#0078D4"
98 | }
99 | ],
100 | "changedTime": "2017-07-05T00:00:52.000Z",
101 | "createdTime": "2017-01-31T00:00:52.000Z",
102 | "popularity": 8
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/templates/dropbox-to-sharepoint.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/4047185d35d041ca80c27e86f7bbbb34",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "4047185d35d041ca80c27e86f7bbbb34",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "productivity"
11 | ],
12 | "description": "${Resources.TEMPLATE_DROPBOX_TO_SHAREPOINT_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_DROPBOX_TO_SHAREPOINT_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Create_file": {
20 | "inputs": {
21 | "body": "@triggerBody()",
22 | "host": {
23 | "connection": {
24 | "name": "@parameters('$connections')['sharepointonline']['connectionId']"
25 | }
26 | },
27 | "method": "post",
28 | "path": "/datasets//files",
29 | "queries": {
30 | "folderPath": "",
31 | "name": "@{triggerOutputs()['headers']?['x-ms-file-name-encoded']}"
32 | }
33 | },
34 | "runAfter": {},
35 | "type": "ApiConnection"
36 | }
37 | },
38 | "contentVersion": "1.0.0.0",
39 | "outputs": {},
40 | "parameters": {
41 | "$connections": {
42 | "defaultValue": {},
43 | "type": "Object"
44 | }
45 | },
46 | "triggers": {
47 | "When_a_file_is_created": {
48 | "inputs": {
49 | "host": {
50 | "connection": {
51 | "name": "@parameters('$connections')['dropbox']['connectionId']"
52 | }
53 | },
54 | "method": "get",
55 | "path": "/datasets/default/triggers/onnewfile",
56 | "queries": {
57 | "folderId": ""
58 | }
59 | },
60 | "recurrence": {
61 | "frequency": "Minute",
62 | "interval": 3
63 | },
64 | "type": "ApiConnection"
65 | }
66 | }
67 | },
68 | "connectionReferences": {
69 | "dropbox": {
70 | "connection": {
71 | "id": ""
72 | },
73 | "api": {
74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/dropbox"
75 | }
76 | },
77 | "sharepointonline": {
78 | "connection": {
79 | "id": ""
80 | },
81 | "api": {
82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sharepointonline"
83 | }
84 | }
85 | },
86 | "apiSummaries": [
87 | {
88 | "type": "apiconnection",
89 | "displayName": "${Resources.DROPBOX}",
90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/dropbox.png",
91 | "brandColor": "#007ee5"
92 | },
93 | {
94 | "type": "apiconnection",
95 | "displayName": "${Resources.SHAREPOINT}",
96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/sharepoint.png",
97 | "brandColor": "#036C70"
98 | }
99 | ],
100 | "changedTime": "2017-07-05T00:00:39.000Z",
101 | "createdTime": "2017-01-31T00:00:39.000Z",
102 | "popularity": 22
103 | }
104 | }
--------------------------------------------------------------------------------
/templates/images/azure-monitor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Azure/logicapps/a3f00d170e23329c78a4e55bee11d93bab30d16a/templates/images/azure-monitor.png
--------------------------------------------------------------------------------
/templates/manifest.json:
--------------------------------------------------------------------------------
1 | [
2 | "as2-response.json",
3 | "asc-alert-send-notification-email.json",
4 | "asc-recommendation-send-notification-email.json",
5 | "asc-regulatoryCompliance-send-notification-email.json",
6 | "azure-monitor-metric-alert-handler.json",
7 | "Azure-Blob-Auto-Expiration.json",
8 | "Azure-Blob-Auto-Tier.json",
9 | "blob-storage-to-dynamics-365-import.json",
10 | "blockchain-dataworkflow.json",
11 | "blockchain-messagingworkflow-eventgrid.json",
12 | "blockchain-messagingworkflow-servicebus.json",
13 | "blockchain-reportingworkflow.json",
14 | "blockchain-serviceworkflow-nogas.json",
15 | "blockchain-serviceworkflow-withgas.json",
16 | "cancel-runs-by-tracking-id.json",
17 | "daily-reminders.json",
18 | "dropbox-onedrive.json",
19 | "dropbox-to-sharepoint.json",
20 | "instagram-to-twitter.json",
21 | "mailchimp-sharepoint.json",
22 | "office-to-wunderlist.json",
23 | "request-response.json",
24 | "rosettanet-decode-response.json",
25 | "rosettanet-encode-response.json",
26 | "sap-receive-batch.json",
27 | "scheduler-recurrence-storage-queue.json",
28 | "scheduler-run-once-http.json",
29 | "service-bus-peek-lock-complete.json",
30 | "service-bus-peek-lock-dead-letter.json",
31 | "service-bus-sessions.json",
32 | "sharepoint-attachments.json",
33 | "sharepoint-file-email.json",
34 | "sharepoint-list-email.json",
35 | "sharepoint-modified.json",
36 | "sharepoint-move.json",
37 | "slack-tweet.json",
38 | "twitter-facebook.json",
39 | "twitter-sharepoint.json",
40 | "twitter-to-office.json",
41 | "twitter-to-outlook.json",
42 | "twitter-to-smtp.json",
43 | "veter.json",
44 | "x12-to-as2.json"
45 | ]
--------------------------------------------------------------------------------
/templates/office-to-wunderlist.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/962f42368af84bd1ade21cbab02c1df5",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "962f42368af84bd1ade21cbab02c1df5",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "productivity"
11 | ],
12 | "description": "${Resources.TEMPLATE_OFFICE_TO_WUNDERLIST_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_OFFICE_TO_WUNDERLIST_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Create_a_task": {
20 | "inputs": {
21 | "body": {
22 | "list_id": null,
23 | "title": "@{triggerBody()['Subject']}"
24 | },
25 | "host": {
26 | "connection": {
27 | "name": "@parameters('$connections')['wunderlist']['connectionId']"
28 | }
29 | },
30 | "method": "post",
31 | "path": "/tasks"
32 | },
33 | "runAfter": {},
34 | "type": "ApiConnection"
35 | }
36 | },
37 | "contentVersion": "1.0.0.0",
38 | "outputs": {},
39 | "parameters": {
40 | "$connections": {
41 | "defaultValue": {},
42 | "type": "Object"
43 | }
44 | },
45 | "triggers": {
46 | "On_new_email": {
47 | "inputs": {
48 | "host": {
49 | "connection": {
50 | "name": "@parameters('$connections')['office365']['connectionId']"
51 | }
52 | },
53 | "method": "get",
54 | "path": "/Mail/OnNewEmail",
55 | "queries": {
56 | "folderPath": "Inbox",
57 | "importance": "High"
58 | }
59 | },
60 | "splitOn": "@triggerBody()?['value']",
61 | "recurrence": {
62 | "frequency": "Minute",
63 | "interval": 3
64 | },
65 | "type": "ApiConnection"
66 | }
67 | }
68 | },
69 | "connectionReferences": {
70 | "office365": {
71 | "connection": {
72 | "id": ""
73 | },
74 | "api": {
75 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/office365"
76 | }
77 | },
78 | "wunderlist": {
79 | "connection": {
80 | "id": ""
81 | },
82 | "api": {
83 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/wunderlist"
84 | }
85 | }
86 | },
87 | "apiSummaries": [
88 | {
89 | "type": "apiconnection",
90 | "displayName": "${Resources.OFFICE}",
91 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/office365.png",
92 | "brandColor": "#0078D4"
93 | },
94 | {
95 | "type": "apiconnection",
96 | "displayName": "${Resources.WUNDERLIST}",
97 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/wunderlist.png",
98 | "brandColor": "#de4c40"
99 | }
100 | ],
101 | "changedTime": "2017-07-05T00:00:37.000Z",
102 | "createdTime": "2017-01-31T00:00:37.000Z",
103 | "popularity": 23
104 | }
105 | }
--------------------------------------------------------------------------------
/templates/request-response.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/93807acf52bf403db4a31ca3f9031af7",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "93807acf52bf403db4a31ca3f9031af7",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "general"
11 | ],
12 | "description": "${Resources.TEMPLATE_REQUEST_RESPONSE_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_REQUEST_RESPONSE_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Response": {
20 | "inputs": {
21 | "statusCode": 200
22 | },
23 | "runAfter": {},
24 | "type": "Response"
25 | }
26 | },
27 | "contentVersion": "1.0.0.0",
28 | "outputs": {},
29 | "parameters": {},
30 | "triggers": {
31 | "request": {
32 | "inputs": {
33 | "schema": {}
34 | },
35 | "kind": "Http",
36 | "type": "Request"
37 | }
38 | }
39 | },
40 | "connectionReferences": {},
41 | "apiSummaries": [
42 | {
43 | "type": "request",
44 | "displayName": "${Resources.REQUEST_TRIGGER_DISPLAYNAME}",
45 | "iconUri": "${Images.RequestIcon}",
46 | "brandColor": "#009DA5"
47 | },
48 | {
49 | "type": "http",
50 | "displayName": "${Resources.RESPONSE_DISPLAYNAME}",
51 | "iconUri": "${Images.ResponseIcon}",
52 | "brandColor": "#009DA5"
53 | }
54 | ],
55 | "changedTime": "2017-01-31T00:00:38.000Z",
56 | "createdTime": "2017-01-31T00:00:38.000Z",
57 | "popularity": 1
58 | }
59 | }
--------------------------------------------------------------------------------
/templates/service-bus-peek-lock-complete.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/20f0612a-375c-4610-b432-772bb05950ae",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "20f0612a-375c-4610-b432-772bb05950ae",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "Enterprise Integration"
11 | ],
12 | "description": "${Resources.TEMPLATE_SERVICEBUS_PEEKLOCK_COMPLETE_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_SERVICEBUS_PEEKLOCK_COMPLETE_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Complete_the_message_in_a_queue": {
20 | "inputs": {
21 | "host": {
22 | "connection": {
23 | "name": "@parameters('$connections')['servicebus']['connectionId']"
24 | }
25 | },
26 | "method": "delete",
27 | "path": "//messages/complete",
28 | "queries": {
29 | "lockToken": "@{triggerBody()?['LockToken']}",
30 | "queueType": "Main"
31 | }
32 | },
33 | "runAfter": {},
34 | "type": "ApiConnection"
35 | }
36 | },
37 | "contentVersion": "1.0.0.0",
38 | "outputs": {},
39 | "parameters": {
40 | "$connections": {
41 | "defaultValue": {},
42 | "type": "Object"
43 | }
44 | },
45 | "triggers": {
46 | "When_a_message_is_received_in_a_queue_(peek-lock)": {
47 | "inputs": {
48 | "host": {
49 | "connection": {
50 | "name": "@parameters('$connections')['servicebus']['connectionId']"
51 | }
52 | },
53 | "method": "get",
54 | "path": "//messages/head/peek",
55 | "queries": {
56 | "queueType": "Main"
57 | }
58 | },
59 | "recurrence": {
60 | "frequency": "Minute",
61 | "interval": 3
62 | },
63 | "type": "ApiConnection"
64 | }
65 | }
66 | },
67 | "connectionReferences": {
68 | "servicebus": {
69 | "connection": {
70 | "id": ""
71 | },
72 | "api": {
73 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/servicebus"
74 | }
75 | }
76 | },
77 | "apiSummaries": [
78 | {
79 | "type": "apiconnection",
80 | "displayName": "${Resources.SERVICEBUS}",
81 | "iconUri": "https://connectoricons-prod.azureedge.net/servicebus/icon_1.0.1019.1195.png",
82 | "brandColor": "#59B4D9"
83 | },
84 | {
85 | "type": "apiconnection",
86 | "displayName": "${Resources.SERVICEBUS}",
87 | "iconUri": "https://connectoricons-prod.azureedge.net/servicebus/icon_1.0.1019.1195.png",
88 | "brandColor": "#59B4D9"
89 | }
90 | ],
91 | "changedTime": "2017-07-05T00:00:59.000Z",
92 | "createdTime": "2017-01-31T00:00:59.000Z",
93 | "popularity": 2
94 | }
95 | }
--------------------------------------------------------------------------------
/templates/sharepoint-modified.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/cdad3da1-b3e1-4aaf-bf3c-05aa0d3082da",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "cdad3da1-b3e1-4aaf-bf3c-05aa0d3082da",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "productivity"
11 | ],
12 | "description": "${Resources.TEMPLATE_SHAREPOINT_MODIFIED_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_SHAREPOINT_MODIFIED_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Send_email": {
20 | "inputs": {
21 | "body": {
22 | "Body": "Item: @{triggerBody()?['Title']} was modified at @{triggerBody()?['Modified']} by @{triggerBody()?['Editor']?['DisplayName']}",
23 | "Subject": "Item: @{triggerBody()?['Title']} was modified by @{triggerBody()?['Editor']?['DisplayName']}",
24 | "To": null
25 | },
26 | "host": {
27 | "connection": {
28 | "name": "@parameters('$connections')['office365']['connectionId']"
29 | }
30 | },
31 | "method": "post",
32 | "path": "/Mail"
33 | },
34 | "runAfter": {},
35 | "type": "ApiConnection"
36 | }
37 | },
38 | "contentVersion": "1.0.0.0",
39 | "outputs": {},
40 | "parameters": {
41 | "$connections": {
42 | "defaultValue": {},
43 | "type": "Object"
44 | }
45 | },
46 | "triggers": {
47 | "When_an_existing_item_is_modified": {
48 | "inputs": {
49 | "host": {
50 | "connection": {
51 | "name": "@parameters('$connections')['sharepointonline']['connectionId']"
52 | }
53 | },
54 | "method": "get",
55 | "path": "/datasets//tables//onupdateditems"
56 | },
57 | "splitOn": "@triggerBody()?['value']",
58 | "recurrence": {
59 | "frequency": "Minute",
60 | "interval": 3
61 | },
62 | "type": "ApiConnection"
63 | }
64 | }
65 | },
66 | "connectionReferences": {
67 | "sharepointonline": {
68 | "connection": {
69 | "id": ""
70 | },
71 | "api": {
72 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sharepointonline"
73 | }
74 | },
75 | "office365": {
76 | "connection": {
77 | "id": ""
78 | },
79 | "api": {
80 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/office365"
81 | }
82 | }
83 | },
84 | "apiSummaries": [
85 | {
86 | "type": "apiconnection",
87 | "displayName": "${Resources.SHAREPOINT}",
88 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/sharepoint.png",
89 | "brandColor": "#036C70"
90 | },
91 | {
92 | "type": "apiconnection",
93 | "displayName": "${Resources.OFFICE}",
94 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/office365.png",
95 | "brandColor": "#0078D4"
96 | }
97 | ],
98 | "changedTime": "2017-07-05T00:00:35.000Z",
99 | "createdTime": "2017-01-31T00:00:35.000Z",
100 | "popularity": 3
101 | }
102 | }
--------------------------------------------------------------------------------
/templates/slack-tweet.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/e78de444-f0f3-46ab-93bd-4911c4698d19",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "e78de444-f0f3-46ab-93bd-4911c4698d19",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "social"
11 | ],
12 | "description": "${Resources.TEMPLATE_SLACK_TWEET_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_SLACK_TWEET_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Post_Message": {
20 | "inputs": {
21 | "host": {
22 | "connection": {
23 | "name": "@parameters('$connections')['slack']['connectionId']"
24 | }
25 | },
26 | "method": "post",
27 | "path": "/chat.postMessage",
28 | "queries": {
29 | "channel": "",
30 | "text": "@{triggerBody()['TweetText']}@{triggerBody()['TweetedBy']}"
31 | }
32 | },
33 | "runAfter": {},
34 | "type": "ApiConnection"
35 | }
36 | },
37 | "contentVersion": "1.0.0.0",
38 | "outputs": {},
39 | "parameters": {
40 | "$connections": {
41 | "defaultValue": {},
42 | "type": "Object"
43 | }
44 | },
45 | "triggers": {
46 | "When_a_new_tweet_appears": {
47 | "inputs": {
48 | "host": {
49 | "connection": {
50 | "name": "@parameters('$connections')['twitter']['connectionId']"
51 | }
52 | },
53 | "method": "get",
54 | "path": "/onnewtweet",
55 | "queries": {
56 | "searchQuery": ""
57 | }
58 | },
59 | "splitOn": "@triggerBody()?['value']",
60 | "recurrence": {
61 | "frequency": "Minute",
62 | "interval": 3
63 | },
64 | "type": "ApiConnection"
65 | }
66 | }
67 | },
68 | "connectionReferences": {
69 | "twitter": {
70 | "connection": {
71 | "id": ""
72 | },
73 | "api": {
74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter"
75 | }
76 | },
77 | "slack": {
78 | "connection": {
79 | "id": ""
80 | },
81 | "api": {
82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/slack"
83 | }
84 | }
85 | },
86 | "apiSummaries": [
87 | {
88 | "type": "apiconnection",
89 | "displayName": "${Resources.TWITTER}",
90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png",
91 | "brandColor": "#5fa9dd"
92 | },
93 | {
94 | "type": "apiconnection",
95 | "displayName": "${Resources.SLACK}",
96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/slack.png",
97 | "brandColor": "#78d4b6"
98 | }
99 | ],
100 | "changedTime": "2017-09-18T00:00:00.000Z",
101 | "createdTime": "2017-01-31T00:00:47.000Z",
102 | "popularity": 13
103 | }
104 | }
105 |
--------------------------------------------------------------------------------
/templates/twitter-facebook.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/31a7826b6f404812b4e0b6e54964a72f",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "31a7826b6f404812b4e0b6e54964a72f",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "social"
11 | ],
12 | "description": "${Resources.TEMPLATE_TWITTER_FACEBOOK_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_TWITTER_FACEBOOK_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Post_to_my_timeline": {
20 | "inputs": {
21 | "body": {
22 | "caption": "@{triggerBody()['TweetedBy']}",
23 | "message": "@{triggerBody()['TweetText']}",
24 | "name": "@{triggerBody()['TweetText']}",
25 | "privacy": {
26 | "value": "EVERYONE"
27 | }
28 | },
29 | "host": {
30 | "connection": {
31 | "name": "@parameters('$connections')['facebook']['connectionId']"
32 | }
33 | },
34 | "method": "post",
35 | "path": "/me/feed"
36 | },
37 | "runAfter": {},
38 | "type": "ApiConnection"
39 | }
40 | },
41 | "contentVersion": "1.0.0.0",
42 | "outputs": {},
43 | "parameters": {
44 | "$connections": {
45 | "defaultValue": {},
46 | "type": "Object"
47 | }
48 | },
49 | "triggers": {
50 | "When_a_new_tweet_appears": {
51 | "inputs": {
52 | "host": {
53 | "connection": {
54 | "name": "@parameters('$connections')['twitter']['connectionId']"
55 | }
56 | },
57 | "method": "get",
58 | "path": "/onnewtweet",
59 | "queries": {
60 | "searchQuery": ""
61 | }
62 | },
63 | "splitOn": "@triggerBody()?['value']",
64 | "recurrence": {
65 | "frequency": "Minute",
66 | "interval": 3
67 | },
68 | "type": "ApiConnection"
69 | }
70 | }
71 | },
72 | "connectionReferences": {
73 | "twitter": {
74 | "connection": {
75 | "id": ""
76 | },
77 | "api": {
78 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter"
79 | }
80 | },
81 | "facebook": {
82 | "connection": {
83 | "id": ""
84 | },
85 | "api": {
86 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/facebook"
87 | }
88 | }
89 | },
90 | "apiSummaries": [
91 | {
92 | "type": "apiconnection",
93 | "displayName": "${Resources.TWITTER}",
94 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png",
95 | "brandColor": "#5fa9dd"
96 | },
97 | {
98 | "type": "apiconnection",
99 | "displayName": "${Resources.FACEBOOK}",
100 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/facebook.png",
101 | "brandColor": "#3b5998"
102 | }
103 | ],
104 | "changedTime": "2017-07-05T00:00:46.000Z",
105 | "createdTime": "2017-01-31T00:00:46.000Z",
106 | "popularity": 16
107 | }
108 | }
--------------------------------------------------------------------------------
/templates/twitter-sharepoint.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/e78571e5c70e4806a18eeacba5a897c8",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "e78571e5c70e4806a18eeacba5a897c8",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "social"
11 | ],
12 | "description": "${Resources.TEMPLATE_TWITTER_SHAREPOINT_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_TWITTER_SHAREPOINT_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Create_item": {
20 | "inputs": {
21 | "body": {},
22 | "host": {
23 | "connection": {
24 | "name": "@parameters('$connections')['sharepointonline']['connectionId']"
25 | }
26 | },
27 | "method": "post",
28 | "path": "/datasets//tables//items"
29 | },
30 | "runAfter": {},
31 | "type": "ApiConnection"
32 | }
33 | },
34 | "contentVersion": "1.0.0.0",
35 | "outputs": {},
36 | "parameters": {
37 | "$connections": {
38 | "defaultValue": {},
39 | "type": "Object"
40 | }
41 | },
42 | "triggers": {
43 | "When_a_new_tweet_appears": {
44 | "inputs": {
45 | "host": {
46 | "connection": {
47 | "name": "@parameters('$connections')['twitter']['connectionId']"
48 | }
49 | },
50 | "method": "get",
51 | "path": "/onnewtweet",
52 | "queries": {
53 | "searchQuery": ""
54 | }
55 | },
56 | "splitOn": "@triggerBody()?['value']",
57 | "recurrence": {
58 | "frequency": "Minute",
59 | "interval": 3
60 | },
61 | "type": "ApiConnection"
62 | }
63 | }
64 | },
65 | "connectionReferences": {
66 | "twitter": {
67 | "connection": {
68 | "id": ""
69 | },
70 | "api": {
71 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter"
72 | }
73 | },
74 | "sharepointonline": {
75 | "connection": {
76 | "id": ""
77 | },
78 | "api": {
79 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/sharepointonline"
80 | }
81 | }
82 | },
83 | "apiSummaries": [
84 | {
85 | "type": "apiconnection",
86 | "displayName": "${Resources.TWITTER}",
87 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png",
88 | "brandColor": "#5fa9dd"
89 | },
90 | {
91 | "type": "apiconnection",
92 | "displayName": "${Resources.SHAREPOINT}",
93 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/sharepoint.png",
94 | "brandColor": "#036C70"
95 | }
96 | ],
97 | "changedTime": "2017-07-05T00:00:45.000Z",
98 | "createdTime": "2017-01-31T00:00:45.000Z",
99 | "popularity": 18
100 | }
101 | }
--------------------------------------------------------------------------------
/templates/twitter-to-smtp.json:
--------------------------------------------------------------------------------
1 | {
2 | "id": "/providers/Microsoft.Logic/galleries/public/templates/8fb6dccf96fc4039b8d26068dbd214af",
3 | "type": "Microsoft.Logic/galleries/templates",
4 | "name": "8fb6dccf96fc4039b8d26068dbd214af",
5 | "properties": {
6 | "author": {
7 | "displayName": "Microsoft"
8 | },
9 | "categoryNames": [
10 | "social"
11 | ],
12 | "description": "${Resources.TEMPLATE_TWITTER_TO_SMTP_DESCRIPTION}",
13 | "displayName": "${Resources.TEMPLATE_TWITTER_TO_SMTP_DISPLAYNAME}",
14 | "galleryName": "public",
15 | "summary": "",
16 | "definition": {
17 | "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
18 | "actions": {
19 | "Send_Email": {
20 | "inputs": {
21 | "body": {
22 | "Body": "@{triggerBody()['RetweetCount']}\n@{triggerBody()['TweetText']}\n@{triggerBody()['TweetedBy']}\n@{triggerBody()?['CreatedAt']}",
23 | "Subject": "Twitter: @{triggerBody()['TweetText']}"
24 | },
25 | "host": {
26 | "connection": {
27 | "name": "@parameters('$connections')['smtp']['connectionId']"
28 | }
29 | },
30 | "method": "post",
31 | "path": "/SendEmail"
32 | },
33 | "runAfter": {},
34 | "type": "ApiConnection"
35 | }
36 | },
37 | "contentVersion": "1.0.0.0",
38 | "outputs": {},
39 | "parameters": {
40 | "$connections": {
41 | "defaultValue": {},
42 | "type": "Object"
43 | }
44 | },
45 | "triggers": {
46 | "When_a_new_tweet_appears": {
47 | "inputs": {
48 | "host": {
49 | "connection": {
50 | "name": "@parameters('$connections')['twitter']['connectionId']"
51 | }
52 | },
53 | "method": "get",
54 | "path": "/onnewtweet",
55 | "queries": {
56 | "searchQuery": ""
57 | }
58 | },
59 | "splitOn": "@triggerBody()?['value']",
60 | "recurrence": {
61 | "frequency": "Minute",
62 | "interval": 3
63 | },
64 | "type": "ApiConnection"
65 | }
66 | }
67 | },
68 | "connectionReferences": {
69 | "twitter": {
70 | "connection": {
71 | "id": ""
72 | },
73 | "api": {
74 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/twitter"
75 | }
76 | },
77 | "smtp": {
78 | "connection": {
79 | "id": ""
80 | },
81 | "api": {
82 | "id": "/subscriptions/{0}/providers/Microsoft.Web/locations/{1}/managedApis/smtp"
83 | }
84 | }
85 | },
86 | "apiSummaries": [
87 | {
88 | "type": "apiconnection",
89 | "displayName": "${Resources.TWITTER}",
90 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/twitter.png",
91 | "brandColor": "#5fa9dd"
92 | },
93 | {
94 | "type": "apiconnection",
95 | "displayName": "${Resources.SMTP}",
96 | "iconUri": "https://logicappsresources.blob.core.windows.net/icons/smtp.png",
97 | "brandColor": "#e75300"
98 | }
99 | ],
100 | "changedTime": "2017-07-05T00:00:42.000Z",
101 | "createdTime": "2017-01-31T00:00:42.000Z",
102 | "popularity": 15
103 | }
104 | }
--------------------------------------------------------------------------------
/tools/powerapps-swagger-generator/generateSwagger.ps1:
--------------------------------------------------------------------------------
1 | Param(
2 | [string]$subscriptionId = "<>",
3 | [string]$resourceGroup = "<>",
4 | [string]$logicAppName = "<>",
5 | [string]$triggerName = "<>"
6 | )
7 |
8 | Function Get-Folder()
9 | {
10 |
11 |
12 | [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms")
13 |
14 | $foldername = New-Object System.Windows.Forms.FolderBrowserDialog
15 | $foldername.rootfolder = "MyComputer"
16 |
17 | if($foldername.ShowDialog() -eq "OK")
18 | {
19 | $folder += $foldername.SelectedPath
20 | }
21 | return $folder
22 | }
23 |
24 | Login-AzureRmAccount -SubscriptionId $subscriptionId
25 | $folder = Get-Folder
26 | $filePath = $folder.GetValue(1) + "\" + $logicAppName + ".swagger.json"
27 | Invoke-AzureRmResourceAction -ResourceType "Microsoft.Logic/workflows" -ResourceGroupName $resourceGroup -ResourceName $logicAppName -Action listSwagger -ApiVersion "2016-06-01" -Force | ConvertTo-Json -Depth 99 | Out-File $filePath
28 | $triggerResourceName = $logicAppName + "/$triggerName"
29 | $callbackUrl = Invoke-AzureRmResourceAction -ResourceType "Microsoft.Logic/workflows/triggers" -ResourceGroupName $resourceGroup -ResourceName $triggerResourceName -Action listCallbackURL -ApiVersion "2016-06-01" -Force
30 | Write-Output "`n`n`nWrote file to $filePath`n`n"
31 | $URL = [System.Web.HttpUtility]::ParseQueryString($callbackUrl.value)
32 | Write-Output $callbackUrl.method $callbackUrl.value
33 | $sp = $URL.GetValues('sp')
34 | $sv = $URL.GetValues('sv')
35 | $sig = $URL.GetValues('sig')
36 | Write-Output "`n`n sp = $sp `n`n sv = $sv `n`n sig = $sig `n`n api-version = 2016-06-01"
37 |
--------------------------------------------------------------------------------