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: sdk/appconfiguration/Azure.ApplicationModel.Configuration/README.md
+43-26Lines changed: 43 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,23 @@
1
1
# Azure App Configuration client library for .NET
2
-
Azure App Configuration is a managed service that helps developers centralize their application configurations simply and securely.
3
2
4
-
Modern programs, especially programs running in a cloud, generally have many components that are distributed in nature. Spreading configuration settings across these components can lead to hard-to-troubleshoot errors during an application deployment. Use App Configuration to securely store all the settings for your application in one place.
3
+
Azure App Configuration is a managed service that helps developers centralize their application configurations in one place, simply and securely.
5
4
6
-
Use the client library for App Configuration to create and manage application configuration settings.
In order to interact with the App Configuration service, you'll need to create an instance of the [Configuration Client][configuration_client_class] class. To make this possible, you'll need the connection string of the Configuration Store.
37
43
38
44
#### Get credentials
45
+
39
46
Use the [Azure CLI][azure_cli] snippet below to get the connection string from the Configuration Store.
40
-
```Powershell
47
+
48
+
```PowerShell
41
49
az appconfig credential list --name <config-store-name>
42
50
```
43
51
@@ -54,10 +62,12 @@ var client = new ConfigurationClient(connectionString);
54
62
55
63
## Key concepts
56
64
57
-
### Configuration Setting
58
-
A Configuration Setting is the fundamental resource within a Configuration Store. In its simplest form it is a key and a value. However, there are additional properties such as the modifiable content type and tags fields that allow the value to be interpreted or associated in different ways.
65
+
### Configuration setting
66
+
67
+
A Configuration Setting is the fundamental resource within a Configuration Store. In its simplest form, it is a key and a value. However, there are additional properties such as the modifiable content type and tags fields that allow the value to be interpreted or associated in different ways.
59
68
60
69
The Label property of a Configuration Setting provides a way to separate Configuration Settings into different dimensions. These dimensions are user defined and can take any form. Some common examples of dimensions to use for a label include regions, semantic versions, or environments. Many applications have a required set of configuration keys that have varying values as the application exists across different dimensions.
70
+
61
71
For example, MaxRequests may be 100 in "NorthAmerica", and 200 in "WestEurope". By creating a Configuration Setting named MaxRequests with a label of "NorthAmerica" and another, only with a different value, in the "WestEurope" label, an application can seamlessly retrieve Configuration Settings as it runs in these two dimensions.
62
72
63
73
Properties of a Configuration Setting:
@@ -81,15 +91,18 @@ Properties of a Configuration Setting:
81
91
```
82
92
83
93
## Examples
94
+
84
95
The following sections provide several code snippets covering some of the most common Configuration Service tasks. Note that there are sync and async methods available for both:
85
-
-[Create a Configuration Setting](#create-a-Configuration-Setting)
86
-
-[Retrieve a Configuration Setting](#retrieve-a-Configuration-Setting)
87
-
-[Update an existing Configuration Setting](#update-an-existing-Configuration-Setting)
88
-
-[Delete a Configuration Setting](#delete-a-Configuration-Setting)
96
+
97
+
-[Create a Configuration Setting](#create-a-configuration-setting)
98
+
-[Retrieve a Configuration Setting](#retrieve-a-configuration-setting)
99
+
-[Update an existing Configuration Setting](#update-an-existing-configuration-setting)
100
+
-[Delete a Configuration Setting](#delete-a-configuration-setting)
89
101
90
102
### Create a Configuration Setting
91
-
Create a Configuration Setting to be stored in the Configuration Store.
92
-
There are two ways to store a Configuration Setting:
103
+
104
+
Create a Configuration Setting to be stored in the Configuration Store. There are two ways to store a Configuration Setting:
105
+
93
106
- Add creates a setting only if the setting does not already exist in the store.
94
107
- Set creates a setting if it doesn't exist or overrides an existing setting.
95
108
@@ -101,6 +114,7 @@ client.Set(setting);
101
114
```
102
115
103
116
### Retrieve a Configuration Setting
117
+
104
118
Retrieve a previously stored Configuration Setting by calling Get.
The App Configuration client library, also includes additional functionality that can be set when creating the Configuration Client.
170
-
These samples provide example of those scenarios:
185
+
186
+
The App Configuration client library includes additional functionality that can be set when creating the Configuration Client. These samples provide example of those scenarios:
171
187
172
188
-[Hello world](samples/Sample1_HelloWorld.cs)
173
189
-[Hello world async extended](samples/Sample2_HelloWorldExtended.cs)
174
190
-[How to access diagnostic logs](samples/Sample4_Logging.cs)
175
191
-[How to configure retry policy](samples/Sample6_ConfiguringRetries.cs)
176
192
-[How to configure service requests](samples/Sample7_ConfiguringPipeline.cs)
177
193
178
-
# Contributing
194
+
### Project-to-project references
195
+
179
196
If the changes you are working on span both Azure.Core and Azure.Configuration then you can set this environment variable before launching Visual Studio. That will use Project To Project references between Azure.Configuration and Azure.Core instead of package references.
180
197
181
-
This will enable the project to project references:
182
-
```
198
+
This will enable the project-to-project references:
0 commit comments