如何停止Azure Logic App SMS泛洪?

时间:2019-06-25 19:02:59

标签: azure-logic-apps azure-function-app

我正在尝试使用此Azure无服务器IOT按钮项目发送SMS警报:https://azure.microsoft.com/en-in/resources/samples/azure-serverless-iot-button/

单击一次按钮后,我发现Logic App开始运行多次,并且不到一分钟就充满了数百条SMS消息。每单击一次按钮,我只需要一个SMS警报。我想念什么?

    "$connections": {
        "value": {
            "plivo": {
                "connectionId": "/subscriptions/---0-fb3c-406e-98--2-7fa0e00ef0d0/resourceGroups/--/providers/Microsoft.Web/connections/plivo",
                "connectionName": "plivo",
                "id": "/subscriptions/f--0-fb3c-406e-9-72-7f--0/providers/Microsoft.Web/locations/westus/managedApis/plivo"
            }
        }
    },
    "definition": {
        "$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
        "actions": {
            "Send_SMS": {
                "inputs": {
                    "body": {
                        "dst": "1 801-999-9999",
                        "src": "1 801-999-9982",
                        "text": "Button Pressed - @{triggerBody()?['location']}"
                    },
                    "host": {
                        "connection": {
                            "name": "@parameters('$connections')['plivo']['connectionId']"
                        }
                    },
                    "method": "post",
                    "path": "/v1/Account/auth_id_value/Message/"
                },
                "runAfter": {},
                "type": "ApiConnection"
            }
        },
        "contentVersion": "1.0.0.0",
        "outputs": {},
        "parameters": {
            "$connections": {
                "defaultValue": {},
                "type": "Object"
            }
        },
        "triggers": {
            "manual": {
                "inputs": {
                    "schema": {
                        "properties": {
                            "location": {
                                "type": "string"
                            }
                        },
                        "type": "object"
                    }
                },
                "kind": "Http",
                "type": "Request"
            }
        }
    }
}

2 个答案:

答案 0 :(得分:0)

您已用azure-function-app标记了这个问题,确定azure函数仅调用逻辑应用一次吗?您能发表一下azure函数的代码吗?

答案 1 :(得分:0)

我显然不是在过滤通过的消息,因此它是在其他与按钮无关的遥测中触发的。