diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs index cd0a8bbcdd183..a0386139bd1e7 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs @@ -142,6 +142,9 @@ public partial interface IVirtualMachinesOperations /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The headers that will be added to request. /// @@ -154,7 +157,7 @@ public partial interface IVirtualMachinesOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieves information about the model view or the instance view of /// a virtual machine. @@ -733,6 +736,9 @@ public partial interface IVirtualMachinesOperations /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The headers that will be added to request. /// @@ -745,7 +751,7 @@ public partial interface IVirtualMachinesOperations /// /// Thrown when a required parameter is null /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Converts virtual machine disks from blob-based to managed disks. /// Virtual machine must be stop-deallocated before invoking this diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHost.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHost.cs index 26a73584615c9..2492e07e7fed4 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHost.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHost.cs @@ -168,10 +168,6 @@ public override void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Sku"); } - if (PlatformFaultDomain > 2) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PlatformFaultDomain", 2); - } if (PlatformFaultDomain < 0) { throw new ValidationException(ValidationRules.InclusiveMinimum, "PlatformFaultDomain", 0); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs index 2b5ce35389aa0..03c9b92e68a8d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs @@ -130,10 +130,6 @@ public DedicatedHostGroup() public override void Validate() { base.Validate(); - if (PlatformFaultDomainCount > 3) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PlatformFaultDomainCount", 3); - } if (PlatformFaultDomainCount < 1) { throw new ValidationException(ValidationRules.InclusiveMinimum, "PlatformFaultDomainCount", 1); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs index fc9d5783c8072..c021f69c8e5bf 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs @@ -122,10 +122,6 @@ public DedicatedHostGroupUpdate() /// public virtual void Validate() { - if (PlatformFaultDomainCount > 3) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PlatformFaultDomainCount", 3); - } if (PlatformFaultDomainCount < 1) { throw new ValidationException(ValidationRules.InclusiveMinimum, "PlatformFaultDomainCount", 1); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostUpdate.cs index 99a1a24361c2c..b49fbb5da1485 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostUpdate.cs @@ -148,10 +148,6 @@ public DedicatedHostUpdate() /// public virtual void Validate() { - if (PlatformFaultDomain > 2) - { - throw new ValidationException(ValidationRules.InclusiveMaximum, "PlatformFaultDomain", 2); - } if (PlatformFaultDomain < 0) { throw new ValidationException(ValidationRules.InclusiveMinimum, "PlatformFaultDomain", 0); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs index 3d3ee884b9171..42ca72a44f9bd 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SdkInfo_ComputeManagementClient.cs @@ -53,16 +53,5 @@ public static IEnumerable> ApiInfo_ComputeManageme }.AsEnumerable(); } } - // BEGIN: Code Generation Metadata Section - public static readonly String AutoRestVersion = "v2"; - public static readonly String AutoRestBootStrapperVersion = "autorest@2.0.4413"; - public static readonly String AutoRestCmdExecuted = "cmd.exe /c autorest.cmd https://github.com/Azure/azure-rest-api-specs/blob/master/specification/compute/resource-manager/readme.md --csharp --version=v2 --reflect-api-versions --csharp-sdks-folder=C:\\Users\\luwu\\Documents\\october\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "1d90950c9db002ca44a56873c5a2ea3c96f533f8"; - public static readonly String CodeGenerationErrors = ""; - public static readonly String GithubRepoName = "azure-rest-api-specs"; - // END: Code Generation Metadata Section } } - diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs index 7c170b6402a66..443773a98417b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs @@ -329,16 +329,19 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -2804,6 +2807,9 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// Headers that will be added to request. /// @@ -2822,7 +2828,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2846,6 +2852,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmName", vmName); + tracingParameters.Add("forceDeletion", forceDeletion); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); @@ -2857,6 +2864,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDeletion != null) + { + _queryParameters.Add(string.Format("forceDeletion={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDeletion, Client.SerializationSettings).Trim('"')))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs index 495ef93f9b68c..17ea6694c4c72 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs @@ -213,9 +213,12 @@ public static VirtualMachine Update(this IVirtualMachinesOperations operations, /// /// The name of the virtual machine. /// - public static void Delete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName) + /// + /// Optional parameter to force delete virtual machines. + /// + public static void Delete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?)) { - operations.DeleteAsync(resourceGroupName, vmName).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, vmName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -230,12 +233,15 @@ public static void Delete(this IVirtualMachinesOperations operations, string res /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1187,9 +1193,12 @@ public static VirtualMachine BeginUpdate(this IVirtualMachinesOperations operati /// /// The name of the virtual machine. /// - public static void BeginDelete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName) + /// + /// Optional parameter to force delete virtual machines. + /// + public static void BeginDelete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?)) { - operations.BeginDeleteAsync(resourceGroupName, vmName).GetAwaiter().GetResult(); + operations.BeginDeleteAsync(resourceGroupName, vmName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -1204,12 +1213,15 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines. + /// /// /// The cancellation token. /// - public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } ///