[英]Azure Api Management: Any way to implement rate limiting in the consumption tier?
我想“限速”调用我的 API。假设每个 API 键每分钟最多调用 5 次。 我的 APIM 位于消费 SKU 上。
但是当我尝试添加策略时,我得到了
Error in element 'quota-by-key' on line 16, column 10: Policy is not allowed in 'Consumption' sku
同样适用于
Rate-limit-by-key Policy is not allowed in 'Consumption' sku
有什么方法可以在消费层上使用速率限制吗?
发现在消费层只能在 API 级别设置速率限制或使用限制,不能在产品级别设置。
速率限制
<policies>
<inbound>
<base />
<rate-limit calls="5" renewal-period="60" remaining-calls-variable-name="remainingCallsPerSubscription" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
使用配额:
<policies>
<inbound>
<base />
<quota calls="10000" renewal-period="3600" />
</inbound>
<outbound>
<base />
</outbound>
</policies>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.