Skip to content

Commit fe95c39

Browse files
mmacyKrzysztofCwalina
authored andcommitted
[docs] AppConfig README (Azure#6192)
* [docs] AppConfig README * Intro update
1 parent d6a3682 commit fe95c39

File tree

1 file changed

+43
-26
lines changed
  • sdk/appconfiguration/Azure.ApplicationModel.Configuration

1 file changed

+43
-26
lines changed

sdk/appconfiguration/Azure.ApplicationModel.Configuration/README.md

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
# 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.
32

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.
54

6-
Use the client library for App Configuration to create and manage application configuration settings.
5+
Use the client library for App Configuration to:
76

8-
[Source code]() | [Package (NuGet)][package] | [API reference documentation]() | [Product documentation][azconfig_docs]
7+
* Create centrally stored application configuration settings
8+
* Retrieve settings
9+
* Update settings
10+
* Delete settings
11+
12+
[Package (NuGet)][package] | API reference documentation (coming soon) | [Product documentation][azconfig_docs]
913

1014
## Getting started
1115

1216
### Install the package
1317

1418
Install the Azure App Configuration client library for .NET with [NuGet][nuget]:
1519

16-
```Powershell
20+
```PowerShell
1721
Install-Package Azure.ApplicationModel.Configuration -Version 1.0.0-preview.2
1822
```
1923

@@ -22,12 +26,14 @@ Install-Package Azure.ApplicationModel.Configuration -Version 1.0.0-preview.2
2226
To create a Configuration Store, you can use the Azure Portal or [Azure CLI][azure_cli].
2327

2428
You need to install the Azure App Configuration CLI extension first by executing the following command:
25-
```Powershell
29+
30+
```PowerShell
2631
az extension add -n appconfig
2732
```
2833

2934
After that, create the Configuration Store:
30-
```Powershell
35+
36+
```PowerShell
3137
az appconfig create --name <config-store-name> --resource-group <resource-group-name> --location eastus
3238
```
3339

@@ -36,8 +42,10 @@ az appconfig create --name <config-store-name> --resource-group <resource-group-
3642
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.
3743

3844
#### Get credentials
45+
3946
Use the [Azure CLI][azure_cli] snippet below to get the connection string from the Configuration Store.
40-
```Powershell
47+
48+
```PowerShell
4149
az appconfig credential list --name <config-store-name>
4250
```
4351

@@ -54,10 +62,12 @@ var client = new ConfigurationClient(connectionString);
5462

5563
## Key concepts
5664

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.
5968

6069
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+
6171
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.
6272

6373
Properties of a Configuration Setting:
@@ -81,15 +91,18 @@ Properties of a Configuration Setting:
8191
```
8292

8393
## Examples
94+
8495
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)
89101

90102
### 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+
93106
- Add creates a setting only if the setting does not already exist in the store.
94107
- Set creates a setting if it doesn't exist or overrides an existing setting.
95108

@@ -101,6 +114,7 @@ client.Set(setting);
101114
```
102115

103116
### Retrieve a Configuration Setting
117+
104118
Retrieve a previously stored Configuration Setting by calling Get.
105119

106120
```c#
@@ -112,6 +126,7 @@ ConfigurationSetting setting = client.Get("some_key");
112126
```
113127

114128
### Update an existing Configuration Setting
129+
115130
Update an existing Configuration Setting by calling Update.
116131

117132
```c#
@@ -123,6 +138,7 @@ ConfigurationSetting setting = client.Update("some_key", "new_value");
123138
```
124139

125140
### Delete a Configuration Setting
141+
126142
Delete an existing Configuration Setting by calling Delete.
127143

128144
```c#
@@ -145,11 +161,11 @@ For example, if you try to retrieve a Configuration Setting that doesn't exist i
145161
string connectionString = <connection_string>;
146162
var client = new ConfigurationClient(connectionString);
147163
ConfigurationSetting setting = client.Get("some_key");
148-
````
164+
```
149165

150166
You will notice that additional information is logged, like the Client Request ID of the operation.
151167

152-
```c#
168+
```
153169
Message: Azure.RequestFailedException : StatusCode: 404, ReasonPhrase: 'Not Found', Version: 1.1, Content: System.Net.Http.NoWriteNoSeekStreamContent, Headers:
154170
{
155171
Connection: keep-alive
@@ -166,32 +182,33 @@ Message: Azure.RequestFailedException : StatusCode: 404, ReasonPhrase: 'Not Foun
166182
## Next Steps
167183

168184
### More sample code
169-
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:
171187

172188
- [Hello world](samples/Sample1_HelloWorld.cs)
173189
- [Hello world async extended](samples/Sample2_HelloWorldExtended.cs)
174190
- [How to access diagnostic logs](samples/Sample4_Logging.cs)
175191
- [How to configure retry policy](samples/Sample6_ConfiguringRetries.cs)
176192
- [How to configure service requests](samples/Sample7_ConfiguringPipeline.cs)
177193

178-
# Contributing
194+
### Project-to-project references
195+
179196
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.
180197

181-
This will enable the project to project references:
182-
```
198+
This will enable the project-to-project references:
199+
200+
```Batchfile
183201
set UseProjectReferenceToAzureBase=true
184202
```
185203

186204
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-net%2Fsrc%2FSDKs%2FAzure.ApplicationModel.Configuration%2Fdata-plane%2FREADME.png)
187205

188-
189206
<!-- LINKS -->
190-
[azconfig_docs]: https://docs.microsoft.com/en-us/azure/azure-app-configuration/
207+
[azconfig_docs]: https://docs.microsoft.com/azure/azure-app-configuration/
191208
[azconfig_rest]: https://github.com/Azure/AppConfiguration#rest-api-reference
192209
[azure_cli]: https://docs.microsoft.com/cli/azure
193210
[azure_sub]: https://azure.microsoft.com/free/
194211
[configuration_client_class]: src/ConfigurationClient.cs
195-
[configuration_store]: https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store
212+
[configuration_store]: https://docs.microsoft.com/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store
196213
[nuget]: https://www.nuget.org/
197214
[package]: https://www.nuget.org/packages/Azure.ApplicationModel.Configuration/

0 commit comments

Comments
 (0)