如果有人在没有所需功能键的情况下向您的功能 URL 发送垃圾邮件,您会产生使用费用吗?
Do you incur usage costs if someone spams your function URL without the required function key?
我的 Azure Functions 需要功能键才能访问(不,这不会分发给客户端)。在我的测试中,如果我不提供密钥,我会返回 401:未授权(良好)。 Azure 是否在请求到达我的函数之前就停止了请求?那是否意味着如果有人试图在没有密钥的情况下向我的函数 URL 发送垃圾邮件,我将不会因 "demand" 的突然激增而产生任何使用成本?我的想法是肯定的,但我想知道我是否错了,因为在投入生产之前我需要研究另一个解决方案。
在消费计划中,您只需按函数实际运行的时间付费,不包括在调度到您的函数之前运行时在身份验证上花费的时间.
虽然 pricing page 没有这么明确,但它确实说:
Functions are billed based on total number of requested executions each month for all Functions. Executions are counted each time a function is executed in response to an event, triggered by a binding. The first million executions are included free each month.
在这种情况下,您的函数永远不会执行(因此您不会被计费),因为身份验证失败。
来自文档:
when an error occurs before your function code begins to execute you aren't charged for an execution. This means that 401 responses from the platform due to API key validation or the App Service Authentication / Authorization feature don't count against your execution cost.
https://docs.microsoft.com/en-us/azure/azure-functions/functions-consumption-costs?tabs=portal
我的 Azure Functions 需要功能键才能访问(不,这不会分发给客户端)。在我的测试中,如果我不提供密钥,我会返回 401:未授权(良好)。 Azure 是否在请求到达我的函数之前就停止了请求?那是否意味着如果有人试图在没有密钥的情况下向我的函数 URL 发送垃圾邮件,我将不会因 "demand" 的突然激增而产生任何使用成本?我的想法是肯定的,但我想知道我是否错了,因为在投入生产之前我需要研究另一个解决方案。
在消费计划中,您只需按函数实际运行的时间付费,不包括在调度到您的函数之前运行时在身份验证上花费的时间.
虽然 pricing page 没有这么明确,但它确实说:
Functions are billed based on total number of requested executions each month for all Functions. Executions are counted each time a function is executed in response to an event, triggered by a binding. The first million executions are included free each month.
在这种情况下,您的函数永远不会执行(因此您不会被计费),因为身份验证失败。
来自文档:
when an error occurs before your function code begins to execute you aren't charged for an execution. This means that 401 responses from the platform due to API key validation or the App Service Authentication / Authorization feature don't count against your execution cost.
https://docs.microsoft.com/en-us/azure/azure-functions/functions-consumption-costs?tabs=portal