From c02453356f2dcd754b5fa504217d7916d2d417e8 Mon Sep 17 00:00:00 2001 From: Shivangi Reja Date: Thu, 5 Oct 2023 13:47:01 -0700 Subject: [PATCH 1/5] [App Config] Update snapshot API and changelog for "11.5.0-beta.5" release --- .../Azure.Data.AppConfiguration/CHANGELOG.md | 17 ++--- .../Azure.Data.AppConfiguration/README.md | 2 +- .../Azure.Data.AppConfiguration/assets.json | 2 +- .../samples/Sample11_SettingsSnapshot.md | 8 +-- ...figurationSettingsFilter.Serialization.cs} | 6 +- ...lter.cs => ConfigurationSettingsFilter.cs} | 6 +- .../ConfigurationSnapshot.Serialization.cs | 6 +- .../src/Models/ConfigurationSnapshot.cs | 6 +- .../tests/ConfigurationLiveTests.cs | 62 +++++++++++++++---- .../ConfigurationSettingsSnapshotTest.cs | 4 +- .../samples/Sample11_SettingsSnapshot.cs | 18 +++--- 11 files changed, 90 insertions(+), 47 deletions(-) rename sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/{SnapshotSettingFilter.Serialization.cs => ConfigurationSettingsFilter.Serialization.cs} (82%) rename sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/{SnapshotSettingFilter.cs => ConfigurationSettingsFilter.cs} (86%) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md index c05b40febb881..7c370c76c36bc 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md @@ -1,31 +1,34 @@ # Release History -## 1.3.0-beta.3 (Unreleased) +## 11.5.0-beta.5 (2023-10-09) ### Features Added -### Breaking Changes +- Added a new type, `SnapshotSelector`, to encapsulate parameters like `name`, `fields`, and `status` within the `GetSnapshots` method. ### Bugs Fixed - Fixed `GetConfigurationSettings(SettingSelector)` not setting `ContentType` and `LastModified` properties [(#38524)](https://github.com/Azure/azure-sdk-for-net/issues/38524). - - `FeatureFlagConfigurationSetting` will now allow custom attributes under the `conditions` element in the setting value. Previously, only `client_filters` was recognized and other data would be discarded. ### Other Changes +- `CompositionType` has been renamed to `SnapshotComposition`. +- `ConfigurationSettingsSnapshot` has been renamed to `ConfigurationSnapshot`. +- `SnapshotStatus` has been renamed to `ConfigurationSnapshotStatus`. +- `SnapshotSettingFilter` has been renamed to `ConfigurationSettingsFilter`. +- In `ConfigurationSnapshot`, `Size` has been renamed to `SizeInBytes`. +- The `name` parameter in the following methods has been changed to `snapshotName`: `CreateSnapshot`, `GetSnapshot`, `RecoverSnapshot`, and `ArchiveSnapshot`. This change aligns with the naming convention used in the `GetConfigurationSettingsForSnapshot` method. +- For the `ArchiveSnapshot` and `RecoverSnapshot` methods, parameters have been updated from `ConfigurationSnapshot snapshot` and `bool onlyIfUnchanged` to `string name` and `MatchConditions matchConditions`. + ## 1.2.1 (2023-09-13) ### Bugs Fixed - `FeatureFlagConfigurationSetting` and `SecretReferenceConfigurationSetting` will now retain custom attributes in the setting value. Previously, only attributes that were defined in the associated JSON schema were allowed and unknown attributes were discarded. - - Added the ability to create `FeatureFlagConfigurationSetting` and `SecretReferenceConfigurationSetting` instances with an ETag, matching `ConfigurationSetting`. This allows all setting types to use the [GetConfigurationSettingAsync](https://learn.microsoft.com/dotnet/api/azure.data.appconfiguration.configurationclient.getconfigurationsettingasync?view=azure-dotnet#azure-data-appconfiguration-configurationclient-getconfigurationsettingasync(azure-data-appconfiguration-configurationsetting-system-boolean-system-threading-cancellationtoken)) overload that accepts `onlyIfUnchanged.` Previously, this was not possible for specialized settings types. - - Added the ability to create `FeatureFlagConfigurationSetting` and `SecretReferenceConfigurationSetting` instances for testing purposes using the `ConfigurationModelFactory`. It was previously not possible to populate service-owned fields when testing. - - Marked a constructor overload of `ConfigurationSetting` that was intended for testing purposes as non-visible, as the `ConfigurationModelFactory` should instead be used. - - Fixed a bug where a disposed content stream was used to attempt deserialization in some scenarios, such as using a custom `HttpMessageHandler` that returns `StringContent`. ## 1.3.0-beta.2 (2023-07-11) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md index c1438e5fc87ef..1807cc183ac83 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md @@ -163,7 +163,7 @@ client.DeleteConfigurationSetting("some_key"); To create a snapshot, you need to instantiate the `ConfigurationSnapshot` class and specify filters to determine which configuration settings should be included. The creation process is a Long-Running Operation (LRO) and can be achieved by calling the `CreateSnapshot` method. ```C# Snippet:AzConfigSample11_CreateSnapshot_AutomaticPolling -var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; +var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json b/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json index 1eac8ff51bcd9..3fb6d171d759d 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/assets.json @@ -2,5 +2,5 @@ "AssetsRepo": "Azure/azure-sdk-assets", "AssetsRepoPrefixPath": "net", "TagPrefix": "net/appconfiguration/Azure.Data.AppConfiguration", - "Tag": "net/appconfiguration/Azure.Data.AppConfiguration_bebb69bca2" + "Tag": "net/appconfiguration/Azure.Data.AppConfiguration_48bd1bc562" } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md index 710af03dac9ef..90d6a4ec08f7b 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md @@ -13,7 +13,7 @@ To create a snapshot, you need to create an instance of `ConfigurationSnapshot` ### Automatic Polling ```C# Snippet:AzConfigSample11_CreateSnapshot_AutomaticPolling -var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; +var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; @@ -25,7 +25,7 @@ Console.WriteLine($"Created configuration snapshot: {createdSnapshot.Name}, Stat ### Automatic Polling with `WaitForCompletion` ```C# Snippet:AzConfigSample11_CreateSnapshot_AutomaticPollingLater -var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; +var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; @@ -39,7 +39,7 @@ Console.WriteLine($"Created configuration snapshot: {createdSnapshot.Name}, stat ### Manual Polling ```C# Snippet:AzConfigSample11_CreateSnapshot_ManualPolling -var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; +var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; @@ -111,7 +111,7 @@ client.AddConfigurationSetting(firstSetting); var secondSetting = new ConfigurationSetting("second_key", "second_value"); client.AddConfigurationSetting(secondSetting); -var snapshotFilter = new List { new SnapshotSettingFilter(firstSetting.Key), new SnapshotSettingFilter(secondSetting.Key) }; +var snapshotFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key), new ConfigurationSettingsFilter(secondSetting.Key) }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/SnapshotSettingFilter.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsFilter.Serialization.cs similarity index 82% rename from sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/SnapshotSettingFilter.Serialization.cs rename to sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsFilter.Serialization.cs index 20b22ca091430..9a6c9971bc834 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/SnapshotSettingFilter.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsFilter.Serialization.cs @@ -6,7 +6,7 @@ namespace Azure.Data.AppConfiguration { - public partial class SnapshotSettingFilter : IUtf8JsonSerializable + public partial class ConfigurationSettingsFilter : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { @@ -21,7 +21,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteEndObject(); } - internal static SnapshotSettingFilter DeserializeKeyValueFilter(JsonElement element) + internal static ConfigurationSettingsFilter DeserializeKeyValueFilter(JsonElement element) { string key = default; Optional label = default; @@ -38,7 +38,7 @@ internal static SnapshotSettingFilter DeserializeKeyValueFilter(JsonElement elem continue; } } - return new SnapshotSettingFilter(key, label.Value); + return new ConfigurationSettingsFilter(key, label.Value); } } } diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/SnapshotSettingFilter.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsFilter.cs similarity index 86% rename from sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/SnapshotSettingFilter.cs rename to sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsFilter.cs index 4163d54e1f528..901b3da05907d 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/SnapshotSettingFilter.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSettingsFilter.cs @@ -7,12 +7,12 @@ namespace Azure.Data.AppConfiguration { /// Enables filtering of key-values. - public partial class SnapshotSettingFilter + public partial class ConfigurationSettingsFilter { /// Initializes a new instance of KeyValueFilter. /// Filters key-values by their key field. /// is null. - public SnapshotSettingFilter(string key) + public ConfigurationSettingsFilter(string key) { Argument.AssertNotNull(key, nameof(key)); @@ -22,7 +22,7 @@ public SnapshotSettingFilter(string key) /// Initializes a new instance of KeyValueFilter. /// Filters key-values by their key field. /// Filters key-values by their label field. - internal SnapshotSettingFilter(string key, string label) + internal ConfigurationSettingsFilter(string key, string label) { Key = key; Label = label; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.Serialization.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.Serialization.cs index d39a533b25c71..2a70a13c78a52 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.Serialization.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.Serialization.cs @@ -48,7 +48,7 @@ internal static ConfigurationSnapshot DeserializeSnapshot(JsonElement element) { Optional name = default; Optional status = default; - IList filters = default; + IList filters = default; Optional snapshotComposition = default; Optional created = default; Optional expires = default; @@ -76,10 +76,10 @@ internal static ConfigurationSnapshot DeserializeSnapshot(JsonElement element) } if (property.NameEquals("filters")) { - List array = new List(); + List array = new List(); foreach (var item in property.Value.EnumerateArray()) { - array.Add(SnapshotSettingFilter.DeserializeKeyValueFilter(item)); + array.Add(ConfigurationSettingsFilter.DeserializeKeyValueFilter(item)); } filters = array; continue; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.cs index 43fbffc55efe6..4ed893d7068e4 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/src/Models/ConfigurationSnapshot.cs @@ -14,7 +14,7 @@ public partial class ConfigurationSnapshot /// Initializes a new instance of Snapshot. /// A list of filters used to filter the key-values included in the snapshot. /// is null. - public ConfigurationSnapshot(IEnumerable filters) + public ConfigurationSnapshot(IEnumerable filters) { Argument.AssertNotNull(filters, nameof(filters)); @@ -34,7 +34,7 @@ public ConfigurationSnapshot(IEnumerable filters) /// The amount of key-values in the snapshot. /// The tags of the snapshot. /// A value representing the current state of the snapshot. - internal ConfigurationSnapshot(string name, ConfigurationSnapshotStatus? status, IList filters, SnapshotComposition? snapshotComposition, DateTimeOffset? createdOn, DateTimeOffset? expiresOn, long? retentionPeriod, long? sizeInBytes, long? itemCount, IDictionary tags, ETag eTag) + internal ConfigurationSnapshot(string name, ConfigurationSnapshotStatus? status, IList filters, SnapshotComposition? snapshotComposition, DateTimeOffset? createdOn, DateTimeOffset? expiresOn, long? retentionPeriod, long? sizeInBytes, long? itemCount, IDictionary tags, ETag eTag) { Name = name; Status = status; @@ -54,7 +54,7 @@ internal ConfigurationSnapshot(string name, ConfigurationSnapshotStatus? status, /// The current status of the snapshot. public ConfigurationSnapshotStatus? Status { get; } /// A list of filters used to filter the key-values included in the snapshot. - public IList Filters { get; } + public IList Filters { get; } /// The composition type describes how the key-values within the snapshot are composed. The 'key' composition type ensures there are no two key-values containing the same key. The 'key_label' composition type ensures there are no two key-values containing the same key and label. public SnapshotComposition? SnapshotComposition { get; set; } /// The time that the snapshot was created. diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs index 6070aca7fc430..4a136be555d00 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs @@ -1701,7 +1701,7 @@ public async Task CreateSnapshotUsingAutomaticPolling() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(testSetting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = GenerateSnapshotName(); @@ -1728,7 +1728,7 @@ public async Task CreateSnapshotUsingWaitForCompletion() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(testSetting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = GenerateSnapshotName(); @@ -1756,7 +1756,7 @@ public async Task CreateSnapshotUsingManualPolling() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(testSetting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = GenerateSnapshotName(); @@ -1782,6 +1782,46 @@ public async Task CreateSnapshotUsingManualPolling() } } + [RecordedTest] + public async Task CreateSnapshotUsingWildCardKeyFilter() + { + var service = GetClient(); + var key1 = GenerateKeyId("Key-1"); + var key2 = GenerateKeyId("Key-2"); + var key3 = GenerateKeyId("Key1"); + var key4 = GenerateKeyId("Key2"); + var firstSetting = new ConfigurationSetting(key1, "value1"); + var secondSetting = new ConfigurationSetting(key2, "value2"); + var thirdSetting = new ConfigurationSetting(key3, "value3"); + var fourthSetting = new ConfigurationSetting(key4, "value4"); + + try + { + await service.AddConfigurationSettingAsync(firstSetting); + await service.AddConfigurationSettingAsync(secondSetting); + await service.AddConfigurationSettingAsync(thirdSetting); + await service.AddConfigurationSettingAsync(fourthSetting); + + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter("Key-*") }); + var snapshotName = GenerateSnapshotName(); + var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(settingsFilter)); + ValidateCompletedOperation(operation); + + ConfigurationSetting[] settings = (await service.GetConfigurationSettingsForSnapshotAsync(snapshotName, CancellationToken.None).ToEnumerableAsync()).ToArray(); + Assert.GreaterOrEqual(2, settings.Count()); + + Assert.AreEqual(key1, settings[0].Key); + Assert.AreEqual(key2, settings[1].Key); + } + finally + { + AssertStatus200(await service.DeleteConfigurationSettingAsync(firstSetting.Key, firstSetting.Label)); + AssertStatus200(await service.DeleteConfigurationSettingAsync(secondSetting.Key, secondSetting.Label)); + AssertStatus200(await service.DeleteConfigurationSettingAsync(thirdSetting.Key, thirdSetting.Label)); + AssertStatus200(await service.DeleteConfigurationSettingAsync(fourthSetting.Key, fourthSetting.Label)); + } + } + [RecordedTest] public async Task ArchiveSnapshotStatus() { @@ -1792,7 +1832,7 @@ public async Task ArchiveSnapshotStatus() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(testSetting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = GenerateSnapshotName(); @@ -1823,7 +1863,7 @@ public async Task RecoverSnapshotStatus() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(testSetting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = GenerateSnapshotName(); @@ -1860,12 +1900,12 @@ public async Task GetSnapshots() await service.AddConfigurationSettingAsync(firstSetting); await service.AddConfigurationSettingAsync(secondSetting); - var firstSnapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(firstSetting.Key) }); + var firstSnapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(firstSetting.Key) }); var firstSnapshotName = GenerateSnapshotName("first_snapshot"); var firstOperation = await service.CreateSnapshotAsync(WaitUntil.Completed, firstSnapshotName, new ConfigurationSnapshot(firstSnapshotFilter)); ValidateCompletedOperation(firstOperation); - var secondSnapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(secondSetting.Key) }); + var secondSnapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(secondSetting.Key) }); var secondSnapshotName = GenerateSnapshotName("second_snapshot"); var secondOperation = await service.CreateSnapshotAsync(WaitUntil.Completed, secondSnapshotName, new ConfigurationSnapshot(secondSnapshotFilter)); ValidateCompletedOperation(secondOperation); @@ -1894,12 +1934,12 @@ public async Task GetSnapshotsUsingNameFilter() await service.AddConfigurationSettingAsync(firstSetting); await service.AddConfigurationSettingAsync(secondSetting); - var firstSnapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(firstSetting.Key) }); + var firstSnapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(firstSetting.Key) }); var firstSnapshotName = GenerateSnapshotName("first_snapshot"); var firstOperation = await service.CreateSnapshotAsync(WaitUntil.Completed, firstSnapshotName, new ConfigurationSnapshot(firstSnapshotFilter)); ValidateCompletedOperation(firstOperation); - var secondSnapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(secondSetting.Key) }); + var secondSnapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(secondSetting.Key) }); var secondSnapshotName = GenerateSnapshotName("second_snapshot"); var secondOperation = await service.CreateSnapshotAsync(WaitUntil.Completed, secondSnapshotName, new ConfigurationSnapshot(secondSnapshotFilter)); ValidateCompletedOperation(secondOperation); @@ -1931,7 +1971,7 @@ public async Task GetConfigurationSettingsForSnapshot() { await service.AddConfigurationSettingAsync(setting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(setting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(setting.Key) }); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(snapshotFilter)); ValidateCompletedOperation(operation); @@ -1956,7 +1996,7 @@ public async Task UnchangedSnapshotAfterSettingsUpdate() { ConfigurationSetting createdSetting = await service.AddConfigurationSettingAsync(setting); - var snapshotFilter = new List(new SnapshotSettingFilter[] { new SnapshotSettingFilter(createdSetting.Key) }); + var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(createdSetting.Key) }); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(snapshotFilter)); ValidateCompletedOperation(operation); diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingsSnapshotTest.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingsSnapshotTest.cs index 8cea67110c074..48bfda9f5f540 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingsSnapshotTest.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationSettingsSnapshotTest.cs @@ -15,7 +15,7 @@ public void SetRetentionPeriodUsingConstructor() var settingSnapshot = new ConfigurationSnapshot( "name", ConfigurationSnapshotStatus.Ready, - new List(), + new List(), new SnapshotComposition(), DateTime.UtcNow, DateTime.UtcNow, @@ -32,7 +32,7 @@ public void SetRetentionPeriodUsingConstructor() [Test] public void SetRetentionPeriodUsingSetter() { - List filters = new() { new SnapshotSettingFilter("key", "val") }; + List filters = new() { new ConfigurationSettingsFilter("key", "val") }; var settingSnapshot = new ConfigurationSnapshot(filters); settingSnapshot.RetentionPeriod = TimeSpan.FromSeconds(10675199); diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs index 5c901208294fd..2792a26391d6a 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs @@ -23,7 +23,7 @@ public void CreateSnapshotAutomaticPolling() client.AddConfigurationSetting(setting); #region Snippet:AzConfigSample11_CreateSnapshot_AutomaticPolling - var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; + var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; @@ -59,7 +59,7 @@ public void CreateSnapshotAutomaticPollingLater() client.AddConfigurationSetting(setting); #region Snippet:AzConfigSample11_CreateSnapshot_AutomaticPollingLater - var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; + var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; @@ -97,7 +97,7 @@ public async Task CreateSnapshotManualPolling() client.AddConfigurationSetting(setting); #region Snippet:AzConfigSample11_CreateSnapshot_ManualPolling - var snapshotFilter = new List { new SnapshotSettingFilter("some_key") }; + var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; @@ -140,7 +140,7 @@ public void GetSnapshot() { client.AddConfigurationSetting(setting); - var snapshotFilter = new List { new SnapshotSettingFilter(setting.Key) }; + var snapshotFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var configSnapshotName = GenerateSnapshotName(); @@ -177,7 +177,7 @@ public void ArchiveSnapshot() { client.AddConfigurationSetting(setting); - var snapshotFilter = new List { new SnapshotSettingFilter(setting.Key) }; + var snapshotFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var configSnapshotName = GenerateSnapshotName(); @@ -219,7 +219,7 @@ public void RecoverSnapshot() { client.AddConfigurationSetting(setting); - var snapshotFilter = new List { new SnapshotSettingFilter(setting.Key) }; + var snapshotFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var configSnapshotName = GenerateSnapshotName(); @@ -269,7 +269,7 @@ public void GetSnapshots() client.AddConfigurationSetting(firstSetting); client.AddConfigurationSetting(secondSetting); - var firstSnapshotFilter = new List { new SnapshotSettingFilter(firstSetting.Key) }; + var firstSnapshotFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key) }; var firstSnapshotName = GenerateSnapshotName("first_snapshot"); var firstOperation = client.CreateSnapshot(WaitUntil.Completed, firstSnapshotName, new ConfigurationSnapshot(firstSnapshotFilter)); var createdFirstSnapshot = firstOperation.Value; @@ -278,7 +278,7 @@ public void GetSnapshots() Assert.NotNull(createdFirstSnapshot); Assert.AreEqual(firstSnapshotName, createdFirstSnapshot.Name); - var secondSnapshotFilter = new List { new SnapshotSettingFilter(secondSetting.Key) }; + var secondSnapshotFilter = new List { new ConfigurationSettingsFilter(secondSetting.Key) }; var secondSnapshotName = GenerateSnapshotName("second_snapshot"); var secondOperation = client.CreateSnapshot(WaitUntil.Completed, secondSnapshotName, new ConfigurationSnapshot(secondSnapshotFilter)); var createdSecondSnapshot = secondOperation.Value; @@ -321,7 +321,7 @@ public void GetConfigurationSettingsForSnapshot() var secondSetting = new ConfigurationSetting("second_key", "second_value"); client.AddConfigurationSetting(secondSetting); - var snapshotFilter = new List { new SnapshotSettingFilter(firstSetting.Key), new SnapshotSettingFilter(secondSetting.Key) }; + var snapshotFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key), new ConfigurationSettingsFilter(secondSetting.Key) }; var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); var snapshotName = "some_snapshot"; From 5b0495cc80b80141d11b3fd38da5c7e5b533dc4b Mon Sep 17 00:00:00 2001 From: Shivangi Reja Date: Thu, 5 Oct 2023 13:48:13 -0700 Subject: [PATCH 2/5] Update public API --- ...Azure.Data.AppConfiguration.netstandard2.0.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/api/Azure.Data.AppConfiguration.netstandard2.0.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/api/Azure.Data.AppConfiguration.netstandard2.0.cs index 7042fb8bd3c30..cf4bf4f3cf9f2 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/api/Azure.Data.AppConfiguration.netstandard2.0.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/api/Azure.Data.AppConfiguration.netstandard2.0.cs @@ -98,13 +98,19 @@ public ConfigurationSetting(string key, string value, string label, Azure.ETag e [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] public override string ToString() { throw null; } } + public partial class ConfigurationSettingsFilter + { + public ConfigurationSettingsFilter(string key) { } + public string Key { get { throw null; } set { } } + public string Label { get { throw null; } set { } } + } public partial class ConfigurationSnapshot { - public ConfigurationSnapshot(System.Collections.Generic.IEnumerable filters) { } + public ConfigurationSnapshot(System.Collections.Generic.IEnumerable filters) { } public System.DateTimeOffset? CreatedOn { get { throw null; } } public Azure.ETag ETag { get { throw null; } } public System.DateTimeOffset? ExpiresOn { get { throw null; } } - public System.Collections.Generic.IList Filters { get { throw null; } } + public System.Collections.Generic.IList Filters { get { throw null; } } public long? ItemCount { get { throw null; } } public string Name { get { throw null; } } public System.TimeSpan? RetentionPeriod { get { throw null; } set { } } @@ -250,12 +256,6 @@ public SnapshotSelector() { } public string NameFilter { get { throw null; } set { } } public System.Collections.Generic.IList Status { get { throw null; } } } - public partial class SnapshotSettingFilter - { - public SnapshotSettingFilter(string key) { } - public string Key { get { throw null; } set { } } - public string Label { get { throw null; } set { } } - } } namespace Microsoft.Extensions.Azure { From 1b3e30cb76bb9a7e66713cead537f93581b51514 Mon Sep 17 00:00:00 2001 From: Shivangi Reja Date: Thu, 5 Oct 2023 13:53:53 -0700 Subject: [PATCH 3/5] Rename snapshotName to settingsFilter --- .../Azure.Data.AppConfiguration/README.md | 4 +-- .../samples/Sample11_SettingsSnapshot.md | 16 +++++------ .../tests/ConfigurationLiveTests.cs | 28 +++++++++---------- .../samples/Sample11_SettingsSnapshot.cs | 28 +++++++++---------- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md index 1807cc183ac83..ca65364968978 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/README.md @@ -163,8 +163,8 @@ client.DeleteConfigurationSetting("some_key"); To create a snapshot, you need to instantiate the `ConfigurationSnapshot` class and specify filters to determine which configuration settings should be included. The creation process is a Long-Running Operation (LRO) and can be achieved by calling the `CreateSnapshot` method. ```C# Snippet:AzConfigSample11_CreateSnapshot_AutomaticPolling -var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; -var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); +var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; +var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; var operation = client.CreateSnapshot(WaitUntil.Completed, snapshotName, settingsSnapshot); diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md index 90d6a4ec08f7b..18cb2962c2c5b 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/samples/Sample11_SettingsSnapshot.md @@ -13,8 +13,8 @@ To create a snapshot, you need to create an instance of `ConfigurationSnapshot` ### Automatic Polling ```C# Snippet:AzConfigSample11_CreateSnapshot_AutomaticPolling -var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; -var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); +var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; +var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; var operation = client.CreateSnapshot(WaitUntil.Completed, snapshotName, settingsSnapshot); @@ -25,8 +25,8 @@ Console.WriteLine($"Created configuration snapshot: {createdSnapshot.Name}, Stat ### Automatic Polling with `WaitForCompletion` ```C# Snippet:AzConfigSample11_CreateSnapshot_AutomaticPollingLater -var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; -var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); +var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; +var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; var operation = client.CreateSnapshot(WaitUntil.Started, snapshotName, settingsSnapshot); @@ -39,8 +39,8 @@ Console.WriteLine($"Created configuration snapshot: {createdSnapshot.Name}, stat ### Manual Polling ```C# Snippet:AzConfigSample11_CreateSnapshot_ManualPolling -var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; -var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); +var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; +var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; var operation = client.CreateSnapshot(WaitUntil.Started, snapshotName, settingsSnapshot); @@ -111,8 +111,8 @@ client.AddConfigurationSetting(firstSetting); var secondSetting = new ConfigurationSetting("second_key", "second_value"); client.AddConfigurationSetting(secondSetting); -var snapshotFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key), new ConfigurationSettingsFilter(secondSetting.Key) }; -var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); +var settingsFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key), new ConfigurationSettingsFilter(secondSetting.Key) }; +var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; var operation = client.CreateSnapshot(WaitUntil.Completed, snapshotName, settingsSnapshot); diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs index 4a136be555d00..1116f6efd0878 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/ConfigurationLiveTests.cs @@ -1701,8 +1701,8 @@ public async Task CreateSnapshotUsingAutomaticPolling() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, settingsSnapshot); @@ -1728,8 +1728,8 @@ public async Task CreateSnapshotUsingWaitForCompletion() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Started, snapshotName, settingsSnapshot); @@ -1756,8 +1756,8 @@ public async Task CreateSnapshotUsingManualPolling() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Started, snapshotName, settingsSnapshot); @@ -1832,8 +1832,8 @@ public async Task ArchiveSnapshotStatus() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, settingsSnapshot); @@ -1863,8 +1863,8 @@ public async Task RecoverSnapshotStatus() { await service.AddConfigurationSettingAsync(testSetting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(testSetting.Key) }); + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = GenerateSnapshotName(); var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, settingsSnapshot); @@ -1971,9 +1971,9 @@ public async Task GetConfigurationSettingsForSnapshot() { await service.AddConfigurationSettingAsync(setting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(setting.Key) }); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(setting.Key) }); var snapshotName = GenerateSnapshotName(); - var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(snapshotFilter)); + var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(settingsFilter)); ValidateCompletedOperation(operation); var settingsForSnapshot = service.GetConfigurationSettingsForSnapshotAsync(snapshotName); @@ -1996,9 +1996,9 @@ public async Task UnchangedSnapshotAfterSettingsUpdate() { ConfigurationSetting createdSetting = await service.AddConfigurationSettingAsync(setting); - var snapshotFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(createdSetting.Key) }); + var settingsFilter = new List(new ConfigurationSettingsFilter[] { new ConfigurationSettingsFilter(createdSetting.Key) }); var snapshotName = GenerateSnapshotName(); - var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(snapshotFilter)); + var operation = await service.CreateSnapshotAsync(WaitUntil.Completed, snapshotName, new ConfigurationSnapshot(settingsFilter)); ValidateCompletedOperation(operation); setting.Value = "Updated_Value"; diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs index 2792a26391d6a..feafcaed19b7b 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/tests/samples/Sample11_SettingsSnapshot.cs @@ -23,8 +23,8 @@ public void CreateSnapshotAutomaticPolling() client.AddConfigurationSetting(setting); #region Snippet:AzConfigSample11_CreateSnapshot_AutomaticPolling - var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; #if !SNIPPET @@ -59,8 +59,8 @@ public void CreateSnapshotAutomaticPollingLater() client.AddConfigurationSetting(setting); #region Snippet:AzConfigSample11_CreateSnapshot_AutomaticPollingLater - var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; #if !SNIPPET @@ -97,8 +97,8 @@ public async Task CreateSnapshotManualPolling() client.AddConfigurationSetting(setting); #region Snippet:AzConfigSample11_CreateSnapshot_ManualPolling - var snapshotFilter = new List { new ConfigurationSettingsFilter("some_key") }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter("some_key") }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; #if !SNIPPET @@ -140,8 +140,8 @@ public void GetSnapshot() { client.AddConfigurationSetting(setting); - var snapshotFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var configSnapshotName = GenerateSnapshotName(); var operation = client.CreateSnapshot(WaitUntil.Completed, configSnapshotName, settingsSnapshot); @@ -177,8 +177,8 @@ public void ArchiveSnapshot() { client.AddConfigurationSetting(setting); - var snapshotFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var configSnapshotName = GenerateSnapshotName(); @@ -219,8 +219,8 @@ public void RecoverSnapshot() { client.AddConfigurationSetting(setting); - var snapshotFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter(setting.Key) }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var configSnapshotName = GenerateSnapshotName(); @@ -321,8 +321,8 @@ public void GetConfigurationSettingsForSnapshot() var secondSetting = new ConfigurationSetting("second_key", "second_value"); client.AddConfigurationSetting(secondSetting); - var snapshotFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key), new ConfigurationSettingsFilter(secondSetting.Key) }; - var settingsSnapshot = new ConfigurationSnapshot(snapshotFilter); + var settingsFilter = new List { new ConfigurationSettingsFilter(firstSetting.Key), new ConfigurationSettingsFilter(secondSetting.Key) }; + var settingsSnapshot = new ConfigurationSnapshot(settingsFilter); var snapshotName = "some_snapshot"; #if !SNIPPET From 2a6f8c8d573b97128d4712d1d404a45feb2c61ef Mon Sep 17 00:00:00 2001 From: Shivangi Reja Date: Thu, 5 Oct 2023 13:55:09 -0700 Subject: [PATCH 4/5] Update release version --- sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md index 7c370c76c36bc..aeae3379d0664 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 11.5.0-beta.5 (2023-10-09) +## 1.3.0-beta.3 (2023-10-09) ### Features Added From 6c249a91bce2972944212b3082401846c8fc8232 Mon Sep 17 00:00:00 2001 From: Shivangi Reja Date: Thu, 5 Oct 2023 15:30:20 -0700 Subject: [PATCH 5/5] Feedback --- .../Azure.Data.AppConfiguration/CHANGELOG.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md index aeae3379d0664..0a41020b744ec 100644 --- a/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md +++ b/sdk/appconfiguration/Azure.Data.AppConfiguration/CHANGELOG.md @@ -11,16 +11,6 @@ - Fixed `GetConfigurationSettings(SettingSelector)` not setting `ContentType` and `LastModified` properties [(#38524)](https://github.com/Azure/azure-sdk-for-net/issues/38524). - `FeatureFlagConfigurationSetting` will now allow custom attributes under the `conditions` element in the setting value. Previously, only `client_filters` was recognized and other data would be discarded. -### Other Changes - -- `CompositionType` has been renamed to `SnapshotComposition`. -- `ConfigurationSettingsSnapshot` has been renamed to `ConfigurationSnapshot`. -- `SnapshotStatus` has been renamed to `ConfigurationSnapshotStatus`. -- `SnapshotSettingFilter` has been renamed to `ConfigurationSettingsFilter`. -- In `ConfigurationSnapshot`, `Size` has been renamed to `SizeInBytes`. -- The `name` parameter in the following methods has been changed to `snapshotName`: `CreateSnapshot`, `GetSnapshot`, `RecoverSnapshot`, and `ArchiveSnapshot`. This change aligns with the naming convention used in the `GetConfigurationSettingsForSnapshot` method. -- For the `ArchiveSnapshot` and `RecoverSnapshot` methods, parameters have been updated from `ConfigurationSnapshot snapshot` and `bool onlyIfUnchanged` to `string name` and `MatchConditions matchConditions`. - ## 1.2.1 (2023-09-13) ### Bugs Fixed