I am trying to add a rate-limit policy for an API management (per API Management access restriction policies) and I am not sure if I do something wrong or if documentation is not correct.
According to the documentation, the
- Set usage quota by key
- Limit call rate by key
are not available in consumption tier, but Limit call rate by subscription has no such notice, so it should work (plus Set usage quota by subscription can be set).
I have an Azure API Management, I have created a sample API and a product and in the policy of the product is:
<policies>
<inbound>
<base />
<quota calls="100" renewal-period="86400" />
<rate-limit calls="20" renewal-period="90" />
</inbound>
<backend>
<base />
</backend>
<outbound>
<base />
</outbound>
<on-error>
<base />
</on-error>
</policies>
When I click on Save, I get
One or more fields contain incorrect values:
Error in element 'rate-limit' on line 16, column 10: Policy is not allowed in this sku 'Consumption'
Is there a way to set the rate-limit (=am I missing something) for consumption tier or is the documentation not correct?
rate-limit
should work in consumption tier. I tried the same policy with my APIM instance hosted on consumption tier and it worked without any error: – Ketan