diff --git a/generated/KeyVault/KeyVault.Autorest/Az.KeyVault.format.ps1xml b/generated/KeyVault/KeyVault.Autorest/Az.KeyVault.format.ps1xml index 339276fe5dc2..65fc22e1a888 100644 --- a/generated/KeyVault/KeyVault.Autorest/Az.KeyVault.format.ps1xml +++ b/generated/KeyVault/KeyVault.Autorest/Az.KeyVault.format.ps1xml @@ -8,6 +8,15 @@ + + + + + + + + + @@ -45,6 +54,15 @@ + + IdentityPrincipalId + + + IdentityTenantId + + + IdentityType + Location @@ -783,6 +801,34 @@ + + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentity + + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentity#Multiple + + + + + + + + + + + + + + + PrincipalId + + + TenantId + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.MhsmGeoReplicatedRegion @@ -874,6 +920,15 @@ + + + + + + + + + @@ -920,6 +975,15 @@ + + IdentityPrincipalId + + + IdentityTenantId + + + IdentityType + Location @@ -1040,6 +1104,15 @@ + + + + + + + + + @@ -1074,6 +1147,15 @@ + + IdentityPrincipalId + + + IdentityTenantId + + + IdentityType + Location @@ -1569,6 +1651,34 @@ + + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentity + + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentity#Multiple + + + + + + + + + + + + + + + ClientId + + + PrincipalId + + + + + + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.Vault diff --git a/generated/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs b/generated/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs new file mode 100644 index 000000000000..ab9eb17df562 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the Apache License, Version 2.0 (the ""License""); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an ""AS IS"" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code +// is regenerated. + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +[assembly: System.Reflection.AssemblyCompanyAttribute("Microsoft")] +[assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] +[assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] +[assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - KeyVault")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("6.3.1")] +[assembly: System.Reflection.AssemblyVersionAttribute("6.3.1")] +[assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/KeyVault.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/KeyVault.cs index a01c150f15de..def430d8381d 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/KeyVault.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/KeyVault.cs @@ -29,7 +29,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -73,7 +73,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -125,7 +125,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -179,7 +179,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCheckNameAvailabilityViaJsonString(string subscriptionId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -221,7 +221,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -264,7 +264,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCheckNameAvailabilityWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -444,7 +444,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCreateOrUpdate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -491,7 +491,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -548,7 +548,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -609,7 +609,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string name, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -656,7 +656,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string name, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -704,7 +704,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1080,7 +1080,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsDelete(string subscriptionId, string resourceGroupName, string name, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1122,7 +1122,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1354,7 +1354,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGet(string subscriptionId, string resourceGroupName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1398,7 +1398,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetDeleted(string subscriptionId, string name, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1439,7 +1439,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetDeletedViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1490,7 +1490,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetDeletedViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1544,7 +1544,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetDeletedWithResult(string subscriptionId, string name, string location, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1718,7 +1718,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1769,7 +1769,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1823,7 +1823,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsGetWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2014,7 +2014,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2060,7 +2060,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2115,7 +2115,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2172,7 +2172,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2351,7 +2351,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2394,7 +2394,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2445,7 +2445,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2497,7 +2497,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListBySubscriptionWithResult(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2671,7 +2671,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListDeleted(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2711,7 +2711,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListDeletedViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2759,7 +2759,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListDeletedViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2808,7 +2808,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsListDeletedWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2977,7 +2977,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsPurgeDeleted(string subscriptionId, string name, string location, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3019,7 +3019,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsPurgeDeletedViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3246,7 +3246,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsUpdate(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3293,7 +3293,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3350,7 +3350,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3411,7 +3411,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string name, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3458,7 +3458,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string name, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3506,7 +3506,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task ManagedHsmsUpdateWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3883,7 +3883,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3929,7 +3929,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3985,7 +3985,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsDeleteViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4045,7 +4045,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsDeleteWithResult(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4436,7 +4436,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4481,7 +4481,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4537,7 +4537,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4597,7 +4597,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4781,7 +4781,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsListByResource(string subscriptionId, string resourceGroupName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4825,7 +4825,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsListByResourceViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4879,7 +4879,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsListByResourceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4936,7 +4936,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsListByResourceWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5122,7 +5122,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsPut(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5173,7 +5173,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsPutViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5235,7 +5235,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsPutViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5302,7 +5302,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsPutViaJsonString(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5354,7 +5354,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsPutViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5407,7 +5407,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateEndpointConnectionsPutWithResult(string subscriptionId, string resourceGroupName, string name, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5596,7 +5596,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateLinkResourcesListByMhsmResource(string subscriptionId, string resourceGroupName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5638,7 +5638,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateLinkResourcesListByMhsmResourceViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5690,7 +5690,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateLinkResourcesListByMhsmResourceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5745,7 +5745,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmPrivateLinkResourcesListByMhsmResourceWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5928,7 +5928,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmRegionsListByResource(string subscriptionId, string resourceGroupName, string name, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5972,7 +5972,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmRegionsListByResourceViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6026,7 +6026,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmRegionsListByResourceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6083,7 +6083,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task MhsmRegionsListByResourceWithResult(string subscriptionId, string resourceGroupName, string name, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6266,7 +6266,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDelete(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6312,7 +6312,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6368,7 +6368,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6428,7 +6428,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsDeleteWithResult(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6817,7 +6817,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGet(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6861,7 +6861,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6915,7 +6915,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6973,7 +6973,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsGetWithResult(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7170,7 +7170,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListByResource(string subscriptionId, string resourceGroupName, string vaultName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7214,7 +7214,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListByResourceViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7268,7 +7268,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListByResourceViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7325,7 +7325,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsListByResourceWithResult(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7510,7 +7510,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPut(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7559,7 +7559,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IPrivateEndpointConnection body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7619,7 +7619,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7684,7 +7684,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaJsonString(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7734,7 +7734,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7785,7 +7785,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsPutWithResult(string subscriptionId, string resourceGroupName, string vaultName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IPrivateEndpointConnection body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -7975,7 +7975,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByVault(string subscriptionId, string resourceGroupName, string vaultName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8017,7 +8017,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByVaultViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8069,7 +8069,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByVaultViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8124,7 +8124,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task PrivateLinkResourcesListByVaultWithResult(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8304,7 +8304,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCheckNameAvailability(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCheckNameAvailabilityParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8348,7 +8348,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCheckNameAvailabilityViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCheckNameAvailabilityParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8400,7 +8400,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCheckNameAvailabilityViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCheckNameAvailabilityParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8454,7 +8454,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCheckNameAvailabilityViaJsonString(string subscriptionId, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8496,7 +8496,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCheckNameAvailabilityViaJsonStringWithResult(string subscriptionId, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8539,7 +8539,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCheckNameAvailabilityWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCheckNameAvailabilityParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8719,7 +8719,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCreateOrUpdate(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCreateOrUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8766,7 +8766,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCreateOrUpdateParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8823,7 +8823,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCreateOrUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCreateOrUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8884,7 +8884,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCreateOrUpdateViaJsonString(string subscriptionId, string resourceGroupName, string vaultName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8931,7 +8931,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCreateOrUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string vaultName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -8979,7 +8979,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsCreateOrUpdateWithResult(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultCreateOrUpdateParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9354,7 +9354,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsDelete(string subscriptionId, string resourceGroupName, string vaultName, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9396,7 +9396,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsDeleteViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func onNoContent, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9531,7 +9531,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGet(string subscriptionId, string resourceGroupName, string vaultName, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9575,7 +9575,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetDeleted(string subscriptionId, string vaultName, string location, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9616,7 +9616,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetDeletedViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9667,7 +9667,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetDeletedViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9721,7 +9721,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetDeletedWithResult(string subscriptionId, string vaultName, string location, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9894,7 +9894,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9945,7 +9945,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -9999,7 +9999,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsGetWithResult(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10177,7 +10177,7 @@ public partial class KeyVault public async global::System.Threading.Tasks.Task VaultsList(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { var Filter = @"resourceType eq 'Microsoft.KeyVault/vaults'"; - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10225,7 +10225,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListByResourceGroup(string subscriptionId, string resourceGroupName, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10271,7 +10271,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListByResourceGroupViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10326,7 +10326,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListByResourceGroupViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10383,7 +10383,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListByResourceGroupWithResult(string subscriptionId, string resourceGroupName, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10562,7 +10562,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListBySubscription(string subscriptionId, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10605,7 +10605,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListBySubscriptionViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10656,7 +10656,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListBySubscriptionViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10708,7 +10708,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListBySubscriptionWithResult(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10878,7 +10878,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListDeleted(string subscriptionId, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10916,7 +10916,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListDeletedViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -10962,7 +10962,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListDeletedViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11009,7 +11009,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsListDeletedWithResult(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11179,7 +11179,7 @@ public partial class KeyVault public async global::System.Threading.Tasks.Task VaultsListViaIdentity(global::System.String viaIdentity, int? Top, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { var Filter = @"resourceType eq 'Microsoft.KeyVault/vaults'"; - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11233,7 +11233,7 @@ public partial class KeyVault public async global::System.Threading.Tasks.Task VaultsListViaIdentityWithResult(global::System.String viaIdentity, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { var Filter = @"resourceType eq 'Microsoft.KeyVault/vaults'"; - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11288,7 +11288,7 @@ public partial class KeyVault public async global::System.Threading.Tasks.Task VaultsListWithResult(string subscriptionId, int? Top, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { var Filter = @"resourceType eq 'Microsoft.KeyVault/vaults'"; - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11464,7 +11464,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsPurgeDeleted(string subscriptionId, string vaultName, string location, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11508,7 +11508,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsPurgeDeletedViaIdentity(global::System.String viaIdentity, global::System.Func onOk, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11736,7 +11736,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdate(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultPatchParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11788,7 +11788,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateAccessPolicy(string subscriptionId, string resourceGroupName, string vaultName, string operationKind, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultAccessPolicyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11838,7 +11838,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateAccessPolicyViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultAccessPolicyParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11898,7 +11898,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateAccessPolicyViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultAccessPolicyParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -11964,7 +11964,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateAccessPolicyViaJsonString(string subscriptionId, string resourceGroupName, string vaultName, string operationKind, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12014,7 +12014,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateAccessPolicyViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string vaultName, string operationKind, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12065,7 +12065,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateAccessPolicyWithResult(string subscriptionId, string resourceGroupName, string vaultName, string operationKind, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultAccessPolicyParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12266,7 +12266,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultPatchParameters body, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12323,7 +12323,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateViaIdentityWithResult(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultPatchParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12385,7 +12385,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateViaJsonString(string subscriptionId, string resourceGroupName, string vaultName, global::System.String jsonString, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> onCreated, global::System.Func, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12432,7 +12432,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateViaJsonStringWithResult(string subscriptionId, string resourceGroupName, string vaultName, global::System.String jsonString, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -12480,7 +12480,7 @@ public partial class KeyVault /// public async global::System.Threading.Tasks.Task VaultsUpdateWithResult(string subscriptionId, string resourceGroupName, string vaultName, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IVaultPatchParameters body, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.ISendAsync sender, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode = Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeCreate|Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate) { - var apiVersion = @"2023-02-01"; + var apiVersion = @"2024-11-01"; // Constant Parameters using( NoSynchronizationContext ) { diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.PowerShell.cs index a47c0b3eaf40..98c194459cc0 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.PowerShell.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.PowerShell.cs @@ -145,6 +145,22 @@ internal ManagedHsm(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } if (content.Contains("Sku")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSkuTypeConverter.ConvertFrom); @@ -153,6 +169,10 @@ internal ManagedHsm(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); @@ -310,6 +330,22 @@ internal ManagedHsm(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } if (content.Contains("Sku")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSkuTypeConverter.ConvertFrom); @@ -318,6 +354,10 @@ internal ManagedHsm(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.cs index 5865f22ac793..31bd61a8637f 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsm.cs @@ -48,6 +48,36 @@ public partial class ManagedHsm : [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id; } + /// Managed service identity (system assigned and/or user assigned identities) + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity = value ?? null /* model class */; } + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityType = value ?? null; } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityUserAssignedIdentity = value ?? null /* model class */; } + /// Array of initial administrators object ids for this managed hsm pool. [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] public System.Collections.Generic.List InitialAdminObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmPropertiesInternal)Property).InitialAdminObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmPropertiesInternal)Property).InitialAdminObjectId = value ?? null /* arrayOf */; } @@ -89,15 +119,21 @@ public partial class ManagedHsm : /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id = value ?? null; } + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity = value ?? null /* model class */; } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId = value ?? null; } + /// Internal Acessors for Name string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Name = value ?? null; } /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Sku = value ?? null /* model class */; } - /// Internal Acessors for SkuFamily - string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily = value ?? null; } - /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SystemData = value ?? null /* model class */; } @@ -192,7 +228,7 @@ public partial class ManagedHsm : /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily = value ?? null; } /// SKU of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.PowerShell.cs index cef83b43eaad..584236646421 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.PowerShell.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.PowerShell.cs @@ -117,6 +117,10 @@ internal ManagedHsmResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); @@ -169,6 +173,22 @@ internal ManagedHsmResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } AfterDeserializeDictionary(content); } @@ -194,6 +214,10 @@ internal ManagedHsmResource(global::System.Management.Automation.PSObject conten { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); @@ -246,6 +270,22 @@ internal ManagedHsmResource(global::System.Management.Automation.PSObject conten { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } AfterDeserializePSObject(content); } diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.cs index 7f12b9a8e0fb..e00e963241c5 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.cs @@ -20,6 +20,39 @@ public partial class ManagedHsmResource : [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] public string Id { get => this._id; } + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity _identity; + + /// Managed service identity (system assigned and/or user assigned identities) + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentity()); set => this._identity = value; } + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).TenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).Type = value ?? null; } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + /// Backing field for property. private string _location; @@ -30,15 +63,21 @@ public partial class ManagedHsmResource : /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Id { get => this._id; set { {_id = value;} } } + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).PrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)Identity).TenantId = value ?? null; } + /// Internal Acessors for Name string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSku()); set { {_sku = value;} } } - /// Internal Acessors for SkuFamily - string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSkuInternal)Sku).Family = value ?? null; } - /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemData()); set { {_systemData = value;} } } @@ -79,7 +118,7 @@ public partial class ManagedHsmResource : /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSkuInternal)Sku).Family; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSkuInternal)Sku).Family; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSkuInternal)Sku).Family = value ?? null; } /// SKU of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inlined)] @@ -153,6 +192,61 @@ public partial interface IManagedHsmResource : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string IdentityTenantId { get; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string IdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } /// The supported Azure location where the managed HSM Pool should be created. [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( Required = false, @@ -178,14 +272,15 @@ public partial interface IManagedHsmResource : /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( Required = false, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, Description = @"SKU Family of the managed HSM Pool", SerializedName = @"family", PossibleTypes = new [] { typeof(string) })] - string SkuFamily { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] + string SkuFamily { get; set; } /// SKU of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( Required = false, @@ -196,7 +291,7 @@ public partial interface IManagedHsmResource : Description = @"SKU of the managed HSM Pool", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] string SkuName { get; set; } /// The timestamp of the key vault resource creation (UTC). [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( @@ -296,6 +391,27 @@ internal partial interface IManagedHsmResourceInternal { /// The Azure Resource Manager resource ID for the managed HSM Pool. string Id { get; set; } + /// Managed service identity (system assigned and/or user assigned identities) + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Identity { get; set; } + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string IdentityPrincipalId { get; set; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string IdentityTenantId { get; set; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string IdentityType { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } /// The supported Azure location where the managed HSM Pool should be created. string Location { get; set; } /// The name of the managed HSM Pool. @@ -303,9 +419,10 @@ internal partial interface IManagedHsmResourceInternal /// SKU details Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku Sku { get; set; } /// SKU Family of the managed HSM Pool + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] string SkuFamily { get; set; } /// SKU of the managed HSM Pool - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] string SkuName { get; set; } /// /// Metadata pertaining to creation and last modification of the key vault resource. diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.json.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.json.cs index a3e5dd934ae1..59799f2ed7ba 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.json.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmResource.json.cs @@ -79,6 +79,7 @@ internal ManagedHsmResource(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime. } {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSku.FromJson(__jsonSku) : _sku;} {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemData.FromJson(__jsonSystemData) : _systemData;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentity.FromJson(__jsonIdentity) : _identity;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)_id;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)_name;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} @@ -111,6 +112,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode ToJson( { AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); } + AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeRead)) { AddIf( null != (((object)this._id)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonString(this._id.ToString()) : null, "id" ,container.Add ); diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmSku.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmSku.cs index 4231c6f29b21..b2ad34f3b655 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmSku.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedHsmSku.cs @@ -14,14 +14,11 @@ public partial class ManagedHsmSku : { /// Backing field for property. - private string _family= @"B"; + private string _family; /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] - public string Family { get => this._family; } - - /// Internal Acessors for Family - string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSkuInternal.Family { get => this._family; set { {_family = value;} } } + public string Family { get => this._family; set => this._family = value; } /// Backing field for property. private string _name; @@ -43,14 +40,15 @@ public partial interface IManagedHsmSku : /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( Required = true, - ReadOnly = true, + ReadOnly = false, Read = true, Create = true, Update = true, Description = @"SKU Family of the managed HSM Pool", SerializedName = @"family", PossibleTypes = new [] { typeof(string) })] - string Family { get; } + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] + string Family { get; set; } /// SKU of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( Required = true, @@ -61,7 +59,7 @@ public partial interface IManagedHsmSku : Description = @"SKU of the managed HSM Pool", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] string Name { get; set; } } @@ -70,9 +68,10 @@ internal partial interface IManagedHsmSkuInternal { /// SKU Family of the managed HSM Pool + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] string Family { get; set; } /// SKU of the managed HSM Pool - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] string Name { get; set; } } diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.PowerShell.cs new file mode 100644 index 000000000000..4d3084972177 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.PowerShell.cs @@ -0,0 +1,188 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell; + + /// Managed service identity (system assigned and/or user assigned identities) + [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityTypeConverter))] + public partial class ManagedServiceIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedServiceIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedServiceIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode.Parse(jsonText)); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ManagedServiceIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedServiceIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("TenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).TenantId, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } + AfterDeserializePSObject(content); + } + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + } + /// Managed service identity (system assigned and/or user assigned identities) + [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityTypeConverter))] + public partial interface IManagedServiceIdentity + + { + + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.TypeConverter.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.TypeConverter.cs new file mode 100644 index 000000000000..bc00161bec84 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedServiceIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedServiceIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedServiceIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedServiceIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.cs new file mode 100644 index 000000000000..f322a91e933b --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + /// Managed service identity (system assigned and/or user assigned identities) + public partial class ManagedServiceIdentity : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity, + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal + { + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + + /// Internal Acessors for TenantId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + + /// Backing field for property. + private string _principalId; + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + public string PrincipalId { get => this._principalId; } + + /// Backing field for property. + private string _tenantId; + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + public string TenantId { get => this._tenantId; } + + /// Backing field for property. + private string _type; + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + public string Type { get => this._type; set => this._type = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities _userAssignedIdentity; + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentities()); set => this._userAssignedIdentity = value; } + + /// Creates an new instance. + public ManagedServiceIdentity() + { + + } + } + /// Managed service identity (system assigned and/or user assigned identities) + public partial interface IManagedServiceIdentity : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IJsonSerializable + { + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.", + SerializedName = @"tenantId", + PossibleTypes = new [] { typeof(string) })] + string TenantId { get; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = true, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string Type { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Read = true, + Create = true, + Update = true, + Description = @"The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities UserAssignedIdentity { get; set; } + + } + /// Managed service identity (system assigned and/or user assigned identities) + internal partial interface IManagedServiceIdentityInternal + + { + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string PrincipalId { get; set; } + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + string TenantId { get; set; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + string Type { get; set; } + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities UserAssignedIdentity { get; set; } + + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.json.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.json.cs new file mode 100644 index 000000000000..8917ae8efb51 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/ManagedServiceIdentity.json.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + /// Managed service identity (system assigned and/or user assigned identities) + public partial class ManagedServiceIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json ? new ManagedServiceIdentity(json) : null; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject instance to deserialize from. + internal ManagedServiceIdentity(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_tenantId = If( json?.PropertyT("tenantId"), out var __jsonTenantId) ? (string)__jsonTenantId : (string)_tenantId;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)_type;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : _userAssignedIdentity;} + AfterFromJson(json); + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._tenantId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonString(this._tenantId.ToString()) : null, "tenantId" ,container.Add ); + } + AddIf( null != (((object)this._type)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonString(this._type.ToString()) : null, "type" ,container.Add ); + AddIf( null != this._userAssignedIdentity ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) this._userAssignedIdentity.ToJson(null,serializationMode) : null, "userAssignedIdentities" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.PowerShell.cs index 78f2ee330d5e..05070cc43aaa 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.PowerShell.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.PowerShell.cs @@ -157,6 +157,22 @@ internal MhsmPrivateEndpointConnection(global::System.Collections.IDictionary co { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } if (content.Contains("Sku")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSkuTypeConverter.ConvertFrom); @@ -165,6 +181,10 @@ internal MhsmPrivateEndpointConnection(global::System.Collections.IDictionary co { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); @@ -278,6 +298,22 @@ internal MhsmPrivateEndpointConnection(global::System.Management.Automation.PSOb { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } if (content.Contains("Sku")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSkuTypeConverter.ConvertFrom); @@ -286,6 +322,10 @@ internal MhsmPrivateEndpointConnection(global::System.Management.Automation.PSOb { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.cs index 76b8765fabd9..26db64598600 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateEndpointConnection.cs @@ -39,6 +39,36 @@ public partial class MhsmPrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id; } + /// Managed service identity (system assigned and/or user assigned identities) + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity = value ?? null /* model class */; } + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityType = value ?? null; } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityUserAssignedIdentity = value ?? null /* model class */; } + /// The supported Azure location where the managed HSM Pool should be created. [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Location = value ?? null; } @@ -46,15 +76,21 @@ public partial class MhsmPrivateEndpointConnection : /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id = value ?? null; } + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity = value ?? null /* model class */; } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId = value ?? null; } + /// Internal Acessors for Name string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Name = value ?? null; } /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Sku = value ?? null /* model class */; } - /// Internal Acessors for SkuFamily - string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily = value ?? null; } - /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SystemData = value ?? null /* model class */; } @@ -142,7 +178,7 @@ public partial class MhsmPrivateEndpointConnection : /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily = value ?? null; } /// SKU of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.PowerShell.cs index ffb5b7ad838a..dad582c125d8 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.PowerShell.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.PowerShell.cs @@ -145,6 +145,22 @@ internal MhsmPrivateLinkResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } if (content.Contains("Sku")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSkuTypeConverter.ConvertFrom); @@ -153,6 +169,10 @@ internal MhsmPrivateLinkResource(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); @@ -238,6 +258,22 @@ internal MhsmPrivateLinkResource(global::System.Management.Automation.PSObject c { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType = (string) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityType, global::System.Convert.ToString); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentitiesTypeConverter.ConvertFrom); + } if (content.Contains("Sku")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedHsmSkuTypeConverter.ConvertFrom); @@ -246,6 +282,10 @@ internal MhsmPrivateLinkResource(global::System.Management.Automation.PSObject c { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.SystemDataTypeConverter.ConvertFrom); } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ManagedServiceIdentityTypeConverter.ConvertFrom); + } if (content.Contains("Id")) { ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)this).Id, global::System.Convert.ToString); diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.cs index 072de00081b3..e13925a2f85d 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/MhsmPrivateLinkResource.cs @@ -27,6 +27,36 @@ public partial class MhsmPrivateLinkResource : [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] public string Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id; } + /// Managed service identity (system assigned and/or user assigned identities) + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + internal Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity = value ?? null /* model class */; } + + /// + /// The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId; } + + /// + /// The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId; } + + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public string IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityType = value ?? null; } + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityUserAssignedIdentity = value ?? null /* model class */; } + /// The supported Azure location where the managed HSM Pool should be created. [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Location = value ?? null; } @@ -34,15 +64,21 @@ public partial class MhsmPrivateLinkResource : /// Internal Acessors for Id string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Id = value ?? null; } + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedServiceIdentity Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Identity = value ?? null /* model class */; } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityPrincipalId = value ?? null; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).IdentityTenantId = value ?? null; } + /// Internal Acessors for Name string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Name = value ?? null; } /// Internal Acessors for Sku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmSku Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.Sku { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Sku; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).Sku = value ?? null /* model class */; } - /// Internal Acessors for SkuFamily - string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily = value ?? null; } - /// Internal Acessors for SystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ISystemData Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SystemData = value ?? null /* model class */; } @@ -101,7 +137,7 @@ public partial class MhsmPrivateLinkResource : /// SKU Family of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] - public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; } + public string SkuFamily { get => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily; set => ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsmResourceInternal)__managedHsmResource).SkuFamily = value ?? null; } /// SKU of the managed HSM Pool [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Inherited)] diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.PowerShell.cs new file mode 100644 index 000000000000..e08e2fb39724 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.PowerShell.cs @@ -0,0 +1,166 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell; + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentitiesTypeConverter))] + public partial class UserAssignedIdentities + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UserAssignedIdentities(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UserAssignedIdentities(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UserAssignedIdentities(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UserAssignedIdentities(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + // this type is a dictionary; copy elements from source to here. + CopyFrom(content); + AfterDeserializePSObject(content); + } + } + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentitiesTypeConverter))] + public partial interface IUserAssignedIdentities + + { + + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.TypeConverter.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.TypeConverter.cs new file mode 100644 index 000000000000..45ff385ddda4 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UserAssignedIdentitiesTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UserAssignedIdentities.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UserAssignedIdentities.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UserAssignedIdentities.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.cs new file mode 100644 index 000000000000..8aed4f99e35c --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + public partial class UserAssignedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities, + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentitiesInternal + { + + /// Creates an new instance. + public UserAssignedIdentities() + { + + } + } + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + public partial interface IUserAssignedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray + { + + } + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + internal partial interface IUserAssignedIdentitiesInternal + + { + + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.dictionary.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.dictionary.cs new file mode 100644 index 000000000000..52579143f3ba --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.dictionary.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + public partial class UserAssignedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray + { + protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + + global::System.Collections.Generic.IDictionary Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray.AdditionalProperties { get => __additionalProperties; } + + int Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray.Count { get => __additionalProperties.Count; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray.Keys { get => __additionalProperties.Keys; } + + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); + + public void Clear() => __additionalProperties.Clear(); + + /// + public bool ContainsKey(global::System.String key) => __additionalProperties.ContainsKey( key); + + /// + public void CopyFrom(global::System.Collections.IDictionary source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public void CopyFrom(global::System.Management.Automation.PSObject source) + { + if (null != source) + { + foreach( var property in Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell.TypeConverterExtensions.GetFilteredProperties(source, new global::System.Collections.Generic.HashSet() { } ) ) + { + if ((null != property.Key && null != property.Value)) + { + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + } + } + } + } + + /// + public bool Remove(global::System.String key) => __additionalProperties.Remove( key); + + /// + /// + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentities source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.json.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.json.cs new file mode 100644 index 000000000000..427845c28db3 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentities.json.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + /// + /// The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM + /// resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. + /// The dictionary values can be empty objects ({}) in requests. + /// + public partial class UserAssignedIdentities + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json ? new UserAssignedIdentities(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray)this).AdditionalProperties, container); + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject instance to deserialize from. + /// + internal UserAssignedIdentities(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json, global::System.Collections.Generic.HashSet exclusions = null) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.JsonSerializable.FromJson( json, ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IAssociativeArray)this).AdditionalProperties, (j) => Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentity.FromJson(j) ,exclusions ); + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs new file mode 100644 index 000000000000..dbffcb78b096 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.PowerShell.cs @@ -0,0 +1,172 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell; + + /// User assigned identity properties + [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentityTypeConverter))] + public partial class UserAssignedIdentity + { + + /// + /// AfterDeserializeDictionary will be called after the deserialization has finished, allowing customization of the + /// object before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Collections.IDictionary content that should be used. + + partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content); + + /// + /// AfterDeserializePSObject will be called after the deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The global::System.Management.Automation.PSObject content that should be used. + + partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content); + + /// + /// BeforeDeserializeDictionary will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Collections.IDictionary content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow); + + /// + /// BeforeDeserializePSObject will be called before the deserialization has commenced, allowing complete customization + /// of the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow); + + /// + /// OverrideToString will be called if it is implemented. Implement this method in a partial class to enable this behavior + /// + /// /// instance serialized to a string, normally it is a Json + /// /// set returnNow to true if you provide a customized OverrideToString function + + partial void OverrideToString(ref string stringResult, ref bool returnNow); + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new UserAssignedIdentity(content); + } + + /// + /// Deserializes a into an instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new UserAssignedIdentity(content); + } + + /// + /// Creates a new instance of , deserializing the content from a json string. + /// + /// a string containing a JSON serialized instance of this model. + /// an instance of the model class. + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode.Parse(jsonText)); + + /// Serializes this instance to a json string. + + /// a containing this model serialized to JSON text. + public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeAll)?.ToString(); + + public override string ToString() + { + var returnNow = false; + var result = global::System.String.Empty; + OverrideToString(ref result, ref returnNow); + if (returnNow) + { + return result; + } + return ToJsonString(); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal UserAssignedIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal UserAssignedIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + } + if (content.Contains("ClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// User assigned identity properties + [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentityTypeConverter))] + public partial interface IUserAssignedIdentity + + { + + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs new file mode 100644 index 000000000000..9f4f9ee3a41a --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.TypeConverter.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class UserAssignedIdentityTypeConverter : global::System.Management.Automation.PSTypeConverter + { + + /// + /// Determines if the converter can convert the parameter to the parameter. + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false. + /// + public override bool CanConvertFrom(object sourceValue, global::System.Type destinationType) => CanConvertFrom(sourceValue); + + /// + /// Determines if the converter can convert the parameter to the + /// type. + /// + /// the instance to check if it can be converted to the type. + /// + /// true if the instance could be converted to a type, otherwise false + /// + public static bool CanConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return true; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + // we say yest to PSObjects + return true; + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + // we say yest to Hashtables/dictionaries + return true; + } + try + { + if (null != sourceValue.ToJsonString()) + { + return true; + } + } + catch + { + // Not one of our objects + } + try + { + string text = sourceValue.ToString()?.Trim(); + return true == text?.StartsWith("{") && true == text?.EndsWith("}") && Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode.Parse(text).Type == Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonType.Object; + } + catch + { + // Doesn't look like it can be treated as JSON + } + return false; + } + + /// + /// Determines if the parameter can be converted to the + /// parameter + /// + /// the to convert from + /// the to convert to + /// + /// true if the converter can convert the parameter to the parameter, otherwise false + /// + public override bool CanConvertTo(object sourceValue, global::System.Type destinationType) => false; + + /// + /// Converts the parameter to the parameter using and + /// + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// + /// an instance of , or null if there is no suitable conversion. + /// + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => ConvertFrom(sourceValue); + + /// + /// Converts the parameter into an instance of + /// + /// the value to convert into an instance of . + /// + /// an instance of , or null if there is no suitable conversion. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return UserAssignedIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return UserAssignedIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return UserAssignedIdentity.DeserializeFromDictionary(sourceValue); + } + return null; + } + + /// NotImplemented -- this will return null + /// the to convert from + /// the to convert to + /// not used by this TypeConverter. + /// when set to true, will ignore the case when converting. + /// will always return null. + public override object ConvertTo(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => null; + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.cs new file mode 100644 index 000000000000..15cca0f5b0e4 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + /// User assigned identity properties + public partial class UserAssignedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal + { + + /// Backing field for property. + private string _clientId; + + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + public string ClientId { get => this._clientId; } + + /// Internal Acessors for ClientId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } + + /// Internal Acessors for PrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + + /// Backing field for property. + private string _principalId; + + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Origin(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PropertyOrigin.Owned)] + public string PrincipalId { get => this._principalId; } + + /// Creates an new instance. + public UserAssignedIdentity() + { + + } + } + /// User assigned identity properties + public partial interface IUserAssignedIdentity : + Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IJsonSerializable + { + /// The client ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The client ID of the assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ClientId { get; } + /// The principal ID of the assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = true, + Read = true, + Create = false, + Update = false, + Description = @"The principal ID of the assigned identity.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string PrincipalId { get; } + + } + /// User assigned identity properties + internal partial interface IUserAssignedIdentityInternal + + { + /// The client ID of the assigned identity. + string ClientId { get; set; } + /// The principal ID of the assigned identity. + string PrincipalId { get; set; } + + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.json.cs b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.json.cs new file mode 100644 index 000000000000..26fd2aee2177 --- /dev/null +++ b/generated/KeyVault/KeyVault.Autorest/generated/api/Models/UserAssignedIdentity.json.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models +{ + using static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Extensions; + + /// User assigned identity properties + public partial class UserAssignedIdentity + { + + /// + /// AfterFromJson will be called after the json deserialization has finished, allowing customization of the object + /// before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JsonNode that should be deserialized into this object. + + partial void AfterFromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json); + + /// + /// AfterToJson will be called after the json serialization has finished, allowing customization of the before it is returned. Implement this method in a partial class to enable this behavior + /// + /// The JSON container that the serialization result will be placed in. + + partial void AfterToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container); + + /// + /// BeforeFromJson will be called before the json deserialization has commenced, allowing complete customization of + /// the object before it is deserialized. + /// If you wish to disable the default deserialization entirely, return true in the + /// output parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JsonNode that should be deserialized into this object. + /// Determines if the rest of the deserialization should be processed, or if the method should return + /// instantly. + + partial void BeforeFromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json, ref bool returnNow); + + /// + /// BeforeToJson will be called before the json serialization has commenced, allowing complete customization of the + /// object before it is serialized. + /// If you wish to disable the default serialization entirely, return true in the output + /// parameter. + /// Implement this method in a partial class to enable this behavior. + /// + /// The JSON container that the serialization result will be placed in. + /// Determines if the rest of the serialization should be processed, or if the method should return + /// instantly. + + partial void BeforeToJson(ref Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container, ref bool returnNow); + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json ? new UserAssignedIdentity(json) : null; + } + + /// + /// Serializes this instance of into a . + /// + /// The container to serialize this object into. If the caller + /// passes in null, a new instance will be created and returned to the caller. + /// Allows the caller to choose the depth of the serialization. See . + /// + /// a serialized instance of as a . + /// + public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode ToJson(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject container, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode serializationMode) + { + container = container ?? new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject(); + + bool returnNow = false; + BeforeToJson(ref container, ref returnNow); + if (returnNow) + { + return container; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._principalId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonString(this._principalId.ToString()) : null, "principalId" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeRead)) + { + AddIf( null != (((object)this._clientId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonString(this._clientId.ToString()) : null, "clientId" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + + /// + /// Deserializes a Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject into a new instance of . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject instance to deserialize from. + internal UserAssignedIdentity(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_principalId = If( json?.PropertyT("principalId"), out var __jsonPrincipalId) ? (string)__jsonPrincipalId : (string)_principalId;} + {_clientId = If( json?.PropertyT("clientId"), out var __jsonClientId) ? (string)__jsonClientId : (string)_clientId;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsmRegion_List.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsmRegion_List.cs index 284322671435..4c9683d88b8b 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsmRegion_List.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsmRegion_List.cs @@ -20,7 +20,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmGeoReplicatedRegion))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"The List operation gets information about the regions associated with the managed HSM Pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/regions", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}/regions", ApiVersion = "2024-11-01")] public partial class GetAzKeyVaultManagedHsmRegion_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_Get.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_Get.cs index fdfd3fc322ff..9df70ed37ebe 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_Get.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_Get.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Gets the specified managed HSM Pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] public partial class GetAzKeyVaultManagedHsm_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_GetViaIdentity.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_GetViaIdentity.cs index 990cd8a39200..2d1cebc4cafe 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_GetViaIdentity.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_GetViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Gets the specified managed HSM Pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] public partial class GetAzKeyVaultManagedHsm_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List.cs index 96db94fd06ca..6b2c701a57f9 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"The List operation gets information about the managed HSM Pools associated with the subscription and within the specified resource group.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs", ApiVersion = "2024-11-01")] public partial class GetAzKeyVaultManagedHsm_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List1.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List1.cs index 8528be7ad340..0dc3bcbfe249 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List1.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/GetAzKeyVaultManagedHsm_List1.cs @@ -21,7 +21,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"The List operation gets information about the managed HSM Pools associated with the subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/managedHSMs", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/managedHSMs", ApiVersion = "2024-11-01")] public partial class GetAzKeyVaultManagedHsm_List1 : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckExpanded.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckExpanded.cs index c606d4f1c27c..033dcc462af1 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckExpanded.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Checks that the managed hsm name is valid and is not already in use.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability", ApiVersion = "2024-11-01")] public partial class TestAzKeyVaultManagedHsmNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonFilePath.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonFilePath.cs index 1f1bed67f51f..10a925214e8c 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonFilePath.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Checks that the managed hsm name is valid and is not already in use.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability", ApiVersion = "2024-11-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.NotSuggestDefaultParameterSet] public partial class TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonString.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonString.cs index e05066f33c36..88ccd69f84c9 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonString.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckMhsmNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Checks that the managed hsm name is valid and is not already in use.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkMhsmNameAvailability", ApiVersion = "2024-11-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.NotSuggestDefaultParameterSet] public partial class TestAzKeyVaultManagedHsmNameAvailability_CheckViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckExpanded.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckExpanded.cs index 879a36fef77c..bbabdb3f75e3 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckExpanded.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckExpanded.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Checks that the vault name is valid and is not already in use.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability", ApiVersion = "2024-11-01")] public partial class TestAzKeyVaultNameAvailability_CheckExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonFilePath.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonFilePath.cs index a88754280887..0d18cd1a8f29 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonFilePath.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonFilePath.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Checks that the vault name is valid and is not already in use.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability", ApiVersion = "2024-11-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.NotSuggestDefaultParameterSet] public partial class TestAzKeyVaultNameAvailability_CheckViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonString.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonString.cs index a91eab15499e..2aa84b308868 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonString.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/TestAzKeyVaultNameAvailability_CheckViaJsonString.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.ICheckNameAvailabilityResult))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"Checks that the vault name is valid and is not already in use.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/providers/Microsoft.KeyVault/checkNameAvailability", ApiVersion = "2024-11-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.NotSuggestDefaultParameterSet] public partial class TestAzKeyVaultNameAvailability_CheckViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_Update.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_Update.cs index 32b13bcd43cf..3bd10218c683 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_Update.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_Update.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"update a managed HSM Pool in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] public partial class UpdateAzKeyVaultManagedHsm_Update : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateExpanded.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateExpanded.cs index 476d6bec4e2a..70c792019972 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateExpanded.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"update a managed HSM Pool in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] public partial class UpdateAzKeyVaultManagedHsm_UpdateExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext @@ -137,6 +137,20 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } + /// Array of initial administrators object ids for this managed hsm pool. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of initial administrators object ids for this managed hsm pool.")] @@ -294,6 +308,18 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateExpanded : global::System. [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Path)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } + /// SKU Family of the managed HSM Pool + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SKU Family of the managed HSM Pool")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SKU Family of the managed HSM Pool", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] + public string SkuFamily { get => _parametersBody.SkuFamily ?? null; set => _parametersBody.SkuFamily = value; } + /// SKU of the managed HSM Pool [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SKU of the managed HSM Pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Body)] @@ -303,7 +329,7 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateExpanded : global::System. Description = @"SKU of the managed HSM Pool", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] public string SkuName { get => _parametersBody.SkuName ?? null; set => _parametersBody.SkuName = value; } /// @@ -367,6 +393,14 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateExpanded : global::System. PossibleTypes = new [] { typeof(string) })] public string TenantId { get => _parametersBody.TenantId ?? null; set => _parametersBody.TenantId = value; } + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { get; set; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -646,6 +680,15 @@ protected override void ProcessRecord() try { await ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _parametersBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _parametersBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentity()); + } + } await this.Client.ManagedHsmsUpdate(SubscriptionId, ResourceGroupName, Name, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate); await ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } } diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentity.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentity.cs index 38cf55373147..a16423c77639 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentity.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentity.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"update a managed HSM Pool in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] public partial class UpdateAzKeyVaultManagedHsm_UpdateViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded.cs index d796d69d2ca0..77c5446e0cbb 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"update a managed HSM Pool in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] public partial class UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IContext @@ -137,6 +137,20 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded : glob [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Runtime)] public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SendAsyncStep[] HttpPipelinePrepend { get; set; } + /// + /// Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + public string IdentityType { get => _parametersBody.IdentityType ?? null; set => _parametersBody.IdentityType = value; } + /// Array of initial administrators object ids for this managed hsm pool. [global::System.Management.Automation.AllowEmptyCollection] [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Array of initial administrators object ids for this managed hsm pool.")] @@ -274,6 +288,18 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded : glob PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmGeoReplicatedRegion) })] public Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IMhsmGeoReplicatedRegion[] Region { get => _parametersBody.Region?.ToArray() ?? null /* fixedArrayOf */; set => _parametersBody.Region = (value != null ? new System.Collections.Generic.List(value) : null); } + /// SKU Family of the managed HSM Pool + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SKU Family of the managed HSM Pool")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Body)] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"SKU Family of the managed HSM Pool", + SerializedName = @"family", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] + public string SkuFamily { get => _parametersBody.SkuFamily ?? null; set => _parametersBody.SkuFamily = value; } + /// SKU of the managed HSM Pool [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "SKU of the managed HSM Pool")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category(global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.ParameterCategory.Body)] @@ -283,7 +309,7 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded : glob Description = @"SKU of the managed HSM Pool", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] public string SkuName { get => _parametersBody.SkuName ?? null; set => _parametersBody.SkuName = value; } /// @@ -325,6 +351,14 @@ public partial class UpdateAzKeyVaultManagedHsm_UpdateViaIdentityExpanded : glob PossibleTypes = new [] { typeof(string) })] public string TenantId { get => _parametersBody.TenantId ?? null; set => _parametersBody.TenantId = value; } + /// + /// The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in + /// the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + /// + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The array of user assigned identities associated with the resource. The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.'")] + [global::System.Management.Automation.AllowEmptyCollection] + public string[] UserAssignedIdentity { get; set; } + /// /// overrideOnDefault will be called before the regular onDefault has been processed, allowing customization of what /// happens on that response. Implement this method in a partial class to enable this behavior @@ -603,6 +637,15 @@ protected override void ProcessRecord() await ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Events.CmdletBeforeAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } if (InputObject?.Id != null) { + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _parametersBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _parametersBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentity()); + } + } await this.Client.ManagedHsmsUpdateViaIdentity(InputObject.Id, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate); } else @@ -620,6 +663,15 @@ protected override void ProcessRecord() { ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.Name"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); } + if (this.UserAssignedIdentity?.Length > 0) + { + // calculate UserAssignedIdentity + _parametersBody.IdentityUserAssignedIdentity.Clear(); + foreach( var id in this.UserAssignedIdentity ) + { + _parametersBody.IdentityUserAssignedIdentity.Add(id, new Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.UserAssignedIdentity()); + } + } await this.Client.ManagedHsmsUpdate(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.Name ?? null, _parametersBody, onOk, onDefault, this, Pipeline, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.SerializationMode.IncludeUpdate); } await ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Signal(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.Events.CmdletAfterAPICall); if( ((Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener)this).Token.IsCancellationRequested ) { return; } diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonFilePath.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonFilePath.cs index 5c88601ca4d4..0831609696d9 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonFilePath.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonFilePath.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"update a managed HSM Pool in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.NotSuggestDefaultParameterSet] public partial class UpdateAzKeyVaultManagedHsm_UpdateViaJsonFilePath : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, diff --git a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonString.cs b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonString.cs index 24cec712d90e..7d279239fd85 100644 --- a/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonString.cs +++ b/generated/KeyVault/KeyVault.Autorest/generated/cmdlets/UpdateAzKeyVaultManagedHsm_UpdateViaJsonString.cs @@ -19,7 +19,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Cmdlets [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Models.IManagedHsm))] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Description(@"update a managed HSM Pool in the specified subscription.")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Generated] - [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2023-02-01")] + [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.HttpPath(Path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.KeyVault/managedHSMs/{name}", ApiVersion = "2024-11-01")] [global::Microsoft.Azure.PowerShell.Cmdlets.KeyVault.NotSuggestDefaultParameterSet] public partial class UpdateAzKeyVaultManagedHsm_UpdateViaJsonString : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Runtime.IEventListener, diff --git a/generated/KeyVault/KeyVault.Autorest/internal/Get-ParameterForRegion.ps1 b/generated/KeyVault/KeyVault.Autorest/internal/Get-ParameterForRegion.ps1 index bacb6c55141d..735b2b33054d 100644 --- a/generated/KeyVault/KeyVault.Autorest/internal/Get-ParameterForRegion.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/internal/Get-ParameterForRegion.ps1 @@ -34,7 +34,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. PARAMETER : Resource information with extended details. + [IdentityType ]: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + [IdentityUserAssignedIdentity ]: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + [(Any) ]: This indicates any property can be added to this object. [Location ]: The supported Azure location where the managed HSM Pool should be created. + [SkuFamily ]: SKU Family of the managed HSM Pool [SkuName ]: SKU of the managed HSM Pool [Tag ]: Resource tags [(Any) ]: This indicates any property can be added to this object. diff --git a/generated/KeyVault/KeyVault.Autorest/internal/ProxyCmdletDefinitions.ps1 b/generated/KeyVault/KeyVault.Autorest/internal/ProxyCmdletDefinitions.ps1 index b707bbc561b3..579748ae38b0 100644 --- a/generated/KeyVault/KeyVault.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -219,7 +219,11 @@ COMPLEX PARAMETER PROPERTIES To create the parameters described below, construct a hash table containing the appropriate properties. For information on hash tables, run Get-Help about_Hash_Tables. PARAMETER : Resource information with extended details. + [IdentityType ]: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + [IdentityUserAssignedIdentity ]: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + [(Any) ]: This indicates any property can be added to this object. [Location ]: The supported Azure location where the managed HSM Pool should be created. + [SkuFamily ]: SKU Family of the managed HSM Pool [SkuName ]: SKU of the managed HSM Pool [Tag ]: Resource tags [(Any) ]: This indicates any property can be added to this object. @@ -351,7 +355,11 @@ NETWORKACLSVIRTUALNETWORKRULE : The list of virtual n Id : Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. PARAMETER : Resource information with extended details. + [IdentityType ]: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + [IdentityUserAssignedIdentity ]: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + [(Any) ]: This indicates any property can be added to this object. [Location ]: The supported Azure location where the managed HSM Pool should be created. + [SkuFamily ]: SKU Family of the managed HSM Pool [SkuName ]: SKU of the managed HSM Pool [Tag ]: Resource tags [(Any) ]: This indicates any property can be added to this object. @@ -450,6 +458,14 @@ param( # Soft delete is enabled by default for all managed HSMs and is immutable. ${EnableSoftDelete}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] + [System.String] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] @@ -511,7 +527,15 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] + [System.String] + # SKU Family of the managed HSM Pool + ${SkuFamily}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] [System.String] # SKU of the managed HSM Pool @@ -541,6 +565,15 @@ param( # The Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool. ${TenantId}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] [System.String] diff --git a/generated/KeyVault/KeyVault.Autorest/internal/Update-AzKeyVaultManagedHsm.ps1 b/generated/KeyVault/KeyVault.Autorest/internal/Update-AzKeyVaultManagedHsm.ps1 index 5529ba8b603b..96ea4b62aa0a 100644 --- a/generated/KeyVault/KeyVault.Autorest/internal/Update-AzKeyVaultManagedHsm.ps1 +++ b/generated/KeyVault/KeyVault.Autorest/internal/Update-AzKeyVaultManagedHsm.ps1 @@ -52,7 +52,11 @@ NETWORKACLSVIRTUALNETWORKRULE : The list of virtual n Id : Full resource id of a vnet subnet, such as '/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/subnet1'. PARAMETER : Resource information with extended details. + [IdentityType ]: Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + [IdentityUserAssignedIdentity ]: The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests. + [(Any) ]: This indicates any property can be added to this object. [Location ]: The supported Azure location where the managed HSM Pool should be created. + [SkuFamily ]: SKU Family of the managed HSM Pool [SkuName ]: SKU of the managed HSM Pool [Tag ]: Resource tags [(Any) ]: This indicates any property can be added to this object. @@ -151,6 +155,14 @@ param( # Soft delete is enabled by default for all managed HSMs and is immutable. ${EnableSoftDelete}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("None", "SystemAssigned", "UserAssigned", "SystemAssigned,UserAssigned")] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] + [System.String] + # Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). + ${IdentityType}, + [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] [AllowEmptyCollection()] @@ -212,7 +224,15 @@ param( [Parameter(ParameterSetName='UpdateExpanded')] [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] - [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6")] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("B", "C")] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] + [System.String] + # SKU Family of the managed HSM Pool + ${SkuFamily}, + + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.PSArgumentCompleterAttribute("Standard_B1", "Custom_B32", "Custom_B6", "Custom_C42", "Custom_C10")] [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] [System.String] # SKU of the managed HSM Pool @@ -242,6 +262,15 @@ param( # The Azure Active Directory tenant ID that should be used for authenticating requests to the managed HSM pool. ${TenantId}, + [Parameter(ParameterSetName='UpdateExpanded')] + [Parameter(ParameterSetName='UpdateViaIdentityExpanded')] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] + [System.String[]] + # The array of user assigned identities associated with the resource. + # The elements in array will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}.' + ${UserAssignedIdentity}, + [Parameter(ParameterSetName='UpdateViaJsonFilePath', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.KeyVault.Category('Body')] [System.String] diff --git a/src/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs b/src/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs index ab9eb17df562..b1c506984fa8 100644 --- a/src/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs +++ b/src/KeyVault/KeyVault.Autorest/Properties/AssemblyInfo.cs @@ -20,7 +20,7 @@ [assembly: System.Reflection.AssemblyCopyrightAttribute("Copyright © Microsoft")] [assembly: System.Reflection.AssemblyProductAttribute("Microsoft Azure PowerShell")] [assembly: System.Reflection.AssemblyTitleAttribute("Microsoft Azure PowerShell - KeyVault")] -[assembly: System.Reflection.AssemblyFileVersionAttribute("6.3.1")] -[assembly: System.Reflection.AssemblyVersionAttribute("6.3.1")] +[assembly: System.Reflection.AssemblyFileVersionAttribute("0.1.0.0")] +[assembly: System.Reflection.AssemblyVersionAttribute("0.1.0.0")] [assembly: System.Runtime.InteropServices.ComVisibleAttribute(false)] -[assembly: System.CLSCompliantAttribute(false)] +[assembly: System.CLSCompliantAttribute(false)] \ No newline at end of file diff --git a/src/KeyVault/KeyVault.Autorest/docs/Az.KeyVault.md b/src/KeyVault/KeyVault.Autorest/docs/Az.KeyVault.md index b1d45e84fc0e..1b35ebc55992 100644 --- a/src/KeyVault/KeyVault.Autorest/docs/Az.KeyVault.md +++ b/src/KeyVault/KeyVault.Autorest/docs/Az.KeyVault.md @@ -1,6 +1,6 @@ --- Module Name: Az.KeyVault -Module Guid: f682d34a-6f17-4cd7-967e-aa2e28f8b021 +Module Guid: 413501d4-744b-494d-b2f5-0d09e57f3f8d Download Help Link: https://learn.microsoft.com/powershell/module/az.keyvault Help Version: 1.0.0.0 Locale: en-US diff --git a/src/KeyVault/KeyVault.Autorest/resources/README.md b/src/KeyVault/KeyVault.Autorest/resources/README.md deleted file mode 100644 index 937f07f8fec2..000000000000 --- a/src/KeyVault/KeyVault.Autorest/resources/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Resources -This directory can contain any additional resources for module that are not required at runtime. This directory **does not** get packaged with the module. If you have assets for custom implementation, place them into the `..\custom` folder. - -## Info -- Modifiable: yes -- Generated: no -- Committed: yes -- Packaged: no - -## Purpose -Use this folder to put anything you want to keep around as part of the repository for the module, but is not something that is required for the module. For example, development files, packaged builds, or additional information. This is only intended to be used in repositories where the module's output directory is cleaned, but tangential resources for the module want to remain intact. \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/ISyncGroupsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/ISyncGroupsOperations.cs index f9644a37e88d..4b85088a5879 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/ISyncGroupsOperations.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/ISyncGroupsOperations.cs @@ -37,10 +37,10 @@ public partial interface ISyncGroupsOperations System.Threading.Tasks.Task>> ListSyncDatabaseIdsWithHttpMessagesAsync(string locationName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Refreshes a hub database schema. + /// Lists sync groups under a hub database. /// /// - /// Refreshes a hub database schema. + /// Lists sync groups under a hub database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -52,9 +52,6 @@ public partial interface ISyncGroupsOperations /// /// The name of the database on which the sync group is hosted. /// - /// - /// The name of the sync group. - /// /// /// The headers that will be added to request. /// @@ -64,13 +61,16 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a collection of hub database schemas. + /// Gets a sync group. /// /// - /// Gets a collection of hub database schemas. + /// Gets a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -97,13 +97,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a collection of sync group logs. + /// Creates or updates a sync group. /// /// - /// Gets a collection of sync group logs. + /// Creates or updates a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -118,17 +118,8 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// - /// - /// Get logs generated after this time. - /// - /// - /// Get logs generated before this time. - /// - /// - /// The types of logs to retrieve. - /// - /// - /// The continuation token for this operation. + /// + /// The requested sync group resource state. /// /// /// The headers that will be added to request. @@ -142,13 +133,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Cancels a sync group synchronization. + /// Deletes a sync group. /// /// - /// Cancels a sync group synchronization. + /// Deletes a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -172,13 +163,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task CancelSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Triggers a sync group synchronization. + /// Updates a sync group. /// /// - /// Triggers a sync group synchronization. + /// Updates a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -193,6 +184,9 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// + /// + /// The requested sync group resource state. + /// /// /// The headers that will be added to request. /// @@ -202,13 +196,16 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a sync group. + /// Cancels a sync group synchronization. /// /// - /// Gets a sync group. + /// Cancels a sync group synchronization. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -232,16 +229,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task CancelSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Creates or updates a sync group. + /// Gets a collection of hub database schemas. /// /// - /// Creates or updates a sync group. + /// Gets a collection of hub database schemas. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -256,9 +250,6 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// /// /// The headers that will be added to request. /// @@ -271,13 +262,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Deletes a sync group. + /// Gets a collection of sync group logs. /// /// - /// Deletes a sync group. + /// Gets a collection of sync group logs. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -292,6 +283,18 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// + /// + /// Get logs generated after this time. + /// + /// + /// Get logs generated before this time. + /// + /// + /// The types of logs to retrieve. + /// + /// + /// The continuation token for this operation. + /// /// /// The headers that will be added to request. /// @@ -301,13 +304,16 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -322,9 +328,6 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// /// /// The headers that will be added to request. /// @@ -334,16 +337,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Lists sync groups under a hub database. + /// Triggers a sync group synchronization. /// /// - /// Lists sync groups under a hub database. + /// Triggers a sync group synchronization. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -355,6 +355,9 @@ public partial interface ISyncGroupsOperations /// /// The name of the database on which the sync group is hosted. /// + /// + /// The name of the sync group. + /// /// /// The headers that will be added to request. /// @@ -364,16 +367,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Refreshes a hub database schema. + /// Creates or updates a sync group. /// /// - /// Refreshes a hub database schema. + /// Creates or updates a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -388,6 +388,9 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// + /// + /// The requested sync group resource state. + /// /// /// The headers that will be added to request. /// @@ -397,13 +400,16 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Creates or updates a sync group. + /// Deletes a sync group. /// /// - /// Creates or updates a sync group. + /// Deletes a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -418,9 +424,6 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// /// /// The headers that will be added to request. /// @@ -430,16 +433,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Deletes a sync group. + /// Updates a sync group. /// /// - /// Deletes a sync group. + /// Updates a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -454,6 +454,9 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// + /// + /// The requested sync group resource state. + /// /// /// The headers that will be added to request. /// @@ -463,13 +466,16 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -484,9 +490,6 @@ public partial interface ISyncGroupsOperations /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// /// /// The headers that will be added to request. /// @@ -496,10 +499,7 @@ public partial interface ISyncGroupsOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Gets a collection of sync database ids. @@ -525,10 +525,10 @@ public partial interface ISyncGroupsOperations System.Threading.Tasks.Task>> ListSyncDatabaseIdsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a collection of hub database schemas. + /// Lists sync groups under a hub database. /// /// - /// Gets a collection of hub database schemas. + /// Lists sync groups under a hub database. /// /// /// The NextLink from the previous successful call to List operation. @@ -545,13 +545,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a collection of sync group logs. + /// Gets a collection of hub database schemas. /// /// - /// Gets a collection of sync group logs. + /// Gets a collection of hub database schemas. /// /// /// The NextLink from the previous successful call to List operation. @@ -568,13 +568,13 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Lists sync groups under a hub database. + /// Gets a collection of sync group logs. /// /// - /// Lists sync groups under a hub database. + /// Gets a collection of sync group logs. /// /// /// The NextLink from the previous successful call to List operation. @@ -591,7 +591,7 @@ public partial interface ISyncGroupsOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); } } \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/ISyncMembersOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/ISyncMembersOperations.cs index 3b2df0b0bc9f..42c872d780f7 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/ISyncMembersOperations.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/ISyncMembersOperations.cs @@ -14,10 +14,10 @@ namespace Microsoft.Azure.Management.Sql public partial interface ISyncMembersOperations { /// - /// Gets a sync member. + /// Lists sync members in the given sync group. /// /// - /// Gets a sync member. + /// Lists sync members in the given sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -30,10 +30,7 @@ public partial interface ISyncMembersOperations /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. + /// The name of the sync group. /// /// /// The headers that will be added to request. @@ -47,13 +44,13 @@ public partial interface ISyncMembersOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Creates or updates a sync member. + /// Gets a sync member. /// /// - /// Creates or updates a sync member. + /// Gets a sync member. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -71,9 +68,6 @@ public partial interface ISyncMembersOperations /// /// The name of the sync member. /// - /// - /// The requested sync member resource state. - /// /// /// The headers that will be added to request. /// @@ -86,13 +80,13 @@ public partial interface ISyncMembersOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Deletes a sync member. + /// Creates or updates a sync member. /// /// - /// Deletes a sync member. + /// Creates or updates a sync member. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -110,6 +104,9 @@ public partial interface ISyncMembersOperations /// /// The name of the sync member. /// + /// + /// The requested sync member resource state. + /// /// /// The headers that will be added to request. /// @@ -119,13 +116,16 @@ public partial interface ISyncMembersOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Updates an existing sync member. + /// Deletes a sync member. /// /// - /// Updates an existing sync member. + /// Deletes a sync member. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -143,9 +143,6 @@ public partial interface ISyncMembersOperations /// /// The name of the sync member. /// - /// - /// The requested sync member resource state. - /// /// /// The headers that will be added to request. /// @@ -155,16 +152,13 @@ public partial interface ISyncMembersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Lists sync members in the given sync group. + /// Updates an existing sync member. /// /// - /// Lists sync members in the given sync group. + /// Updates an existing sync member. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -177,7 +171,13 @@ public partial interface ISyncMembersOperations /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group. + /// The name of the sync group on which the sync member is hosted. + /// + /// + /// The name of the sync member. + /// + /// + /// The requested sync member resource state. /// /// /// The headers that will be added to request. @@ -191,13 +191,13 @@ public partial interface ISyncMembersOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Gets a sync member database schema. + /// Refreshes a sync member database schema. /// /// - /// Gets a sync member database schema. + /// Refreshes a sync member database schema. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -224,16 +224,13 @@ public partial interface ISyncMembersOperations /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// - System.Threading.Tasks.Task>> ListMemberSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> RefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// - /// Refreshes a sync member database schema. + /// Gets a sync member database schema. /// /// - /// Refreshes a sync member database schema. + /// Gets a sync member database schema. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -260,7 +257,10 @@ public partial interface ISyncMembersOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task RefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListMemberSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Creates or updates a sync member. @@ -299,7 +299,7 @@ public partial interface ISyncMembersOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Deletes a sync member. @@ -332,7 +332,7 @@ public partial interface ISyncMembersOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Updates an existing sync member. @@ -371,7 +371,7 @@ public partial interface ISyncMembersOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Refreshes a sync member database schema. @@ -404,7 +404,7 @@ public partial interface ISyncMembersOperations /// /// Thrown when the operation returned an invalid status code /// - System.Threading.Tasks.Task BeginRefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task> BeginRefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Lists sync members in the given sync group. diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentity.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentity.cs new file mode 100644 index 000000000000..8f3890254580 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentity.cs @@ -0,0 +1,84 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + /// + /// Azure Active Directory identity configuration for a resource. + /// + public partial class DataSyncParticipantIdentity + { + /// + /// Initializes a new instance of the DataSyncParticipantIdentity class. + /// + public DataSyncParticipantIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataSyncParticipantIdentity class. + /// + + /// The Datasync identity type + /// Possible values include: 'None', 'SystemAssigned', 'UserAssigned', + /// 'SystemAssignedUserAssigned' + + /// The DataSync participant identity tenant id + /// + + /// The resource ids of the user assigned identities to use + /// + public DataSyncParticipantIdentity(string type, System.Guid? tenantId = default(System.Guid?), System.Collections.Generic.IDictionary userAssignedIdentities = default(System.Collections.Generic.IDictionary)) + + { + this.Type = type; + this.TenantId = tenantId; + this.UserAssignedIdentities = userAssignedIdentities; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the Datasync identity type Possible values include: 'None', 'SystemAssigned', 'UserAssigned', 'SystemAssignedUserAssigned' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } + + /// + /// Gets or sets the DataSync participant identity tenant id + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tenantId")] + public System.Guid? TenantId {get; set; } + + /// + /// Gets or sets the resource ids of the user assigned identities to use + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "userAssignedIdentities")] + public System.Collections.Generic.IDictionary UserAssignedIdentities {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Type == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type"); + } + + + } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentityType.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentityType.cs new file mode 100644 index 000000000000..9ef22aa9fa23 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantIdentityType.cs @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + + /// + /// Defines values for DataSyncParticipantIdentityType. + /// + + + public static class DataSyncParticipantIdentityType + { + public const string None = "None"; + public const string SystemAssigned = "SystemAssigned"; + public const string UserAssigned = "UserAssigned"; + public const string SystemAssignedUserAssigned = "SystemAssignedUserAssigned"; + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantUserAssignedIdentity.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantUserAssignedIdentity.cs new file mode 100644 index 000000000000..e9979f66290e --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/DataSyncParticipantUserAssignedIdentity.cs @@ -0,0 +1,58 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + /// + /// Azure Active Directory identity configuration for a resource. + /// + public partial class DataSyncParticipantUserAssignedIdentity + { + /// + /// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class. + /// + public DataSyncParticipantUserAssignedIdentity() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DataSyncParticipantUserAssignedIdentity class. + /// + + /// The Azure Active Directory principal id. + /// + + /// The Azure Active Directory client id. + /// + public DataSyncParticipantUserAssignedIdentity(System.Guid? principalId = default(System.Guid?), System.Guid? clientId = default(System.Guid?)) + + { + this.PrincipalId = principalId; + this.ClientId = clientId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the Azure Active Directory principal id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "principalId")] + public System.Guid? PrincipalId {get; private set; } + + /// + /// Gets the Azure Active Directory client id. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "clientId")] + public System.Guid? ClientId {get; private set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs index 2db11dc14ecb..a000a9afe4a5 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroup.cs @@ -37,6 +37,9 @@ public SyncGroup() /// The name and capacity of the SKU. /// + /// Sync group authentication information. + /// + /// Sync interval of the sync group. /// @@ -74,11 +77,12 @@ public SyncGroup() /// Private endpoint name of the sync group if use private link connection is /// enabled. /// - public SyncGroup(string id = default(string), string name = default(string), string type = default(string), Sku sku = default(Sku), int? interval = default(int?), System.DateTime? lastSyncTime = default(System.DateTime?), string conflictResolutionPolicy = default(string), string syncDatabaseId = default(string), string hubDatabaseUserName = default(string), string hubDatabasePassword = default(string), string syncState = default(string), SyncGroupSchema schema = default(SyncGroupSchema), bool? enableConflictLogging = default(bool?), int? conflictLoggingRetentionInDays = default(int?), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string)) + public SyncGroup(DataSyncParticipantIdentity identity, string id = default(string), string name = default(string), string type = default(string), Sku sku = default(Sku), int? interval = default(int?), System.DateTime? lastSyncTime = default(System.DateTime?), string conflictResolutionPolicy = default(string), string syncDatabaseId = default(string), string hubDatabaseUserName = default(string), string hubDatabasePassword = default(string), string syncState = default(string), SyncGroupSchema schema = default(SyncGroupSchema), bool? enableConflictLogging = default(bool?), int? conflictLoggingRetentionInDays = default(int?), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string)) : base(id, name, type) { this.Sku = sku; + this.Identity = identity; this.Interval = interval; this.LastSyncTime = lastSyncTime; this.ConflictResolutionPolicy = conflictResolutionPolicy; @@ -106,6 +110,12 @@ public SyncGroup() [Newtonsoft.Json.JsonProperty(PropertyName = "sku")] public Sku Sku {get; set; } + /// + /// Gets or sets sync group authentication information. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public DataSyncParticipantIdentity Identity {get; set; } + /// /// Gets or sets sync interval of the sync group. /// @@ -186,10 +196,18 @@ public SyncGroup() /// public virtual void Validate() { + if (this.Identity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity"); + } if (this.Sku != null) { this.Sku.Validate(); } + if (this.Identity != null) + { + this.Identity.Validate(); + } diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs index 0b737805efc7..fb30ec66ef60 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupProperties.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.Management.Sql.Models using System.Linq; /// - /// Properties of a sync group. + /// Properties of a sync group with support to MI. /// public partial class SyncGroupProperties { diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsCreateOrUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..58fb77f33625 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsCreateOrUpdateHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncGroupsCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the SyncGroupsCreateOrUpdateHeaders class. + /// + public SyncGroupsCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncGroupsCreateOrUpdateHeaders class. + /// + + /// + /// + public SyncGroupsCreateOrUpdateHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs new file mode 100644 index 000000000000..fbf965966015 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsDeleteHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncGroupsDeleteHeaders + { + /// + /// Initializes a new instance of the SyncGroupsDeleteHeaders class. + /// + public SyncGroupsDeleteHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncGroupsDeleteHeaders class. + /// + + /// + /// + public SyncGroupsDeleteHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsRefreshHubSchemaHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsRefreshHubSchemaHeaders.cs new file mode 100644 index 000000000000..fa353dcaeddb --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsRefreshHubSchemaHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncGroupsRefreshHubSchemaHeaders + { + /// + /// Initializes a new instance of the SyncGroupsRefreshHubSchemaHeaders class. + /// + public SyncGroupsRefreshHubSchemaHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncGroupsRefreshHubSchemaHeaders class. + /// + + /// + /// + public SyncGroupsRefreshHubSchemaHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsUpdateHeaders.cs new file mode 100644 index 000000000000..c52018994bb0 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncGroupsUpdateHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncGroupsUpdateHeaders + { + /// + /// Initializes a new instance of the SyncGroupsUpdateHeaders class. + /// + public SyncGroupsUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncGroupsUpdateHeaders class. + /// + + /// + /// + public SyncGroupsUpdateHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs index 88effdb1d310..63a5dee274b3 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMember.cs @@ -34,6 +34,9 @@ public SyncMember() /// Resource type. /// + /// Sync member authentication information. + /// + /// Sync direction of the sync member. /// Possible values include: 'Bidirectional', 'OneWayMemberToHub', /// 'OneWayHubToMember' @@ -77,10 +80,11 @@ public SyncMember() /// 'UnProvisioned', 'Provisioning', 'Provisioned', 'ProvisionFailed', /// 'DeProvisioning', 'DeProvisioned', 'DeProvisionFailed', 'Reprovisioning', /// 'ReprovisionFailed', 'UnReprovisioned' - public SyncMember(string id = default(string), string name = default(string), string type = default(string), string syncDirection = default(string), string databaseType = default(string), string syncAgentId = default(string), System.Guid? sqlServerDatabaseId = default(System.Guid?), string syncMemberAzureDatabaseResourceId = default(string), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string), string serverName = default(string), string databaseName = default(string), string userName = default(string), string password = default(string), string syncState = default(string)) + public SyncMember(DataSyncParticipantIdentity identity, string id = default(string), string name = default(string), string type = default(string), string syncDirection = default(string), string databaseType = default(string), string syncAgentId = default(string), System.Guid? sqlServerDatabaseId = default(System.Guid?), string syncMemberAzureDatabaseResourceId = default(string), bool? usePrivateLinkConnection = default(bool?), string privateEndpointName = default(string), string serverName = default(string), string databaseName = default(string), string userName = default(string), string password = default(string), string syncState = default(string)) : base(id, name, type) { + this.Identity = identity; this.SyncDirection = syncDirection; this.DatabaseType = databaseType; this.SyncAgentId = syncAgentId; @@ -102,6 +106,12 @@ public SyncMember() partial void CustomInit(); + /// + /// Gets or sets sync member authentication information. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "identity")] + public DataSyncParticipantIdentity Identity {get; set; } + /// /// Gets or sets sync direction of the sync member. Possible values include: 'Bidirectional', 'OneWayMemberToHub', 'OneWayHubToMember' /// @@ -175,5 +185,32 @@ public SyncMember() /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.syncState")] public string SyncState {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Identity == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Identity"); + } + if (this.Identity != null) + { + this.Identity.Validate(); + } + + + + + + + + + + + } } } \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMemberProperties.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMemberProperties.cs index 610598afc1f3..3c16e9242801 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMemberProperties.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMemberProperties.cs @@ -8,7 +8,7 @@ namespace Microsoft.Azure.Management.Sql.Models using System.Linq; /// - /// Properties of a sync member. + /// Properties of a sync member with support to MI. /// public partial class SyncMemberProperties { diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersCreateOrUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..4310344b1f36 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersCreateOrUpdateHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncMembersCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the SyncMembersCreateOrUpdateHeaders class. + /// + public SyncMembersCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncMembersCreateOrUpdateHeaders class. + /// + + /// + /// + public SyncMembersCreateOrUpdateHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersDeleteHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersDeleteHeaders.cs new file mode 100644 index 000000000000..255a1bcf9ff1 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersDeleteHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncMembersDeleteHeaders + { + /// + /// Initializes a new instance of the SyncMembersDeleteHeaders class. + /// + public SyncMembersDeleteHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncMembersDeleteHeaders class. + /// + + /// + /// + public SyncMembersDeleteHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersRefreshMemberSchemaHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersRefreshMemberSchemaHeaders.cs new file mode 100644 index 000000000000..6399a2635396 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersRefreshMemberSchemaHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncMembersRefreshMemberSchemaHeaders + { + /// + /// Initializes a new instance of the SyncMembersRefreshMemberSchemaHeaders class. + /// + public SyncMembersRefreshMemberSchemaHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncMembersRefreshMemberSchemaHeaders class. + /// + + /// + /// + public SyncMembersRefreshMemberSchemaHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersUpdateHeaders.cs b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersUpdateHeaders.cs new file mode 100644 index 000000000000..a3733e8a81e1 --- /dev/null +++ b/src/Sql/Sql.Management.Sdk/Generated/Models/SyncMembersUpdateHeaders.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Sql.Models +{ + using System.Linq; + + public partial class SyncMembersUpdateHeaders + { + /// + /// Initializes a new instance of the SyncMembersUpdateHeaders class. + /// + public SyncMembersUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SyncMembersUpdateHeaders class. + /// + + /// + /// + public SyncMembersUpdateHeaders(string location = default(string)) + + { + this.Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + } +} \ No newline at end of file diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs index 5ab2e8aba833..e56c49191c6c 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperations.cs @@ -81,7 +81,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -168,14 +168,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -185,10 +184,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -239,36 +234,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Refreshes a hub database schema. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// - /// - /// The name of the sync group. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Gets a collection of hub database schemas. + /// Lists sync groups under a hub database. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -280,9 +246,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the database on which the sync group is hosted. /// - /// - /// The name of the sync group. - /// /// /// Headers that will be added to request. /// @@ -304,7 +267,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -325,17 +288,12 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName"); } - if (syncGroupName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); - } - if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -346,21 +304,19 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); - tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemas", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); - _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -428,14 +384,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -445,10 +400,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -461,7 +412,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -475,7 +426,7 @@ internal SyncGroupsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -499,7 +450,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Gets a collection of sync group logs. + /// Gets a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -514,18 +465,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// - /// - /// Get logs generated after this time. - /// - /// - /// Get logs generated before this time. - /// - /// - /// The types of logs to retrieve. - /// - /// - /// The continuation token for this operation. - /// /// /// Headers that will be added to request. /// @@ -547,7 +486,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -573,28 +512,12 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } - if (startTime == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "startTime"); - } - - if (endTime == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "endTime"); - } - - if (type == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "type"); - } - - if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -606,20 +529,16 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("syncGroupName", syncGroupName); - tracingParameters.Add("startTime", startTime); - tracingParameters.Add("endTime", endTime); - tracingParameters.Add("type", type); - tracingParameters.Add("continuationToken", continuationToken); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogs", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); @@ -627,22 +546,6 @@ internal SyncGroupsOperations (SqlManagementClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); - if (startTime != null) - { - _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(startTime))); - } - if (endTime != null) - { - _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(endTime))); - } - if (type != null) - { - _queryParameters.Add(string.Format("type={0}", System.Uri.EscapeDataString(type))); - } - if (continuationToken != null) - { - _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken))); - } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -707,14 +610,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -724,10 +626,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -740,7 +638,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -754,7 +652,7 @@ internal SyncGroupsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -777,6 +675,99 @@ internal SyncGroupsOperations (SqlManagementClient client) } + /// + /// Creates or updates a sync group. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group. + /// + /// + /// The requested sync group resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a sync group. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates a sync group. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group. + /// + /// + /// The requested sync group resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Cancels a sync group synchronization. /// @@ -842,7 +833,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -935,14 +926,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -952,10 +942,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -988,7 +974,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Triggers a sync group synchronization. + /// Gets a collection of hub database schemas. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1012,6 +998,9 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1021,7 +1010,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListHubSchemasWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -1052,7 +1041,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1068,12 +1057,12 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "TriggerSync", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemas", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/hubSchemas").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); @@ -1092,7 +1081,7 @@ internal SyncGroupsOperations (SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -1145,14 +1134,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1162,10 +1150,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1178,7 +1162,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1186,6 +1170,24 @@ internal SyncGroupsOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1198,7 +1200,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Gets a sync group. + /// Gets a collection of sync group logs. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1213,6 +1215,18 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// + /// + /// Get logs generated after this time. + /// + /// + /// Get logs generated before this time. + /// + /// + /// The types of logs to retrieve. + /// + /// + /// The continuation token for this operation. + /// /// /// Headers that will be added to request. /// @@ -1234,7 +1248,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListLogsWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -1260,12 +1274,28 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } + if (startTime == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "startTime"); + } + + if (endTime == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "endTime"); + } + + if (type == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "type"); + } + + if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1277,16 +1307,20 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("syncGroupName", syncGroupName); + tracingParameters.Add("startTime", startTime); + tracingParameters.Add("endTime", endTime); + tracingParameters.Add("type", type); + tracingParameters.Add("continuationToken", continuationToken); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogs", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); @@ -1294,6 +1328,22 @@ internal SyncGroupsOperations (SqlManagementClient client) _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (startTime != null) + { + _queryParameters.Add(string.Format("startTime={0}", System.Uri.EscapeDataString(startTime))); + } + if (endTime != null) + { + _queryParameters.Add(string.Format("endTime={0}", System.Uri.EscapeDataString(endTime))); + } + if (type != null) + { + _queryParameters.Add(string.Format("type={0}", System.Uri.EscapeDataString(type))); + } + if (continuationToken != null) + { + _queryParameters.Add(string.Format("continuationToken={0}", System.Uri.EscapeDataString(continuationToken))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -1358,14 +1408,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1375,10 +1424,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1391,7 +1436,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1405,7 +1450,7 @@ internal SyncGroupsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -1429,39 +1474,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Creates or updates a sync group. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// - /// - /// The name of the sync group. - /// - /// - /// The requested sync group resource state. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a sync group. + /// Refreshes a hub database schema. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1482,15 +1495,15 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The cancellation token. /// - public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> RefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false); + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, customHeaders, cancellationToken).ConfigureAwait(false); return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } /// - /// Updates a sync group. + /// Triggers a sync group synchronization. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1505,35 +1518,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Lists sync groups under a hub database. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// /// /// Headers that will be added to request. /// @@ -1543,9 +1527,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -1555,7 +1536,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListByDatabaseWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task TriggerSyncWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -1576,12 +1557,17 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "databaseName"); } + if (syncGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); + } + if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1592,19 +1578,21 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); + tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabase", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "TriggerSync", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/triggerSync").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); + _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -1619,7 +1607,7 @@ internal SyncGroupsOperations (SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -1672,14 +1660,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1689,10 +1676,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1705,7 +1688,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1713,24 +1696,6 @@ internal SyncGroupsOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1743,7 +1708,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Refreshes a hub database schema. + /// Creates or updates a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1758,6 +1723,9 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// + /// + /// The requested sync group resource state. + /// /// /// Headers that will be added to request. /// @@ -1767,6 +1735,9 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -1776,12 +1747,20 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -1807,7 +1786,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1821,14 +1800,15 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshHubSchema", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); @@ -1847,7 +1827,7 @@ internal SyncGroupsOperations (SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -1876,6 +1856,12 @@ internal SyncGroupsOperations (SqlManagementClient client) } // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (this.Client.Credentials != null) { @@ -1898,16 +1884,15 @@ internal SyncGroupsOperations (SqlManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1917,10 +1902,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1933,7 +1914,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1941,6 +1922,55 @@ internal SyncGroupsOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1953,7 +1983,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Creates or updates a sync group. + /// Deletes a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -1968,9 +1998,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// /// /// Headers that will be added to request. /// @@ -1980,9 +2007,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -1992,20 +2016,12 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (parameters == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); - } - if (parameters != null) - { - parameters.Validate(); - } if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -2031,7 +2047,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2045,10 +2061,9 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); } // Construct URL @@ -2072,7 +2087,7 @@ internal SyncGroupsOperations (SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -2101,12 +2116,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (this.Client.Credentials != null) { @@ -2129,16 +2138,15 @@ internal SyncGroupsOperations (SqlManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2148,10 +2156,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -2164,7 +2168,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -2172,41 +2176,18 @@ internal SyncGroupsOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) + try { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); - } + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); } - // Deserialize Response - if ((int)_statusCode == 201) + catch (Newtonsoft.Json.JsonException ex) { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) + _httpRequest.Dispose(); + if (_httpResponse != null) { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + _httpResponse.Dispose(); } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { @@ -2220,7 +2201,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Deletes a sync group. + /// Updates a sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2235,6 +2216,9 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// + /// + /// The requested sync group resource state. + /// /// /// Headers that will be added to request. /// @@ -2244,6 +2228,9 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// + /// + /// Thrown when unable to deserialize the response + /// /// /// Thrown when a required parameter is null /// @@ -2253,12 +2240,16 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { + if (parameters == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); + } if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -2284,7 +2275,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2298,9 +2289,10 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); } // Construct URL @@ -2324,7 +2316,7 @@ internal SyncGroupsOperations (SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -2353,6 +2345,12 @@ internal SyncGroupsOperations (SqlManagementClient client) } // Serialize Request string _requestContent = null; + if(parameters != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } // Set Credentials if (this.Client.Credentials != null) { @@ -2375,16 +2373,15 @@ internal SyncGroupsOperations (SqlManagementClient client) cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2394,10 +2391,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -2410,7 +2403,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -2418,6 +2411,37 @@ internal SyncGroupsOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + // Deserialize Response + if ((int)_statusCode == 200) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -2430,7 +2454,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -2445,9 +2469,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// The name of the sync group. /// - /// - /// The requested sync group resource state. - /// /// /// Headers that will be added to request. /// @@ -2457,9 +2478,6 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// Thrown when the operation returned an invalid status code /// - /// - /// Thrown when unable to deserialize the response - /// /// /// Thrown when a required parameter is null /// @@ -2469,16 +2487,12 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginRefreshHubSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - if (parameters == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); - } if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -2504,7 +2518,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2518,15 +2532,14 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("syncGroupName", syncGroupName); tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("parameters", parameters); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginRefreshHubSchema", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/refreshHubSchema").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); @@ -2545,7 +2558,7 @@ internal SyncGroupsOperations (SqlManagementClient client) // Create HTTP transport objects var _httpRequest = new System.Net.Http.HttpRequestMessage(); System.Net.Http.HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); _httpRequest.RequestUri = new System.Uri(_url); // Set Headers if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) @@ -2574,12 +2587,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } // Serialize Request string _requestContent = null; - if(parameters != null) - { - _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(parameters, this.Client.SerializationSettings); - _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } // Set Credentials if (this.Client.Credentials != null) { @@ -2604,14 +2611,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2621,10 +2627,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -2637,7 +2639,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -2645,23 +2647,18 @@ internal SyncGroupsOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } - // Deserialize Response - if ((int)_statusCode == 200) + try { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); - } - catch (Newtonsoft.Json.JsonException ex) + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + _httpResponse.Dispose(); } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); } if (_shouldTrace) { @@ -2786,14 +2783,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2803,10 +2799,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -2857,7 +2849,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Gets a collection of hub database schemas. + /// Lists sync groups under a hub database. /// /// /// The NextLink from the previous successful call to List operation. @@ -2883,7 +2875,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { if (nextPageLink == null) @@ -2901,7 +2893,7 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemasNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabaseNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -2968,14 +2960,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2985,10 +2976,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -3001,7 +2988,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -3015,7 +3002,7 @@ internal SyncGroupsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -3039,7 +3026,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Gets a collection of sync group logs. + /// Gets a collection of hub database schemas. /// /// /// The NextLink from the previous successful call to List operation. @@ -3065,7 +3052,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListHubSchemasNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { if (nextPageLink == null) @@ -3083,7 +3070,7 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogsNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListHubSchemasNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -3150,14 +3137,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -3167,10 +3153,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -3183,7 +3165,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -3197,7 +3179,7 @@ internal SyncGroupsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -3221,7 +3203,7 @@ internal SyncGroupsOperations (SqlManagementClient client) } /// - /// Lists sync groups under a hub database. + /// Gets a collection of sync group logs. /// /// /// The NextLink from the previous successful call to List operation. @@ -3247,7 +3229,7 @@ internal SyncGroupsOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListByDatabaseNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListLogsNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { if (nextPageLink == null) @@ -3265,7 +3247,7 @@ internal SyncGroupsOperations (SqlManagementClient client) tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListByDatabaseNext", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListLogsNext", tracingParameters); } // Construct URL string _url = "{nextLink}"; @@ -3332,14 +3314,13 @@ internal SyncGroupsOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -3349,10 +3330,6 @@ internal SyncGroupsOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -3365,7 +3342,7 @@ internal SyncGroupsOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -3379,7 +3356,7 @@ internal SyncGroupsOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs index 214faa925ef0..7ba7e3dd41a4 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/SyncGroupsOperationsExtensions.cs @@ -46,7 +46,7 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab } } /// - /// Refreshes a hub database schema. + /// Lists sync groups under a hub database. /// /// /// The operations group for this extension method. @@ -61,16 +61,13 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab /// /// The name of the database on which the sync group is hosted. /// - /// - /// The name of the sync group. - /// - public static void RefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName) { - ((ISyncGroupsOperations)operations).RefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); } /// - /// Refreshes a hub database schema. + /// Lists sync groups under a hub database. /// /// /// The operations group for this extension method. @@ -85,18 +82,18 @@ public static void RefreshHubSchema(this ISyncGroupsOperations operations, strin /// /// The name of the database on which the sync group is hosted. /// - /// - /// The name of the sync group. - /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task RefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByDatabaseAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.RefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Gets a collection of hub database schemas. + /// Gets a sync group. /// /// /// The operations group for this extension method. @@ -114,13 +111,13 @@ public static void RefreshHubSchema(this ISyncGroupsOperations operations, strin /// /// The name of the sync group. /// - public static Microsoft.Rest.Azure.IPage ListHubSchemas(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).ListHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Gets a collection of hub database schemas. + /// Gets a sync group. /// /// /// The operations group for this extension method. @@ -141,15 +138,15 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListHubSchemasAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListHubSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets a collection of sync group logs. + /// Creates or updates a sync group. /// /// /// The operations group for this extension method. @@ -167,25 +164,13 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema /// /// The name of the sync group. /// - /// - /// Get logs generated after this time. - /// - /// - /// Get logs generated before this time. - /// - /// - /// The types of logs to retrieve. - /// - /// - /// The continuation token for this operation. - /// - public static Microsoft.Rest.Azure.IPage ListLogs(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string)) + public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) { - return ((ISyncGroupsOperations)operations).ListLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); } /// - /// Gets a collection of sync group logs. + /// Creates or updates a sync group. /// /// /// The operations group for this extension method. @@ -203,30 +188,18 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema /// /// The name of the sync group. /// - /// - /// Get logs generated after this time. - /// - /// - /// Get logs generated before this time. - /// - /// - /// The types of logs to retrieve. - /// - /// - /// The continuation token for this operation. - /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListLogsAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListLogsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Cancels a sync group synchronization. + /// Deletes a sync group. /// /// /// The operations group for this extension method. @@ -244,13 +217,13 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema /// /// The name of the sync group. /// - public static void CancelSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static SyncGroupsDeleteHeaders Delete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - ((ISyncGroupsOperations)operations).CancelSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Cancels a sync group synchronization. + /// Deletes a sync group. /// /// /// The operations group for this extension method. @@ -271,12 +244,15 @@ public static void CancelSync(this ISyncGroupsOperations operations, string reso /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CancelSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task DeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.CancelSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } } /// - /// Triggers a sync group synchronization. + /// Updates a sync group. /// /// /// The operations group for this extension method. @@ -294,13 +270,13 @@ public static void CancelSync(this ISyncGroupsOperations operations, string reso /// /// The name of the sync group. /// - public static void TriggerSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static SyncGroup Update(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) { - ((ISyncGroupsOperations)operations).TriggerSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); } /// - /// Triggers a sync group synchronization. + /// Updates a sync group. /// /// /// The operations group for this extension method. @@ -321,12 +297,15 @@ public static void TriggerSync(this ISyncGroupsOperations operations, string res /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task TriggerSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task UpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.TriggerSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Gets a sync group. + /// Cancels a sync group synchronization. /// /// /// The operations group for this extension method. @@ -344,13 +323,13 @@ public static void TriggerSync(this ISyncGroupsOperations operations, string res /// /// The name of the sync group. /// - public static SyncGroup Get(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static void CancelSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + ((ISyncGroupsOperations)operations).CancelSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Gets a sync group. + /// Cancels a sync group synchronization. /// /// /// The operations group for this extension method. @@ -371,15 +350,12 @@ public static SyncGroup Get(this ISyncGroupsOperations operations, string resour /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task GetAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CancelSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.CancelSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Creates or updates a sync group. + /// Gets a collection of hub database schemas. /// /// /// The operations group for this extension method. @@ -397,13 +373,13 @@ public static SyncGroup Get(this ISyncGroupsOperations operations, string resour /// /// The name of the sync group. /// - public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) + public static Microsoft.Rest.Azure.IPage ListHubSchemas(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).ListHubSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Creates or updates a sync group. + /// Gets a collection of hub database schemas. /// /// /// The operations group for this extension method. @@ -424,15 +400,15 @@ public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, st /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListHubSchemasAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListHubSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes a sync group. + /// Gets a collection of sync group logs. /// /// /// The operations group for this extension method. @@ -450,13 +426,25 @@ public static SyncGroup CreateOrUpdate(this ISyncGroupsOperations operations, st /// /// The name of the sync group. /// - public static void Delete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + /// + /// Get logs generated after this time. + /// + /// + /// Get logs generated before this time. + /// + /// + /// The types of logs to retrieve. + /// + /// + /// The continuation token for this operation. + /// + public static Microsoft.Rest.Azure.IPage ListLogs(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string)) { - ((ISyncGroupsOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).ListLogsAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken).GetAwaiter().GetResult(); } /// - /// Deletes a sync group. + /// Gets a collection of sync group logs. /// /// /// The operations group for this extension method. @@ -474,15 +462,30 @@ public static void Delete(this ISyncGroupsOperations operations, string resource /// /// The name of the sync group. /// + /// + /// Get logs generated after this time. + /// + /// + /// Get logs generated before this time. + /// + /// + /// The types of logs to retrieve. + /// + /// + /// The continuation token for this operation. + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task DeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListLogsAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string startTime, string endTime, string type, string continuationToken = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ListLogsWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, startTime, endTime, type, continuationToken, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The operations group for this extension method. @@ -500,13 +503,13 @@ public static void Delete(this ISyncGroupsOperations operations, string resource /// /// The name of the sync group. /// - public static SyncGroup Update(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) + public static SyncGroupsRefreshHubSchemaHeaders RefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).RefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The operations group for this extension method. @@ -527,15 +530,15 @@ public static SyncGroup Update(this ISyncGroupsOperations operations, string res /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task UpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task RefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.RefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// - /// Lists sync groups under a hub database. + /// Triggers a sync group synchronization. /// /// /// The operations group for this extension method. @@ -550,13 +553,16 @@ public static SyncGroup Update(this ISyncGroupsOperations operations, string res /// /// The name of the database on which the sync group is hosted. /// - public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName) + /// + /// The name of the sync group. + /// + public static void TriggerSync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).ListByDatabaseAsync(resourceGroupName, serverName, databaseName).GetAwaiter().GetResult(); + ((ISyncGroupsOperations)operations).TriggerSyncAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Lists sync groups under a hub database. + /// Triggers a sync group synchronization. /// /// /// The operations group for this extension method. @@ -571,18 +577,18 @@ public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGro /// /// The name of the database on which the sync group is hosted. /// + /// + /// The name of the sync group. + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByDatabaseAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task TriggerSyncAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListByDatabaseWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } + (await operations.TriggerSyncWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// - /// Refreshes a hub database schema. + /// Creates or updates a sync group. /// /// /// The operations group for this extension method. @@ -600,13 +606,13 @@ public static Microsoft.Rest.Azure.IPage ListByDatabase(this ISyncGro /// /// The name of the sync group. /// - public static void BeginRefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) { - ((ISyncGroupsOperations)operations).BeginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); } /// - /// Refreshes a hub database schema. + /// Creates or updates a sync group. /// /// /// The operations group for this extension method. @@ -627,12 +633,15 @@ public static void BeginRefreshHubSchema(this ISyncGroupsOperations operations, /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginRefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Creates or updates a sync group. + /// Deletes a sync group. /// /// /// The operations group for this extension method. @@ -650,13 +659,13 @@ public static void BeginRefreshHubSchema(this ISyncGroupsOperations operations, /// /// The name of the sync group. /// - public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) + public static SyncGroupsDeleteHeaders BeginDelete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Creates or updates a sync group. + /// Deletes a sync group. /// /// /// The operations group for this extension method. @@ -677,15 +686,15 @@ public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operation /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginDeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// - /// Deletes a sync group. + /// Updates a sync group. /// /// /// The operations group for this extension method. @@ -703,13 +712,13 @@ public static SyncGroup BeginCreateOrUpdate(this ISyncGroupsOperations operation /// /// The name of the sync group. /// - public static void BeginDelete(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + public static SyncGroup BeginUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) { - ((ISyncGroupsOperations)operations).BeginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).BeginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); } /// - /// Deletes a sync group. + /// Updates a sync group. /// /// /// The operations group for this extension method. @@ -730,12 +739,15 @@ public static void BeginDelete(this ISyncGroupsOperations operations, string res /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginDeleteAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The operations group for this extension method. @@ -753,13 +765,13 @@ public static void BeginDelete(this ISyncGroupsOperations operations, string res /// /// The name of the sync group. /// - public static SyncGroup BeginUpdate(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters) + public static SyncGroupsRefreshHubSchemaHeaders BeginRefreshHubSchema(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncGroupsOperations)operations).BeginUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).BeginRefreshHubSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Updates a sync group. + /// Refreshes a hub database schema. /// /// /// The operations group for this extension method. @@ -780,11 +792,11 @@ public static SyncGroup BeginUpdate(this ISyncGroupsOperations operations, strin /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginUpdateAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, SyncGroup parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginRefreshHubSchemaAsync(this ISyncGroupsOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.BeginRefreshHubSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// @@ -821,7 +833,7 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab } } /// - /// Gets a collection of hub database schemas. + /// Lists sync groups under a hub database. /// /// /// The operations group for this extension method. @@ -829,13 +841,13 @@ public static Microsoft.Rest.Azure.IPage ListSyncDatab /// /// The NextLink from the previous successful call to List operation. /// - public static Microsoft.Rest.Azure.IPage ListHubSchemasNext(this ISyncGroupsOperations operations, string nextPageLink) + public static Microsoft.Rest.Azure.IPage ListByDatabaseNext(this ISyncGroupsOperations operations, string nextPageLink) { - return ((ISyncGroupsOperations)operations).ListHubSchemasNextAsync(nextPageLink).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Gets a collection of hub database schemas. + /// Lists sync groups under a hub database. /// /// /// The operations group for this extension method. @@ -846,15 +858,15 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListHubSchemasNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListByDatabaseNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListHubSchemasNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets a collection of sync group logs. + /// Gets a collection of hub database schemas. /// /// /// The operations group for this extension method. @@ -862,13 +874,13 @@ public static Microsoft.Rest.Azure.IPage ListHubSchema /// /// The NextLink from the previous successful call to List operation. /// - public static Microsoft.Rest.Azure.IPage ListLogsNext(this ISyncGroupsOperations operations, string nextPageLink) + public static Microsoft.Rest.Azure.IPage ListHubSchemasNext(this ISyncGroupsOperations operations, string nextPageLink) { - return ((ISyncGroupsOperations)operations).ListLogsNextAsync(nextPageLink).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).ListHubSchemasNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Gets a collection of sync group logs. + /// Gets a collection of hub database schemas. /// /// /// The operations group for this extension method. @@ -879,15 +891,15 @@ public static Microsoft.Rest.Azure.IPage ListLogsNext(th /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListLogsNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListHubSchemasNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListLogsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListHubSchemasNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Lists sync groups under a hub database. + /// Gets a collection of sync group logs. /// /// /// The operations group for this extension method. @@ -895,13 +907,13 @@ public static Microsoft.Rest.Azure.IPage ListLogsNext(th /// /// The NextLink from the previous successful call to List operation. /// - public static Microsoft.Rest.Azure.IPage ListByDatabaseNext(this ISyncGroupsOperations operations, string nextPageLink) + public static Microsoft.Rest.Azure.IPage ListLogsNext(this ISyncGroupsOperations operations, string nextPageLink) { - return ((ISyncGroupsOperations)operations).ListByDatabaseNextAsync(nextPageLink).GetAwaiter().GetResult(); + return ((ISyncGroupsOperations)operations).ListLogsNextAsync(nextPageLink).GetAwaiter().GetResult(); } /// - /// Lists sync groups under a hub database. + /// Gets a collection of sync group logs. /// /// /// The operations group for this extension method. @@ -912,9 +924,9 @@ public static Microsoft.Rest.Azure.IPage ListByDatabaseNext(this ISyn /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListByDatabaseNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListLogsNextAsync(this ISyncGroupsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListByDatabaseNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListLogsNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs index 8f34be8e1159..4711f4712d39 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperations.cs @@ -39,7 +39,7 @@ internal SyncMembersOperations (SqlManagementClient client) public SqlManagementClient Client { get; private set; } /// - /// Gets a sync member. + /// Lists sync members in the given sync group. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -52,10 +52,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. + /// The name of the sync group. /// /// /// Headers that will be added to request. @@ -78,7 +75,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -104,17 +101,12 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } - if (syncMemberName == null) - { - throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncMemberName"); - } - if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -126,22 +118,20 @@ internal SyncMembersOperations (SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("syncGroupName", syncGroupName); - tracingParameters.Add("syncMemberName", syncMemberName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); - _url = _url.Replace("{syncMemberName}", System.Uri.EscapeDataString(syncMemberName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -209,14 +199,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -226,10 +215,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -242,7 +227,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -256,7 +241,7 @@ internal SyncMembersOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -280,74 +265,7 @@ internal SyncMembersOperations (SqlManagementClient client) } /// - /// Creates or updates a sync member. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// - /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. - /// - /// - /// The requested sync member resource state. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Deletes a sync member. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// - /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Updates an existing sync member. + /// Gets a sync member. /// /// /// The name of the resource group that contains the resource. You can obtain @@ -365,38 +283,6 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// The name of the sync member. /// - /// - /// The requested sync member resource state. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// Lists sync members in the given sync group. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// - /// - /// The name of the sync group. - /// /// /// Headers that will be added to request. /// @@ -418,7 +304,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListBySyncGroupWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -444,12 +330,17 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncGroupName"); } + if (syncMemberName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "syncMemberName"); + } + if (this.Client.SubscriptionId == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -461,20 +352,22 @@ internal SyncMembersOperations (SqlManagementClient client) tracingParameters.Add("serverName", serverName); tracingParameters.Add("databaseName", databaseName); tracingParameters.Add("syncGroupName", syncGroupName); + tracingParameters.Add("syncMemberName", syncMemberName); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); - Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListBySyncGroup", tracingParameters); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } // Construct URL var _baseUrl = this.Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers").ToString(); + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/syncMembers/{syncMemberName}").ToString(); _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); _url = _url.Replace("{serverName}", System.Uri.EscapeDataString(serverName)); _url = _url.Replace("{databaseName}", System.Uri.EscapeDataString(databaseName)); _url = _url.Replace("{syncGroupName}", System.Uri.EscapeDataString(syncGroupName)); + _url = _url.Replace("{syncMemberName}", System.Uri.EscapeDataString(syncMemberName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); @@ -542,14 +435,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -559,10 +451,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -575,7 +463,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse>(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -589,7 +477,7 @@ internal SyncMembersOperations (SqlManagementClient client) _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); try { - _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); } catch (Newtonsoft.Json.JsonException ex) { @@ -612,6 +500,140 @@ internal SyncMembersOperations (SqlManagementClient client) } + /// + /// Creates or updates a sync member. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group on which the sync member is hosted. + /// + /// + /// The name of the sync member. + /// + /// + /// The requested sync member resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Deletes a sync member. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group on which the sync member is hosted. + /// + /// + /// The name of the sync member. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Updates an existing sync member. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group on which the sync member is hosted. + /// + /// + /// The name of the sync member. + /// + /// + /// The requested sync member resource state. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Refreshes a sync member database schema. + /// + /// + /// The name of the resource group that contains the resource. You can obtain + /// this value from the Azure Resource Manager API or the portal. + /// + /// + /// The name of the server. + /// + /// + /// The name of the database on which the sync group is hosted. + /// + /// + /// The name of the sync group on which the sync member is hosted. + /// + /// + /// The name of the sync member. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> RefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRefreshMemberSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Gets a sync member database schema. /// @@ -688,7 +710,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -783,14 +805,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -800,10 +821,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -853,38 +870,6 @@ internal SyncMembersOperations (SqlManagementClient client) } - /// - /// Refreshes a sync member database schema. - /// - /// - /// The name of the resource group that contains the resource. You can obtain - /// this value from the Azure Resource Manager API or the portal. - /// - /// - /// The name of the server. - /// - /// - /// The name of the database on which the sync group is hosted. - /// - /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async System.Threading.Tasks.Task RefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) - { - // Send Request - Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginRefreshMemberSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, customHeaders, cancellationToken).ConfigureAwait(false); - return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - /// /// Creates or updates a sync member. /// @@ -928,7 +913,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -938,7 +923,10 @@ internal SyncMembersOperations (SqlManagementClient client) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "parameters"); } - + if (parameters != null) + { + parameters.Validate(); + } if (resourceGroupName == null) { throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); @@ -969,7 +957,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1071,14 +1059,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 201 && (int)_statusCode != 202) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1088,10 +1075,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1104,7 +1087,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1148,6 +1131,19 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1196,7 +1192,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -1232,7 +1228,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1327,14 +1323,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1344,10 +1339,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1360,7 +1351,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1368,6 +1359,19 @@ internal SyncMembersOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1422,7 +1426,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -1462,7 +1466,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1564,14 +1568,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1581,10 +1584,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1597,7 +1596,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1623,6 +1622,19 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); } } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1671,7 +1683,7 @@ internal SyncMembersOperations (SqlManagementClient client) /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task BeginRefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task> BeginRefreshMemberSchemaWithHttpMessagesAsync(string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -1707,7 +1719,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-11-01-preview"; + string apiVersion = "2025-02-01-preview"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1802,14 +1814,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200 && (int)_statusCode != 202) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1819,10 +1830,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -1835,7 +1842,7 @@ internal SyncMembersOperations (SqlManagementClient client) throw ex; } // Create Result - var _result = new Microsoft.Rest.Azure.AzureOperationResponse(); + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); _result.Request = _httpRequest; _result.Response = _httpResponse; @@ -1843,6 +1850,19 @@ internal SyncMembersOperations (SqlManagementClient client) { _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); @@ -1966,14 +1986,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -1983,10 +2002,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); @@ -2148,14 +2163,13 @@ internal SyncMembersOperations (SqlManagementClient client) if ((int)_statusCode != 200) { - var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try { _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); if (_errorBody != null) { - ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); ex.Body = _errorBody; } } @@ -2165,10 +2179,6 @@ internal SyncMembersOperations (SqlManagementClient client) } ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } if (_shouldTrace) { Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); diff --git a/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperationsExtensions.cs b/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperationsExtensions.cs index aa86b6f0043d..98b33acdb82c 100644 --- a/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperationsExtensions.cs +++ b/src/Sql/Sql.Management.Sdk/Generated/SyncMembersOperationsExtensions.cs @@ -13,7 +13,7 @@ namespace Microsoft.Azure.Management.Sql public static partial class SyncMembersOperationsExtensions { /// - /// Gets a sync member. + /// Lists sync members in the given sync group. /// /// /// The operations group for this extension method. @@ -29,18 +29,15 @@ public static partial class SyncMembersOperationsExtensions /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. + /// The name of the sync group. /// - public static SyncMember Get(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) + public static Microsoft.Rest.Azure.IPage ListBySyncGroup(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) { - return ((ISyncMembersOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).ListBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); } /// - /// Gets a sync member. + /// Lists sync members in the given sync group. /// /// /// The operations group for this extension method. @@ -56,23 +53,20 @@ public static SyncMember Get(this ISyncMembersOperations operations, string reso /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group on which the sync member is hosted. - /// - /// - /// The name of the sync member. + /// The name of the sync group. /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task GetAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListBySyncGroupAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Creates or updates a sync member. + /// Gets a sync member. /// /// /// The operations group for this extension method. @@ -93,13 +87,13 @@ public static SyncMember Get(this ISyncMembersOperations operations, string reso /// /// The name of the sync member. /// - public static SyncMember CreateOrUpdate(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters) + public static SyncMember Get(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) { - return ((ISyncMembersOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).GetAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); } /// - /// Creates or updates a sync member. + /// Gets a sync member. /// /// /// The operations group for this extension method. @@ -123,15 +117,15 @@ public static SyncMember CreateOrUpdate(this ISyncMembersOperations operations, /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task GetAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Deletes a sync member. + /// Creates or updates a sync member. /// /// /// The operations group for this extension method. @@ -152,13 +146,13 @@ public static SyncMember CreateOrUpdate(this ISyncMembersOperations operations, /// /// The name of the sync member. /// - public static void Delete(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) + public static SyncMember CreateOrUpdate(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters) { - ((ISyncMembersOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).CreateOrUpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).GetAwaiter().GetResult(); } /// - /// Deletes a sync member. + /// Creates or updates a sync member. /// /// /// The operations group for this extension method. @@ -182,12 +176,15 @@ public static void Delete(this ISyncMembersOperations operations, string resourc /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task DeleteAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// - /// Updates an existing sync member. + /// Deletes a sync member. /// /// /// The operations group for this extension method. @@ -208,13 +205,13 @@ public static void Delete(this ISyncMembersOperations operations, string resourc /// /// The name of the sync member. /// - public static SyncMember Update(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters) + public static SyncMembersDeleteHeaders Delete(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) { - return ((ISyncMembersOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).DeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); } /// - /// Updates an existing sync member. + /// Deletes a sync member. /// /// /// The operations group for this extension method. @@ -238,15 +235,15 @@ public static SyncMember Update(this ISyncMembersOperations operations, string r /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task UpdateAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task DeleteAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// - /// Lists sync members in the given sync group. + /// Updates an existing sync member. /// /// /// The operations group for this extension method. @@ -262,15 +259,18 @@ public static SyncMember Update(this ISyncMembersOperations operations, string r /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group. + /// The name of the sync group on which the sync member is hosted. /// - public static Microsoft.Rest.Azure.IPage ListBySyncGroup(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName) + /// + /// The name of the sync member. + /// + public static SyncMember Update(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters) { - return ((ISyncMembersOperations)operations).ListBySyncGroupAsync(resourceGroupName, serverName, databaseName, syncGroupName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).UpdateAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters).GetAwaiter().GetResult(); } /// - /// Lists sync members in the given sync group. + /// Updates an existing sync member. /// /// /// The operations group for this extension method. @@ -286,20 +286,23 @@ public static Microsoft.Rest.Azure.IPage ListBySyncGroup(this ISyncM /// The name of the database on which the sync group is hosted. /// /// - /// The name of the sync group. + /// The name of the sync group on which the sync member is hosted. + /// + /// + /// The name of the sync member. /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListBySyncGroupAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task UpdateAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, SyncMember parameters, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListBySyncGroupWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, parameters, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } } /// - /// Gets a sync member database schema. + /// Refreshes a sync member database schema. /// /// /// The operations group for this extension method. @@ -320,13 +323,13 @@ public static Microsoft.Rest.Azure.IPage ListBySyncGroup(this ISyncM /// /// The name of the sync member. /// - public static Microsoft.Rest.Azure.IPage ListMemberSchemas(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) + public static SyncMembersRefreshMemberSchemaHeaders RefreshMemberSchema(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) { - return ((ISyncMembersOperations)operations).ListMemberSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).RefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); } /// - /// Gets a sync member database schema. + /// Refreshes a sync member database schema. /// /// /// The operations group for this extension method. @@ -350,15 +353,15 @@ public static Microsoft.Rest.Azure.IPage ListMemberSch /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListMemberSchemasAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task RefreshMemberSchemaAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListMemberSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.RefreshMemberSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) { - return _result.Body; + return _result.Headers; } } /// - /// Refreshes a sync member database schema. + /// Gets a sync member database schema. /// /// /// The operations group for this extension method. @@ -379,13 +382,13 @@ public static Microsoft.Rest.Azure.IPage ListMemberSch /// /// The name of the sync member. /// - public static void RefreshMemberSchema(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) + public static Microsoft.Rest.Azure.IPage ListMemberSchemas(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) { - ((ISyncMembersOperations)operations).RefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).ListMemberSchemasAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); } /// - /// Refreshes a sync member database schema. + /// Gets a sync member database schema. /// /// /// The operations group for this extension method. @@ -409,9 +412,12 @@ public static void RefreshMemberSchema(this ISyncMembersOperations operations, s /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task RefreshMemberSchemaAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListMemberSchemasAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.RefreshMemberSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.ListMemberSchemasWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } } /// /// Creates or updates a sync member. @@ -494,9 +500,9 @@ public static SyncMember BeginCreateOrUpdate(this ISyncMembersOperations operati /// /// The name of the sync member. /// - public static void BeginDelete(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) + public static SyncMembersDeleteHeaders BeginDelete(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) { - ((ISyncMembersOperations)operations).BeginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).BeginDeleteAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); } /// @@ -524,9 +530,12 @@ public static void BeginDelete(this ISyncMembersOperations operations, string re /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginDeleteAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginDeleteAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } } /// /// Updates an existing sync member. @@ -609,9 +618,9 @@ public static SyncMember BeginUpdate(this ISyncMembersOperations operations, str /// /// The name of the sync member. /// - public static void BeginRefreshMemberSchema(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) + public static SyncMembersRefreshMemberSchemaHeaders BeginRefreshMemberSchema(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName) { - ((ISyncMembersOperations)operations).BeginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); + return ((ISyncMembersOperations)operations).BeginRefreshMemberSchemaAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName).GetAwaiter().GetResult(); } /// @@ -639,9 +648,12 @@ public static void BeginRefreshMemberSchema(this ISyncMembersOperations operatio /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task BeginRefreshMemberSchemaAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task BeginRefreshMemberSchemaAsync(this ISyncMembersOperations operations, string resourceGroupName, string serverName, string databaseName, string syncGroupName, string syncMemberName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - (await operations.BeginRefreshMemberSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + using (var _result = await operations.BeginRefreshMemberSchemaWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, syncGroupName, syncMemberName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } } /// /// Lists sync members in the given sync group. diff --git a/src/Sql/Sql.Management.Sdk/README.md b/src/Sql/Sql.Management.Sdk/README.md index 9e9b53f4a474..4d6ef4923400 100644 --- a/src/Sql/Sql.Management.Sdk/README.md +++ b/src/Sql/Sql.Management.Sdk/README.md @@ -26,13 +26,13 @@ use-extension: ### ``` yaml -commit: 37d29762e68000fc58e03dcefada999f3876f0af +commit: 3505359ff8021fef1d2fb9ec8757d7c73f84115f input-file: - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01/metrics.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/stable/2014-04-01-legacy/sql.core_legacy.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2022-05-01-preview/ServerDevOpsAudit.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2021-11-01-preview/BlobAuditing.json - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/SyncGroups.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2025-02-01-preview/SyncGroups.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/DatabaseSecurityAlertPolicies.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/DatabaseVulnerabilityAssesmentRuleBaselines.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/DatabaseVulnerabilityAssessments.json @@ -75,7 +75,7 @@ input-file: - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ServerSecurityAlertPolicies.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ServerTrustGroups.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/ServerVulnerabilityAssessments.json - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/SyncMembers.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2025-02-01-preview/SyncMembers.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/TdeCertificates.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2020-11-01-preview/VirtualNetworkRules.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/sql/resource-manager/Microsoft.Sql/preview/2022-08-01-preview/TransparentDataEncryptions.json diff --git a/src/Sql/Sql/ChangeLog.md b/src/Sql/Sql/ChangeLog.md index 67b126088cac..50e4ead2fd66 100644 --- a/src/Sql/Sql/ChangeLog.md +++ b/src/Sql/Sql/ChangeLog.md @@ -21,6 +21,8 @@ * Fixed `New-AzSqlDatabaseExport` and `New-AzSqlDatabaseImport` to use SQL Authentication with ManagedIdentity without any mandatory password * Added `MemorySizeInGB` parameter to `New-AzSqlInstance`, `Set-AzSqlInstance` to enable the creation of instances with flexible memory * Added `MemorySizeInGB` field to the model of the managed instance so that it displays information about flexible memory instances that are returned by `Get-AzSqlInstance`. +* Added support for User Assigned Managed Identity (UAMI) authentication in Data Sync cmdlets (`New-AzSqlSyncGroup`, `Update-AzSqlSyncGroup`, `New-AzSqlSyncMember`, `Update-AzSqlSyncMember`) + ## Version 6.0.5 * Updated `DatabaseOperations` Api to version `2024-11-01-preview` for .Net Sdk diff --git a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs index daa35d17cdeb..4117cbe2f2f2 100644 --- a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs +++ b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncGroup.cs @@ -106,6 +106,19 @@ public class NewAzureSqlSyncGroup : AzureSqlSyncGroupCmdletBase /// private string syncDatabaseId = null; + /// + /// Gets or sets the Database Authentication type of the hub database + /// + [Parameter(Mandatory = false, HelpMessage = "The database authentication type of the hub database. If not specified, defaults to 'SqlAuthentication' (username/password).")] + [ValidateSet("password", "userAssigned", IgnoreCase = true)] + public string HubDatabaseAuthenticationType { get; set; } + + /// + /// Gets or sets the identity ID of the hub database in case of user assigned identity authentication + /// + [Parameter(Mandatory = false, HelpMessage = "The resource ID of the UAMI (User Assigned Managed Identity) to use for hub database authentication.")] + public string ResourceId { get; set; } + /// /// Get the entities from the service /// @@ -149,11 +162,66 @@ protected override IEnumerable ApplyUserInputToModel(IEn ServerName = this.ServerName, DatabaseName = this.DatabaseName, SyncGroupName = this.Name, - ConflictResolutionPolicy = this.ConflictResolutionPolicy != null ? this.ConflictResolutionPolicy.ToString() : null, - HubDatabaseUserName = this.DatabaseCredential != null ? this.DatabaseCredential.UserName : null, - HubDatabasePassword = this.DatabaseCredential != null ? this.DatabaseCredential.Password : null + ConflictResolutionPolicy = this.ConflictResolutionPolicy?.ToString() }; + if (!MyInvocation.BoundParameters.ContainsKey(nameof(HubDatabaseAuthenticationType)) || + this.HubDatabaseAuthenticationType.Equals("password", System.StringComparison.OrdinalIgnoreCase)) + { + if (!MyInvocation.BoundParameters.ContainsKey(nameof(DatabaseCredential)) || + this.DatabaseCredential == null || + string.IsNullOrEmpty(this.DatabaseCredential.UserName)) + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.DatabaseCredentialRequired, + "DatabaseCredentials"); + } + + if(MyInvocation.BoundParameters.ContainsKey(nameof(ResourceId))) + { + throw new PSArgumentException( + string.Format( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidParameterForAuthenticationType, + nameof(ResourceId), + "password"), nameof(ResourceId)); + } + + newModel.HubDatabaseUserName = this.DatabaseCredential.UserName; + newModel.HubDatabasePassword = this.DatabaseCredential.Password; + + newModel.Identity = new DataSyncParticipantIdentity + { + Type = "None" + }; + } + else if (this.HubDatabaseAuthenticationType.Equals("userAssigned", System.StringComparison.OrdinalIgnoreCase)) + { + if (!MyInvocation.BoundParameters.ContainsKey(nameof(ResourceId)) || + string.IsNullOrEmpty(this.ResourceId)) + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.ResourceIdRequired, + "ResourceId"); + } + + if (MyInvocation.BoundParameters.ContainsKey(nameof(DatabaseCredential))) + { + throw new PSArgumentException( + string.Format( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidParameterForAuthenticationType, + nameof(DatabaseCredential), + "userAssigned"), nameof(DatabaseCredential)); + } + + newModel.Identity = AzureSqlSyncIdentityHelper.CreateUserAssignedIdentity(this.ResourceId); + } + else + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidDatabaseAuthenticationType, + "HubDatabaseAuthenticationType"); + } + if (MyInvocation.BoundParameters.ContainsKey("IntervalInSeconds")) { newModel.IntervalInSeconds = this.IntervalInSeconds; diff --git a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs index 0a14f3a58574..903384e9c3f0 100644 --- a/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs +++ b/src/Sql/Sql/Data Sync/Cmdlet/NewAzureSqlSyncMember.cs @@ -21,6 +21,7 @@ using Microsoft.Azure.Commands.Sql.Properties; using Microsoft.Azure.Management.Sql.LegacySdk.Models; using System; +using Microsoft.Azure.Management.Sql.Models; using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters; namespace Microsoft.Azure.Commands.Sql.DataSync.Cmdlet @@ -84,7 +85,7 @@ public class NewAzureSqlSyncMember : AzureSqlSyncMemberCmdletBase /// /// Gets or sets the credential (username and password) of the Azure SQL Database. /// - [Parameter(Mandatory = true, + [Parameter(Mandatory = false, ParameterSetName = AzureSqlSet, HelpMessage = "The credential (username and password) of the Azure SQL Database.")] public PSCredential MemberDatabaseCredential { get; set; } @@ -169,6 +170,19 @@ public class NewAzureSqlSyncMember : AzureSqlSyncMemberCmdletBase /// private string syncAgentId = null; + /// + /// Gets or sets the Database Authentication type of the sync member database + /// + [Parameter(Mandatory = false, HelpMessage = "The database authentication type of the Member database. If not specified, defaults to 'SqlAuthentication' (username/password).")] + [ValidateSet("password", "userAssigned", IgnoreCase = true)] + public string MemberDatabaseAuthenticationType { get; set; } + + /// + /// Gets or sets the identity ID of the sync member database in case of user assigned identity authentication + /// + [Parameter(Mandatory = false, HelpMessage = "The resource ID of the UAMI (User Assigned Managed Identity) to use for member database authentication.")] + public string ResourceId { get; set; } + /// /// Get the entities from the service /// @@ -233,9 +247,60 @@ protected override IEnumerable ApplyUserInputToModel(IE { newModel.MemberDatabaseName = this.MemberDatabaseName; newModel.MemberServerName = this.MemberServerName; - newModel.MemberDatabaseUserName = this.MemberDatabaseCredential.UserName; - newModel.MemberDatabasePassword = this.MemberDatabaseCredential.Password; - } + + if (!MyInvocation.BoundParameters.ContainsKey(nameof(MemberDatabaseAuthenticationType)) || + this.MemberDatabaseAuthenticationType.Equals("password", StringComparison.OrdinalIgnoreCase)) + { + if (!MyInvocation.BoundParameters.ContainsKey(nameof(MemberDatabaseCredential)) + || this.MemberDatabaseCredential == null + || string.IsNullOrEmpty(this.MemberDatabaseCredential.UserName)) + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.DatabaseCredentialRequired, nameof(MemberDatabaseCredential)); + } + + if (MyInvocation.BoundParameters.ContainsKey(nameof(ResourceId))) + { + throw new PSArgumentException( + string.Format( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidParameterForAuthenticationType, + nameof(ResourceId), "password"), nameof(ResourceId)); + } + + newModel.MemberDatabaseUserName = this.MemberDatabaseCredential.UserName; + newModel.MemberDatabasePassword = this.MemberDatabaseCredential.Password; + + newModel.Identity = new DataSyncParticipantIdentity + { + Type = "None" + }; + } + else if (this.MemberDatabaseAuthenticationType.Equals("userAssigned", StringComparison.OrdinalIgnoreCase)) + { + if (!MyInvocation.BoundParameters.ContainsKey(nameof(ResourceId)) || + string.IsNullOrEmpty(this.ResourceId)) + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.ResourceIdRequired, nameof(ResourceId)); + } + + if (MyInvocation.BoundParameters.ContainsKey(nameof(MemberDatabaseCredential))) + { + throw new PSArgumentException( + string.Format( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidParameterForAuthenticationType, + nameof(MemberDatabaseCredential), "userAssigned"), nameof(MemberDatabaseCredential)); + } + + newModel.Identity = AzureSqlSyncIdentityHelper.CreateUserAssignedIdentity(this.ResourceId); + } + else + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidDatabaseAuthenticationType, nameof(MemberDatabaseAuthenticationType)); + } + + } else { newModel.SqlServerDatabaseId = this.SqlServerDatabaseId; diff --git a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs index 4c3f4f4f0039..50474af29545 100644 --- a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs +++ b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncGroup.cs @@ -62,6 +62,19 @@ public class UpdateAzureSqlSyncGroup : AzureSqlSyncGroupCmdletBase [Parameter(Mandatory = false, HelpMessage = "Whether to use a private link connection when connecting to the hub of this sync group.")] public bool UsePrivateLinkConnection { get; set; } + /// + /// Gets or sets the Database Authentication type of the hub database + /// + [Parameter(Mandatory = false, HelpMessage = "The database authentication type of the hub database. If not specified, defaults to 'SqlAuthentication' (username/password).")] + [ValidateSet("password", "userAssigned", IgnoreCase = true)] + public string HubDatabaseAuthenticationType { get; set; } + + /// + /// Gets or sets the identity ID of the hub database in case of user assigned identity authentication + /// + [Parameter(Mandatory = false, HelpMessage = "The resource ID of the UAMI (User Assigned Managed Identity) to use for hub database authentication.")] + public string ResourceId { get; set; } + /// /// Get the entities from the service /// @@ -91,17 +104,6 @@ protected override IEnumerable ApplyUserInputToModel(IEn { newModel.UsePrivateLinkConnection = this.UsePrivateLinkConnection; } - - if (MyInvocation.BoundParameters.ContainsKey("DatabaseCredential")) - { - newModel.HubDatabaseUserName = this.DatabaseCredential.UserName; - newModel.HubDatabasePassword = this.DatabaseCredential.Password; - } - else - { - newModel.HubDatabaseUserName = null; - newModel.HubDatabasePassword = null; - } // if schema file is specified if (MyInvocation.BoundParameters.ContainsKey("SchemaFile")) @@ -117,6 +119,48 @@ protected override IEnumerable ApplyUserInputToModel(IEn } } + if (!MyInvocation.BoundParameters.ContainsKey(nameof(HubDatabaseAuthenticationType)) || + this.HubDatabaseAuthenticationType.Equals("password", System.StringComparison.OrdinalIgnoreCase)) + { + if (MyInvocation.BoundParameters.ContainsKey(nameof(DatabaseCredential))) + { + newModel.HubDatabaseUserName = this.DatabaseCredential.UserName; + newModel.HubDatabasePassword = this.DatabaseCredential.Password; + } + else + { + newModel.HubDatabaseUserName = null; + newModel.HubDatabasePassword = null; + } + + newModel.Identity = new DataSyncParticipantIdentity + { + Type = "None" + }; + } + else if (this.HubDatabaseAuthenticationType.Equals("userAssigned", System.StringComparison.OrdinalIgnoreCase)) + { + if (!MyInvocation.BoundParameters.ContainsKey(nameof(ResourceId)) || + string.IsNullOrEmpty(this.ResourceId)) + { + newModel.Identity = new DataSyncParticipantIdentity + { + Type = "UserAssigned" + }; + } + else + { + newModel.Identity = AzureSqlSyncIdentityHelper.CreateUserAssignedIdentity(this.ResourceId); + } + } + else + { + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidDatabaseAuthenticationType, + "HubDatabaseAuthenticationType"); + } + + return model; } diff --git a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs index 0301ba307d07..59879ee0c7f8 100644 --- a/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs +++ b/src/Sql/Sql/Data Sync/Cmdlet/UpdateAzureSqlSyncMember.cs @@ -61,6 +61,19 @@ public class UpdateAzureSqlSyncMember : AzureSqlSyncMemberCmdletBase [Parameter(Mandatory = false, HelpMessage = "The resource ID for the sync member database, used if UsePrivateLinkConnection is set to true.")] public string SyncMemberAzureDatabaseResourceId { get; set; } + /// + /// Gets or sets the Database Authentication type of the sync member database + /// + [Parameter(Mandatory = false, HelpMessage = "The database authentication type of the member database. If not specified, defaults to 'SqlAuthentication' (username/password).")] + [ValidateSet("password", "userAssigned", IgnoreCase = true)] + public string MemberDatabaseAuthenticationType { get; set; } + + /// + /// Gets or sets the identity ID of the sync member database in case of user assigned identity authentication + /// + [Parameter(Mandatory = false, HelpMessage = "The resource ID of the UAMI (User Assigned Managed Identity) to use for member database authentication.")] + public string ResourceId { get; set; } + /// /// Get the entities from the service /// @@ -93,15 +106,45 @@ protected override IEnumerable ApplyUserInputToModel(IE newModel.SyncMemberAzureDatabaseResourceId = this.SyncMemberAzureDatabaseResourceId; } - if (MyInvocation.BoundParameters.ContainsKey("MemberDatabaseCredential")) + if (!MyInvocation.BoundParameters.ContainsKey(nameof(MemberDatabaseAuthenticationType)) || + this.MemberDatabaseAuthenticationType.Equals("password", StringComparison.OrdinalIgnoreCase)) { - newModel.MemberDatabaseUserName = this.MemberDatabaseCredential.UserName; - newModel.MemberDatabasePassword = this.MemberDatabaseCredential.Password; + if (MyInvocation.BoundParameters.ContainsKey("MemberDatabaseCredential")) + { + newModel.MemberDatabaseUserName = this.MemberDatabaseCredential.UserName; + newModel.MemberDatabasePassword = this.MemberDatabaseCredential.Password; + } + else + { + newModel.MemberDatabaseUserName = null; + newModel.MemberDatabasePassword = null; + } + + newModel.Identity = new DataSyncParticipantIdentity + { + Type = "None" + }; + } + else if (this.MemberDatabaseAuthenticationType.Equals("userAssigned", StringComparison.OrdinalIgnoreCase)) + { + if (!MyInvocation.BoundParameters.ContainsKey(nameof(ResourceId)) || + string.IsNullOrEmpty(this.ResourceId)) + { + newModel.Identity = new DataSyncParticipantIdentity + { + Type = "UserAssigned" + }; + } + else + { + newModel.Identity = AzureSqlSyncIdentityHelper.CreateUserAssignedIdentity(this.ResourceId); + } } else { - newModel.MemberDatabaseUserName = null; - newModel.MemberDatabasePassword = null; + throw new PSArgumentException( + Microsoft.Azure.Commands.Sql.Properties.Resources.InvalidDatabaseAuthenticationType, + nameof(MemberDatabaseAuthenticationType)); } return model; diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs index 78b899eaed44..ce214e2b0500 100644 --- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs +++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncGroupModel.cs @@ -93,6 +93,11 @@ public class AzureSqlSyncGroupModel /// public bool? UsePrivateLinkConnection { get; set; } + /// + /// Gets or sets sync group authentication information. + /// + public DataSyncParticipantIdentity Identity { get; set; } + /// /// Construct AzureSqlSyncGroupModel /// @@ -123,6 +128,7 @@ public AzureSqlSyncGroupModel(string resourceGroupName, string serverName, strin LastSyncTime = syncGroup.LastSyncTime; Schema = syncGroup.Schema == null ? null : new AzureSqlSyncGroupSchemaModel(syncGroup.Schema); UsePrivateLinkConnection = syncGroup.UsePrivateLinkConnection; + Identity = syncGroup.Identity; } } } diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncIdentityHelper.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncIdentityHelper.cs new file mode 100644 index 000000000000..6557431a9251 --- /dev/null +++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncIdentityHelper.cs @@ -0,0 +1,44 @@ +// ---------------------------------------------------------------------------------- +// +// Copyright Microsoft Corporation +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// ---------------------------------------------------------------------------------- + +using System.Collections.Generic; +using Microsoft.Azure.Management.Sql.Models; + +namespace Microsoft.Azure.Commands.Sql.DataSync.Model +{ + /// + /// Helper class for constructing DataSyncParticipantIdentity objects. + /// This class is static because it only provides stateless utility methods + /// and should not be instantiated. Can be called for both Sync Group and Sync Member scenarios. + /// + public static class AzureSqlSyncIdentityHelper + { + /// + /// Creates a DataSyncParticipantIdentity for a user-assigned managed identity. + /// + /// The resource ID of the user-assigned managed identity. + /// A DataSyncParticipantIdentity object configured for user-assigned identity. + public static DataSyncParticipantIdentity CreateUserAssignedIdentity(string identityResourceId) + { + return new DataSyncParticipantIdentity + { + Type = "UserAssigned", + UserAssignedIdentities = new Dictionary + { + [identityResourceId] = new DataSyncParticipantUserAssignedIdentity() + } + }; + } + } +} \ No newline at end of file diff --git a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs index abd15857177b..fa8d0340cc55 100644 --- a/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs +++ b/src/Sql/Sql/Data Sync/Model/AzureSqlSyncMemberModel.cs @@ -107,6 +107,11 @@ public class AzureSqlSyncMemberModel /// public bool? UsePrivateLinkConnection { get; set; } + /// + /// Gets or sets sync group authentication information. + /// + public DataSyncParticipantIdentity Identity { get; set; } + /// /// Construct AzureSqlSyncMemberModel /// @@ -141,6 +146,7 @@ public AzureSqlSyncMemberModel(string resourceGroup, string serverName, string d SyncState = syncMember.SyncState; UsePrivateLinkConnection = syncMember.UsePrivateLinkConnection; SyncMemberAzureDatabaseResourceId = syncMember.SyncMemberAzureDatabaseResourceId; + Identity = syncMember.Identity; } } } diff --git a/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs b/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs index 05f6c7e821fa..1d4e8ed027fc 100644 --- a/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs +++ b/src/Sql/Sql/Data Sync/Services/AzureSqlDataSyncAdapter.cs @@ -173,6 +173,7 @@ internal AzureSqlSyncGroupModel CreateSyncGroup(AzureSqlSyncGroupModel model, st HubDatabasePassword = model.HubDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.HubDatabasePassword), Schema = model.Schema == null ? null : model.Schema.ToSyncGroupSchema(), UsePrivateLinkConnection = model.UsePrivateLinkConnection, + Identity = model.Identity }); // Workaround for Rest API return response value incorrect issue. Remove this line after backend fix is deployed @@ -194,6 +195,7 @@ internal AzureSqlSyncGroupModel UpdateSyncGroup(AzureSqlSyncGroupModel model) HubDatabasePassword = model.HubDatabasePassword == null ? null: AzureSqlServerAdapter.Decrypt(model.HubDatabasePassword), Schema = model.Schema == null ? null : model.Schema.ToSyncGroupSchema(), UsePrivateLinkConnection = model.UsePrivateLinkConnection, + Identity = model.Identity }); // Workaround for Rest API return response value incorrect issue. Remove this line after backend fix is deployed @@ -314,6 +316,7 @@ internal AzureSqlSyncMemberModel CreateSyncMember(AzureSqlSyncMemberModel model, properties.Password = model.MemberDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.MemberDatabasePassword); properties.UsePrivateLinkConnection = model.UsePrivateLinkConnection; properties.SyncMemberAzureDatabaseResourceId = model.SyncMemberAzureDatabaseResourceId; + properties.Identity = model.Identity; } else { @@ -346,7 +349,8 @@ internal AzureSqlSyncMemberModel UpdateSyncMember(AzureSqlSyncMemberModel model) UserName = model.MemberDatabaseUserName, Password = model.MemberDatabasePassword == null ? null : AzureSqlServerAdapter.Decrypt(model.MemberDatabasePassword), UsePrivateLinkConnection = model.UsePrivateLinkConnection, - SyncMemberAzureDatabaseResourceId = model.SyncMemberAzureDatabaseResourceId + SyncMemberAzureDatabaseResourceId = model.SyncMemberAzureDatabaseResourceId, + Identity = model.Identity }; var updateResp = Communicator.UpdateSyncMember(model.ResourceGroupName, model.ServerName, model.DatabaseName, model.SyncGroupName, model.SyncMemberName, properties); diff --git a/src/Sql/Sql/Properties/Resources.Designer.cs b/src/Sql/Sql/Properties/Resources.Designer.cs index 697af13b41f4..a40363108678 100644 --- a/src/Sql/Sql/Properties/Resources.Designer.cs +++ b/src/Sql/Sql/Properties/Resources.Designer.cs @@ -402,6 +402,15 @@ internal static string CreateAzureSqlInstanceServerTrustCertificateWarning { } } + /// + /// Looks up a localized string similar to DatabaseCredentials (username/password) must be provided when DatabaseAuthenticationType is 'password'.. + /// + internal static string DatabaseCredentialRequired { + get { + return ResourceManager.GetString("DatabaseCredentialRequired", resourceCulture); + } + } + /// /// Looks up a localized string similar to Database with name: '{0}' already exists in server '{1}'.. /// @@ -663,6 +672,15 @@ internal static string InvalidBlobStorageSasUri { } } + /// + /// Looks up a localized string similar to Invalid DatabaseAuthenticationType. Supported authentication types are 'userAssigned' and 'password'. + /// + internal static string InvalidDatabaseAuthenticationType { + get { + return ResourceManager.GetString("InvalidDatabaseAuthenticationType", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cannot use the None option with other event types.. /// @@ -719,6 +737,15 @@ internal static string InvalidLongTermRetentionBackupResourceIdFormat { } } + /// + /// Looks up a localized string similar to The parameter '{0}' cannot be specified when using '{1}' authentication.. + /// + internal static string InvalidParameterForAuthenticationType { + get { + return ResourceManager.GetString("InvalidParameterForAuthenticationType", resourceCulture); + } + } + /// /// Looks up a localized string similar to Cannot use audit table retention without specifying TableIdentifier. You may want to use '{0}'.. /// @@ -1349,6 +1376,15 @@ internal static string RemoveInstancePoolWarning { } } + /// + /// Looks up a localized string similar to ResourceID of UAMI must be provided when DatabaseAuthenticationType is 'userAssigned'.. + /// + internal static string ResourceIdRequired { + get { + return ResourceManager.GetString("ResourceIdRequired", resourceCulture); + } + } + /// /// Looks up a localized string similar to Failed retrieving id of storage account '{0}' under subscription '{1}'.. /// diff --git a/src/Sql/Sql/Properties/Resources.resx b/src/Sql/Sql/Properties/Resources.resx index 694f54c5a582..2cdf16992617 100644 --- a/src/Sql/Sql/Properties/Resources.resx +++ b/src/Sql/Sql/Properties/Resources.resx @@ -766,4 +766,16 @@ Changing the service tier to Hyperscale also converts the geo-secondary replica to Hyperscale. For more information, see https://go.microsoft.com/fwlink/?linkid=2314103 + + ResourceID of UAMI must be provided when DatabaseAuthenticationType is 'userAssigned'. + + + DatabaseCredentials (username/password) must be provided when DatabaseAuthenticationType is 'password'. + + + Invalid DatabaseAuthenticationType. Supported authentication types are 'userAssigned' and 'password' + + + The parameter '{0}' cannot be specified when using '{1}' authentication. + \ No newline at end of file diff --git a/src/Sql/Sql/help/New-AzSqlSyncGroup.md b/src/Sql/Sql/help/New-AzSqlSyncGroup.md index 925d9bbfd08c..ed4122a0f9dd 100644 --- a/src/Sql/Sql/help/New-AzSqlSyncGroup.md +++ b/src/Sql/Sql/help/New-AzSqlSyncGroup.md @@ -16,8 +16,8 @@ Creates an Azure SQL Database Sync Group. New-AzSqlSyncGroup [-Name] -SyncDatabaseName -SyncDatabaseServerName -SyncDatabaseResourceGroupName [-IntervalInSeconds ] [-DatabaseCredential ] [-ConflictResolutionPolicy ] [-SchemaFile ] [-UsePrivateLinkConnection] [-ServerName] - [-DatabaseName] [-ResourceGroupName] [-DefaultProfile ] [-WhatIf] - [-Confirm] [] + [-DatabaseName] [-ResourceGroupName] [-DefaultProfile ] + [-HubDatabaseAuthenticationType ] [-IdentityId ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -55,6 +55,33 @@ This command creates a sync group for an Azure SQL Database. "schema.json" is a "MasterSyncMemberName": null } +### Example 2: Create a sync group for an Azure SQL Database using user-assigned managed identity authentication + +This command creates a sync group using user-assigned managed identity to authenticate to the hub database. + +```powershell +New-AzSqlSyncGroup -ResourceGroupName "ResourceGroup02" -ServerName "Server02" -DatabaseName "Database02" -Name "SyncGroup02" ` +-ConflictResolutionPolicy "HubWin" -IntervalInSeconds -1 ` +-SyncDatabaseServerName "Server02" -SyncDatabaseName "Database02" ` +-SyncDatabaseResourceGroupName "syncDatabaseResourceGroup02" ` +-HubDatabaseAuthenticationType "userAssigned" ` +-IdentityId "/subscriptions/{subscriptionId}/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" -Schema ".\schema.json" | Format-List +``` + +```output +ResourceId : /subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup02}/providers/Microsoft.Sql/servers/{Server02}/databases/{Database02}/syncGroups/{SyncGroup02} +ResourceGroupName : ResourceGroup02 +ServerName : Server02 +DatabaseName : Database02 +SyncGroupName : SyncGroup02 +SyncDatabaseId : /subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup02}/providers/Microsoft.Sql/servers/{Server02}/databases/{Database02} +IntervalInSeconds : -1 +ConflictResolutionPolicy : HubWin +SyncState : NotReady +LastSyncTime : 1/1/0001 12:00:00 AM +Schema : +``` + ## PARAMETERS ### -ConflictResolutionPolicy @@ -254,6 +281,35 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -HubDatabaseAuthenticationType +The Database Authentication type of the hub database. +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: password, userAssigned + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityId +The identity ID of the hub database in case of UAMI Authentication. +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Sql/Sql/help/New-AzSqlSyncMember.md b/src/Sql/Sql/help/New-AzSqlSyncMember.md index 521196f3589f..52da7459f867 100644 --- a/src/Sql/Sql/help/New-AzSqlSyncMember.md +++ b/src/Sql/Sql/help/New-AzSqlSyncMember.md @@ -18,7 +18,8 @@ New-AzSqlSyncMember -Name -MemberDatabaseType -MemberServerNam -MemberDatabaseName -MemberDatabaseCredential [-SyncDirection ] [-UsePrivateLinkConnection] [-SyncMemberAzureDatabaseResourceId ] [-SyncGroupName] [-ServerName] [-DatabaseName] [-ResourceGroupName] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-MemberDatabaseAuthenticationType ] + [-IdentityId ] [-WhatIf] [-Confirm] [] ``` ### OnPremisesDatabaseSyncAgentComponent @@ -99,6 +100,32 @@ SyncState : UnProvisioned This command creates a sync member for an on-premises SQL database. +### Example 3: Create a sync member for an Azure SQL database using user managed identity authentication to authenticate to member database. +```powershell +New-AzSqlSyncMember -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -SyncGroupName "SyncGroup01" -Name "SyncMember01" -SyncDirection "OneWayMemberToHub" ` +-MemberDatabaseType "AzureSqlDatabase" -MemberServerName "memberServer01.full.dns.name" -MemberDatabaseName "memberDatabase01" -MemberDatabaseAuthenticationType "userAssigned" ` +-IdentityId "/subscriptions/{subscriptionId}/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" | Format-List +``` + +```output +ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01}/syncMembers/{SyncMember01} +ResourceGroupName : ResourceGroup01 +ServerName : Server01 +DatabaseName : Database01 +SyncGroupName : SyncGroup01 +SyncMemberName : SyncMember01 +SyncDirection : OneWayMemberToHub +MemberDatabaseType: : AzureSqlDatabase +SyncAgentId : +SqlServerDatabaseId : +MemberServerName : memberServer01.full.dns.name +MemberDatabaseName : memberDatabase01 +MemberDatabaseUserName : +MemberDatabasePassword : +SyncState : UnProvisioned +``` +This command creates a sync member for an Azure SQL database. + ## PARAMETERS ### -DatabaseName @@ -373,6 +400,36 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MemberDatabaseAuthenticationType +The Database Authentication type of the sync member database. +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: password, userAssigned + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityId +The identity ID of the sync member DB in case of UAMI Authentication +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Sql/Sql/help/Update-AzSqlSyncGroup.md b/src/Sql/Sql/help/Update-AzSqlSyncGroup.md index a34948c53af5..bdc8a7358ac4 100644 --- a/src/Sql/Sql/help/Update-AzSqlSyncGroup.md +++ b/src/Sql/Sql/help/Update-AzSqlSyncGroup.md @@ -15,8 +15,8 @@ Updates an Azure SQL Database Sync Group. ``` Update-AzSqlSyncGroup [-Name] [-IntervalInSeconds ] [-DatabaseCredential ] [-SchemaFile ] [-UsePrivateLinkConnection ] [-ServerName] [-DatabaseName] - [-ResourceGroupName] [-DefaultProfile ] [-WhatIf] [-Confirm] - [] + [-ResourceGroupName] [-DefaultProfile ] [-HubDatabaseAuthenticationType ] + [-IdentityId ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -53,6 +53,29 @@ This command updates a sync group for an Azure SQL Database. "schema.json" is a "MasterSyncMemberName": null } +### Example 2: Update a sync group for an Azure SQL Database with user assigned managed identity as the authentication type for hub db. +```powershell +Update-AzSqlSyncGroup -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -Name "SyncGroup01" ` +-HubDatabaseAuthenticationType "userAssigned" ` +-IdentityId "/subscriptions/{subscriptionId}/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" -IntervalInSeconds 100 -Schema ".\schema.json" | Format-List +``` + +```output +ResourceId : /subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01} +ResourceGroupName : ResourceGroup01 +ServerName : Server01 +DatabaseName : Database01 +SyncGroupName : SyncGroup01 +SyncDatabaseId : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01} +IntervalInSeconds : 100 +ConflictResolutionPolicy: : HubWin +SyncState : NotReady +LastSyncTime : 1/1/0001 12:00:00 AM +Schema : +``` + +This command updates a sync group for an Azure SQL Database + ## PARAMETERS ### -DatabaseCredential @@ -191,6 +214,35 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -HubDatabaseAuthenticationType +The Database Authentication type of the hub database. +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: password, userAssigned + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityId +The identity ID of the hub database in case of UAMI Authentication. +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet. diff --git a/src/Sql/Sql/help/Update-AzSqlSyncMember.md b/src/Sql/Sql/help/Update-AzSqlSyncMember.md index b983b482d034..c970bf1a06df 100644 --- a/src/Sql/Sql/help/Update-AzSqlSyncMember.md +++ b/src/Sql/Sql/help/Update-AzSqlSyncMember.md @@ -16,7 +16,8 @@ Updates an Azure SQL Database Sync Member. Update-AzSqlSyncMember -Name [-MemberDatabaseCredential ] [-UsePrivateLinkConnection ] [-SyncMemberAzureDatabaseResourceId ] [-SyncGroupName] [-ServerName] [-DatabaseName] [-ResourceGroupName] - [-DefaultProfile ] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-MemberDatabaseAuthenticationType ] + [-IdentityId ] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION @@ -62,6 +63,32 @@ Updates an Azure SQL Database Sync Member. (autogenerated) Update-AzSqlSyncMember -DatabaseName 'Database01' -MemberDatabaseCredential -Name 'SyncMember01' -ResourceGroupName 'ResourceGroup01' -ServerName 'Server01' -SyncGroupName 'SyncGroup01' -SyncMemberAzureDatabaseResourceId ``` +### Example 3 +```powershell +Update-AzSqlSyncMember -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "Database01" -SyncGroupName "SyncGroup01" -Name "SyncMember01" ` +-MemberDatabaseAuthenticationType "userAssigned" ` +-IdentityId "/subscriptions/{subscriptionId}/resourceGroups/group1/providers/Microsoft.ManagedIdentity/userAssignedIdentities/test-umi" | Format-List +``` + +```output +ResourceId : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/databases/{Database01}/syncGroups/{SyncGroup01}/syncMembers/{SyncMember01} +ResourceGroupName : ResourceGroup01 +ServerName : Server01 +DatabaseName : Database01 +SyncGroupName : SyncGroup01 +SyncMemberName : SyncMember01 +SyncDirection : OneWayMemberToHub +MemberDatabaseType: : AzureSqlDatabase +SyncAgentId : +SqlServerDatabaseId : +MemberServerName : memberServer01.full.dns.name +MemberDatabaseName : memberDatabase01 +MemberDatabasePassword : +SyncState : Good + +This command updates the sync member uami identity id for the member database. + + ## PARAMETERS ### -DatabaseName @@ -199,6 +226,35 @@ Accept pipeline input: False Accept wildcard characters: False ``` +### -MemberDatabaseAuthenticationType +The Database Authentication type of the sync member database. +```yaml +Type: String +Parameter Sets: (All) +Aliases: +Accepted values: password, userAssigned + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -IdentityId +The identity ID of the sync member DB in case of UAMI Authentication +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + ### -Confirm Prompts you for confirmation before running the cmdlet.