From 2cd534bf04f959e539a584b64d672d44c5609443 Mon Sep 17 00:00:00 2001 From: Mariana Rios Flores Date: Thu, 28 Feb 2019 17:16:38 -0800 Subject: [PATCH 1/5] add documentation --- .../Readme.md | 14 +++++++++----- .../data-plane/README.md | 9 ++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md index 1d891406dc6fb..00e0c88068aa6 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md @@ -1,12 +1,16 @@ # Enable Tests against Live Server -1. Get [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) +## Prerequisites +- Get [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) +- Have an [Azure subscription](https://docs.microsoft.com/azure/guides/developer/azure-developer-guide#understanding-accounts-subscriptions-and-billing). More information about create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio). -Run: +## Usage +Create or use an existing [Configuration Store](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store). -2. `az login` -3. `az extension add --source https://azconfigextensions.blob.core.windows.net/azconfigextension/azconfig-0.3.0-py2.py3-none-any.whl` -4. `az azconfig credential list -n azconfig` +For users that have access to the `Azure SDK Developer Playground` subscription, run: +1. `az login` +2. `az extension add --source https://azconfigextensions.blob.core.windows.net/azconfigextension/azconfig-0.3.0-py2.py3-none-any.whl` +3. `az azconfig credential list -n azconfig` **Note**: If you see the error similar to: `InvalidResourceNamespace - The resource namespace 'Microsoft.Azconfig' is invalid.` make sure to add the subscription `Azure SDK Developer Playground` as your active subscription. To do this: 1. Check your active subscription value by doing `az account show` diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md index b6789becdd77b..d882c01fe8b88 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md @@ -1,7 +1,12 @@ # Overview Azure.ApplicationModel.Configuration is a component of the .NET Azure SDK. -It provides APIs for storing and retrieving application settings. +It provides APIs for Microsoft [Azure's App Configuration Service](https://docs.microsoft.com/en-us/azure/azure-app-configuration/). + +Developers can use this SDK to interact with their [Configuration Stores](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store) in the following ways: +- Perform basic reads, writes, updates, and deletes +- Get key-value history +- Watch for changes in a specific key-value # Installing @@ -40,6 +45,8 @@ public async Task HelloWorld() 2. [How to configure retry policy](https://github.com/Azure/azure-sdk-for-net/tree/master/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.Configuration.Tests/samples/Sample6_ConfiguringRetries.cs) 3. [How to configure service requests](https://github.com/Azure/azure-sdk-for-net/tree/master/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.Configuration.Tests/samples/Sample7_ConfiguringPipeline.cs) +[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. From 6060fbc3cb7ca26b2757d4f96cfba89300a01a7b Mon Sep 17 00:00:00 2001 From: Mariana Rios Flores Date: Fri, 1 Mar 2019 11:17:12 -0800 Subject: [PATCH 2/5] pr feedback --- .../data-plane/README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md index d882c01fe8b88..ae700b1fc0b04 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md @@ -3,10 +3,13 @@ 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/). -Developers can use this SDK to interact with their [Configuration Stores](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store) in the following ways: -- Perform basic reads, writes, updates, and deletes -- Get key-value history -- Watch for changes in a specific key-value +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 or key-value 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: + +- Perform basic reads, writes, updates, and deletes of an application configuration settings. +- Get the history of configuration setting. +- Watch for changes in a specific configuration setting. # Installing From 852b508b2d0b15840173a7abb2d23758c9e69766 Mon Sep 17 00:00:00 2001 From: Mariana Rios Flores Date: Fri, 1 Mar 2019 16:11:29 -0800 Subject: [PATCH 3/5] clarify conf setting --- .../Azure.ApplicationModel.Configuration.Tests/Readme.md | 2 +- .../Azure.ApplicationModel.Configuration/data-plane/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md index 00e0c88068aa6..42b374d89ed39 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/Azure.ApplicationModel.Configuration.Tests/Readme.md @@ -2,7 +2,7 @@ ## Prerequisites - Get [Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) -- Have an [Azure subscription](https://docs.microsoft.com/azure/guides/developer/azure-developer-guide#understanding-accounts-subscriptions-and-billing). More information about create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio). +- Have an [Azure subscription](https://docs.microsoft.com/azure/guides/developer/azure-developer-guide#understanding-accounts-subscriptions-and-billing). More information about how to create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio). ## Usage Create or use an existing [Configuration Store](https://docs.microsoft.com/en-us/azure/azure-app-configuration/quickstart-dotnet-core-app#create-an-app-configuration-store). diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md index ae700b1fc0b04..8268d1c7e3e2f 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md @@ -3,7 +3,7 @@ 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/). -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 or key-value are stored. +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: From 5bf87db3400fbe77907e77b18ff57a7403914e84 Mon Sep 17 00:00:00 2001 From: Mariana Rios Flores Date: Mon, 4 Mar 2019 15:34:20 -0800 Subject: [PATCH 4/5] more info about configuration settings --- .../data-plane/README.md | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md index 8268d1c7e3e2f..731a55742dbf6 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md @@ -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 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() @@ -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. From 67184c7c244ebf1e81b3b97940634f2f1ea5e20e Mon Sep 17 00:00:00 2001 From: Mariana Rios Flores Date: Mon, 4 Mar 2019 16:58:41 -0800 Subject: [PATCH 5/5] PR feedback --- .../Azure.ApplicationModel.Configuration/data-plane/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md index 731a55742dbf6..ce948c0612ab1 100644 --- a/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md +++ b/src/SDKs/Azure.ApplicationModel.Configuration/data-plane/README.md @@ -1,7 +1,7 @@ # 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/) 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. +It provides APIs for Microsoft [Azure's Application Configuration Service](https://docs.microsoft.com/en-us/azure/azure-app-configuration/) which is a 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. @@ -44,7 +44,7 @@ Properties of a Configuration Setting: # 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. +To begin using ConfigurationClient, a connection string must be provided which specifies the configuration store endpoint and credentials to use when sending requests. This conneection string can be retrieved by the Azure Portal or by using the [Azure CLI](https://docs.microsoft.com/en-us/azure/azure-app-configuration/cli-samples). From that point, the example uses the client to set, retrieve and delete a configuration setting by its name. ```c# public async Task HelloWorld()