Partitioned policy when field not set in key

I believe my requirement is clear to you?

  • So are you saying my requirement cannot be achieved?

Yes your requirement is very clear to me. And, no it cannot be achieved.

Policy must be paritioned to take value from key.

If there is a rate set in key → use it.

If the fields to set rate(“rate”, “per” fields) are not present in key → Use the rate from policy associated with the key(In policy I have set a rate limit I just want it to be used. It should not allow as many requests to pass through as it happens now)

When partitioned, you need to define it in the key. It’s either you enforce it to use what is defined in the policy or set it yourself in the key. You cannot set it to be both in the key and policy. A simple rule of thumb to follow:

  • If it is defined in the policy, then there is no need to define in the key. The policy is the template for the key
  • If it is not defined or enforced in the policy, then you need to specify it in the key