diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationManagementClient.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationManagementClient.cs
index 7da5926ead41..9b9b2e8b6367 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationManagementClient.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/AppConfigurationManagementClient.cs
@@ -64,5 +64,8 @@ public AppConfigurationManagementClient(string subscriptionId, Uri endpoint, Tok
/// Returns an instance of PrivateLinkResourcesOperations.
public virtual PrivateLinkResourcesOperations PrivateLinkResources => new PrivateLinkResourcesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint);
+
+ /// Returns an instance of KeyValuesOperations.
+ public virtual KeyValuesOperations KeyValues => new KeyValuesOperations(_clientDiagnostics, _pipeline, _subscriptionId, _endpoint);
}
}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresOperations.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresOperations.cs
index 8fd966e45d9a..8ba6a909438f 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresOperations.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresOperations.cs
@@ -33,7 +33,7 @@ protected ConfigurationStoresOperations()
/// The Microsoft Azure subscription ID.
/// server parameter.
/// Api Version.
- internal ConfigurationStoresOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-06-01")
+ internal ConfigurationStoresOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-03-01-preview")
{
RestClient = new ConfigurationStoresRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion);
_clientDiagnostics = clientDiagnostics;
@@ -118,46 +118,6 @@ public virtual Response RegenerateKey(string resourceGroupName, string c
}
}
- /// Lists a configuration store key-value.
- /// The name of the resource group to which the container registry belongs.
- /// The name of the configuration store.
- /// The parameters for retrieving a key-value.
- /// The cancellation token to use.
- public virtual async Task> ListKeyValueAsync(string resourceGroupName, string configStoreName, ListKeyValueParameters listKeyValueParameters, CancellationToken cancellationToken = default)
- {
- using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeyValue");
- scope.Start();
- try
- {
- return await RestClient.ListKeyValueAsync(resourceGroupName, configStoreName, listKeyValueParameters, cancellationToken).ConfigureAwait(false);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
- /// Lists a configuration store key-value.
- /// The name of the resource group to which the container registry belongs.
- /// The name of the configuration store.
- /// The parameters for retrieving a key-value.
- /// The cancellation token to use.
- public virtual Response ListKeyValue(string resourceGroupName, string configStoreName, ListKeyValueParameters listKeyValueParameters, CancellationToken cancellationToken = default)
- {
- using var scope = _clientDiagnostics.CreateScope("ConfigurationStoresOperations.ListKeyValue");
- scope.Start();
- try
- {
- return RestClient.ListKeyValue(resourceGroupName, configStoreName, listKeyValueParameters, cancellationToken);
- }
- catch (Exception e)
- {
- scope.Failed(e);
- throw;
- }
- }
-
/// Lists the configuration stores for a given subscription.
/// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
/// The cancellation token to use.
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresRestOperations.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresRestOperations.cs
index 3ed0df0746b6..510543d4b6b2 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresRestOperations.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/ConfigurationStoresRestOperations.cs
@@ -31,7 +31,7 @@ internal partial class ConfigurationStoresRestOperations
/// server parameter.
/// Api Version.
/// or is null.
- public ConfigurationStoresRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2020-06-01")
+ public ConfigurationStoresRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-03-01-preview")
{
if (subscriptionId == null)
{
@@ -541,7 +541,7 @@ internal HttpMessage CreateListKeysRequest(string resourceGroupName, string conf
uri.AppendPath(resourceGroupName, true);
uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
uri.AppendPath(configStoreName, true);
- uri.AppendPath("/ListKeys", false);
+ uri.AppendPath("/listKeys", false);
uri.AppendQuery("api-version", apiVersion, true);
if (skipToken != null)
{
@@ -631,7 +631,7 @@ internal HttpMessage CreateRegenerateKeyRequest(string resourceGroupName, string
uri.AppendPath(resourceGroupName, true);
uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
uri.AppendPath(configStoreName, true);
- uri.AppendPath("/RegenerateKey", false);
+ uri.AppendPath("/regenerateKey", false);
uri.AppendQuery("api-version", apiVersion, true);
request.Uri = uri;
request.Headers.Add("Accept", "application/json");
@@ -716,104 +716,6 @@ public Response RegenerateKey(string resourceGroupName, string configSto
}
}
- internal HttpMessage CreateListKeyValueRequest(string resourceGroupName, string configStoreName, ListKeyValueParameters listKeyValueParameters)
- {
- var message = _pipeline.CreateMessage();
- var request = message.Request;
- request.Method = RequestMethod.Post;
- var uri = new RawRequestUriBuilder();
- uri.Reset(endpoint);
- uri.AppendPath("/subscriptions/", false);
- uri.AppendPath(subscriptionId, true);
- uri.AppendPath("/resourceGroups/", false);
- uri.AppendPath(resourceGroupName, true);
- uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
- uri.AppendPath(configStoreName, true);
- uri.AppendPath("/listKeyValue", false);
- uri.AppendQuery("api-version", apiVersion, true);
- request.Uri = uri;
- request.Headers.Add("Accept", "application/json");
- request.Headers.Add("Content-Type", "application/json");
- var content = new Utf8JsonRequestContent();
- content.JsonWriter.WriteObjectValue(listKeyValueParameters);
- request.Content = content;
- return message;
- }
-
- /// Lists a configuration store key-value.
- /// The name of the resource group to which the container registry belongs.
- /// The name of the configuration store.
- /// The parameters for retrieving a key-value.
- /// The cancellation token to use.
- /// , , or is null.
- public async Task> ListKeyValueAsync(string resourceGroupName, string configStoreName, ListKeyValueParameters listKeyValueParameters, CancellationToken cancellationToken = default)
- {
- if (resourceGroupName == null)
- {
- throw new ArgumentNullException(nameof(resourceGroupName));
- }
- if (configStoreName == null)
- {
- throw new ArgumentNullException(nameof(configStoreName));
- }
- if (listKeyValueParameters == null)
- {
- throw new ArgumentNullException(nameof(listKeyValueParameters));
- }
-
- using var message = CreateListKeyValueRequest(resourceGroupName, configStoreName, listKeyValueParameters);
- await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
- switch (message.Response.Status)
- {
- case 200:
- {
- KeyValue value = default;
- using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
- value = KeyValue.DeserializeKeyValue(document.RootElement);
- return Response.FromValue(value, message.Response);
- }
- default:
- throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
- }
- }
-
- /// Lists a configuration store key-value.
- /// The name of the resource group to which the container registry belongs.
- /// The name of the configuration store.
- /// The parameters for retrieving a key-value.
- /// The cancellation token to use.
- /// , , or is null.
- public Response ListKeyValue(string resourceGroupName, string configStoreName, ListKeyValueParameters listKeyValueParameters, CancellationToken cancellationToken = default)
- {
- if (resourceGroupName == null)
- {
- throw new ArgumentNullException(nameof(resourceGroupName));
- }
- if (configStoreName == null)
- {
- throw new ArgumentNullException(nameof(configStoreName));
- }
- if (listKeyValueParameters == null)
- {
- throw new ArgumentNullException(nameof(listKeyValueParameters));
- }
-
- using var message = CreateListKeyValueRequest(resourceGroupName, configStoreName, listKeyValueParameters);
- _pipeline.Send(message, cancellationToken);
- switch (message.Response.Status)
- {
- case 200:
- {
- KeyValue value = default;
- using var document = JsonDocument.Parse(message.Response.ContentStream);
- value = KeyValue.DeserializeKeyValue(document.RootElement);
- return Response.FromValue(value, message.Response);
- }
- default:
- throw _clientDiagnostics.CreateRequestFailedException(message.Response);
- }
- }
-
internal HttpMessage CreateListNextPageRequest(string nextLink, string skipToken)
{
var message = _pipeline.CreateMessage();
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesDeleteOperation.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesDeleteOperation.cs
new file mode 100644
index 000000000000..68acbc0df4d7
--- /dev/null
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesDeleteOperation.cs
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+
+namespace Azure.ResourceManager.AppConfiguration
+{
+ /// Deletes a key-value.
+ public partial class KeyValuesDeleteOperation : Operation, IOperationSource
+ {
+ private readonly ArmOperationHelpers _operation;
+
+ /// Initializes a new instance of KeyValuesDeleteOperation for mocking.
+ protected KeyValuesDeleteOperation()
+ {
+ }
+
+ internal KeyValuesDeleteOperation(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, Request request, Response response)
+ {
+ _operation = new ArmOperationHelpers(this, clientDiagnostics, pipeline, request, response, OperationFinalStateVia.Location, "KeyValuesDeleteOperation");
+ }
+ ///
+ public override string Id => _operation.Id;
+
+ ///
+ public override Response Value => _operation.Value;
+
+ ///
+ public override bool HasCompleted => _operation.HasCompleted;
+
+ ///
+ public override bool HasValue => _operation.HasValue;
+
+ ///
+ public override Response GetRawResponse() => _operation.GetRawResponse();
+
+ ///
+ public override Response UpdateStatus(CancellationToken cancellationToken = default) => _operation.UpdateStatus(cancellationToken);
+
+ ///
+ public override ValueTask UpdateStatusAsync(CancellationToken cancellationToken = default) => _operation.UpdateStatusAsync(cancellationToken);
+
+ ///
+ public override ValueTask> WaitForCompletionAsync(CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(cancellationToken);
+
+ ///
+ public override ValueTask> WaitForCompletionAsync(TimeSpan pollingInterval, CancellationToken cancellationToken = default) => _operation.WaitForCompletionAsync(pollingInterval, cancellationToken);
+
+ Response IOperationSource.CreateResult(Response response, CancellationToken cancellationToken)
+ {
+ return response;
+ }
+
+ async ValueTask IOperationSource.CreateResultAsync(Response response, CancellationToken cancellationToken)
+ {
+ return await new ValueTask(response).ConfigureAwait(false);
+ }
+ }
+}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesOperations.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesOperations.cs
new file mode 100644
index 000000000000..b8a193a3c5b6
--- /dev/null
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesOperations.cs
@@ -0,0 +1,295 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.AppConfiguration.Models;
+
+namespace Azure.ResourceManager.AppConfiguration
+{
+ /// The KeyValues service client.
+ public partial class KeyValuesOperations
+ {
+ private readonly ClientDiagnostics _clientDiagnostics;
+ private readonly HttpPipeline _pipeline;
+ internal KeyValuesRestOperations RestClient { get; }
+
+ /// Initializes a new instance of KeyValuesOperations for mocking.
+ protected KeyValuesOperations()
+ {
+ }
+
+ /// Initializes a new instance of KeyValuesOperations.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// The Microsoft Azure subscription ID.
+ /// server parameter.
+ /// Api Version.
+ internal KeyValuesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-03-01-preview")
+ {
+ RestClient = new KeyValuesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, apiVersion);
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ /// Gets the properties of the specified key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ public virtual async Task> GetAsync(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.Get");
+ scope.Start();
+ try
+ {
+ return await RestClient.GetAsync(resourceGroupName, configStoreName, keyValueName, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Gets the properties of the specified key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ public virtual Response Get(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.Get");
+ scope.Start();
+ try
+ {
+ return RestClient.Get(resourceGroupName, configStoreName, keyValueName, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Creates a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The parameters for creating a key-value.
+ /// The cancellation token to use.
+ public virtual async Task> CreateOrUpdateAsync(string resourceGroupName, string configStoreName, string keyValueName, KeyValue keyValueParameters = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ return await RestClient.CreateOrUpdateAsync(resourceGroupName, configStoreName, keyValueName, keyValueParameters, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Creates a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The parameters for creating a key-value.
+ /// The cancellation token to use.
+ public virtual Response CreateOrUpdate(string resourceGroupName, string configStoreName, string keyValueName, KeyValue keyValueParameters = null, CancellationToken cancellationToken = default)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.CreateOrUpdate");
+ scope.Start();
+ try
+ {
+ return RestClient.CreateOrUpdate(resourceGroupName, configStoreName, keyValueName, keyValueParameters, cancellationToken);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Lists the key-values for a given configuration store.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual AsyncPageable ListByConfigurationStoreAsync(string resourceGroupName, string configStoreName, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+
+ async Task> FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.ListByConfigurationStore");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListByConfigurationStoreAsync(resourceGroupName, configStoreName, skipToken, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ async Task> NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.ListByConfigurationStore");
+ scope.Start();
+ try
+ {
+ var response = await RestClient.ListByConfigurationStoreNextPageAsync(nextLink, resourceGroupName, configStoreName, skipToken, cancellationToken).ConfigureAwait(false);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// Lists the key-values for a given configuration store.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// or is null.
+ public virtual Pageable ListByConfigurationStore(string resourceGroupName, string configStoreName, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+
+ Page FirstPageFunc(int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.ListByConfigurationStore");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListByConfigurationStore(resourceGroupName, configStoreName, skipToken, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ Page NextPageFunc(string nextLink, int? pageSizeHint)
+ {
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.ListByConfigurationStore");
+ scope.Start();
+ try
+ {
+ var response = RestClient.ListByConfigurationStoreNextPage(nextLink, resourceGroupName, configStoreName, skipToken, cancellationToken);
+ return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
+ }
+
+ /// Deletes a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public virtual async Task StartDeleteAsync(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.StartDelete");
+ scope.Start();
+ try
+ {
+ var originalResponse = await RestClient.DeleteAsync(resourceGroupName, configStoreName, keyValueName, cancellationToken).ConfigureAwait(false);
+ return new KeyValuesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, configStoreName, keyValueName).Request, originalResponse);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+
+ /// Deletes a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public virtual KeyValuesDeleteOperation StartDelete(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var scope = _clientDiagnostics.CreateScope("KeyValuesOperations.StartDelete");
+ scope.Start();
+ try
+ {
+ var originalResponse = RestClient.Delete(resourceGroupName, configStoreName, keyValueName, cancellationToken);
+ return new KeyValuesDeleteOperation(_clientDiagnostics, _pipeline, RestClient.CreateDeleteRequest(resourceGroupName, configStoreName, keyValueName).Request, originalResponse);
+ }
+ catch (Exception e)
+ {
+ scope.Failed(e);
+ throw;
+ }
+ }
+ }
+}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesRestOperations.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesRestOperations.cs
new file mode 100644
index 000000000000..241c2b98f341
--- /dev/null
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/KeyValuesRestOperations.cs
@@ -0,0 +1,520 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.Text.Json;
+using System.Threading;
+using System.Threading.Tasks;
+using Azure;
+using Azure.Core;
+using Azure.Core.Pipeline;
+using Azure.ResourceManager.AppConfiguration.Models;
+
+namespace Azure.ResourceManager.AppConfiguration
+{
+ internal partial class KeyValuesRestOperations
+ {
+ private string subscriptionId;
+ private Uri endpoint;
+ private string apiVersion;
+ private ClientDiagnostics _clientDiagnostics;
+ private HttpPipeline _pipeline;
+
+ /// Initializes a new instance of KeyValuesRestOperations.
+ /// The handler for diagnostic messaging in the client.
+ /// The HTTP pipeline for sending and receiving REST requests and responses.
+ /// The Microsoft Azure subscription ID.
+ /// server parameter.
+ /// Api Version.
+ /// or is null.
+ public KeyValuesRestOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId, Uri endpoint = null, string apiVersion = "2021-03-01-preview")
+ {
+ if (subscriptionId == null)
+ {
+ throw new ArgumentNullException(nameof(subscriptionId));
+ }
+ endpoint ??= new Uri("https://management.azure.com");
+ if (apiVersion == null)
+ {
+ throw new ArgumentNullException(nameof(apiVersion));
+ }
+
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.apiVersion = apiVersion;
+ _clientDiagnostics = clientDiagnostics;
+ _pipeline = pipeline;
+ }
+
+ internal HttpMessage CreateListByConfigurationStoreRequest(string resourceGroupName, string configStoreName, string skipToken)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
+ uri.AppendPath(configStoreName, true);
+ uri.AppendPath("/keyValues", false);
+ uri.AppendQuery("api-version", apiVersion, true);
+ if (skipToken != null)
+ {
+ uri.AppendQuery("$skipToken", skipToken, true);
+ }
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ /// Lists the key-values for a given configuration store.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// or is null.
+ public async Task> ListByConfigurationStoreAsync(string resourceGroupName, string configStoreName, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+
+ using var message = CreateListByConfigurationStoreRequest(resourceGroupName, configStoreName, skipToken);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValueListResult value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ value = KeyValueListResult.DeserializeKeyValueListResult(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Lists the key-values for a given configuration store.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// or is null.
+ public Response ListByConfigurationStore(string resourceGroupName, string configStoreName, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+
+ using var message = CreateListByConfigurationStoreRequest(resourceGroupName, configStoreName, skipToken);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValueListResult value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ value = KeyValueListResult.DeserializeKeyValueListResult(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreateGetRequest(string resourceGroupName, string configStoreName, string keyValueName)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
+ uri.AppendPath(configStoreName, true);
+ uri.AppendPath("/keyValues/", false);
+ uri.AppendPath(keyValueName, true);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ /// Gets the properties of the specified key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public async Task> GetAsync(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var message = CreateGetRequest(resourceGroupName, configStoreName, keyValueName);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValue value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ value = KeyValue.DeserializeKeyValue(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Gets the properties of the specified key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public Response Get(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var message = CreateGetRequest(resourceGroupName, configStoreName, keyValueName);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValue value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ value = KeyValue.DeserializeKeyValue(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreateCreateOrUpdateRequest(string resourceGroupName, string configStoreName, string keyValueName, KeyValue keyValueParameters)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Put;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
+ uri.AppendPath(configStoreName, true);
+ uri.AppendPath("/keyValues/", false);
+ uri.AppendPath(keyValueName, true);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ if (keyValueParameters != null)
+ {
+ request.Headers.Add("Content-Type", "application/json");
+ var content = new Utf8JsonRequestContent();
+ content.JsonWriter.WriteObjectValue(keyValueParameters);
+ request.Content = content;
+ }
+ return message;
+ }
+
+ /// Creates a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The parameters for creating a key-value.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public async Task> CreateOrUpdateAsync(string resourceGroupName, string configStoreName, string keyValueName, KeyValue keyValueParameters = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var message = CreateCreateOrUpdateRequest(resourceGroupName, configStoreName, keyValueName, keyValueParameters);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValue value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ value = KeyValue.DeserializeKeyValue(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Creates a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The parameters for creating a key-value.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public Response CreateOrUpdate(string resourceGroupName, string configStoreName, string keyValueName, KeyValue keyValueParameters = null, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var message = CreateCreateOrUpdateRequest(resourceGroupName, configStoreName, keyValueName, keyValueParameters);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValue value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ value = KeyValue.DeserializeKeyValue(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreateDeleteRequest(string resourceGroupName, string configStoreName, string keyValueName)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Delete;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendPath("/subscriptions/", false);
+ uri.AppendPath(subscriptionId, true);
+ uri.AppendPath("/resourceGroups/", false);
+ uri.AppendPath(resourceGroupName, true);
+ uri.AppendPath("/providers/Microsoft.AppConfiguration/configurationStores/", false);
+ uri.AppendPath(configStoreName, true);
+ uri.AppendPath("/keyValues/", false);
+ uri.AppendPath(keyValueName, true);
+ uri.AppendQuery("api-version", apiVersion, true);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ /// Deletes a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public async Task DeleteAsync(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var message = CreateDeleteRequest(resourceGroupName, configStoreName, keyValueName);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ case 202:
+ case 204:
+ return message.Response;
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Deletes a key-value.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// Identifier of key and label combination. Key and label are joined by $ character. Label is optional.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public Response Delete(string resourceGroupName, string configStoreName, string keyValueName, CancellationToken cancellationToken = default)
+ {
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+ if (keyValueName == null)
+ {
+ throw new ArgumentNullException(nameof(keyValueName));
+ }
+
+ using var message = CreateDeleteRequest(resourceGroupName, configStoreName, keyValueName);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ case 202:
+ case 204:
+ return message.Response;
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+
+ internal HttpMessage CreateListByConfigurationStoreNextPageRequest(string nextLink, string resourceGroupName, string configStoreName, string skipToken)
+ {
+ var message = _pipeline.CreateMessage();
+ var request = message.Request;
+ request.Method = RequestMethod.Get;
+ var uri = new RawRequestUriBuilder();
+ uri.Reset(endpoint);
+ uri.AppendRawNextLink(nextLink, false);
+ request.Uri = uri;
+ request.Headers.Add("Accept", "application/json");
+ return message;
+ }
+
+ /// Lists the key-values for a given configuration store.
+ /// The URL to the next page of results.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public async Task> ListByConfigurationStoreNextPageAsync(string nextLink, string resourceGroupName, string configStoreName, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ if (nextLink == null)
+ {
+ throw new ArgumentNullException(nameof(nextLink));
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+
+ using var message = CreateListByConfigurationStoreNextPageRequest(nextLink, resourceGroupName, configStoreName, skipToken);
+ await _pipeline.SendAsync(message, cancellationToken).ConfigureAwait(false);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValueListResult value = default;
+ using var document = await JsonDocument.ParseAsync(message.Response.ContentStream, default, cancellationToken).ConfigureAwait(false);
+ value = KeyValueListResult.DeserializeKeyValueListResult(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw await _clientDiagnostics.CreateRequestFailedExceptionAsync(message.Response).ConfigureAwait(false);
+ }
+ }
+
+ /// Lists the key-values for a given configuration store.
+ /// The URL to the next page of results.
+ /// The name of the resource group to which the container registry belongs.
+ /// The name of the configuration store.
+ /// A skip token is used to continue retrieving items after an operation returns a partial result. If a previous response contains a nextLink element, the value of the nextLink element will include a skipToken parameter that specifies a starting point to use for subsequent calls.
+ /// The cancellation token to use.
+ /// , , or is null.
+ public Response ListByConfigurationStoreNextPage(string nextLink, string resourceGroupName, string configStoreName, string skipToken = null, CancellationToken cancellationToken = default)
+ {
+ if (nextLink == null)
+ {
+ throw new ArgumentNullException(nameof(nextLink));
+ }
+ if (resourceGroupName == null)
+ {
+ throw new ArgumentNullException(nameof(resourceGroupName));
+ }
+ if (configStoreName == null)
+ {
+ throw new ArgumentNullException(nameof(configStoreName));
+ }
+
+ using var message = CreateListByConfigurationStoreNextPageRequest(nextLink, resourceGroupName, configStoreName, skipToken);
+ _pipeline.Send(message, cancellationToken);
+ switch (message.Response.Status)
+ {
+ case 200:
+ {
+ KeyValueListResult value = default;
+ using var document = JsonDocument.Parse(message.Response.ContentStream);
+ value = KeyValueListResult.DeserializeKeyValueListResult(document.RootElement);
+ return Response.FromValue(value, message.Response);
+ }
+ default:
+ throw _clientDiagnostics.CreateRequestFailedException(message.Response);
+ }
+ }
+ }
+}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.Serialization.cs
index cbbb62d29711..fb1174d6aeda 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.Serialization.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.Serialization.cs
@@ -24,8 +24,6 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
}
writer.WritePropertyName("sku");
writer.WriteObjectValue(Sku);
- writer.WritePropertyName("location");
- writer.WriteStringValue(Location);
if (Optional.IsCollectionDefined(Tags))
{
writer.WritePropertyName("tags");
@@ -37,6 +35,8 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
}
writer.WriteEndObject();
}
+ writer.WritePropertyName("location");
+ writer.WriteStringValue(Location);
writer.WritePropertyName("properties");
writer.WriteStartObject();
if (Optional.IsDefined(Encryption))
@@ -49,6 +49,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("publicNetworkAccess");
writer.WriteStringValue(PublicNetworkAccess.Value.ToString());
}
+ if (Optional.IsDefined(DisableLocalAuth))
+ {
+ writer.WritePropertyName("disableLocalAuth");
+ writer.WriteBooleanValue(DisableLocalAuth.Value);
+ }
writer.WriteEndObject();
writer.WriteEndObject();
}
@@ -57,17 +62,19 @@ internal static ConfigurationStore DeserializeConfigurationStore(JsonElement ele
{
Optional identity = default;
Sku sku = default;
+ Optional systemData = default;
+ Optional> tags = default;
+ string location = default;
Optional id = default;
Optional name = default;
Optional type = default;
- string location = default;
- Optional> tags = default;
Optional provisioningState = default;
Optional creationDate = default;
Optional endpoint = default;
Optional encryption = default;
Optional> privateEndpointConnections = default;
Optional publicNetworkAccess = default;
+ Optional disableLocalAuth = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("identity"))
@@ -85,24 +92,14 @@ internal static ConfigurationStore DeserializeConfigurationStore(JsonElement ele
sku = Sku.DeserializeSku(property.Value);
continue;
}
- if (property.NameEquals("id"))
- {
- id = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("name"))
- {
- name = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("type"))
+ if (property.NameEquals("systemData"))
{
- type = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("location"))
- {
- location = property.Value.GetString();
+ if (property.Value.ValueKind == JsonValueKind.Null)
+ {
+ property.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ systemData = SystemData.DeserializeSystemData(property.Value);
continue;
}
if (property.NameEquals("tags"))
@@ -120,6 +117,26 @@ internal static ConfigurationStore DeserializeConfigurationStore(JsonElement ele
tags = dictionary;
continue;
}
+ if (property.NameEquals("location"))
+ {
+ location = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("id"))
+ {
+ id = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("name"))
+ {
+ name = property.Value.GetString();
+ continue;
+ }
+ if (property.NameEquals("type"))
+ {
+ type = property.Value.GetString();
+ continue;
+ }
if (property.NameEquals("properties"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
@@ -189,11 +206,21 @@ internal static ConfigurationStore DeserializeConfigurationStore(JsonElement ele
publicNetworkAccess = new PublicNetworkAccess(property0.Value.GetString());
continue;
}
+ if (property0.NameEquals("disableLocalAuth"))
+ {
+ if (property0.Value.ValueKind == JsonValueKind.Null)
+ {
+ property0.ThrowNonNullablePropertyIsNull();
+ continue;
+ }
+ disableLocalAuth = property0.Value.GetBoolean();
+ continue;
+ }
}
continue;
}
}
- return new ConfigurationStore(id.Value, name.Value, type.Value, location, Optional.ToDictionary(tags), identity.Value, sku, Optional.ToNullable(provisioningState), Optional.ToNullable(creationDate), endpoint.Value, encryption.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(publicNetworkAccess));
+ return new ConfigurationStore(id.Value, name.Value, type.Value, Optional.ToDictionary(tags), location, identity.Value, sku, systemData.Value, Optional.ToNullable(provisioningState), Optional.ToNullable(creationDate), endpoint.Value, encryption.Value, Optional.ToList(privateEndpointConnections), Optional.ToNullable(publicNetworkAccess), Optional.ToNullable(disableLocalAuth));
}
}
}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.cs
index 761d5bf862d3..c35c75edfb32 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStore.cs
@@ -12,10 +12,10 @@
namespace Azure.ResourceManager.AppConfiguration.Models
{
/// The configuration store along with all resource properties. The Configuration Store will have all information to begin utilizing it.
- public partial class ConfigurationStore : Resource
+ public partial class ConfigurationStore : TrackedResource
{
/// Initializes a new instance of ConfigurationStore.
- /// The location of the resource. This cannot be changed after the resource is created.
+ /// The geo-location where the resource lives.
/// The sku of the configuration store.
/// or is null.
public ConfigurationStore(string location, Sku sku) : base(location)
@@ -34,35 +34,41 @@ public ConfigurationStore(string location, Sku sku) : base(location)
}
/// Initializes a new instance of ConfigurationStore.
- /// The resource ID.
+ /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
/// The name of the resource.
- /// The type of the resource.
- /// The location of the resource. This cannot be changed after the resource is created.
- /// The tags of the resource.
+ /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
+ /// Resource tags.
+ /// The geo-location where the resource lives.
/// The managed identity information, if configured.
/// The sku of the configuration store.
+ /// Resource system metadata.
/// The provisioning state of the configuration store.
/// The creation date of configuration store.
/// The DNS endpoint where the configuration store API will be available.
/// The encryption settings of the configuration store.
/// The list of private endpoint connections that are set up for this resource.
/// Control permission for data plane traffic coming from public networks while private endpoint is enabled.
- internal ConfigurationStore(string id, string name, string type, string location, IDictionary tags, ResourceIdentity identity, Sku sku, ProvisioningState? provisioningState, DateTimeOffset? creationDate, string endpoint, EncryptionProperties encryption, IReadOnlyList privateEndpointConnections, PublicNetworkAccess? publicNetworkAccess) : base(id, name, type, location, tags)
+ /// Disables all authentication methods other than AAD authentication.
+ internal ConfigurationStore(string id, string name, string type, IDictionary tags, string location, ResourceIdentity identity, Sku sku, SystemData systemData, ProvisioningState? provisioningState, DateTimeOffset? creationDate, string endpoint, EncryptionProperties encryption, IReadOnlyList privateEndpointConnections, PublicNetworkAccess? publicNetworkAccess, bool? disableLocalAuth) : base(id, name, type, tags, location)
{
Identity = identity;
Sku = sku;
+ SystemData = systemData;
ProvisioningState = provisioningState;
CreationDate = creationDate;
Endpoint = endpoint;
Encryption = encryption;
PrivateEndpointConnections = privateEndpointConnections;
PublicNetworkAccess = publicNetworkAccess;
+ DisableLocalAuth = disableLocalAuth;
}
/// The managed identity information, if configured.
public ResourceIdentity Identity { get; set; }
/// The sku of the configuration store.
public Sku Sku { get; set; }
+ /// Resource system metadata.
+ public SystemData SystemData { get; }
/// The provisioning state of the configuration store.
public ProvisioningState? ProvisioningState { get; }
/// The creation date of configuration store.
@@ -75,5 +81,7 @@ internal ConfigurationStore(string id, string name, string type, string location
public IReadOnlyList PrivateEndpointConnections { get; }
/// Control permission for data plane traffic coming from public networks while private endpoint is enabled.
public PublicNetworkAccess? PublicNetworkAccess { get; set; }
+ /// Disables all authentication methods other than AAD authentication.
+ public bool? DisableLocalAuth { get; set; }
}
}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.Serialization.cs
index b433e0ee8461..be8e5cae4a3b 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.Serialization.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.Serialization.cs
@@ -43,6 +43,11 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
writer.WritePropertyName("encryption");
writer.WriteObjectValue(Encryption);
}
+ if (Optional.IsDefined(DisableLocalAuth))
+ {
+ writer.WritePropertyName("disableLocalAuth");
+ writer.WriteBooleanValue(DisableLocalAuth.Value);
+ }
if (Optional.IsDefined(PublicNetworkAccess))
{
writer.WritePropertyName("publicNetworkAccess");
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.cs
index 65042166c62c..eb6f0c30b8f8 100644
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.cs
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ConfigurationStoreUpdateParameters.cs
@@ -27,6 +27,8 @@ public ConfigurationStoreUpdateParameters()
public IDictionary Tags { get; }
/// The encryption settings of the configuration store.
public EncryptionProperties Encryption { get; set; }
+ /// Disables all authentication methods other than AAD authentication.
+ public bool? DisableLocalAuth { get; set; }
/// Control permission for data plane traffic coming from public networks while private endpoint is enabled.
public PublicNetworkAccess? PublicNetworkAccess { get; set; }
}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/CreatedByType.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/CreatedByType.cs
new file mode 100644
index 000000000000..73dac1a84d32
--- /dev/null
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/CreatedByType.cs
@@ -0,0 +1,57 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System;
+using System.ComponentModel;
+
+namespace Azure.ResourceManager.AppConfiguration.Models
+{
+ /// The type of identity that created the resource.
+ public readonly partial struct CreatedByType : IEquatable
+ {
+ private readonly string _value;
+
+ /// Determines if two values are the same.
+ /// is null.
+ public CreatedByType(string value)
+ {
+ _value = value ?? throw new ArgumentNullException(nameof(value));
+ }
+
+ private const string UserValue = "User";
+ private const string ApplicationValue = "Application";
+ private const string ManagedIdentityValue = "ManagedIdentity";
+ private const string KeyValue = "Key";
+
+ /// User.
+ public static CreatedByType User { get; } = new CreatedByType(UserValue);
+ /// Application.
+ public static CreatedByType Application { get; } = new CreatedByType(ApplicationValue);
+ /// ManagedIdentity.
+ public static CreatedByType ManagedIdentity { get; } = new CreatedByType(ManagedIdentityValue);
+ /// Key.
+ public static CreatedByType Key { get; } = new CreatedByType(KeyValue);
+ /// Determines if two values are the same.
+ public static bool operator ==(CreatedByType left, CreatedByType right) => left.Equals(right);
+ /// Determines if two values are not the same.
+ public static bool operator !=(CreatedByType left, CreatedByType right) => !left.Equals(right);
+ /// Converts a string to a .
+ public static implicit operator CreatedByType(string value) => new CreatedByType(value);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override bool Equals(object obj) => obj is CreatedByType other && Equals(other);
+ ///
+ public bool Equals(CreatedByType other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
+
+ ///
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public override int GetHashCode() => _value?.GetHashCode() ?? 0;
+ ///
+ public override string ToString() => _value;
+ }
+}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/Error.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/Error.Serialization.cs
deleted file mode 100644
index e5eb04140449..000000000000
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/Error.Serialization.cs
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-using System.Text.Json;
-using Azure.Core;
-
-namespace Azure.ResourceManager.AppConfiguration.Models
-{
- internal partial class Error
- {
- internal static Error DeserializeError(JsonElement element)
- {
- Optional code = default;
- Optional message = default;
- foreach (var property in element.EnumerateObject())
- {
- if (property.NameEquals("code"))
- {
- code = property.Value.GetString();
- continue;
- }
- if (property.NameEquals("message"))
- {
- message = property.Value.GetString();
- continue;
- }
- }
- return new Error(code.Value, message.Value);
- }
- }
-}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/Error.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/Error.cs
deleted file mode 100644
index 6bc7bf081d0d..000000000000
--- a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/Error.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-//
-
-#nullable disable
-
-namespace Azure.ResourceManager.AppConfiguration.Models
-{
- /// AppConfiguration error object.
- internal partial class Error
- {
- /// Initializes a new instance of Error.
- internal Error()
- {
- }
-
- /// Initializes a new instance of Error.
- /// Error code.
- /// Error message.
- internal Error(string code, string message)
- {
- Code = code;
- Message = message;
- }
-
- /// Error code.
- public string Code { get; }
- /// Error message.
- public string Message { get; }
- }
-}
diff --git a/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ErrorAdditionalInfo.Serialization.cs b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ErrorAdditionalInfo.Serialization.cs
new file mode 100644
index 000000000000..e2390538a7d1
--- /dev/null
+++ b/sdk/appconfiguration/Azure.ResourceManager.AppConfiguration/src/Generated/Models/ErrorAdditionalInfo.Serialization.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+//
+
+#nullable disable
+
+using System.Text.Json;
+using Azure.Core;
+
+namespace Azure.ResourceManager.AppConfiguration.Models
+{
+ internal partial class ErrorAdditionalInfo
+ {
+ internal static ErrorAdditionalInfo DeserializeErrorAdditionalInfo(JsonElement element)
+ {
+ Optional type = default;
+ Optional