Created
December 4, 2017 14:20
-
-
Save CoditCompany/eba2c81651d033310651bea739f5d025 to your computer and use it in GitHub Desktop.
CodeView of a LogicApp which dynamically defines the API Connection to be used, based on information retrieved from the Integration Account partner-metadata.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$connections": { | |
"value": { | |
"FirstAPI": { | |
"connectionId": "/subscriptions/<subscriptionId>/resourceGroups/LogicApps_APIConn_ARM/providers/Microsoft.Web/connections/FirstAPI", | |
"connectionName": "FirstAPI", | |
"id": "/subscriptions/<subscriptionId>/providers/Microsoft.Web/locations/southcentralus/managedApis/ftp" | |
}, | |
"SecondAPI": { | |
"connectionId": "/subscriptions/<subscriptionId>/resourceGroups/LogicApps_APIConn_ARM/providers/Microsoft.Web/connections/SecondAPI", | |
"connectionName": "SecondAPI", | |
"id": "/subscriptions/<subscriptionId>/providers/Microsoft.Web/locations/southcentralus/managedApis/ftp" | |
} | |
} | |
}, | |
"definition": { | |
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#", | |
"actions": { | |
"Create_file": { | |
"inputs": { | |
"body": "@outputs('Integration_Account_Artifact_Lookup')['properties']['metadata']['ConnectionName']", | |
"host": { | |
"connection": { | |
"name": "@parameters('$connections')[outputs('Integration_Account_Artifact_Lookup')['properties']['metadata']['ConnectionName']]['connectionId']" | |
} | |
}, | |
"method": "post", | |
"path": "/datasets/default/files", | |
"queries": { | |
"folderPath": "@outputs('Integration_Account_Artifact_Lookup')['properties']['metadata']['FtpFolder']", | |
"name": "@triggerOutputs()['headers']['FileName']" | |
} | |
}, | |
"runAfter": { | |
"Integration_Account_Artifact_Lookup": [ | |
"Succeeded" | |
] | |
}, | |
"runtimeConfiguration": { | |
"contentTransfer": { | |
"transferMode": "Chunked" | |
} | |
}, | |
"type": "ApiConnection" | |
}, | |
"Integration_Account_Artifact_Lookup": { | |
"inputs": { | |
"artifactName": "@triggerOutputs()['headers']['Partner']", | |
"artifactType": "Partner" | |
}, | |
"runAfter": {}, | |
"type": "IntegrationAccountArtifactLookup" | |
} | |
}, | |
"contentVersion": "1.0.0.0", | |
"outputs": {}, | |
"parameters": { | |
"$connections": { | |
"defaultValue": {}, | |
"type": "Object" | |
} | |
}, | |
"triggers": { | |
"manual": { | |
"inputs": { | |
"method": "POST", | |
"schema": {} | |
}, | |
"kind": "Http", | |
"type": "Request" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment