You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/api-management/api-management-howto-properties.md
+14-14Lines changed: 14 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: How to use properties in Azure API Management policies
3
-
description: Learn how to use properties in Azure API Management policies.
2
+
title: How to use Named Values in Azure API Management policies
3
+
description: Learn how to use Named Values in Azure API Management policies.
4
4
services: api-management
5
5
documentationcenter: ''
6
6
author: vladvino
@@ -16,10 +16,10 @@ ms.date: 01/25/2018
16
16
ms.author: apimpm
17
17
18
18
---
19
-
# How to use properties in Azure API Management policies
20
-
API Management policies are a powerful capability of the system that allow the Azure portal to change the behavior of the API through configuration. Policies are a collection of statements that are executed sequentially on the request or response of an API. Policy statements can be constructed using literal text values, policy expressions, and properties.
19
+
# How to use Named Values in Azure API Management policies
20
+
API Management policies are a powerful capability of the system that allow the Azure portal to change the behavior of the API through configuration. Policies are a collection of statements that are executed sequentially on the request or response of an API. Policy statements can be constructed using literal text values, policy expressions, and named values.
21
21
22
-
Each API Management service instance has a properties collection of key/value pairsthat are global to the service instance. These properties can be used to manage constant string values across all API configuration and policies. Each property can have the following attributes:
22
+
Each API Management service instance has a properties collection of key/value pairs, which is called Named Values, that are global to the service instance. These Named Values can be used to manage constant string values across all API configuration and policies. Each property can have the following attributes:
23
23
24
24
| Attribute | Type | Description |
25
25
| --- | --- | --- |
@@ -46,7 +46,7 @@ Property values can contain literal strings and [policy expressions](https://msd
46
46
2. Select **Named values**.
47
47
3. Press **+Add**.
48
48
49
-
Name and Value are required values. If this property value is a secret, check the This is a secret checkbox. Enter one or more optional tags to help with organizing your properties, and click Save.
49
+
Name and Value are required values. If this property value is a secret, check the This is a secret checkbox. Enter one or more optional tags to help with organizing your named values, and click Save.
50
50
4. Click **Create**.
51
51
52
52
Once the property is created, you can edit it by clicking on the property. If you change the property name, any policies that reference that property are automatically updated to use the new name.
@@ -64,11 +64,11 @@ To delete a property, click **Delete** beside the property to delete.
64
64
65
65
For information on deleting a property using the REST API, see [Delete a property using the REST API](https://msdn.microsoft.com/library/azure/mt651775.aspx#Delete).
66
66
67
-
## To search and filter properties
67
+
## To search and filter Named Values
68
68
69
-
The **Named values** tab includes searching and filtering capabilities to help you manage your properties. To filter the property list by property name, enter a search term in the **Search property** textbox. To display all properties, clear the **Search property** textbox and press enter.
69
+
The **Named values** tab includes searching and filtering capabilities to help you manage your named values. To filter the property list by property name, enter a search term in the **Search property** textbox. To display all named values, clear the **Search property** textbox and press enter.
70
70
71
-
To filter the property list by tag values, enter one or more tags into the **Filter by tags** textbox. To display all properties, clear the **Filter by tags** textbox and press enter.
71
+
To filter the property list by tag values, enter one or more tags into the **Filter by tags** textbox. To display all named values, clear the **Filter by tags** textbox and press enter.
72
72
73
73
## To use a property
74
74
@@ -82,9 +82,9 @@ To use a property in a policy, place the property name inside a double pair of b
82
82
83
83
In this example, `ContosoHeader` is used as the name of a header in a `set-header` policy, and `ContosoHeaderValue` is used as the value of that header. When this policy is evaluated during a request or response to the API Management gateway, `{{ContosoHeader}}` and `{{ContosoHeaderValue}}` are replaced with their respective property values.
84
84
85
-
Properties can be used as complete attribute or element values as shown in the previous example, but they can also be inserted into or combined with part of a literal text expression as shown in the following example: `<set-header name = "CustomHeader{{ContosoHeader}}" ...>`
85
+
Named values can be used as complete attribute or element values as shown in the previous example, but they can also be inserted into or combined with part of a literal text expression as shown in the following example: `<set-header name = "CustomHeader{{ContosoHeader}}" ...>`
86
86
87
-
Properties can also contain policy expressions. In the following example, the `ExpressionProperty` is used.
87
+
Named values can also contain policy expressions. In the following example, the `ExpressionProperty` is used.
@@ -94,15 +94,15 @@ Properties can also contain policy expressions. In the following example, the `E
94
94
95
95
When this policy is evaluated, `{{ExpressionProperty}}` is replaced with its value: `@(DateTime.Now.ToString())`. Since the value is a policy expression, the expression is evaluated and the policy proceeds with its execution.
96
96
97
-
You can test this out in the developer portal by calling an operation that has a policy with properties in scope. In the following example, an operation is called with the two previous example `set-header` policies with properties. Note that the response contains two custom headers that were configured using policies with properties.
97
+
You can test this out in the developer portal by calling an operation that has a policy with named values in scope. In the following example, an operation is called with the two previous example `set-header` policies with named values. Note that the response contains two custom headers that were configured using policies with named values.
98
98
99
99
![Developer portal][api-management-send-results]
100
100
101
-
If you look at the [API Inspector trace](api-management-howto-api-inspector.md) for a call that includes the two previous sample policies with properties, you can see the two `set-header` policies with the property values inserted as well as the policy expression evaluation for the property that contained the policy expression.
101
+
If you look at the [API Inspector trace](api-management-howto-api-inspector.md) for a call that includes the two previous sample policies with named values, you can see the two `set-header` policies with the property values inserted as well as the policy expression evaluation for the property that contained the policy expression.
While property values can contain policy expressions, property values can't contain other properties. If text containing a property reference is used for a property value, such as `Property value text {{MyProperty}}`, that property reference won't be replaced and will be included as part of the property value.
105
+
While property values can contain policy expressions, property values can't contain other named values. If text containing a property reference is used for a property value, such as `Property value text {{MyProperty}}`, that property reference won't be replaced and will be included as part of the property value.
0 commit comments