Skip to content

Commit 945db51

Browse files
authored
Merge pull request #232515 from dlepow/pol4
[APIM] Policy expression support in policies - 4
2 parents a39a2f7 + ea0f959 commit 945db51

10 files changed

+63
-63
lines changed

articles/api-management/quota-by-key-policy.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ To understand the difference between rate limits and quotas, [see Rate limits an
3535

3636
| Attribute | Description | Required | Default |
3737
| ------------------- | --------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- | ------- |
38-
| bandwidth | The maximum total number of kilobytes allowed during the time interval specified in the `renewal-period`. | Either `calls`, `bandwidth`, or both together must be specified. | N/A |
39-
| calls | The maximum total number of calls allowed during the time interval specified in the `renewal-period`. | Either `calls`, `bandwidth`, or both together must be specified. | N/A |
40-
| counter-key | The key to use for the `quota policy`. For each key value, a single counter is used for all scopes at which the policy is configured. | Yes | N/A |
41-
| increment-condition | The Boolean expression specifying if the request should be counted towards the quota (`true`) | No | N/A |
42-
| renewal-period | The length in seconds of the fixed window after which the quota resets. The start of each period is calculated relative to `first-period-start`. When `renewal-period` is set to `0`, the period is set to infinite. | Yes | N/A |
43-
| first-period-start | The starting date and time for quota renewal periods, in the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. | No | `0001-01-01T00:00:00Z` |
38+
| bandwidth | The maximum total number of kilobytes allowed during the time interval specified in the `renewal-period`. Policy expressions aren't allowed.| Either `calls`, `bandwidth`, or both together must be specified. | N/A |
39+
| calls | The maximum total number of calls allowed during the time interval specified in the `renewal-period`. Policy expressions aren't allowed. | Either `calls`, `bandwidth`, or both together must be specified. | N/A |
40+
| counter-key | The key to use for the `quota policy`. For each key value, a single counter is used for all scopes at which the policy is configured. Policy expressions are allowed. | Yes | N/A |
41+
| increment-condition | The Boolean expression specifying if the request should be counted towards the quota (`true`). Policy expressions are allowed. | No | N/A |
42+
| renewal-period | The length in seconds of the fixed window after which the quota resets. The start of each period is calculated relative to `first-period-start`. When `renewal-period` is set to `0`, the period is set to infinite. Policy expressions aren't allowed. | Yes | N/A |
43+
| first-period-start | The starting date and time for quota renewal periods, in the following format: `yyyy-MM-ddTHH:mm:ssZ` as specified by the ISO 8601 standard. Policy expressions aren't allowed. | No | `0001-01-01T00:00:00Z` |
4444

4545

4646
## Usage

articles/api-management/rate-limit-by-key-policy.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ To understand the difference between rate limits and quotas, [see Rate limits an
3939

4040
| Attribute | Description | Required | Default |
4141
| ------------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
42-
| calls | The maximum total number of calls allowed during the time interval specified in the `renewal-period`. Policy expression is allowed. | Yes | N/A |
43-
| counter-key | The key to use for the rate limit policy. For each key value, a single counter is used for all scopes at which the policy is configured. | Yes | N/A |
44-
| increment-condition | The Boolean expression specifying if the request should be counted towards the rate (`true`). | No | N/A |
45-
| increment-count | The number by which the counter is increased per request. | No | 1 |
46-
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Policy expression is allowed. Maximum allowed value: 300 seconds. | Yes | N/A |
47-
| retry-after-header-name | The name of a custom response header whose value is the recommended retry interval in seconds after the specified call rate is exceeded. | No | `Retry-After` |
48-
| retry-after-variable-name | The name of a policy expression variable that stores the recommended retry interval in seconds after the specified call rate is exceeded. | No | N/A |
49-
| remaining-calls-header-name | The name of a response header whose value after each policy execution is the number of remaining calls allowed for the time interval specified in the `renewal-period`. | No | N/A |
50-
| remaining-calls-variable-name | The name of a policy expression variable that after each policy execution stores the number of remaining calls allowed for the time interval specified in the `renewal-period`. | No | N/A |
51-
| total-calls-header-name | The name of a response header whose value is the value specified in `calls`. | No | N/A |
42+
| calls | The maximum total number of calls allowed during the time interval specified in the `renewal-period`. Policy expressions are allowed. | Yes | N/A |
43+
| counter-key | The key to use for the rate limit policy. For each key value, a single counter is used for all scopes at which the policy is configured. Policy expressions are allowed. | Yes | N/A |
44+
| increment-condition | The Boolean expression specifying if the request should be counted towards the rate (`true`). Policy expressions are allowed. | No | N/A |
45+
| increment-count | The number by which the counter is increased per request. Policy expressions are allowed. | No | 1 |
46+
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. Policy expressions are allowed. | Yes | N/A |
47+
| retry-after-header-name | The name of a custom response header whose value is the recommended retry interval in seconds after the specified call rate is exceeded. Policy expressions aren't allowed. | No | `Retry-After` |
48+
| retry-after-variable-name | The name of a policy expression variable that stores the recommended retry interval in seconds after the specified call rate is exceeded. Policy expressions aren't allowed. | No | N/A |
49+
| remaining-calls-header-name | The name of a response header whose value after each policy execution is the number of remaining calls allowed for the time interval specified in the `renewal-period`. Policy expressions aren't allowed. | No | N/A |
50+
| remaining-calls-variable-name | The name of a policy expression variable that after each policy execution stores the number of remaining calls allowed for the time interval specified in the `renewal-period`. Policy expressions aren't allowed. | No | N/A |
51+
| total-calls-header-name | The name of a response header whose value is the value specified in `calls`. Policy expressions aren't allowed. | No | N/A |
5252

5353
## Usage
5454

articles/api-management/rate-limit-policy.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ To understand the difference between rate limits and quotas, [see Rate limits an
3838

3939
| Attribute | Description | Required | Default |
4040
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
41-
| calls | The maximum total number of calls allowed during the time interval specified in `renewal-period`. | Yes | N/A |
42-
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. | Yes | N/A |
43-
| total-calls-header-name | The name of a response header whose value is the value specified in `calls`. | No | N/A |
44-
| retry-after-header-name | The name of a custom response header whose value is the recommended retry interval in seconds after the specified call rate is exceeded. | No | `Retry-After` |
45-
| retry-after-variable-name | The name of a policy expression variable that stores the recommended retry interval in seconds after the specified call rate is exceeded. | No | N/A |
46-
| remaining-calls-header-name | The name of a response header whose value after each policy execution is the number of remaining calls allowed for the time interval specified in the `renewal-period`. | No | N/A |
47-
| remaining-calls-variable-name | The name of a policy expression variable that after each policy execution stores the number of remaining calls allowed for the time interval specified in the `renewal-period`. | No | N/A |
48-
| total-calls-header-name | The name of a response header whose value is the value specified in `calls`. | No | N/A |
41+
| calls | The maximum total number of calls allowed during the time interval specified in `renewal-period`. Policy expressions aren't allowed.| Yes | N/A |
42+
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. Policy expressions aren't allowed. | Yes | N/A |
43+
| total-calls-header-name | The name of a response header whose value is the value specified in `calls`. Policy expressions aren't allowed. | No | N/A |
44+
| retry-after-header-name | The name of a custom response header whose value is the recommended retry interval in seconds after the specified call rate is exceeded. Policy expressions aren't allowed. | No | `Retry-After` |
45+
| retry-after-variable-name | The name of a variable that stores the recommended retry interval in seconds after the specified call rate is exceeded. Policy expressions aren't allowed. | No | N/A |
46+
| remaining-calls-header-name | The name of a response header whose value after each policy execution is the number of remaining calls allowed for the time interval specified in the `renewal-period`. Policy expressions aren't allowed.| No | N/A |
47+
| remaining-calls-variable-name | The name of a variable that after each policy execution stores the number of remaining calls allowed for the time interval specified in the `renewal-period`. Policy expressions aren't allowed.| No | N/A |
48+
| total-calls-header-name | The name of a response header whose value is the value specified in `calls`. Policy expressions aren't allowed.| No | N/A |
4949

5050

5151
## Elements
@@ -62,8 +62,8 @@ To understand the difference between rate limits and quotas, [see Rate limits an
6262
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
6363
| name | The name of the API for which to apply the rate limit. | Either `name` or `id` must be specified. | N/A |
6464
| id | The ID of the API for which to apply the rate limit. | Either `name` or `id` must be specified. | N/A |
65-
| calls | The maximum total number of calls allowed during the time interval specified in `renewal-period`. | Yes | N/A |
66-
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. | Yes | N/A |
65+
| calls | The maximum total number of calls allowed during the time interval specified in `renewal-period`. Policy expressions aren't allowed.| Yes | N/A |
66+
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. Policy expressions aren't allowed. | Yes | N/A |
6767

6868

6969
### operation attributes
@@ -72,8 +72,8 @@ To understand the difference between rate limits and quotas, [see Rate limits an
7272
| -------------- | ----------------------------------------------------------------------------------------------------- | -------- | ------- |
7373
| name | The name of the operation for which to apply the rate limit. | Either `name` or `id` must be specified. | N/A |
7474
| id | The ID of the operation for which to apply the rate limit. | Either `name` or `id` must be specified. | N/A |
75-
| calls | The maximum total number of calls allowed during the time interval specified in `renewal-period`. | Yes | N/A |
76-
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. | Yes | N/A |
75+
| calls | The maximum total number of calls allowed during the time interval specified in `renewal-period`. Policy expressions aren't allowed.| Yes | N/A |
76+
| renewal-period | The length in seconds of the sliding window during which the number of allowed requests should not exceed the value specified in `calls`. Maximum allowed value: 300 seconds. Policy expressions aren't allowed. | Yes | N/A |
7777

7878
## Usage
7979

@@ -84,7 +84,6 @@ To understand the difference between rate limits and quotas, [see Rate limits an
8484
### Usage notes
8585

8686
* This policy can be used only once per policy definition.
87-
* Except where noted, [policy expressions](api-management-policy-expressions.md) can't be used in attribute values for this policy.
8887
* This policy is only applied when an API is accessed using a subscription key.
8988
* [!INCLUDE [api-management-self-hosted-gateway-rate-limit](../../includes/api-management-self-hosted-gateway-rate-limit.md)] [Learn more](how-to-self-hosted-gateway-on-kubernetes-in-production.md#request-throttling)
9089

articles/api-management/retry-policy.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ The `retry` policy executes its child policies once and then retries their execu
3636

3737
| Attribute | Description | Required | Default |
3838
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
39-
| condition | A Boolean literal or [expression](api-management-policy-expressions.md) specifying if retries should be stopped (`false`) or continued (`true`). | Yes | N/A |
40-
| count | A positive number specifying the maximum number of retries to attempt. | Yes | N/A |
41-
| interval | A positive number in seconds specifying the wait interval between the retry attempts. | Yes | N/A |
42-
| max-interval | A positive number in seconds specifying the maximum wait interval between the retry attempts. It is used to implement an exponential retry algorithm. | No | N/A |
43-
| delta | A positive number in seconds specifying the wait interval increment. It is used to implement the linear and exponential retry algorithms. | No | N/A |
44-
| first-fast-retry | If set to `true` , the first retry attempt is performed immediately. | No | `false` |
39+
| condition | Boolean. Specifies whether retries should be stopped (`false`) or continued (`true`). Policy expressions are allowed. | Yes | N/A |
40+
| count | A positive number specifying the maximum number of retries to attempt. Policy expressions are allowed. | Yes | N/A |
41+
| interval | A positive number in seconds specifying the wait interval between the retry attempts. Policy expressions are allowed. | Yes | N/A |
42+
| max-interval | A positive number in seconds specifying the maximum wait interval between the retry attempts. It is used to implement an exponential retry algorithm. Policy expressions are allowed. | No | N/A |
43+
| delta | A positive number in seconds specifying the wait interval increment. It is used to implement the linear and exponential retry algorithms. Policy expressions are allowed. | No | N/A |
44+
| first-fast-retry | Boolean. If set to `true`, the first retry attempt is performed immediately. Policy expressions are allowed. | No | `false` |
4545

4646
## Retry wait times
4747

articles/api-management/return-response-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ The `return-response` policy cancels pipeline execution and returns either a def
3030

3131
| Attribute | Description | Required | Default |
3232
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | ---- |
33-
| response-variable-name | The name of the context variable referenced from, for example, an upstream [send-request](send-request-policy.md) policy and containing a `Response` object. | No | N/A |
33+
| response-variable-name | The name of the context variable referenced from, for example, an upstream [send-request](send-request-policy.md) policy and containing a `Response` object. Policy expressions aren't allowed. | No | N/A |
3434

3535
## Elements
3636

0 commit comments

Comments
 (0)