diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md index 032fe4c6ce10e..2adf23355426e 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md @@ -254,7 +254,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con [source_root]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/src [source_samples]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/samples [reference_docs]: https://azure.github.io/azure-sdk-for-net/appconfiguration.html -[azconfig_rest]: https://github.com/Azure/AppConfiguration#rest-api-reference +[azconfig_rest]: https://docs.microsoft.com/azure/azure-app-configuration/rest-api [azure_cli]: https://docs.microsoft.com/cli/azure [azure_sub]: https://azure.microsoft.com/free/ [configuration_client_class]: https://github.com/Azure/azure-sdk-for-net/blob/master/sdk/appconfiguration/Azure.Data.AppConfiguration/src/ConfigurationClient.cs diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample2_HelloWorldExtended.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample2_HelloWorldExtended.md index 066d7b59e4b2b..0827d7b7a2897 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample2_HelloWorldExtended.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample2_HelloWorldExtended.md @@ -51,7 +51,7 @@ await client.SetConfigurationSettingAsync(instancesToUpdate); ## Search by label filter -To gather all the information available for the "production" environment, call `GetConfigurationSettingsAsync` with a setting selector that filters for settings with the "production" label. This will retrieve all the Configuration Settings in the store that satisfy that condition. See App Configuration [REST API](https://github.com/Azure/AppConfiguration/blob/master/docs/REST/kv.md#filtering) for more information about filtering. +To gather all the information available for the "production" environment, call `GetConfigurationSettingsAsync` with a setting selector that filters for settings with the "production" label. This will retrieve all the Configuration Settings in the store that satisfy that condition. See App Configuration [REST API](https://docs.microsoft.com/azure/azure-app-configuration/rest-api-key-value#filtering) for more information about filtering. ```C# Snippet:AzConfigSample2_GetConfigurationSettingsAsync var selector = new SettingSelector { LabelFilter = "production" }; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample4_ReadRevisionHistory.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample4_ReadRevisionHistory.md index 582ef602e30e2..545e62f8c93eb 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample4_ReadRevisionHistory.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample4_ReadRevisionHistory.md @@ -35,7 +35,7 @@ await client.SetConfigurationSettingAsync(setting); ## Retrieve revisions of the setting -To asynchronously get all unexpired revisions, call `GetRevisionsAsync` with a setting selector that has `KeyFilter` equal to `settings.Key`. This will retrieve all revisions of this setting in the store. See App Configuration [REST API](https://github.com/Azure/AppConfiguration/blob/master/docs/REST/revisions.md#filtering) for more information about filtering. +To asynchronously get all unexpired revisions, call `GetRevisionsAsync` with a setting selector that has `KeyFilter` equal to `settings.Key`. This will retrieve all revisions of this setting in the store. See App Configuration [REST API](https://docs.microsoft.com/azure/azure-app-configuration/rest-api-revisions#filtering) for more information about filtering. ```C# Snippet:AzConfigSample4_GetRevisions var selector = new SettingSelector { KeyFilter = setting.Key }; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample5_GetSettingIfChanged.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample5_GetSettingIfChanged.md index 07d4633eada5d..c5f55d20737b2 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample5_GetSettingIfChanged.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample5_GetSettingIfChanged.md @@ -4,7 +4,7 @@ This sample illustrates how to get a setting from the configuration store only i ## Define method `GetConfigurationSettingIfChanged` -When `GetConfigurationSetting` is called with `onlyIfChanged: true`, it adds an `If-None-Match` header to the HTTP request. The response will have an HTTP status code equals to either 200 if the setting value was modified or 304 otherwise. See App Configuration [REST API](https://github.com/Azure/AppConfiguration/blob/master/docs/REST/kv.md#get-conditionally) and [Azure API design](https://azure.github.io/azure-sdk/general_design.html#conditional-requests) for more information about conditional requests. +When `GetConfigurationSetting` is called with `onlyIfChanged: true`, it adds an `If-None-Match` header to the HTTP request. The response will have an HTTP status code equals to either 200 if the setting value was modified or 304 otherwise. See App Configuration [REST API](https://docs.microsoft.com/azure/azure-app-configuration/rest-api-key-value#get-conditionally) and [Azure API design](https://azure.github.io/azure-sdk/general_design.html#conditional-requests) for more information about conditional requests. This logic can be encapsulated into a helper method that will return either a setting from the response if it was changed in the configuration store or the current local setting otherwise. The method must check the response's HTTP status code before accessing the response value. If `response.Value` is accessed when no value was returned, an exception will be thrown. diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample6_UpdateSettingIfUnchanged.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample6_UpdateSettingIfUnchanged.md index d494c7e8efce3..a84d452704a57 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample6_UpdateSettingIfUnchanged.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample6_UpdateSettingIfUnchanged.md @@ -20,7 +20,7 @@ private int ReleaseVMs(int vmsToRelease) ## Define method `UpdateAvailableVms` -When `SetConfigurationSetting` is called with `onlyIfUnchanged: true`, it adds optional `If-Match` header to the HTTP request. Response will have HTTP status code equals to either 200 if client setting ETag matched the service one and setting has been successfully updated or 412 otherwise. See App Configuration [REST API](https://github.com/Azure/AppConfiguration/blob/master/docs/REST/kv.md#set-key-conditionally) and [Azure API design](https://azure.github.io/azure-sdk/general_design.html#conditional-requests) for more information about conditional requests. +When `SetConfigurationSetting` is called with `onlyIfUnchanged: true`, it adds optional `If-Match` header to the HTTP request. Response will have HTTP status code equals to either 200 if client setting ETag matched the service one and setting has been successfully updated or 412 otherwise. See App Configuration [REST API](https://docs.microsoft.com/azure/azure-app-configuration/rest-api-key-value#get-conditionally) and [Azure API design](https://azure.github.io/azure-sdk/general_design.html#conditional-requests) for more information about conditional requests. To increase the number of available VMs, we need to get current number of VMs, add the number of released ones and send this number back to the service. If the `available_vms` setting has been modified since the last time our client retrieved it from the service, we need to catch `RequestFailedException` exception and re-apply our update logic before attempting to set it again on the service. This logic can be encapsulates into a helper method that will return the number of available VMs after the update.