Skip to content

Commit dac6297

Browse files
authored
Merge pull request #232296 from dlepow/pol1
[APIM] Policy expression support in policies -1
2 parents 5843f97 + ca188ae commit dac6297

10 files changed

+60
-37
lines changed

articles/api-management/authentication-basic-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Use the `authentication-basic` policy to authenticate with a backend service usi
2828

2929
| Attribute | Description | Required | Default |
3030
| ----------------- | ------------------------------------------------------ | -------- | ------- |
31-
|username|Specifies the username of the Basic credential.|Yes|N/A|
32-
|password|Specifies the password of the Basic credential.|Yes|N/A|
31+
|username|Specifies the username of the Basic credential. Policy expressions are allowed. |Yes|N/A|
32+
|password|Specifies the password of the Basic credential. Policy expressions are allowed. |Yes|N/A|
3333

3434

3535
## Usage

articles/api-management/authentication-certificate-policy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ ms.author: danlep
3030

3131
| Attribute | Description | Required | Default |
3232
| ----------------- | ------------------------------------------------------ | -------- | ------- |
33-
|thumbprint|The thumbprint for the client certificate.|Either `thumbprint` or `certificate-id` can be present.|N/A|
34-
|certificate-id|The certificate resource name.|Either `thumbprint` or `certificate-id` can be present.|N/A|
35-
|body|Client certificate as a byte array. Use if the certificate isn't retrieved from the built-in certificate store.|No|N/A|
36-
|password|Password for the client certificate.|Use if certificate specified in `body` is password protected.|N/A|
33+
|thumbprint|The thumbprint for the client certificate. Policy expressions are allowed. |Either `thumbprint` or `certificate-id` can be present.|N/A|
34+
|certificate-id|The certificate resource name. Policy expressions are allowed.|Either `thumbprint` or `certificate-id` can be present.|N/A|
35+
|body|Client certificate as a byte array. Use if the certificate isn't retrieved from the built-in certificate store. Policy expressions are allowed.|No|N/A|
36+
|password|Password for the client certificate. Policy expressions are allowed.|Use if certificate specified in `body` is password protected.|N/A|
3737

3838
## Usage
3939

articles/api-management/authentication-managed-identity-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Both system-assigned identity and any of the multiple user-assigned identities c
2929
| Attribute | Description | Required | Default |
3030
| ----------------- | ------------------------------------------------------ | -------- | ------- |
3131
|resource|String. The application ID of the target web API (secured resource) in Azure Active Directory. Policy expressions are allowed. |Yes|N/A|
32-
|client-id|String. The client ID of the user-assigned identity in Azure Active Directory. Policy expressions are not allowed. |No|system-assigned identity|
33-
|output-token-variable-name|String. Name of the context variable that will receive token value as an object of type `string`. Policy expresssions are not allowed. |No|N/A|
34-
|ignore-error|Boolean. If set to `true`, the policy pipeline will continue to execute even if an access token is not obtained.|No|`false`|
32+
|client-id|String. The client ID of the user-assigned identity in Azure Active Directory. Policy expressions aren't allowed. |No|system-assigned identity|
33+
|output-token-variable-name|String. Name of the context variable that will receive token value as an object of type `string`. Policy expressions aren't allowed. |No|N/A|
34+
|ignore-error|Boolean. If set to `true`, the policy pipeline continues to execute even if an access token isn't obtained.|No|`false`|
3535

3636

3737
## Usage

articles/api-management/cache-lookup-policy.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ Use the `cache-lookup` policy to perform cache lookup and return a valid cached
4242

4343
| Attribute | Description | Required | Default |
4444
| ----------------- | ------------------------------------------------------ | -------- | ------- |
45-
| allow-private-response-caching | When set to `true`, allows caching of requests that contain an Authorization header. | No | `false` |
46-
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise. | No | `prefer-external` |
47-
| downstream-caching-type | This attribute must be set to one of the following values.<br /><br /> - none - downstream caching is not allowed.<br />- private - downstream private caching is allowed.<br />- public - private and shared downstream caching is allowed. | No | none |
48-
| must-revalidate | When downstream caching is enabled this attribute turns on or off the `must-revalidate` cache control directive in gateway responses. | No | `true` |
49-
| vary-by-developer | Set to `true` to cache responses per developer account that owns [subscription key](./api-management-subscriptions.md) included in the request. | Yes | `false` |
50-
| vary-by-developer-groups | Set to `true` to cache responses per [user group](./api-management-howto-create-groups.md). | Yes | `false` |
45+
| allow-private-response-caching | When set to `true`, allows caching of requests that contain an Authorization header. Policy expressions are allowed. | No | `false` |
46+
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise.<br/><br/>Policy expressions aren't allowed. | No | `prefer-external` |
47+
| downstream-caching-type | This attribute must be set to one of the following values.<br /><br /> - none - downstream caching is not allowed.<br />- private - downstream private caching is allowed.<br />- public - private and shared downstream caching is allowed.<br/><br/>Policy expressions are allowed. | No | none |
48+
| must-revalidate | When downstream caching is enabled this attribute turns on or off the `must-revalidate` cache control directive in gateway responses. Policy expressions are allowed. | No | `true` |
49+
| vary-by-developer | Set to `true` to cache responses per developer account that owns [subscription key](./api-management-subscriptions.md) included in the request. Policy expressions are allowed. | Yes | `false` |
50+
| vary-by-developer-groups | Set to `true` to cache responses per [user group](./api-management-howto-create-groups.md). Policy expressions are allowed. | Yes | `false` |
5151

5252

5353
## Elements

articles/api-management/cache-lookup-value-policy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ Use the `cache-lookup-value` policy to perform cache lookup by key and return a
3434

3535
| Attribute | Description | Required | Default |
3636
|---|--|--|--|
37-
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise. | No | `prefer-external` |
38-
| default-value | A value that will be assigned to the variable if the cache key lookup resulted in a miss. If this attribute is not specified, `null` is assigned. | No | `null` |
39-
| key | Cache key value to use in the lookup. | Yes | N/A |
40-
| variable-name | Name of the [context variable](api-management-policy-expressions.md#ContextVariables) the looked up value will be assigned to, if lookup is successful. If lookup results in a miss, the variable will not be set. | Yes | N/A |
37+
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise.<br/><br/>Policy expressions aren't allowed. | No | `prefer-external` |
38+
| default-value | A value that will be assigned to the variable if the cache key lookup resulted in a miss. If this attribute is not specified, `null` is assigned. Policy expressions are allowed. | No | `null` |
39+
| key | Cache key value to use in the lookup. Policy expressions are allowed. | Yes | N/A |
40+
| variable-name | Name of the [context variable](api-management-policy-expressions.md#ContextVariables) the looked up value will be assigned to, if lookup is successful. If lookup results in a miss, the variable will not be set. Policy expressions aren't allowed. | Yes | N/A |
4141

4242

4343
## Usage

articles/api-management/cache-remove-value-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ The `cache-remove-value` deletes a cached item identified by its key. The key ca
2626

2727
| Attribute | Description | Required | Default |
2828
|---|--|--|--|
29-
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise. | No | `prefer-external` |
30-
| key | The key of the previously cached value to be removed from the cache. | Yes | N/A |
29+
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise. <br/><br/>Policy expressions aren't allowed. | No | `prefer-external` |
30+
| key | The key of the previously cached value to be removed from the cache. Policy expressions are allowed. | Yes | N/A |
3131
## Usage
3232

3333

articles/api-management/cache-store-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ The `cache-store` policy caches responses according to the specified cache setti
3333

3434
| Attribute | Description | Required | Default |
3535
| ----------------- | ------------------------------------------------------ | -------- | ------- |
36-
| duration | Time-to-live of the cached entries, specified in seconds. | Yes | N/A |
37-
| cache-response | Set to `true` to cache the current HTTP response. If the attribute is omitted or set to `false`, only HTTP responses with the status code `200 OK` are cached. | No | `false` |
36+
| duration | Time-to-live of the cached entries, specified in seconds. Policy expressions are allowed. | Yes | N/A |
37+
| cache-response | Set to `true` to cache the current HTTP response. If the attribute is omitted or set to `false`, only HTTP responses with the status code `200 OK` are cached. Policy expressions are allowed. | No | `false` |
3838

3939
## Usage
4040

articles/api-management/cache-store-value-policy.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ The `cache-store-value` performs cache storage by key. The key can have an arbit
3131

3232
| Attribute | Description | Required | Default |
3333
|---|--|--|--|
34-
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise. | No | `prefer-external` |
35-
| duration | Value will be cached for the provided duration value, specified in seconds. | Yes | N/A |
36-
| key | Cache key the value will be stored under. | Yes | N/A |
37-
| value | The value to be cached. | Yes | N/A |
34+
| caching-type | Choose between the following values of the attribute:<br />- `internal` to use the [built-in API Management cache](api-management-howto-cache.md),<br />- `external` to use the external cache as described in [Use an external Azure Cache for Redis in Azure API Management](api-management-howto-cache-external.md),<br />- `prefer-external` to use external cache if configured or internal cache otherwise.<br/><br/>Policy expressions aren't allowed.| No | `prefer-external` |
35+
| duration | Value will be cached for the provided duration value, specified in seconds. Policy expressions are allowed. | Yes | N/A |
36+
| key | Cache key the value will be stored under. Policy expressions are allowed. | Yes | N/A |
37+
| value | The value to be cached. Policy expressions are allowed. | Yes | N/A |
3838

3939
## Usage
4040

0 commit comments

Comments
 (0)