azure - LogicApp via ARM to Listen Dropbox ( trigger ) to FTP ( action ) -
would there arm template listening dropbox folder , creating file in ftp. find templates in azure on blob ftp.
also, dropbox connection resource in deploy template? these details in documentaion.
please find deploy json below
{ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymenttemplate.json#", "contentversion": "1.0.0.0", "parameters": { "dropboxconnectionaccountname": { "type": "string", "metadata": { "description": "account name of dropbox." } }, "dropboxpassword": { "type": "securestring", "metadata": { "description": "password dropbox account" } }, "dropboxconnectionname": { "type": "string", "metadata": { "description": "the name of dropbox connection being created." } }, "ftpserveraddress": { "type": "string", "metadata": { "description": "the address of ftp server." } }, "ftpusername": { "type": "string", "metadata": { "description": "the username ftp server." } }, "ftppassword": { "type": "securestring", "metadata": { "description": "the password ftp server." } }, "ftpserverport": { "type": "int", "defaultvalue": 21, "metadata": { "description": "the port ftp server." } }, "ftpconnectionname": { "type": "string", "metadata": { "description": "the name of ftp connection being created." } }, "logicappname": { "type": "string", "metadata": { "description": "the name of logic app create." } }, "flowskuname": { "type": "string", "defaultvalue": "standard", "allowedvalues": [ "free", "basic", "standard", "premium" ], "metadata": { "description": "the pricing tier logic app." } }, "hostingplanname": { "type": "string", "metadata": { "description": "the name of app service plan create hosting logic app." } }, "hostingskuname": { "type": "string", "defaultvalue": "s1", "allowedvalues": [ "f1", "d1", "b1", "b2", "b3", "s1", "s2", "s3", "p1", "p2", "p3", "p4" ], "metadata": { "description": "describes plan's pricing tier , instance size." } }, "hostingskucapacity": { "type": "int", "defaultvalue": 1, "minvalue": 1, "metadata": { "description": "describes plan's instance count" } }, "testuri": { "type": "string", "defaultvalue": "http://azure.microsoft.com/en-us/status/feed/", "metadata": { "description": "a test uri" } } }, "variables": { "$ftpisssl": true, "$ftpisbinarytransport": true, "$ftpdisablecertificatevalidation": true }, "resources": [ { "type": "microsoft.web/connections", "apiversion": "2016-06-01", "location": "[resourcegroup().location]", "name": "[parameters('dropboxconnectionname')]", "properties": { "api": { "id": "[concat(subscription().id,'/providers/microsoft.web/locations/', resourcegroup().location, '/managedapis/dropbox')]" }, "displayname": "dropbox", "parametervalues": { "email": "[parameters('dropboxconnectionaccountname')]", "password": "[parameters('dropboxpassword')]" } } }, { "type": "microsoft.web/connections", "apiversion": "2016-06-01", "location": "[resourcegroup().location]", "name": "[parameters('ftpconnectionname')]", "properties": { "api": { "id": "[concat(subscription().id,'/providers/microsoft.web/locations/', resourcegroup().location, '/managedapis/ftp')]" }, "displayname": "ftp", "parametervalues": { "serveraddress": "[parameters('ftpserveraddress')]", "username": "[parameters('ftpusername')]", "password": "[parameters('ftppassword')]", "serverport": "[parameters('ftpserverport')]", "isssl": "[variables('$ftpisssl')]", "isbinarytransport": "[variables('$ftpisbinarytransport')]", "disablecertificatevalidation": "[variables('$ftpdisablecertificatevalidation')]" } } }, { "apiversion": "2015-08-01", "name": "[parameters('hostingplanname')]", "type": "microsoft.web/serverfarms", "location": "[resourcegroup().location]", "tags": { "displayname": "hostingplan" }, "sku": { "name": "[parameters('hostingskuname')]", "capacity": "[parameters('hostingskucapacity')]" }, "properties": { "name": "[parameters('hostingplanname')]" } }, { "type": "microsoft.logic/workflows", "apiversion": "2015-08-01-preview", "name": "[parameters('logicappname')]", "location": "[resourcegroup().location]", "dependson": [ "[resourceid('microsoft.web/connections', parameters('dropboxconnectionname'))]", "[resourceid('microsoft.web/connections', parameters('ftpconnectionname'))]" ], "tags": { "displayname": "logicapp" }, "properties": { "sku": { "name": "[parameters('flowskuname')]", "plan": { "id": "[concat(resourcegroup().id, '/providers/microsoft.web/serverfarms/',parameters('hostingplanname'))]" } }, "definition": { "$schema": "https://schema.management.azure.com/providers/microsoft.logic/schemas/2016-06-01/workflowdefinition.json#", "actions": { "create_file": { "inputs": { "body": "@triggerbody()", "host": { "api": { "runtimeurl": "[concat('https://logic-apis-', resourcegroup().location, '.azure-apim.net/apim/ftp')]" }, "connection": { "name": "@parameters('$connections')['ftp']['connectionid']" } }, "method": "post", "path": "/datasets/default/files", "queries": { "folderpath": "/site/wwwroot/", "name": "@{triggeroutputs()['headers']?['x-ms-file-name']}" } }, "runafter": {}, "type": "apiconnection" } }, "contentversion": "1.0.0.0", "outputs": {}, "parameters": { "$connections": { "defaultvalue": {}, "type": "object" } }, "triggers": { "when_a_file_is_added_or_modified": { "inputs": { "host": { "api": { "runtimeurl": "[concat('https://logic-apis-', resourcegroup().location, '.azure-apim.net/apim/dropbox')]" }, "connection": { "name": "@parameters('$connections')['dropbox']['connectionid']" } }, "method": "get", "path": "/datasets/default/triggers/onupdatedfile", "queries": { "folderid": "/site/wwwroot" } }, "recurrence": { "frequency": "second", "interval": 15 }, "type": "apiconnection" } } }, "parameters": { "$connections": { "value": { "ftp": { "id": "[reference(concat('microsoft.web/connections/', parameters('ftpconnectionname')), '2015-08-01-preview').api.id]", "connectionname": "[parameters('ftpconnectionname')]", "connectionid": "[resourceid('microsoft.web/connections', parameters('ftpconnectionname'))]" }, "dropbox": { "id": "[reference(concat('microsoft.web/connections/', parameters('dropboxconnectionname')), '2015-08-01-preview').api.id]", "connectionname": "[parameters('dropboxconnectionname')]", "connectionid": "[resourceid('microsoft.web/connections', parameters('dropboxconnectionname'))]" } } } } } } ], "outputs": {} }
Comments
Post a Comment