From abe6de9b500895379207a4da19c91cf5d54c75eb Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Wed, 14 Oct 2020 04:16:34 +0000 Subject: [PATCH] Generated from 02890966cefd4f7382d43c9fcac744f359fdcf6b --- .../Generated/AvailabilitySetsOperations.cs | 14 +- .../src/Generated/ComputeManagementClient.cs | 6 - .../DedicatedHostGroupsOperations.cs | 12 +- .../src/Generated/DedicatedHostsOperations.cs | 10 +- .../src/Generated/IComputeManagementClient.cs | 5 - .../IVirtualMachineRunCommandsOperations.cs | 265 --- ...lMachineScaleSetVMRunCommandsOperations.cs | 312 ---- .../src/Generated/ImagesOperations.cs | 12 +- .../src/Generated/LogAnalyticsOperations.cs | 4 +- .../src/Generated/Models/ExecutionState.cs | 27 - .../Generated/Models/RollingUpgradePolicy.cs | 30 +- .../Models/VirtualMachineRunCommand.cs | 188 --- .../VirtualMachineRunCommandInstanceView.cs | 118 -- .../VirtualMachineRunCommandScriptSource.cs | 72 - .../Models/VirtualMachineRunCommandUpdate.cs | 156 -- .../src/Generated/Operations.cs | 2 +- .../ProximityPlacementGroupsOperations.cs | 12 +- .../SdkInfo_ComputeManagementClient.cs | 52 +- .../src/Generated/SshPublicKeysOperations.cs | 14 +- .../src/Generated/UsageOperations.cs | 2 +- ...VirtualMachineExtensionImagesOperations.cs | 6 +- .../VirtualMachineExtensionsOperations.cs | 10 +- .../VirtualMachineImagesOperations.cs | 10 +- .../VirtualMachineRunCommandsOperations.cs | 1311 +-------------- ...lMachineRunCommandsOperationsExtensions.cs | 430 ----- ...tualMachineScaleSetExtensionsOperations.cs | 10 +- ...achineScaleSetRollingUpgradesOperations.cs | 8 +- ...alMachineScaleSetVMExtensionsOperations.cs | 10 +- ...lMachineScaleSetVMRunCommandsOperations.cs | 1415 ----------------- ...aleSetVMRunCommandsOperationsExtensions.cs | 503 ------ .../VirtualMachineScaleSetVMsOperations.cs | 32 +- .../VirtualMachineScaleSetsOperations.cs | 44 +- .../VirtualMachineSizesOperations.cs | 2 +- .../Generated/VirtualMachinesOperations.cs | 48 +- 34 files changed, 182 insertions(+), 4970 deletions(-) delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMRunCommandsOperations.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExecutionState.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommand.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs delete mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperationsExtensions.cs diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/AvailabilitySetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/AvailabilitySetsOperations.cs index f2701a2ef069..a68b33a6ee12 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/AvailabilitySetsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/AvailabilitySetsOperations.cs @@ -105,7 +105,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -313,7 +313,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -511,7 +511,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -687,7 +687,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -871,7 +871,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1059,7 +1059,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1252,7 +1252,7 @@ internal AvailabilitySetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs index 7bab34599755..de53f6a7b193 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs @@ -171,11 +171,6 @@ public partial class ComputeManagementClient : ServiceClient public virtual IVirtualMachineRunCommandsOperations VirtualMachineRunCommands { get; private set; } - /// - /// Gets the IVirtualMachineScaleSetVMRunCommandsOperations. - /// - public virtual IVirtualMachineScaleSetVMRunCommandsOperations VirtualMachineScaleSetVMRunCommands { get; private set; } - /// /// Gets the IResourceSkusOperations. /// @@ -492,7 +487,6 @@ private void Initialize() VirtualMachineScaleSetVMs = new VirtualMachineScaleSetVMsOperations(this); LogAnalytics = new LogAnalyticsOperations(this); VirtualMachineRunCommands = new VirtualMachineRunCommandsOperations(this); - VirtualMachineScaleSetVMRunCommands = new VirtualMachineScaleSetVMRunCommandsOperations(this); ResourceSkus = new ResourceSkusOperations(this); Disks = new DisksOperations(this); Snapshots = new SnapshotsOperations(this); diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostGroupsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostGroupsOperations.cs index e81752b46337..076bab87a29d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostGroupsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostGroupsOperations.cs @@ -107,7 +107,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -333,7 +333,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -531,7 +531,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -712,7 +712,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -906,7 +906,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1086,7 +1086,7 @@ internal DedicatedHostGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostsOperations.cs index db530fa653c0..6bb551e9fc24 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/DedicatedHostsOperations.cs @@ -186,7 +186,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -389,7 +389,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -601,7 +601,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -836,7 +836,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1043,7 +1043,7 @@ internal DedicatedHostsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs index b96ecca11522..12145c0f68bc 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs @@ -166,11 +166,6 @@ public partial interface IComputeManagementClient : System.IDisposable /// IVirtualMachineRunCommandsOperations VirtualMachineRunCommands { get; } - /// - /// Gets the IVirtualMachineScaleSetVMRunCommandsOperations. - /// - IVirtualMachineScaleSetVMRunCommandsOperations VirtualMachineScaleSetVMRunCommands { get; } - /// /// Gets the IResourceSkusOperations. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineRunCommandsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineRunCommandsOperations.cs index 229f8903879e..cedeeaf1e432 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineRunCommandsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineRunCommandsOperations.cs @@ -71,249 +71,6 @@ public partial interface IVirtualMachineRunCommandsOperations /// Task> GetWithHttpMessagesAsync(string location, string commandId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// The operation to create or update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be - /// created or updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to delete the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be - /// deleted. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to get the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to create or update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be - /// created or updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to delete the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be - /// deleted. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// /// Lists all available run commands for a subscription in a location. /// /// @@ -335,27 +92,5 @@ public partial interface IVirtualMachineRunCommandsOperations /// Thrown when a required parameter is null /// Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListByVirtualMachineNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMRunCommandsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMRunCommandsOperations.cs deleted file mode 100644 index bab27f051589..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMRunCommandsOperations.cs +++ /dev/null @@ -1,312 +0,0 @@ -// -// 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.Compute -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Collections; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - - /// - /// VirtualMachineScaleSetVMRunCommandsOperations operations. - /// - public partial interface IVirtualMachineScaleSetVMRunCommandsOperations - { - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to get the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to get all run commands of an instance in Virtual - /// Machine Scaleset. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand - /// operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// The operation to get all run commands of an instance in Virtual - /// Machine Scaleset. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ImagesOperations.cs index 39a12de9721a..9ccac6de301c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ImagesOperations.cs @@ -169,7 +169,7 @@ internal ImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -361,7 +361,7 @@ internal ImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -541,7 +541,7 @@ internal ImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -742,7 +742,7 @@ internal ImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -968,7 +968,7 @@ internal ImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1184,7 +1184,7 @@ internal ImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/LogAnalyticsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/LogAnalyticsOperations.cs index b31614b702f2..90df713f2e74 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/LogAnalyticsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/LogAnalyticsOperations.cs @@ -152,7 +152,7 @@ internal LogAnalyticsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -363,7 +363,7 @@ internal LogAnalyticsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExecutionState.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExecutionState.cs deleted file mode 100644 index ccc2a5c844a1..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExecutionState.cs +++ /dev/null @@ -1,27 +0,0 @@ -// -// 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.Compute.Models -{ - - /// - /// Defines values for ExecutionState. - /// - public static class ExecutionState - { - public const string Unknown = "Unknown"; - public const string Pending = "Pending"; - public const string Running = "Running"; - public const string Failed = "Failed"; - public const string Succeeded = "Succeeded"; - public const string TimedOut = "TimedOut"; - public const string Canceled = "Canceled"; - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RollingUpgradePolicy.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RollingUpgradePolicy.cs index 2a43f60a0103..d41e70a6260e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RollingUpgradePolicy.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RollingUpgradePolicy.cs @@ -52,12 +52,22 @@ public RollingUpgradePolicy() /// completing the update for all virtual machines in one batch and /// starting the next batch. The time duration should be specified in /// ISO 8601 format. The default value is 0 seconds (PT0S). - public RollingUpgradePolicy(int? maxBatchInstancePercent = default(int?), int? maxUnhealthyInstancePercent = default(int?), int? maxUnhealthyUpgradedInstancePercent = default(int?), string pauseTimeBetweenBatches = default(string)) + /// Enable rolling upgrade across + /// multiple zones during UD walk within the limit of + /// MaxBatchInstanceCount or BatchInstancePercent + /// Enable rolling upgrade + /// to start with the batch which has most unhealthy VMs in percentage. + /// If enableCrossZoneUpgrade is not enabled, the rolling upgrade will + /// start from the most unhealthy availability zone,and within the + /// zone, walk the UD that has the most unhealhty VMs first + public RollingUpgradePolicy(int? maxBatchInstancePercent = default(int?), int? maxUnhealthyInstancePercent = default(int?), int? maxUnhealthyUpgradedInstancePercent = default(int?), string pauseTimeBetweenBatches = default(string), bool? enableCrossZoneUpgrade = default(bool?), bool? prioritizeUnhealthyInstances = default(bool?)) { MaxBatchInstancePercent = maxBatchInstancePercent; MaxUnhealthyInstancePercent = maxUnhealthyInstancePercent; MaxUnhealthyUpgradedInstancePercent = maxUnhealthyUpgradedInstancePercent; PauseTimeBetweenBatches = pauseTimeBetweenBatches; + EnableCrossZoneUpgrade = enableCrossZoneUpgrade; + PrioritizeUnhealthyInstances = prioritizeUnhealthyInstances; CustomInit(); } @@ -107,6 +117,24 @@ public RollingUpgradePolicy() [JsonProperty(PropertyName = "pauseTimeBetweenBatches")] public string PauseTimeBetweenBatches { get; set; } + /// + /// Gets or sets enable rolling upgrade across multiple zones during UD + /// walk within the limit of MaxBatchInstanceCount or + /// BatchInstancePercent + /// + [JsonProperty(PropertyName = "enableCrossZoneUpgrade")] + public bool? EnableCrossZoneUpgrade { get; set; } + + /// + /// Gets or sets enable rolling upgrade to start with the batch which + /// has most unhealthy VMs in percentage. If enableCrossZoneUpgrade is + /// not enabled, the rolling upgrade will start from the most unhealthy + /// availability zone,and within the zone, walk the UD that has the + /// most unhealhty VMs first + /// + [JsonProperty(PropertyName = "prioritizeUnhealthyInstances")] + public bool? PrioritizeUnhealthyInstances { get; set; } + /// /// Validate the object. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommand.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommand.cs deleted file mode 100644 index b402e7dccce8..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommand.cs +++ /dev/null @@ -1,188 +0,0 @@ -// -// 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.Compute.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes a Virtual Machine run command. - /// - [Rest.Serialization.JsonTransformation] - public partial class VirtualMachineRunCommand : Resource - { - /// - /// Initializes a new instance of the VirtualMachineRunCommand class. - /// - public VirtualMachineRunCommand() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VirtualMachineRunCommand class. - /// - /// Resource location - /// Resource Id - /// Resource name - /// Resource type - /// Resource tags - /// The source of the run command script. - /// The parameters used by the script. - /// The parameters used by the - /// script. - /// Optional. If set to true, provisioning - /// will complete as soon as the script starts and will not wait for - /// script to complete. - /// Specifies the user account on the VM when - /// executing the run command. - /// Specifies the user account password on - /// the VM when executing the run command. - /// The timeout in seconds to execute - /// the run command. - /// Specifies the Azure storage blob where - /// script output stream will be uploaded. - /// Specifies the Azure storage blob where - /// script error stream will be uploaded. - /// The provisioning state, which only - /// appears in the response. - /// The virtual machine run command instance - /// view. - public VirtualMachineRunCommand(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), VirtualMachineRunCommandScriptSource source = default(VirtualMachineRunCommandScriptSource), IList parameters = default(IList), IList protectedParameters = default(IList), bool? asyncExecution = default(bool?), string runAsUser = default(string), string runAsPassword = default(string), int? timeoutInSeconds = default(int?), string outputBlobUri = default(string), string errorBlobUri = default(string), string provisioningState = default(string), VirtualMachineRunCommandInstanceView instanceView = default(VirtualMachineRunCommandInstanceView)) - : base(location, id, name, type, tags) - { - Source = source; - Parameters = parameters; - ProtectedParameters = protectedParameters; - AsyncExecution = asyncExecution; - RunAsUser = runAsUser; - RunAsPassword = runAsPassword; - TimeoutInSeconds = timeoutInSeconds; - OutputBlobUri = outputBlobUri; - ErrorBlobUri = errorBlobUri; - ProvisioningState = provisioningState; - InstanceView = instanceView; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the source of the run command script. - /// - [JsonProperty(PropertyName = "properties.source")] - public VirtualMachineRunCommandScriptSource Source { get; set; } - - /// - /// Gets or sets the parameters used by the script. - /// - [JsonProperty(PropertyName = "properties.parameters")] - public IList Parameters { get; set; } - - /// - /// Gets or sets the parameters used by the script. - /// - [JsonProperty(PropertyName = "properties.protectedParameters")] - public IList ProtectedParameters { get; set; } - - /// - /// Gets or sets optional. If set to true, provisioning will complete - /// as soon as the script starts and will not wait for script to - /// complete. - /// - [JsonProperty(PropertyName = "properties.asyncExecution")] - public bool? AsyncExecution { get; set; } - - /// - /// Gets or sets specifies the user account on the VM when executing - /// the run command. - /// - [JsonProperty(PropertyName = "properties.runAsUser")] - public string RunAsUser { get; set; } - - /// - /// Gets or sets specifies the user account password on the VM when - /// executing the run command. - /// - [JsonProperty(PropertyName = "properties.runAsPassword")] - public string RunAsPassword { get; set; } - - /// - /// Gets or sets the timeout in seconds to execute the run command. - /// - [JsonProperty(PropertyName = "properties.timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } - - /// - /// Gets or sets specifies the Azure storage blob where script output - /// stream will be uploaded. - /// - [JsonProperty(PropertyName = "properties.outputBlobUri")] - public string OutputBlobUri { get; set; } - - /// - /// Gets or sets specifies the Azure storage blob where script error - /// stream will be uploaded. - /// - [JsonProperty(PropertyName = "properties.errorBlobUri")] - public string ErrorBlobUri { get; set; } - - /// - /// Gets the provisioning state, which only appears in the response. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets the virtual machine run command instance view. - /// - [JsonProperty(PropertyName = "properties.instanceView")] - public VirtualMachineRunCommandInstanceView InstanceView { get; private set; } - - /// - /// Validate the object. - /// - /// - /// Thrown if validation fails - /// - public override void Validate() - { - base.Validate(); - if (Parameters != null) - { - foreach (var element in Parameters) - { - if (element != null) - { - element.Validate(); - } - } - } - if (ProtectedParameters != null) - { - foreach (var element1 in ProtectedParameters) - { - if (element1 != null) - { - element1.Validate(); - } - } - } - } - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.cs deleted file mode 100644 index 0c816fc3fa91..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandInstanceView.cs +++ /dev/null @@ -1,118 +0,0 @@ -// -// 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.Compute.Models -{ - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// The instance view of a virtual machine run command. - /// - public partial class VirtualMachineRunCommandInstanceView - { - /// - /// Initializes a new instance of the - /// VirtualMachineRunCommandInstanceView class. - /// - public VirtualMachineRunCommandInstanceView() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// VirtualMachineRunCommandInstanceView class. - /// - /// Script execution status. Possible - /// values include: 'Unknown', 'Pending', 'Running', 'Failed', - /// 'Succeeded', 'TimedOut', 'Canceled' - /// Communicate script configuration - /// errors or execution messages. - /// Exit code returned from script - /// execution. - /// Script output stream. - /// Script error stream. - /// Script start time. - /// Script end time. - /// The resource status information. - public VirtualMachineRunCommandInstanceView(string executionState = default(string), string executionMessage = default(string), int? exitCode = default(int?), string output = default(string), string error = default(string), System.DateTime? startTime = default(System.DateTime?), System.DateTime? endTime = default(System.DateTime?), IList statuses = default(IList)) - { - ExecutionState = executionState; - ExecutionMessage = executionMessage; - ExitCode = exitCode; - Output = output; - Error = error; - StartTime = startTime; - EndTime = endTime; - Statuses = statuses; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets script execution status. Possible values include: - /// 'Unknown', 'Pending', 'Running', 'Failed', 'Succeeded', 'TimedOut', - /// 'Canceled' - /// - [JsonProperty(PropertyName = "executionState")] - public string ExecutionState { get; set; } - - /// - /// Gets or sets communicate script configuration errors or execution - /// messages. - /// - [JsonProperty(PropertyName = "executionMessage")] - public string ExecutionMessage { get; set; } - - /// - /// Gets or sets exit code returned from script execution. - /// - [JsonProperty(PropertyName = "exitCode")] - public int? ExitCode { get; set; } - - /// - /// Gets or sets script output stream. - /// - [JsonProperty(PropertyName = "output")] - public string Output { get; set; } - - /// - /// Gets or sets script error stream. - /// - [JsonProperty(PropertyName = "error")] - public string Error { get; set; } - - /// - /// Gets or sets script start time. - /// - [JsonProperty(PropertyName = "startTime")] - public System.DateTime? StartTime { get; set; } - - /// - /// Gets or sets script end time. - /// - [JsonProperty(PropertyName = "endTime")] - public System.DateTime? EndTime { get; set; } - - /// - /// Gets or sets the resource status information. - /// - [JsonProperty(PropertyName = "statuses")] - public IList Statuses { get; set; } - - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs deleted file mode 100644 index 539bd5afa01b..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandScriptSource.cs +++ /dev/null @@ -1,72 +0,0 @@ -// -// 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.Compute.Models -{ - using Newtonsoft.Json; - using System.Linq; - - /// - /// Describes the script sources for run command. - /// - public partial class VirtualMachineRunCommandScriptSource - { - /// - /// Initializes a new instance of the - /// VirtualMachineRunCommandScriptSource class. - /// - public VirtualMachineRunCommandScriptSource() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the - /// VirtualMachineRunCommandScriptSource class. - /// - /// Specifies the script content to be executed on - /// the VM. - /// Specifies the script download - /// location. - /// Specifies a commandId of predefined - /// built-in script. - public VirtualMachineRunCommandScriptSource(string script = default(string), string scriptUri = default(string), string commandId = default(string)) - { - Script = script; - ScriptUri = scriptUri; - CommandId = commandId; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets specifies the script content to be executed on the VM. - /// - [JsonProperty(PropertyName = "script")] - public string Script { get; set; } - - /// - /// Gets or sets specifies the script download location. - /// - [JsonProperty(PropertyName = "scriptUri")] - public string ScriptUri { get; set; } - - /// - /// Gets or sets specifies a commandId of predefined built-in script. - /// - [JsonProperty(PropertyName = "commandId")] - public string CommandId { get; set; } - - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs deleted file mode 100644 index c3ef14e6a7d9..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineRunCommandUpdate.cs +++ /dev/null @@ -1,156 +0,0 @@ -// -// 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.Compute.Models -{ - using Microsoft.Rest; - using Microsoft.Rest.Serialization; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - - /// - /// Describes a Virtual Machine run command. - /// - [Rest.Serialization.JsonTransformation] - public partial class VirtualMachineRunCommandUpdate : UpdateResource - { - /// - /// Initializes a new instance of the VirtualMachineRunCommandUpdate - /// class. - /// - public VirtualMachineRunCommandUpdate() - { - CustomInit(); - } - - /// - /// Initializes a new instance of the VirtualMachineRunCommandUpdate - /// class. - /// - /// Resource tags - /// The source of the run command script. - /// The parameters used by the script. - /// The parameters used by the - /// script. - /// Optional. If set to true, provisioning - /// will complete as soon as the script starts and will not wait for - /// script to complete. - /// Specifies the user account on the VM when - /// executing the run command. - /// Specifies the user account password on - /// the VM when executing the run command. - /// The timeout in seconds to execute - /// the run command. - /// Specifies the Azure storage blob where - /// script output stream will be uploaded. - /// Specifies the Azure storage blob where - /// script error stream will be uploaded. - /// The provisioning state, which only - /// appears in the response. - /// The virtual machine run command instance - /// view. - public VirtualMachineRunCommandUpdate(IDictionary tags = default(IDictionary), VirtualMachineRunCommandScriptSource source = default(VirtualMachineRunCommandScriptSource), IList parameters = default(IList), IList protectedParameters = default(IList), bool? asyncExecution = default(bool?), string runAsUser = default(string), string runAsPassword = default(string), int? timeoutInSeconds = default(int?), string outputBlobUri = default(string), string errorBlobUri = default(string), string provisioningState = default(string), VirtualMachineRunCommandInstanceView instanceView = default(VirtualMachineRunCommandInstanceView)) - : base(tags) - { - Source = source; - Parameters = parameters; - ProtectedParameters = protectedParameters; - AsyncExecution = asyncExecution; - RunAsUser = runAsUser; - RunAsPassword = runAsPassword; - TimeoutInSeconds = timeoutInSeconds; - OutputBlobUri = outputBlobUri; - ErrorBlobUri = errorBlobUri; - ProvisioningState = provisioningState; - InstanceView = instanceView; - CustomInit(); - } - - /// - /// An initialization method that performs custom operations like setting defaults - /// - partial void CustomInit(); - - /// - /// Gets or sets the source of the run command script. - /// - [JsonProperty(PropertyName = "properties.source")] - public VirtualMachineRunCommandScriptSource Source { get; set; } - - /// - /// Gets or sets the parameters used by the script. - /// - [JsonProperty(PropertyName = "properties.parameters")] - public IList Parameters { get; set; } - - /// - /// Gets or sets the parameters used by the script. - /// - [JsonProperty(PropertyName = "properties.protectedParameters")] - public IList ProtectedParameters { get; set; } - - /// - /// Gets or sets optional. If set to true, provisioning will complete - /// as soon as the script starts and will not wait for script to - /// complete. - /// - [JsonProperty(PropertyName = "properties.asyncExecution")] - public bool? AsyncExecution { get; set; } - - /// - /// Gets or sets specifies the user account on the VM when executing - /// the run command. - /// - [JsonProperty(PropertyName = "properties.runAsUser")] - public string RunAsUser { get; set; } - - /// - /// Gets or sets specifies the user account password on the VM when - /// executing the run command. - /// - [JsonProperty(PropertyName = "properties.runAsPassword")] - public string RunAsPassword { get; set; } - - /// - /// Gets or sets the timeout in seconds to execute the run command. - /// - [JsonProperty(PropertyName = "properties.timeoutInSeconds")] - public int? TimeoutInSeconds { get; set; } - - /// - /// Gets or sets specifies the Azure storage blob where script output - /// stream will be uploaded. - /// - [JsonProperty(PropertyName = "properties.outputBlobUri")] - public string OutputBlobUri { get; set; } - - /// - /// Gets or sets specifies the Azure storage blob where script error - /// stream will be uploaded. - /// - [JsonProperty(PropertyName = "properties.errorBlobUri")] - public string ErrorBlobUri { get; set; } - - /// - /// Gets the provisioning state, which only appears in the response. - /// - [JsonProperty(PropertyName = "properties.provisioningState")] - public string ProvisioningState { get; private set; } - - /// - /// Gets the virtual machine run command instance view. - /// - [JsonProperty(PropertyName = "properties.instanceView")] - public VirtualMachineRunCommandInstanceView InstanceView { get; private set; } - - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Operations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Operations.cs index 53367987b667..3e58df5747bc 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Operations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Operations.cs @@ -70,7 +70,7 @@ internal Operations(ComputeManagementClient client) /// public async Task>> ListWithHttpMessagesAsync(Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ProximityPlacementGroupsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ProximityPlacementGroupsOperations.cs index 6372cbdc612a..5026ed7ba823 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ProximityPlacementGroupsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ProximityPlacementGroupsOperations.cs @@ -105,7 +105,7 @@ internal ProximityPlacementGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -327,7 +327,7 @@ internal ProximityPlacementGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; ProximityPlacementGroupUpdate parameters = new ProximityPlacementGroupUpdate(); if (tags != null) { @@ -530,7 +530,7 @@ internal ProximityPlacementGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -710,7 +710,7 @@ internal ProximityPlacementGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -895,7 +895,7 @@ internal ProximityPlacementGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1078,7 +1078,7 @@ internal ProximityPlacementGroupsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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 9094c86f8b99..9542b2210f64 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 @@ -19,9 +19,9 @@ public static IEnumerable> ApiInfo_ComputeManageme { return new Tuple[] { - new Tuple("Compute", "AvailabilitySets", "2020-06-01"), - new Tuple("Compute", "DedicatedHostGroups", "2020-06-01"), - new Tuple("Compute", "DedicatedHosts", "2020-06-01"), + new Tuple("Compute", "AvailabilitySets", "2020-12-01"), + new Tuple("Compute", "DedicatedHostGroups", "2020-12-01"), + new Tuple("Compute", "DedicatedHosts", "2020-12-01"), new Tuple("Compute", "DiskAccesses", "2020-06-30"), new Tuple("Compute", "DiskEncryptionSets", "2020-06-30"), new Tuple("Compute", "Disks", "2020-06-30"), @@ -30,40 +30,28 @@ public static IEnumerable> ApiInfo_ComputeManageme new Tuple("Compute", "GalleryApplications", "2019-12-01"), new Tuple("Compute", "GalleryImageVersions", "2019-12-01"), new Tuple("Compute", "GalleryImages", "2019-12-01"), - new Tuple("Compute", "Images", "2020-06-01"), - new Tuple("Compute", "LogAnalytics", "2020-06-01"), - new Tuple("Compute", "Operations", "2020-06-01"), - new Tuple("Compute", "ProximityPlacementGroups", "2020-06-01"), + new Tuple("Compute", "Images", "2020-12-01"), + new Tuple("Compute", "LogAnalytics", "2020-12-01"), + new Tuple("Compute", "Operations", "2020-12-01"), + new Tuple("Compute", "ProximityPlacementGroups", "2020-12-01"), new Tuple("Compute", "ResourceSkus", "2019-04-01"), new Tuple("Compute", "Snapshots", "2020-06-30"), - new Tuple("Compute", "SshPublicKeys", "2020-06-01"), - new Tuple("Compute", "Usage", "2020-06-01"), - new Tuple("Compute", "VirtualMachineExtensionImages", "2020-06-01"), - new Tuple("Compute", "VirtualMachineExtensions", "2020-06-01"), - new Tuple("Compute", "VirtualMachineImages", "2020-06-01"), - new Tuple("Compute", "VirtualMachineRunCommands", "2020-06-01"), - new Tuple("Compute", "VirtualMachineScaleSetExtensions", "2020-06-01"), - new Tuple("Compute", "VirtualMachineScaleSetRollingUpgrades", "2020-06-01"), - new Tuple("Compute", "VirtualMachineScaleSetVMExtensions", "2020-06-01"), - new Tuple("Compute", "VirtualMachineScaleSetVMRunCommands", "2020-06-01"), - new Tuple("Compute", "VirtualMachineScaleSetVMs", "2020-06-01"), - new Tuple("Compute", "VirtualMachineScaleSets", "2020-06-01"), - new Tuple("Compute", "VirtualMachineSizes", "2020-06-01"), - new Tuple("Compute", "VirtualMachines", "2020-06-01"), + new Tuple("Compute", "SshPublicKeys", "2020-12-01"), + new Tuple("Compute", "Usage", "2020-12-01"), + new Tuple("Compute", "VirtualMachineExtensionImages", "2020-12-01"), + new Tuple("Compute", "VirtualMachineExtensions", "2020-12-01"), + new Tuple("Compute", "VirtualMachineImages", "2020-12-01"), + new Tuple("Compute", "VirtualMachineRunCommands", "2020-12-01"), + new Tuple("Compute", "VirtualMachineScaleSetExtensions", "2020-12-01"), + new Tuple("Compute", "VirtualMachineScaleSetRollingUpgrades", "2020-12-01"), + new Tuple("Compute", "VirtualMachineScaleSetVMExtensions", "2020-12-01"), + new Tuple("Compute", "VirtualMachineScaleSetVMs", "2020-12-01"), + new Tuple("Compute", "VirtualMachineScaleSets", "2020-12-01"), + new Tuple("Compute", "VirtualMachineSizes", "2020-12-01"), + new Tuple("Compute", "VirtualMachines", "2020-12-01"), new Tuple("ContainerService", "ContainerServices", "2017-01-31"), }.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=E:\\azure-sdk-for-net\\sdk"; - public static readonly String GithubForkName = "Azure"; - public static readonly String GithubBranchName = "master"; - public static readonly String GithubCommidId = "1959aa63dd7a626aac36cc0e6b8c656dd2c1791d"; - 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/SshPublicKeysOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SshPublicKeysOperations.cs index bfb79ef0f201..9897a18878eb 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SshPublicKeysOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SshPublicKeysOperations.cs @@ -81,7 +81,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -265,7 +265,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -468,7 +468,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -694,7 +694,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -892,7 +892,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1068,7 +1068,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1265,7 +1265,7 @@ internal SshPublicKeysOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/UsageOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/UsageOperations.cs index 03b03c068a01..e0c198b712e8 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/UsageOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/UsageOperations.cs @@ -96,7 +96,7 @@ internal UsageOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionImagesOperations.cs index 61a6ba57f579..214564a54e88 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionImagesOperations.cs @@ -106,7 +106,7 @@ internal VirtualMachineExtensionImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -303,7 +303,7 @@ internal VirtualMachineExtensionImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -505,7 +505,7 @@ internal VirtualMachineExtensionImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs index 0d80e4c732e6..8e20e220f535 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineExtensionsOperations.cs @@ -186,7 +186,7 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -390,7 +390,7 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -608,7 +608,7 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -843,7 +843,7 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1050,7 +1050,7 @@ internal VirtualMachineExtensionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesOperations.cs index 3310becdc2ae..c5580e85ffac 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesOperations.cs @@ -115,7 +115,7 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -337,7 +337,7 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -551,7 +551,7 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -739,7 +739,7 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -939,7 +939,7 @@ internal VirtualMachineImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperations.cs index faf49cb6233f..5e21431af62e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperations.cs @@ -94,7 +94,7 @@ internal VirtualMachineRunCommandsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal VirtualMachineRunCommandsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -443,1140 +443,6 @@ internal VirtualMachineRunCommandsOperations(ComputeManagementClient client) return _result; } - /// - /// The operation to create or update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be created or - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to delete the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be deleted. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to get the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmName", vmName); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("expand", expand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "GetByVirtualMachine", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (expand != null) - { - _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); - } - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmName", vmName); - tracingParameters.Add("expand", expand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByVirtualMachine", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (expand != null) - { - _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); - } - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to create or update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be created or - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (runCommand == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommand"); - } - if (runCommand != null) - { - runCommand.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmName", vmName); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("runCommand", runCommand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(runCommand != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to update the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (runCommand == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommand"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmName", vmName); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("runCommand", runCommand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(runCommand != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to delete the run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be deleted. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmName"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmName", vmName); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - /// /// Lists all available run commands for a subscription in a location. /// @@ -1750,178 +616,5 @@ internal VirtualMachineRunCommandsOperations(ComputeManagementClient client) return _result; } - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListByVirtualMachineNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListByVirtualMachineNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperationsExtensions.cs index 6d22f626f7e2..82323d777a95 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineRunCommandsOperationsExtensions.cs @@ -95,402 +95,6 @@ public static RunCommandDocument Get(this IVirtualMachineRunCommandsOperations o } } - /// - /// The operation to create or update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be created or - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand CreateOrUpdate(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand) - { - return operations.CreateOrUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to create or update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be created or - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand Update(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand) - { - return operations.UpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to delete the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be deleted. - /// - /// - /// The name of the virtual machine run command. - /// - public static void Delete(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName) - { - operations.DeleteAsync(resourceGroupName, vmName, runCommandName).GetAwaiter().GetResult(); - } - - /// - /// The operation to delete the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be deleted. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// The operation to get the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - public static VirtualMachineRunCommand GetByVirtualMachine(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, string expand = default(string)) - { - return operations.GetByVirtualMachineAsync(resourceGroupName, vmName, runCommandName, expand).GetAwaiter().GetResult(); - } - - /// - /// The operation to get the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetByVirtualMachineAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetByVirtualMachineWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The expand expression to apply on the operation. - /// - public static IPage ListByVirtualMachine(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string expand = default(string)) - { - return operations.ListByVirtualMachineAsync(resourceGroupName, vmName, expand).GetAwaiter().GetResult(); - } - - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine containing the run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByVirtualMachineAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByVirtualMachineWithHttpMessagesAsync(resourceGroupName, vmName, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to create or update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be created or - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand BeginCreateOrUpdate(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to create or update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be created or - /// updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommand runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand BeginUpdate(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand) - { - return operations.BeginUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to update the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be updated. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to delete the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be deleted. - /// - /// - /// The name of the virtual machine run command. - /// - public static void BeginDelete(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName) - { - operations.BeginDeleteAsync(resourceGroupName, vmName, runCommandName).GetAwaiter().GetResult(); - } - - /// - /// The operation to delete the run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the virtual machine where the run command should be deleted. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IVirtualMachineRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - /// /// Lists all available run commands for a subscription in a location. /// @@ -525,39 +129,5 @@ public static IPage ListNext(this IVirtualMachineRunComm } } - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListByVirtualMachineNext(this IVirtualMachineRunCommandsOperations operations, string nextPageLink) - { - return operations.ListByVirtualMachineNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// The operation to get all run commands of a Virtual Machine. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListByVirtualMachineNextAsync(this IVirtualMachineRunCommandsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListByVirtualMachineNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs index a84c409c1393..597afb7122f8 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetExtensionsOperations.cs @@ -186,7 +186,7 @@ internal VirtualMachineScaleSetExtensionsOperations(ComputeManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -387,7 +387,7 @@ internal VirtualMachineScaleSetExtensionsOperations(ComputeManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -596,7 +596,7 @@ internal VirtualMachineScaleSetExtensionsOperations(ComputeManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -831,7 +831,7 @@ internal VirtualMachineScaleSetExtensionsOperations(ComputeManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1056,7 +1056,7 @@ internal VirtualMachineScaleSetExtensionsOperations(ComputeManagementClient clie { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs index 4259bf51041b..6ad75c560b4c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs @@ -164,7 +164,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations(ComputeManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -355,7 +355,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations(ComputeManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -530,7 +530,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations(ComputeManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -705,7 +705,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations(ComputeManagementClient { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs index 35fa17d315b3..a8fc18d07529 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs @@ -201,7 +201,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -415,7 +415,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -641,7 +641,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -885,7 +885,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1101,7 +1101,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations(ComputeManagementClient cl { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs deleted file mode 100644 index ad9e63511683..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs +++ /dev/null @@ -1,1415 +0,0 @@ -// -// 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.Compute -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using Newtonsoft.Json; - using System.Collections; - using System.Collections.Generic; - using System.Linq; - using System.Net; - using System.Net.Http; - using System.Threading; - using System.Threading.Tasks; - - /// - /// VirtualMachineScaleSetVMRunCommandsOperations operations. - /// - internal partial class VirtualMachineScaleSetVMRunCommandsOperations : IServiceOperations, IVirtualMachineScaleSetVMRunCommandsOperations - { - /// - /// Initializes a new instance of the VirtualMachineScaleSetVMRunCommandsOperations class. - /// - /// - /// Reference to the service client. - /// - /// - /// Thrown when a required parameter is null - /// - internal VirtualMachineScaleSetVMRunCommandsOperations(ComputeManagementClient client) - { - if (client == null) - { - throw new System.ArgumentNullException("client"); - } - Client = client; - } - - /// - /// Gets a reference to the ComputeManagementClient - /// - public ComputeManagementClient Client { get; private set; } - - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send Request - AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The headers that will be added to request. - /// - /// - /// The cancellation token. - /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, customHeaders, cancellationToken).ConfigureAwait(false); - return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); - } - - /// - /// The operation to get the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmScaleSetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmScaleSetName", vmScaleSetName); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("expand", expand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (expand != null) - { - _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); - } - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to get all run commands of an instance in Virtual Machine - /// Scaleset. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmScaleSetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmScaleSetName", vmScaleSetName); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("expand", expand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (expand != null) - { - _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); - } - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmScaleSetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (runCommand == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommand"); - } - if (runCommand != null) - { - runCommand.Validate(); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmScaleSetName", vmScaleSetName); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("runCommand", runCommand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PUT"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(runCommand != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - // Deserialize Response - if ((int)_statusCode == 201) - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - _result.Body = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmScaleSetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (runCommand == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommand"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmScaleSetName", vmScaleSetName); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("runCommand", runCommand); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("PATCH"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - if(runCommand != null) - { - _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, Client.SerializationSettings); - _httpRequest.Content = new StringContent(_requestContent, System.Text.Encoding.UTF8); - _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); - } - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (resourceGroupName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); - } - if (vmScaleSetName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "vmScaleSetName"); - } - if (instanceId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "instanceId"); - } - if (runCommandName == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "runCommandName"); - } - if (Client.SubscriptionId == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); - } - string apiVersion = "2020-06-01"; - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("resourceGroupName", resourceGroupName); - tracingParameters.Add("vmScaleSetName", vmScaleSetName); - tracingParameters.Add("instanceId", instanceId); - tracingParameters.Add("runCommandName", runCommandName); - tracingParameters.Add("apiVersion", apiVersion); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); - } - // Construct URL - var _baseUrl = Client.BaseUri.AbsoluteUri; - var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/runCommands/{runCommandName}").ToString(); - _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); - _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); - _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); - _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); - _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); - List _queryParameters = new List(); - if (apiVersion != null) - { - _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); - } - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("DELETE"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - /// - /// The operation to get all run commands of an instance in Virtual Machine - /// Scaleset. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// Headers that will be added to request. - /// - /// - /// The cancellation token. - /// - /// - /// Thrown when the operation returned an invalid status code - /// - /// - /// Thrown when unable to deserialize the response - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// Thrown when a required parameter is null - /// - /// - /// A response object containing the response body and response headers. - /// - public async Task>> ListNextWithHttpMessagesAsync(string nextPageLink, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) - { - if (nextPageLink == null) - { - throw new ValidationException(ValidationRules.CannotBeNull, "nextPageLink"); - } - // Tracing - bool _shouldTrace = ServiceClientTracing.IsEnabled; - string _invocationId = null; - if (_shouldTrace) - { - _invocationId = ServiceClientTracing.NextInvocationId.ToString(); - Dictionary tracingParameters = new Dictionary(); - tracingParameters.Add("nextPageLink", nextPageLink); - tracingParameters.Add("cancellationToken", cancellationToken); - ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); - } - // Construct URL - string _url = "{nextLink}"; - _url = _url.Replace("{nextLink}", nextPageLink); - List _queryParameters = new List(); - if (_queryParameters.Count > 0) - { - _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); - } - // Create HTTP transport objects - var _httpRequest = new HttpRequestMessage(); - HttpResponseMessage _httpResponse = null; - _httpRequest.Method = new HttpMethod("GET"); - _httpRequest.RequestUri = new System.Uri(_url); - // Set Headers - if (Client.GenerateClientRequestId != null && Client.GenerateClientRequestId.Value) - { - _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); - } - if (Client.AcceptLanguage != null) - { - if (_httpRequest.Headers.Contains("accept-language")) - { - _httpRequest.Headers.Remove("accept-language"); - } - _httpRequest.Headers.TryAddWithoutValidation("accept-language", Client.AcceptLanguage); - } - - - if (customHeaders != null) - { - foreach(var _header in customHeaders) - { - if (_httpRequest.Headers.Contains(_header.Key)) - { - _httpRequest.Headers.Remove(_header.Key); - } - _httpRequest.Headers.TryAddWithoutValidation(_header.Key, _header.Value); - } - } - - // Serialize Request - string _requestContent = null; - // Set Credentials - if (Client.Credentials != null) - { - cancellationToken.ThrowIfCancellationRequested(); - await Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - } - // Send Request - if (_shouldTrace) - { - ServiceClientTracing.SendRequest(_invocationId, _httpRequest); - } - cancellationToken.ThrowIfCancellationRequested(); - _httpResponse = await Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); - if (_shouldTrace) - { - ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); - } - HttpStatusCode _statusCode = _httpResponse.StatusCode; - cancellationToken.ThrowIfCancellationRequested(); - string _responseContent = null; - if ((int)_statusCode != 200) - { - var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); - try - { - _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); - CloudError _errorBody = Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, Client.DeserializationSettings); - if (_errorBody != null) - { - ex = new CloudException(_errorBody.Message); - ex.Body = _errorBody; - } - } - catch (JsonException) - { - // Ignore the exception - } - ex.Request = new HttpRequestMessageWrapper(_httpRequest, _requestContent); - ex.Response = new HttpResponseMessageWrapper(_httpResponse, _responseContent); - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); - } - if (_shouldTrace) - { - ServiceClientTracing.Error(_invocationId, ex); - } - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw ex; - } - // Create Result - var _result = new AzureOperationResponse>(); - _result.Request = _httpRequest; - _result.Response = _httpResponse; - if (_httpResponse.Headers.Contains("x-ms-request-id")) - { - _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 = Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, Client.DeserializationSettings); - } - catch (JsonException ex) - { - _httpRequest.Dispose(); - if (_httpResponse != null) - { - _httpResponse.Dispose(); - } - throw new SerializationException("Unable to deserialize the response.", _responseContent, ex); - } - } - if (_shouldTrace) - { - ServiceClientTracing.Exit(_invocationId, _result); - } - return _result; - } - - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperationsExtensions.cs deleted file mode 100644 index ed637e5e47df..000000000000 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMRunCommandsOperationsExtensions.cs +++ /dev/null @@ -1,503 +0,0 @@ -// -// 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.Compute -{ - using Microsoft.Rest; - using Microsoft.Rest.Azure; - using Models; - using System.Threading; - using System.Threading.Tasks; - - /// - /// Extension methods for VirtualMachineScaleSetVMRunCommandsOperations. - /// - public static partial class VirtualMachineScaleSetVMRunCommandsOperationsExtensions - { - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand CreateOrUpdate(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand) - { - return operations.CreateOrUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task CreateOrUpdateAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand Update(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand) - { - return operations.UpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task UpdateAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - public static void Delete(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName) - { - operations.DeleteAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName).GetAwaiter().GetResult(); - } - - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The cancellation token. - /// - public static async Task DeleteAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// The operation to get the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - public static VirtualMachineRunCommand Get(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string)) - { - return operations.GetAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, expand).GetAwaiter().GetResult(); - } - - /// - /// The operation to get the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The cancellation token. - /// - public static async Task GetAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to get all run commands of an instance in Virtual Machine - /// Scaleset. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The expand expression to apply on the operation. - /// - public static IPage List(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string)) - { - return operations.ListAsync(resourceGroupName, vmScaleSetName, instanceId, expand).GetAwaiter().GetResult(); - } - - /// - /// The operation to get all run commands of an instance in Virtual Machine - /// Scaleset. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The expand expression to apply on the operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, expand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand BeginCreateOrUpdate(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand) - { - return operations.BeginCreateOrUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to create or update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Create Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginCreateOrUpdateAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommand runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - public static VirtualMachineRunCommand BeginUpdate(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand) - { - return operations.BeginUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); - } - - /// - /// The operation to update the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// Parameters supplied to the Update Virtual Machine RunCommand operation. - /// - /// - /// The cancellation token. - /// - public static async Task BeginUpdateAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - public static void BeginDelete(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName) - { - operations.BeginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName).GetAwaiter().GetResult(); - } - - /// - /// The operation to delete the VMSS VM run command. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The name of the resource group. - /// - /// - /// The name of the VM scale set. - /// - /// - /// The instance ID of the virtual machine. - /// - /// - /// The name of the virtual machine run command. - /// - /// - /// The cancellation token. - /// - public static async Task BeginDeleteAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, CancellationToken cancellationToken = default(CancellationToken)) - { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, null, cancellationToken).ConfigureAwait(false)).Dispose(); - } - - /// - /// The operation to get all run commands of an instance in Virtual Machine - /// Scaleset. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - public static IPage ListNext(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string nextPageLink) - { - return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); - } - - /// - /// The operation to get all run commands of an instance in Virtual Machine - /// Scaleset. - /// - /// - /// The operations group for this extension method. - /// - /// - /// The NextLink from the previous successful call to List operation. - /// - /// - /// The cancellation token. - /// - public static async Task> ListNextAsync(this IVirtualMachineScaleSetVMRunCommandsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) - { - using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) - { - return _result.Body; - } - } - - } -} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs index 7a513780a284..fd25e3338793 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs @@ -245,7 +245,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -453,7 +453,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -656,7 +656,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -985,7 +985,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1216,7 +1216,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1432,7 +1432,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMReimageParameters vmScaleSetVMReimageInput = default(VirtualMachineScaleSetVMReimageParameters); if (tempDisk != null) { @@ -1628,7 +1628,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1813,7 +1813,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2010,7 +2010,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2235,7 +2235,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2424,7 +2424,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2611,7 +2611,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2793,7 +2793,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2976,7 +2976,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3158,7 +3158,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3354,7 +3354,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs index f1a9b826a5f7..e745a1488f3d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs @@ -166,7 +166,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -414,7 +414,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -601,7 +601,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -782,7 +782,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -973,7 +973,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1167,7 +1167,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1592,7 +1592,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1792,7 +1792,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VMScaleSetConvertToSinglePlacementGroupInput parameters = new VMScaleSetConvertToSinglePlacementGroupInput(); if (activePlacementGroupId != null) { @@ -2016,7 +2016,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2242,7 +2242,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2440,7 +2440,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2620,7 +2620,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -2813,7 +2813,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "instanceIds"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); if (instanceIds != null) { @@ -3010,7 +3010,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -3206,7 +3206,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -3397,7 +3397,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -3589,7 +3589,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -3783,7 +3783,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -3977,7 +3977,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "instanceIds"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); if (instanceIds != null) { @@ -4167,7 +4167,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4353,7 +4353,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = default(VirtualMachineScaleSetVMInstanceIDs); if (instanceIds != null) { @@ -4550,7 +4550,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineSizesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineSizesOperations.cs index 92ec0f79c93e..11ae9680fcb1 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineSizesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineSizesOperations.cs @@ -95,7 +95,7 @@ internal VirtualMachineSizesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; 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 7c170b6402a6..eb4334e844bc 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperations.cs @@ -95,7 +95,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -391,7 +391,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -590,7 +590,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -833,7 +833,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1003,7 +1003,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1186,7 +1186,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1382,7 +1382,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1728,7 +1728,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1946,7 +1946,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2181,7 +2181,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2394,7 +2394,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2620,7 +2620,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2836,7 +2836,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3010,7 +3010,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3184,7 +3184,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3364,7 +3364,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3542,7 +3542,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3715,7 +3715,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3888,7 +3888,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4062,7 +4062,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4241,7 +4241,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; VirtualMachineReimageParameters parameters = default(VirtualMachineReimageParameters); if (tempDisk != null) { @@ -4427,7 +4427,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4603,7 +4603,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4808,7 +4808,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2020-06-01"; + string apiVersion = "2020-12-01"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null;