From e55adc1f004ef404badeed6859570872fdcf101c Mon Sep 17 00:00:00 2001 From: Richard Park Date: Tue, 30 Jun 2020 14:13:27 -0700 Subject: [PATCH] Fixing readme with feedback from Cala. Also, prettier made some minor formatting changes that looked good. --- .../app-configuration/README.md | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/sdk/appconfiguration/app-configuration/README.md b/sdk/appconfiguration/app-configuration/README.md index ccb25b92c8c9..e554b47c48e9 100644 --- a/sdk/appconfiguration/app-configuration/README.md +++ b/sdk/appconfiguration/app-configuration/README.md @@ -16,19 +16,18 @@ Use the client library for App Configuration to: ## Getting started -### Currently supported environments - -- Node.js version 8.x.x or higher - -**Prerequisites**: You must have an [Azure Subscription](https://azure.microsoft.com) and an [App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/) resource to use this package. - -### 1. Install the `@azure/app-configuration` package +### Install the package ```bash npm install @azure/app-configuration ``` -### 2. Create an App Configuration resource +### Prerequisites + +- You must have an [Azure Subscription](https://azure.microsoft.com) and an [App Configuration](https://docs.microsoft.com/en-us/azure/azure-app-configuration/) resource to use this package. +- Node.js version 8.x.x or higher + +### Create an App Configuration resource You can use the [Azure Portal](https://portal.azure.com) or the [Azure CLI](https://docs.microsoft.com/cli/azure) to create an Azure App Configuration resource. @@ -38,31 +37,32 @@ Example (Azure CLI): az appconfig create --name --resource-group --location eastus ``` -### 3. Create and authenticate an `AppConfigurationClient` +### Authenticate the client AppConfigurationClient can authenticate using a [service principal](#authenticating-with-a-service-principal) or using a [connection string](#authenticating-with-a-connection-string). -#### Authenticating with a service principal +#### Authenticating with a service principal Authentication via service principal is done by: -* Creating a credential using the `@azure/identity` package. -* Setting appropriate RBAC rules on your AppConfiguration resource. - More information on App Configuration roles can be found [here](https://github.com/Azure/AppConfiguration/blob/master/docs/REST/authorization/aad.md). + +- Creating a credential using the `@azure/identity` package. +- Setting appropriate RBAC rules on your AppConfiguration resource. + More information on App Configuration roles can be found [here](https://github.com/Azure/AppConfiguration/blob/master/docs/REST/authorization/aad.md). Using [DefaultAzureCredential](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md#defaultazurecredential) ```javascript - const azureIdentity= require("@azure/identity"); - const appConfig = require("@azure/app-configuration"); - - const credential = new azureIdentity.DefaultAzureCredential(); - const client = new appConfig.AppConfigurationClient( - endpoint, // ex: .azconfig.io> - credential - ); +const azureIdentity = require("@azure/identity"); +const appConfig = require("@azure/app-configuration"); + +const credential = new azureIdentity.DefaultAzureCredential(); +const client = new appConfig.AppConfigurationClient( + endpoint, // ex: .azconfig.io> + credential +); ``` - More information about `@azure/identity` can be found [here](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md) +More information about `@azure/identity` can be found [here](https://github.com/Azure/azure-sdk-for-js/blob/master/sdk/identity/identity/README.md) #### Authenticating with a connection string