Skip to content

Commit e38e17b

Browse files
committed
[APIM] Policy expression support in policies - 5
1 parent 223c853 commit e38e17b

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

articles/api-management/set-body-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Use the `set-body` policy to set the message body for incoming and outgoing requ
3333
| Attribute | Description | Required | Default |
3434
| ----------------- | ------------------------------------------------------ | -------- | ------- |
3535
|template|Used to change the templating mode that the `set-body` policy will run in. Currently the only supported value is:<br /><br />- `liquid` - the `set-body` policy will use the liquid templating engine |No| N/A|
36-
|xsi-nil| Used to control how elements marked with `xsi:nil="true"` are represented in XML payloads. Set to one of the following values:<br /><br />- `blank` - `nil` is represented with an empty string.<br />- `null` - `nil` is represented with a null value.|No | `blank` |
36+
|xsi-nil| Used to control how elements marked with `xsi:nil="true"` are represented in XML payloads. Set to one of the following values:<br /><br />- `blank` - `nil` is represented with an empty string.<br />- `null` - `nil` is represented with a null value.<br/></br>Policy expressions aren't allowed. |No | `blank` |
3737

3838
For accessing information about the request and response, the Liquid template can bind to a context object with the following properties: <br />
3939
<pre>context.

articles/api-management/set-header-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ The `set-header` policy assigns a value to an existing HTTP response and/or requ
3030

3131
|Name|Description|Required|Default|
3232
|----------|-----------------|--------------|-------------|
33-
|exists-action|Specifies action to take when the header is already specified. This attribute must have one of the following values.<br /><br /> - `override` - replaces the value of the existing header.<br />- `skip` - does not replace the existing header value.<br />- `append` - appends the value to the existing header value.<br />- `delete` - removes the header from the request.<br /><br /> When set to `override`, enlisting multiple entries with the same name results in the header being set according to all entries (which will be listed multiple times); only listed values will be set in the result.|No|`override`|
34-
|name|Specifies name of the header to be set.|Yes|N/A|
33+
|exists-action|Specifies action to take when the header is already specified. This attribute must have one of the following values.<br /><br /> - `override` - replaces the value of the existing header.<br />- `skip` - does not replace the existing header value.<br />- `append` - appends the value to the existing header value.<br />- `delete` - removes the header from the request.<br /><br /> When set to `override`, enlisting multiple entries with the same name results in the header being set according to all entries (which will be listed multiple times); only listed values will be set in the result. <br/><br/>Policy expressions are allowed.|No|`override`|
34+
|name|Specifies name of the header to be set. Policy expressions are allowed.|Yes|N/A|
3535

3636

3737
## Elements
3838

3939
|Name|Description|Required|
4040
|----------|-----------------|--------------|
41-
|value|Specifies the value of the header to be set. For multiple headers with the same name, add additional `value` elements.|No|
41+
|value|Specifies the value of the header to be set. Policy expressions are allowed. For multiple headers with the same name, add additional `value` elements.|No|
4242

4343
## Usage
4444

articles/api-management/set-method-policy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The `set-method` policy allows you to change the HTTP request method for a reque
2323
<set-method>HTTP method</set-method>
2424
```
2525

26-
The value of the element specifies the HTTP method, such as `POST`, `GET`, and so on.
26+
The value of the element specifies the HTTP method, such as `POST`, `GET`, and so on. Policy expressions are allowed.
2727

2828
## Usage
2929

articles/api-management/set-query-parameter-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ The `set-query-parameter` policy adds, replaces value of, or deletes request que
2929

3030
|Name|Description|Required|Default|
3131
|----------|-----------------|--------------|-------------|
32-
|exists-action|Specifies what action to take when the query parameter is already specified. This attribute must have one of the following values.<br /><br /> - `override` - replaces the value of the existing parameter.<br />- `skip` - does not replace the existing query parameter value.<br />- `append` - appends the value to the existing query parameter value.<br />- `delete` - removes the query parameter from the request.<br /><br /> When set to `override` enlisting multiple entries with the same name results in the query parameter being set according to all entries (which will be listed multiple times); only listed values will be set in the result.|No|`override`|
33-
|name|Specifies name of the query parameter to be set.|Yes|N/A|
32+
|exists-action|Specifies what action to take when the query parameter is already specified. This attribute must have one of the following values.<br /><br /> - `override` - replaces the value of the existing parameter.<br />- `skip` - does not replace the existing query parameter value.<br />- `append` - appends the value to the existing query parameter value.<br />- `delete` - removes the query parameter from the request.<br /><br /> When set to `override` enlisting multiple entries with the same name results in the query parameter being set according to all entries (which will be listed multiple times); only listed values will be set in the result.<br/><br/>Policy expressions are allowed. |No|`override`|
33+
|name|Specifies name of the query parameter to be set. Policy expressions are allowed. |Yes|N/A|
3434

3535
## Elements
3636

3737
|Name|Description|Required|
3838
|----------|-----------------|--------------|
39-
|value|Specifies the value of the query parameter to be set. For multiple query parameters with the same name, add additional `value` elements.|Yes|
39+
|value|Specifies the value of the query parameter to be set. For multiple query parameters with the same name, add additional `value` elements. Policy expressions are allowed. |Yes|
4040

4141
## Usage
4242

articles/api-management/set-status-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ The `set-status` policy sets the HTTP status code to the specified value.
2828

2929
| Attribute | Description | Required | Default |
3030
| --------------- | ---------------------------------------------------------- | -------- | ------- |
31-
| code | Integer. The HTTP status code to return. | Yes | N/A |
32-
| reason | String. A description of the reason for returning the status code. | Yes | N/A |
31+
| code | Integer. The HTTP status code to return. Policy expressions are allowed. | Yes | N/A |
32+
| reason | String. A description of the reason for returning the status code. Policy expressions are allowed. | Yes | N/A |
3333

3434

3535
## Usage

articles/api-management/set-variable-policy.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ The `set-variable` policy declares a [context](api-management-policy-expressions
2626

2727
| Attribute | Description | Required |
2828
| --------- | ------------------------------------------------------------------------ | -------- |
29-
| name | The name of the variable. | Yes |
30-
| value | The value of the variable. This can be an expression or a literal value. | Yes |
29+
| name | The name of the variable. Policy expressions aren't allowed. | Yes |
30+
| value | The value of the variable. This can be an expression or a literal value. Policy expressions are allowed. | Yes |
3131

3232
## Usage
3333

articles/api-management/trace-policy.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ The `trace` policy adds a custom trace into the request tracing output in the te
3535

3636
| Attribute | Description | Required | Default |
3737
| --------- | ------------------------------------------------------------------------------------------------------------------------- | -------- | ------- |
38-
| source | String literal meaningful to the trace viewer and specifying the source of the message. | Yes | N/A |
39-
| severity | Specifies the severity level of the trace. Allowed values are `verbose`, `information`, `error` (from lowest to highest). | No | `verbose` |
38+
| source | String literal meaningful to the trace viewer and specifying the source of the message. Policy expressions aren't allowed. | Yes | N/A |
39+
| severity | Specifies the severity level of the trace. Allowed values are `verbose`, `information`, `error` (from lowest to highest). Policy expressions aren't allowed. | No | `verbose` |
4040

4141
## Elements
4242

4343
|Name|Description|Required|
4444
|----------|-----------------|--------------|
45-
| message | A string or expression to be logged. | Yes |
45+
| message | A string or expression to be logged. Policy expressions are allowed. | Yes |
4646
| metadata | Adds a custom property to the Application Insights [Trace](../azure-monitor/app/data-model-complete.md#trace) telemetry. | No |
4747

4848
### metadata attributes

0 commit comments

Comments
 (0)