Skip to content

Commit

Permalink
more info about configuration settings
Browse files Browse the repository at this point in the history
  • Loading branch information
maririos committed Mar 7, 2019
1 parent 852b508 commit 5bf87db
Showing 1 changed file with 33 additions and 5 deletions.
38 changes: 33 additions & 5 deletions src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,50 @@
# Overview

Azure.ApplicationModel.Configuration is a component of the .NET Azure SDK.
It provides APIs for Microsoft [Azure's App Configuration Service](https://docs.microsoft.com/en-us/azure/azure-app-configuration/).
It provides APIs for Microsoft [Azure's App Configuration Service](https://docs.microsoft.com/en-us/azure/azure-app-configuration/) which is s a managed configuration service that allows to easily store and manage all application settings in one central place that is separated from code.

Developers can use this SDK to interact with the [Configuration Store](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store) where the configuration settings are stored.
A configuration setting is a resource identified by a unique combination of key + label, where label is optional. Other properties are value, content type, etc.
Actions that can be executed:

Actions that can be executed are:

- Perform basic reads, writes, updates, and deletes of an application configuration settings.
- Get the history of configuration setting.
- Get the history of a configuration setting.
- Watch for changes in a specific configuration setting.

# Installing

A NuGet package called Azure.ApplicationModel.Configuration will be avaliable soon.

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

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.
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, a solution can be achieved that allows the application to seamlessly retrieve configuration settings as it runs in these two dimensions.

Properties of a Configuration Setting:

```c#
string Key { get; set; }

string Label { get; set; }

string Value { get; set; }

string ContentType { get; set; }

string ETag { get; }

DateTimeOffset LastModified { get; }

bool Locked { get; }

IDictionary<string, string> Tags { get; set; }
```

# Hello World
The following example demonstrates how to initialize a ConfigurationClient and perform a basic operations in the Configuration Store.

To begin using ConfigurationClient, a connection string must be provided which specifies the configuration store endpoint and credentials to use when sending requests. From that point, the example uses the client to set, retrieve and delete a configuration setting by its name.

```c#
public async Task HelloWorld()
Expand Down Expand Up @@ -50,7 +79,6 @@ public async Task HelloWorld()

[More...](https://github.com/Azure/azure-sdk-for-net/blob/master/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.Configuration.Tests/ConfigurationLiveTests.cs)


# Contributing
If the changes you are working on span both Azure.Base 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.Base instead of package references.

Expand Down

0 comments on commit 5bf87db

Please sign in to comment.