From 50a3f4321ec76cc56427501bf44237eabb6ffd51 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 15 Dec 2020 00:15:33 +0000 Subject: [PATCH] CodeGen from PR 12085 in Azure/azure-rest-api-specs Merge f6e888d85f4003281c03d1f5d9f88375d6e315c0 into 6523ce7cc57cdfcf0f061de77ac78a476cddf7eb --- .../Generated/AvailabilitySetsOperations.cs | 14 +- .../src/Generated/ComputeManagementClient.cs | 36 +- .../DedicatedHostGroupsOperations.cs | 12 +- .../src/Generated/DedicatedHostsOperations.cs | 10 +- .../src/Generated/GalleriesOperations.cs | 23 +- .../GalleriesOperationsExtensions.cs | 16 +- .../GalleryApplicationVersionsOperations.cs | 10 +- .../GalleryApplicationsOperations.cs | 10 +- .../GalleryImageVersionsOperations.cs | 64 +- ...alleryImageVersionsOperationsExtensions.cs | 108 +- .../src/Generated/GalleryImagesOperations.cs | 38 +- .../GalleryImagesOperationsExtensions.cs | 56 +- .../GallerySharingProfileOperations.cs | 309 ++++ ...llerySharingProfileOperationsExtensions.cs | 117 ++ .../src/Generated/IComputeManagementClient.cs | 30 +- .../src/Generated/IGalleriesOperations.cs | 6 +- .../IGalleryImageVersionsOperations.cs | 54 +- .../src/Generated/IGalleryImagesOperations.cs | 28 +- .../IGallerySharingProfileOperations.cs | 83 ++ .../Generated/ISharedGalleriesOperations.cs | 100 ++ .../ISharedGalleryImageVersionsOperations.cs | 118 ++ .../ISharedGalleryImagesOperations.cs | 107 ++ ...IVirtualMachineImagesEdgeZoneOperations.cs | 197 +++ .../IVirtualMachineRunCommandsOperations.cs | 265 ---- .../IVirtualMachineScaleSetVMsOperations.cs | 12 +- .../IVirtualMachineScaleSetsOperations.cs | 24 +- .../Generated/IVirtualMachinesOperations.cs | 68 +- .../src/Generated/ImagesOperations.cs | 12 +- .../src/Generated/LogAnalyticsOperations.cs | 4 +- .../Generated/Models/ApplicationProfile.cs | 56 + .../Generated/Models/AvailablePatchSummary.cs | 13 +- .../src/Generated/Models/DataDisk.cs | 36 +- .../Generated/Models/DedicatedHostGroup.cs | 6 +- .../Models/DedicatedHostGroupUpdate.cs | 6 +- .../Generated/Models/DiskDetachOptionTypes.cs | 21 + .../src/Generated/Models/ExtendedLocation.cs | 78 + .../Generated/Models/ExtendedLocationTypes.cs | 21 + .../src/Generated/Models/Gallery.cs | 8 +- ...leryApplicationVersionPublishingProfile.cs | 6 +- .../GalleryArtifactPublishingProfileBase.cs | 8 +- .../Models/GalleryArtifactVersionSource.cs | 18 +- .../src/Generated/Models/GalleryImage.cs | 32 +- .../Generated/Models/GalleryImageFeature.cs | 59 + .../Models/GalleryImageIdentifier.cs | 14 +- .../Generated/Models/GalleryImageUpdate.cs | 32 +- .../Generated/Models/GalleryImageVersion.cs | 6 +- .../GalleryImageVersionPublishingProfile.cs | 6 +- .../Models/GalleryImageVersionUpdate.cs | 6 +- .../Models/GallerySharingPermissionTypes.cs | 22 + .../src/Generated/Models/GalleryUpdate.cs | 8 +- .../src/Generated/Models/HardwareProfile.cs | 87 +- .../src/Generated/Models/Image.cs | 15 +- .../src/Generated/Models/ImagePurchasePlan.cs | 2 +- .../Models/LastPatchInstallationSummary.cs | 48 +- .../Generated/Models/LinuxConfiguration.cs | 12 +- .../src/Generated/Models/LinuxParameters.cs | 85 ++ .../Generated/Models/LinuxPatchSettings.cs | 66 + .../Generated/Models/LinuxVMGuestPatchMode.cs | 22 + .../src/Generated/Models/OrchestrationMode.cs | 60 + .../Generated/Models/PatchAssessmentState.cs | 6 +- .../Models/PatchInstallationDetail.cs | 104 ++ .../Models/PatchInstallationState.cs | 26 + .../Generated/Models/PatchOperationStatus.cs | 1 + .../src/Generated/Models/PirResource.cs | 59 + .../Models/PirSharedGalleryResource.cs | 58 + .../Models/RegionalReplicationStatus.cs | 4 +- .../src/Generated/Models/ReplicationStatus.cs | 2 +- .../Generated/Models/RollingUpgradePolicy.cs | 25 +- .../src/Generated/Models/SecurityProfile.cs | 30 +- .../src/Generated/Models/SecurityTypes.cs | 54 + .../src/Generated/Models/SelectPermissions.cs | 21 + .../src/Generated/Models/SharedGallery.cs | 48 + .../Generated/Models/SharedGalleryImage.cs | 157 ++ .../Models/SharedGalleryImageVersion.cs | 76 + .../src/Generated/Models/SharedToValues.cs | 21 + .../src/Generated/Models/SharingProfile.cs | 68 + .../Generated/Models/SharingProfileGroup.cs | 71 + .../Models/SharingProfileGroupTypes.cs | 22 + .../src/Generated/Models/SharingUpdate.cs | 85 ++ .../Models/SharingUpdateOperationTypes.cs | 23 + .../src/Generated/Models/UefiSettings.cs | 69 + .../Generated/Models/VMGalleryApplication.cs | 116 ++ .../Models/VMGuestPatchClassificationLinux.cs | 23 + .../VMGuestPatchClassificationWindows.cs | 28 + .../Models/VMGuestPatchRebootBehavior.cs | 24 + .../Models/VMGuestPatchRebootSetting.cs | 23 + .../Models/VMGuestPatchRebootStatus.cs | 26 + .../src/Generated/Models/VirtualMachine.cs | 56 +- .../VirtualMachineAssessPatchesResult.cs | 25 +- .../Generated/Models/VirtualMachineImage.cs | 12 +- .../Models/VirtualMachineImageFeature.cs | 60 + .../Models/VirtualMachineImageResource.cs | 15 +- .../VirtualMachineInstallPatchesParameters.cs | 107 ++ .../VirtualMachineInstallPatchesResult.cs | 179 +++ .../Models/VirtualMachinePatchStatus.cs | 13 +- .../Models/VirtualMachineScaleSet.cs | 27 +- .../VirtualMachineScaleSetUpdateVMProfile.cs | 12 +- .../Models/VirtualMachineScaleSetVM.cs | 12 +- .../Models/VirtualMachineScaleSetVMProfile.cs | 12 +- .../VirtualMachineSoftwarePatchProperties.cs | 24 +- .../Generated/Models/VirtualMachineUpdate.cs | 43 +- .../Generated/Models/WindowsConfiguration.cs | 11 +- .../src/Generated/Models/WindowsParameters.cs | 97 ++ .../Generated/Models/WindowsPatchSettings.cs | 93 ++ .../Models/WindowsVMGuestPatchMode.cs | 23 + .../src/Generated/Operations.cs | 2 +- .../ProximityPlacementGroupsOperations.cs | 12 +- .../SdkInfo_ComputeManagementClient.cs | 67 +- .../Generated/SharedGalleriesOperations.cs | 615 ++++++++ .../SharedGalleriesOperationsExtensions.cs | 141 ++ .../SharedGalleryImageVersionsOperations.cs | 656 +++++++++ ...alleryImageVersionsOperationsExtensions.cs | 175 +++ .../SharedGalleryImagesOperations.cs | 634 ++++++++ ...SharedGalleryImagesOperationsExtensions.cs | 155 ++ .../src/Generated/SshPublicKeysOperations.cs | 14 +- .../src/Generated/UsageOperations.cs | 2 +- ...VirtualMachineExtensionImagesOperations.cs | 6 +- .../VirtualMachineExtensionsOperations.cs | 10 +- .../VirtualMachineImagesEdgeZoneOperations.cs | 1143 ++++++++++++++ ...chineImagesEdgeZoneOperationsExtensions.cs | 315 ++++ .../VirtualMachineImagesOperations.cs | 10 +- .../VirtualMachineRunCommandsOperations.cs | 1311 +---------------- ...lMachineRunCommandsOperationsExtensions.cs | 430 ------ ...tualMachineScaleSetExtensionsOperations.cs | 10 +- ...achineScaleSetRollingUpgradesOperations.cs | 8 +- ...alMachineScaleSetVMExtensionsOperations.cs | 10 +- .../VirtualMachineScaleSetVMsOperations.cs | 51 +- ...lMachineScaleSetVMsOperationsExtensions.cs | 32 +- .../VirtualMachineScaleSetsOperations.cs | 80 +- ...ualMachineScaleSetsOperationsExtensions.cs | 60 +- .../VirtualMachineSizesOperations.cs | 2 +- .../Generated/VirtualMachinesOperations.cs | 322 +++- .../VirtualMachinesOperationsExtensions.cs | 120 +- 133 files changed, 8626 insertions(+), 2648 deletions(-) create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineImagesEdgeZoneOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ApplicationProfile.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DiskDetachOptionTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocation.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocationTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxParameters.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxPatchSettings.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxVMGuestPatchMode.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationMode.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationDetail.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationState.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UefiSettings.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGalleryApplication.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationLinux.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationWindows.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootBehavior.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootSetting.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootStatus.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageFeature.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesParameters.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsParameters.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsPatchSettings.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsVMGuestPatchMode.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesEdgeZoneOperations.cs create mode 100644 sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesEdgeZoneOperationsExtensions.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..1a6d8971819d 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ComputeManagementClient.cs @@ -116,6 +116,11 @@ public partial class ComputeManagementClient : ServiceClient public virtual IVirtualMachineImagesOperations VirtualMachineImages { get; private set; } + /// + /// Gets the IVirtualMachineImagesEdgeZoneOperations. + /// + public virtual IVirtualMachineImagesEdgeZoneOperations VirtualMachineImagesEdgeZone { get; private set; } + /// /// Gets the IUsageOperations. /// @@ -171,11 +176,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. /// @@ -226,6 +226,26 @@ public partial class ComputeManagementClient : ServiceClient public virtual IGalleryApplicationVersionsOperations GalleryApplicationVersions { get; private set; } + /// + /// Gets the IGallerySharingProfileOperations. + /// + public virtual IGallerySharingProfileOperations GallerySharingProfile { get; private set; } + + /// + /// Gets the ISharedGalleriesOperations. + /// + public virtual ISharedGalleriesOperations SharedGalleries { get; private set; } + + /// + /// Gets the ISharedGalleryImagesOperations. + /// + public virtual ISharedGalleryImagesOperations SharedGalleryImages { get; private set; } + + /// + /// Gets the ISharedGalleryImageVersionsOperations. + /// + public virtual ISharedGalleryImageVersionsOperations SharedGalleryImageVersions { get; private set; } + /// /// Gets the IContainerServicesOperations. /// @@ -481,6 +501,7 @@ private void Initialize() VirtualMachineExtensionImages = new VirtualMachineExtensionImagesOperations(this); VirtualMachineExtensions = new VirtualMachineExtensionsOperations(this); VirtualMachineImages = new VirtualMachineImagesOperations(this); + VirtualMachineImagesEdgeZone = new VirtualMachineImagesEdgeZoneOperations(this); Usage = new UsageOperations(this); VirtualMachines = new VirtualMachinesOperations(this); VirtualMachineSizes = new VirtualMachineSizesOperations(this); @@ -492,7 +513,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); @@ -503,6 +523,10 @@ private void Initialize() GalleryImageVersions = new GalleryImageVersionsOperations(this); GalleryApplications = new GalleryApplicationsOperations(this); GalleryApplicationVersions = new GalleryApplicationVersionsOperations(this); + GallerySharingProfile = new GallerySharingProfileOperations(this); + SharedGalleries = new SharedGalleriesOperations(this); + SharedGalleryImages = new SharedGalleryImagesOperations(this); + SharedGalleryImageVersions = new SharedGalleryImageVersionsOperations(this); ContainerServices = new ContainerServicesOperations(this); BaseUri = new System.Uri("https://management.azure.com"); AcceptLanguage = "en-US"; 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/GalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs index 26c248d669a7..cd1041750010 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperations.cs @@ -113,6 +113,10 @@ internal GalleriesOperations(ComputeManagementClient client) /// /// The name of the Shared Image Gallery. /// + /// + /// The select expression to apply on the operation. Possible values include: + /// 'Permissions' + /// /// /// Headers that will be added to request. /// @@ -134,7 +138,7 @@ internal GalleriesOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (Client.SubscriptionId == null) { @@ -148,7 +152,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -159,6 +163,7 @@ internal GalleriesOperations(ComputeManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("galleryName", galleryName); tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("select", select); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); } @@ -173,6 +178,10 @@ internal GalleriesOperations(ComputeManagementClient client) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); } + if (select != null) + { + _queryParameters.Add(string.Format("$select={0}", System.Uri.EscapeDataString(select))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -357,7 +366,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -535,7 +544,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -738,7 +747,7 @@ internal GalleriesOperations(ComputeManagementClient client) { gallery.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -984,7 +993,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "gallery"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1182,7 +1191,7 @@ internal GalleriesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs index 200ecf5072b8..d5c55ace52ec 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleriesOperationsExtensions.cs @@ -133,9 +133,13 @@ public static Gallery Update(this IGalleriesOperations operations, string resour /// /// The name of the Shared Image Gallery. /// - public static Gallery Get(this IGalleriesOperations operations, string resourceGroupName, string galleryName) + /// + /// The select expression to apply on the operation. Possible values include: + /// 'Permissions' + /// + public static Gallery Get(this IGalleriesOperations operations, string resourceGroupName, string galleryName, string select = default(string)) { - return operations.GetAsync(resourceGroupName, galleryName).GetAwaiter().GetResult(); + return operations.GetAsync(resourceGroupName, galleryName, select).GetAwaiter().GetResult(); } /// @@ -150,12 +154,16 @@ public static Gallery Get(this IGalleriesOperations operations, string resourceG /// /// The name of the Shared Image Gallery. /// + /// + /// The select expression to apply on the operation. Possible values include: + /// 'Permissions' + /// /// /// The cancellation token. /// - public static async Task GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task GetAsync(this IGalleriesOperations operations, string resourceGroupName, string galleryName, string select = default(string), CancellationToken cancellationToken = default(CancellationToken)) { - using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, galleryName, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, galleryName, select, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs index 5ee6cdad2a4f..7fee20b39f3c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationVersionsOperations.cs @@ -187,7 +187,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -429,7 +429,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -656,7 +656,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { galleryApplicationVersion.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -923,7 +923,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersion"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1141,7 +1141,7 @@ internal GalleryApplicationVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs index 1d36b379d0e5..ee8bf60a5e4e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryApplicationsOperations.cs @@ -164,7 +164,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -387,7 +387,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -602,7 +602,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { galleryApplication.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -858,7 +858,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplication"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1066,7 +1066,7 @@ internal GalleryApplicationsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryApplicationName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs index 69cb3fd8df8c..112a66063ee3 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperations.cs @@ -51,7 +51,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) public ComputeManagementClient Client { get; private set; } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -60,17 +60,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -87,7 +87,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -96,17 +96,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The headers that will be added to request. @@ -122,7 +122,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The name of the resource group. @@ -131,11 +131,11 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values include: @@ -184,7 +184,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -344,7 +344,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -353,11 +353,11 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The headers that will be added to request. @@ -373,7 +373,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The name of the resource group. @@ -424,7 +424,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -577,7 +577,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -586,17 +586,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -650,7 +650,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { galleryImageVersion.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -848,7 +848,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -857,17 +857,17 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// Headers that will be added to request. @@ -916,7 +916,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersion"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1078,7 +1078,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -1087,11 +1087,11 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// Headers that will be added to request. @@ -1133,7 +1133,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1270,7 +1270,7 @@ internal GalleryImageVersionsOperations(ComputeManagementClient client) } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs index 7b915d62dfdf..f77ed912503e 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImageVersionsOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Compute public static partial class GalleryImageVersionsOperationsExtensions { /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -34,17 +34,17 @@ public static partial class GalleryImageVersionsOperationsExtensions /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion) @@ -53,7 +53,7 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -65,17 +65,17 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -90,7 +90,7 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -102,17 +102,17 @@ public static GalleryImageVersion CreateOrUpdate(this IGalleryImageVersionsOpera /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// public static GalleryImageVersion Update(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion) { @@ -120,7 +120,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -132,17 +132,17 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The cancellation token. @@ -156,7 +156,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The operations group for this extension method. @@ -168,11 +168,11 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values include: @@ -184,7 +184,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The operations group for this extension method. @@ -196,11 +196,11 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values include: @@ -218,7 +218,7 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -230,11 +230,11 @@ public static GalleryImageVersion Update(this IGalleryImageVersionsOperations op /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// public static void Delete(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName) { @@ -242,7 +242,7 @@ public static void Delete(this IGalleryImageVersionsOperations operations, strin } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -254,11 +254,11 @@ public static void Delete(this IGalleryImageVersionsOperations operations, strin /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The cancellation token. @@ -269,7 +269,7 @@ public static void Delete(this IGalleryImageVersionsOperations operations, strin } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. @@ -290,7 +290,7 @@ public static IPage ListByGalleryImage(this IGalleryImageVe } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. @@ -317,7 +317,7 @@ public static IPage ListByGalleryImage(this IGalleryImageVe } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -329,17 +329,17 @@ public static IPage ListByGalleryImage(this IGalleryImageVe /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion) @@ -348,7 +348,7 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions } /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The operations group for this extension method. @@ -360,17 +360,17 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be created. /// /// - /// The name of the gallery Image Version to be created. Needs to follow + /// The name of the gallery image version to be created. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -385,7 +385,7 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -397,17 +397,17 @@ public static GalleryImageVersion BeginCreateOrUpdate(this IGalleryImageVersions /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion) { @@ -415,7 +415,7 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio } /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The operations group for this extension method. @@ -427,17 +427,17 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version is to + /// The name of the gallery image definition in which the Image Version is to /// be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to follow + /// The name of the gallery image version to be updated. Needs to follow /// semantic version name pattern: The allowed characters are digit and period. /// Digits must be within the range of a 32-bit integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The cancellation token. @@ -451,7 +451,7 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -463,11 +463,11 @@ public static GalleryImageVersion BeginUpdate(this IGalleryImageVersionsOperatio /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// public static void BeginDelete(this IGalleryImageVersionsOperations operations, string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName) { @@ -475,7 +475,7 @@ public static void BeginDelete(this IGalleryImageVersionsOperations operations, } /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The operations group for this extension method. @@ -487,11 +487,11 @@ public static void BeginDelete(this IGalleryImageVersionsOperations operations, /// The name of the Shared Image Gallery in which the Image Definition resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The cancellation token. @@ -502,7 +502,7 @@ public static void BeginDelete(this IGalleryImageVersionsOperations operations, } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. @@ -516,7 +516,7 @@ public static IPage ListByGalleryImageNext(this IGalleryIma } /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The operations group for this extension method. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs index f9021f2d57a9..02f11b8fd7ac 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperations.cs @@ -51,7 +51,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) public ComputeManagementClient Client { get; private set; } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -61,7 +61,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -82,7 +82,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -92,7 +92,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -113,7 +113,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The name of the resource group. @@ -123,7 +123,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// /// /// Headers that will be added to request. @@ -164,7 +164,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -327,7 +327,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The headers that will be added to request. @@ -343,7 +343,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The name of the resource group. @@ -387,7 +387,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -538,7 +538,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -548,7 +548,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -602,7 +602,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { galleryImage.Validate(); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -798,7 +798,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -808,7 +808,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -858,7 +858,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImage"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1028,7 +1028,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// Headers that will be added to request. @@ -1066,7 +1066,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) { throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2019-12-01"; + string apiVersion = "2020-09-30"; // Tracing bool _shouldTrace = ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1201,7 +1201,7 @@ internal GalleryImagesOperations(ComputeManagementClient client) } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs index 0f2a873723dd..578c096bffa6 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GalleryImagesOperationsExtensions.cs @@ -22,7 +22,7 @@ namespace Microsoft.Azure.Management.Compute public static partial class GalleryImagesOperationsExtensions { /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -35,7 +35,7 @@ public static partial class GalleryImagesOperationsExtensions /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -48,7 +48,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -61,7 +61,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -80,7 +80,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -93,7 +93,7 @@ public static GalleryImage CreateOrUpdate(this IGalleryImagesOperations operatio /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -106,7 +106,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -119,7 +119,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -138,7 +138,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri } /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The operations group for this extension method. @@ -151,7 +151,7 @@ public static GalleryImage Update(this IGalleryImagesOperations operations, stri /// to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// public static GalleryImage Get(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName) { @@ -159,7 +159,7 @@ public static GalleryImage Get(this IGalleryImagesOperations operations, string } /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The operations group for this extension method. @@ -172,7 +172,7 @@ public static GalleryImage Get(this IGalleryImagesOperations operations, string /// to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// /// /// The cancellation token. @@ -199,7 +199,7 @@ public static GalleryImage Get(this IGalleryImagesOperations operations, string /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// public static void Delete(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName) { @@ -220,7 +220,7 @@ public static void Delete(this IGalleryImagesOperations operations, string resou /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The cancellation token. @@ -231,7 +231,7 @@ public static void Delete(this IGalleryImagesOperations operations, string resou } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. @@ -249,7 +249,7 @@ public static IPage ListByGallery(this IGalleryImagesOperations op } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. @@ -273,7 +273,7 @@ public static IPage ListByGallery(this IGalleryImagesOperations op } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -286,7 +286,7 @@ public static IPage ListByGallery(this IGalleryImagesOperations op /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -299,7 +299,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope } /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The operations group for this extension method. @@ -312,7 +312,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope /// created. /// /// - /// The name of the gallery Image Definition to be created or updated. The + /// The name of the gallery image definition to be created or updated. The /// allowed characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -331,7 +331,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -344,7 +344,7 @@ public static GalleryImage BeginCreateOrUpdate(this IGalleryImagesOperations ope /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -357,7 +357,7 @@ public static GalleryImage BeginUpdate(this IGalleryImagesOperations operations, } /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The operations group for this extension method. @@ -370,7 +370,7 @@ public static GalleryImage BeginUpdate(this IGalleryImagesOperations operations, /// updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods allowed /// in the middle. The maximum length is 80 characters. /// @@ -402,7 +402,7 @@ public static GalleryImage BeginUpdate(this IGalleryImagesOperations operations, /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// public static void BeginDelete(this IGalleryImagesOperations operations, string resourceGroupName, string galleryName, string galleryImageName) { @@ -423,7 +423,7 @@ public static void BeginDelete(this IGalleryImagesOperations operations, string /// deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The cancellation token. @@ -434,7 +434,7 @@ public static void BeginDelete(this IGalleryImagesOperations operations, string } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. @@ -448,7 +448,7 @@ public static IPage ListByGalleryNext(this IGalleryImagesOperation } /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The operations group for this extension method. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs new file mode 100644 index 000000000000..36d20e5f894b --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperations.cs @@ -0,0 +1,309 @@ +// +// 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; + + /// + /// GallerySharingProfileOperations operations. + /// + internal partial class GallerySharingProfileOperations : IServiceOperations, IGallerySharingProfileOperations + { + /// + /// Initializes a new instance of the GallerySharingProfileOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GallerySharingProfileOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, galleryName, sharingUpdate, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// 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 galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (resourceGroupName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (galleryName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryName"); + } + if (sharingUpdate == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "sharingUpdate"); + } + if (sharingUpdate != null) + { + sharingUpdate.Validate(); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("galleryName", galleryName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("sharingUpdate", sharingUpdate); + 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/galleries/{galleryName}/share").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{galleryName}", System.Uri.EscapeDataString(galleryName)); + 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("POST"); + _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(sharingUpdate != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(sharingUpdate, 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 != 202) + { + 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 == 202) + { + _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/GallerySharingProfileOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs new file mode 100644 index 000000000000..9ab1747dd236 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/GallerySharingProfileOperationsExtensions.cs @@ -0,0 +1,117 @@ +// +// 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 GallerySharingProfileOperations. + /// + public static partial class GallerySharingProfileOperationsExtensions + { + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + public static SharingUpdate Update(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate) + { + return operations.UpdateAsync(resourceGroupName, galleryName, sharingUpdate).GetAwaiter().GetResult(); + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The cancellation token. + /// + public static async Task UpdateAsync(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, galleryName, sharingUpdate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + public static SharingUpdate BeginUpdate(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate) + { + return operations.BeginUpdateAsync(resourceGroupName, galleryName, sharingUpdate).GetAwaiter().GetResult(); + } + + /// + /// Update sharing profile of a gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// The cancellation token. + /// + public static async Task BeginUpdateAsync(this IGallerySharingProfileOperations operations, string resourceGroupName, string galleryName, SharingUpdate sharingUpdate, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, galleryName, sharingUpdate, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} 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..fde70082ad25 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IComputeManagementClient.cs @@ -111,6 +111,11 @@ public partial interface IComputeManagementClient : System.IDisposable /// IVirtualMachineImagesOperations VirtualMachineImages { get; } + /// + /// Gets the IVirtualMachineImagesEdgeZoneOperations. + /// + IVirtualMachineImagesEdgeZoneOperations VirtualMachineImagesEdgeZone { get; } + /// /// Gets the IUsageOperations. /// @@ -166,11 +171,6 @@ public partial interface IComputeManagementClient : System.IDisposable /// IVirtualMachineRunCommandsOperations VirtualMachineRunCommands { get; } - /// - /// Gets the IVirtualMachineScaleSetVMRunCommandsOperations. - /// - IVirtualMachineScaleSetVMRunCommandsOperations VirtualMachineScaleSetVMRunCommands { get; } - /// /// Gets the IResourceSkusOperations. /// @@ -221,6 +221,26 @@ public partial interface IComputeManagementClient : System.IDisposable /// IGalleryApplicationVersionsOperations GalleryApplicationVersions { get; } + /// + /// Gets the IGallerySharingProfileOperations. + /// + IGallerySharingProfileOperations GallerySharingProfile { get; } + + /// + /// Gets the ISharedGalleriesOperations. + /// + ISharedGalleriesOperations SharedGalleries { get; } + + /// + /// Gets the ISharedGalleryImagesOperations. + /// + ISharedGalleryImagesOperations SharedGalleryImages { get; } + + /// + /// Gets the ISharedGalleryImageVersionsOperations. + /// + ISharedGalleryImageVersionsOperations SharedGalleryImageVersions { get; } + /// /// Gets the IContainerServicesOperations. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs index ca3cfebcee4c..2e17fe75814a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleriesOperations.cs @@ -93,6 +93,10 @@ public partial interface IGalleriesOperations /// /// The name of the Shared Image Gallery. /// + /// + /// The select expression to apply on the operation. Possible values + /// include: 'Permissions' + /// /// /// The headers that will be added to request. /// @@ -108,7 +112,7 @@ public partial interface IGalleriesOperations /// /// Thrown when a required parameter is null /// - Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string select = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Delete a Shared Image Gallery. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs index 48a1efb60205..60387a8991fe 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImageVersionsOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Compute public partial interface IGalleryImageVersionsOperations { /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -34,18 +34,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be created. /// /// - /// The name of the gallery Image Version to be created. Needs to + /// The name of the gallery image version to be created. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -65,7 +65,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -75,18 +75,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to + /// The name of the gallery image version to be updated. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The headers that will be added to request. @@ -105,7 +105,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieves information about a gallery Image Version. + /// Retrieves information about a gallery image version. /// /// /// The name of the resource group. @@ -115,11 +115,11 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be retrieved. + /// The name of the gallery image version to be retrieved. /// /// /// The expand expression to apply on the operation. Possible values @@ -142,7 +142,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> GetWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, string expand = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -152,11 +152,11 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The headers that will be added to request. @@ -172,7 +172,7 @@ public partial interface IGalleryImageVersionsOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The name of the resource group. @@ -202,7 +202,7 @@ public partial interface IGalleryImageVersionsOperations /// Task>> ListByGalleryImageWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Create or update a gallery Image Version. + /// Create or update a gallery image version. /// /// /// The name of the resource group. @@ -212,18 +212,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be created. /// /// - /// The name of the gallery Image Version to be created. Needs to + /// The name of the gallery image version to be created. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the create or update gallery Image Version + /// Parameters supplied to the create or update gallery image version /// operation. /// /// @@ -243,7 +243,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersion galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Version. + /// Update a gallery image version. /// /// /// The name of the resource group. @@ -253,18 +253,18 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// is to be updated. /// /// - /// The name of the gallery Image Version to be updated. Needs to + /// The name of the gallery image version to be updated. Needs to /// follow semantic version name pattern: The allowed characters are /// digit and period. Digits must be within the range of a 32-bit /// integer. Format: /// <MajorVersion>.<MinorVersion>.<Patch> /// /// - /// Parameters supplied to the update gallery Image Version operation. + /// Parameters supplied to the update gallery image version operation. /// /// /// The headers that will be added to request. @@ -283,7 +283,7 @@ public partial interface IGalleryImageVersionsOperations /// Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, GalleryImageVersionUpdate galleryImageVersion, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Delete a gallery Image Version. + /// Delete a gallery image version. /// /// /// The name of the resource group. @@ -293,11 +293,11 @@ public partial interface IGalleryImageVersionsOperations /// resides. /// /// - /// The name of the gallery Image Definition in which the Image Version + /// The name of the gallery image definition in which the Image Version /// resides. /// /// - /// The name of the gallery Image Version to be deleted. + /// The name of the gallery image version to be deleted. /// /// /// The headers that will be added to request. @@ -313,7 +313,7 @@ public partial interface IGalleryImageVersionsOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Versions in a gallery Image Definition. + /// List gallery image versions in a gallery image definition. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs index 523c2ffc9ffc..bfe8aaf91f55 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGalleryImagesOperations.cs @@ -24,7 +24,7 @@ namespace Microsoft.Azure.Management.Compute public partial interface IGalleryImagesOperations { /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -34,7 +34,7 @@ public partial interface IGalleryImagesOperations /// is to be created. /// /// - /// The name of the gallery Image Definition to be created or updated. + /// The name of the gallery image definition to be created or updated. /// The allowed characters are alphabets and numbers with dots, dashes, /// and periods allowed in the middle. The maximum length is 80 /// characters. @@ -60,7 +60,7 @@ public partial interface IGalleryImagesOperations /// Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, GalleryImage galleryImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -70,7 +70,7 @@ public partial interface IGalleryImagesOperations /// is to be updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -94,7 +94,7 @@ public partial interface IGalleryImagesOperations /// Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, GalleryImageUpdate galleryImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Retrieves information about a gallery Image Definition. + /// Retrieves information about a gallery image definition. /// /// /// The name of the resource group. @@ -104,7 +104,7 @@ public partial interface IGalleryImagesOperations /// Definitions are to be retrieved. /// /// - /// The name of the gallery Image Definition to be retrieved. + /// The name of the gallery image definition to be retrieved. /// /// /// The headers that will be added to request. @@ -133,7 +133,7 @@ public partial interface IGalleryImagesOperations /// is to be deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The headers that will be added to request. @@ -149,7 +149,7 @@ public partial interface IGalleryImagesOperations /// Task DeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The name of the resource group. @@ -175,7 +175,7 @@ public partial interface IGalleryImagesOperations /// Task>> ListByGalleryWithHttpMessagesAsync(string resourceGroupName, string galleryName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Create or update a gallery Image Definition. + /// Create or update a gallery image definition. /// /// /// The name of the resource group. @@ -185,7 +185,7 @@ public partial interface IGalleryImagesOperations /// is to be created. /// /// - /// The name of the gallery Image Definition to be created or updated. + /// The name of the gallery image definition to be created or updated. /// The allowed characters are alphabets and numbers with dots, dashes, /// and periods allowed in the middle. The maximum length is 80 /// characters. @@ -211,7 +211,7 @@ public partial interface IGalleryImagesOperations /// Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, GalleryImage galleryImage, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// Update a gallery Image Definition. + /// Update a gallery image definition. /// /// /// The name of the resource group. @@ -221,7 +221,7 @@ public partial interface IGalleryImagesOperations /// is to be updated. /// /// - /// The name of the gallery Image Definition to be updated. The allowed + /// The name of the gallery image definition to be updated. The allowed /// characters are alphabets and numbers with dots, dashes, and periods /// allowed in the middle. The maximum length is 80 characters. /// @@ -255,7 +255,7 @@ public partial interface IGalleryImagesOperations /// is to be deleted. /// /// - /// The name of the gallery Image Definition to be deleted. + /// The name of the gallery image definition to be deleted. /// /// /// The headers that will be added to request. @@ -271,7 +271,7 @@ public partial interface IGalleryImagesOperations /// Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string galleryName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// - /// List gallery Image Definitions in a gallery. + /// List gallery image definitions in a gallery. /// /// /// The NextLink from the previous successful call to List operation. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs new file mode 100644 index 000000000000..851857bc297a --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IGallerySharingProfileOperations.cs @@ -0,0 +1,83 @@ +// +// 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; + + /// + /// GallerySharingProfileOperations operations. + /// + public partial interface IGallerySharingProfileOperations + { + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// 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 galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Update sharing profile of a gallery. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the Shared Image Gallery. + /// + /// + /// Parameters supplied to the update gallery sharing profile. + /// + /// + /// 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 galleryName, SharingUpdate sharingUpdate, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs new file mode 100644 index 000000000000..369d638e16b0 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleriesOperations.cs @@ -0,0 +1,100 @@ +// +// 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; + + /// + /// SharedGalleriesOperations operations. + /// + public partial interface ISharedGalleriesOperations + { + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when + /// doing listing operations. Possible values include: 'tenant' + /// + /// + /// 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 location, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// 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 location, string galleryUniqueName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// 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/ISharedGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs new file mode 100644 index 000000000000..f885944fb8f4 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImageVersionsOperations.cs @@ -0,0 +1,118 @@ +// +// 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; + + /// + /// SharedGalleryImageVersionsOperations operations. + /// + public partial interface ISharedGalleryImageVersionsOperations + { + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the + /// Image Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when + /// doing listing operations. Possible values include: 'tenant' + /// + /// + /// 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 location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the + /// Image Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to + /// follow semantic version name pattern: The allowed characters are + /// digit and period. Digits must be within the range of a 32-bit + /// integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + /// + /// 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 location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// 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/ISharedGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs new file mode 100644 index 000000000000..29684dfca5e7 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/ISharedGalleryImagesOperations.cs @@ -0,0 +1,107 @@ +// +// 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; + + /// + /// SharedGalleryImagesOperations operations. + /// + public partial interface ISharedGalleryImagesOperations + { + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when + /// doing listing operations. Possible values include: 'tenant' + /// + /// + /// 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 location, string galleryUniqueName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the + /// Image Versions are to be listed. + /// + /// + /// 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 location, string galleryUniqueName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// 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/IVirtualMachineImagesEdgeZoneOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineImagesEdgeZoneOperations.cs new file mode 100644 index 000000000000..3beead36a4a6 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineImagesEdgeZoneOperations.cs @@ -0,0 +1,197 @@ +// +// 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; + + /// + /// VirtualMachineImagesEdgeZoneOperations operations. + /// + public partial interface IVirtualMachineImagesEdgeZoneOperations + { + /// + /// Gets a virtual machine image in an edge zone. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// A valid image SKU version. + /// + /// + /// 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 location, string edgeZone, string publisherName, string offer, string skus, string version, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of all virtual machine image versions for the specified + /// location, edge zone, publisher, offer, and SKU. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// An integer value specifying the number of images to return that + /// matches supplied values. + /// + /// + /// Specifies the order of the results returned. Formatted as an OData + /// query. + /// + /// + /// 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 location, string edgeZone, string publisherName, string offer, string skus, string expand = default(string), int? top = default(int?), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of virtual machine image offers for the specified + /// location, edge zone and publisher. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// 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>> ListOffersWithHttpMessagesAsync(string location, string edgeZone, string publisherName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of virtual machine image publishers for the specified + /// Azure location and edge zone. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// 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>> ListPublishersWithHttpMessagesAsync(string location, string edgeZone, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Gets a list of virtual machine image SKUs for the specified + /// location, edge zone, publisher, and offer. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// 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>> ListSkusWithHttpMessagesAsync(string location, string edgeZone, string publisherName, string offer, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + } +} 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/IVirtualMachineScaleSetVMsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMsOperations.cs index 24a0c0a583d6..7d01ea2808ed 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetVMsOperations.cs @@ -155,6 +155,10 @@ public partial interface IVirtualMachineScaleSetVMsOperations /// /// The instance ID of the virtual machine. /// + /// + /// Optional parameter to force delete a virtual machine from a VM + /// scale set. (Feature in Preview) + /// /// /// The headers that will be added to request. /// @@ -167,7 +171,7 @@ public partial interface IVirtualMachineScaleSetVMsOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets a virtual machine from a VM scale set. /// @@ -617,6 +621,10 @@ public partial interface IVirtualMachineScaleSetVMsOperations /// /// The instance ID of the virtual machine. /// + /// + /// Optional parameter to force delete a virtual machine from a VM + /// scale set. (Feature in Preview) + /// /// /// The headers that will be added to request. /// @@ -629,7 +637,7 @@ public partial interface IVirtualMachineScaleSetVMsOperations /// /// Thrown when a required parameter is null /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Power off (stop) a virtual machine in a VM scale set. Note that /// resources are still attached and you are getting charged for the diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs index 9ca46d37e2fc..25ba943144d4 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachineScaleSetsOperations.cs @@ -88,6 +88,10 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// The name of the VM scale set. /// + /// + /// Optional parameter to force delete a VM scale set. (Feature in + /// Preview) + /// /// /// The headers that will be added to request. /// @@ -100,7 +104,7 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Display information about a virtual machine scale set. /// @@ -168,6 +172,10 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// The virtual machine scale set instance ids. /// + /// + /// Optional parameter to force delete virtual machines from the VM + /// scale set. (Feature in Preview) + /// /// /// The headers that will be added to request. /// @@ -180,7 +188,7 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// Thrown when a required parameter is null /// - Task DeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Gets the status of a VM scale set instance. /// @@ -682,6 +690,10 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// The name of the VM scale set. /// + /// + /// Optional parameter to force delete a VM scale set. (Feature in + /// Preview) + /// /// /// The headers that will be added to request. /// @@ -694,7 +706,7 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// Thrown when a required parameter is null /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Deallocates specific virtual machines in a VM scale set. Shuts down /// the virtual machines and releases the compute resources. You are @@ -737,6 +749,10 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// The virtual machine scale set instance ids. /// + /// + /// Optional parameter to force delete virtual machines from the VM + /// scale set. (Feature in Preview) + /// /// /// The headers that will be added to request. /// @@ -749,7 +765,7 @@ public partial interface IVirtualMachineScaleSetsOperations /// /// Thrown when a required parameter is null /// - Task BeginDeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginDeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Power off (stop) one or more virtual machines in a VM scale set. /// Note that resources are still attached and you are getting charged diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs index cd0a8bbcdd18..818ce5adb86a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/IVirtualMachinesOperations.cs @@ -142,6 +142,10 @@ public partial interface IVirtualMachinesOperations /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines.(Feature in + /// Preview) + /// /// /// The headers that will be added to request. /// @@ -154,7 +158,7 @@ public partial interface IVirtualMachinesOperations /// /// Thrown when a required parameter is null /// - Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Retrieves information about the model view or the instance view of /// a virtual machine. @@ -611,6 +615,34 @@ public partial interface IVirtualMachinesOperations /// Task> AssessPatchesWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Installs patches on the VM. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + /// + /// 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> InstallPatchesWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Run command on the VM. /// /// @@ -733,6 +765,10 @@ public partial interface IVirtualMachinesOperations /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines.(Feature in + /// Preview) + /// /// /// The headers that will be added to request. /// @@ -745,7 +781,7 @@ public partial interface IVirtualMachinesOperations /// /// Thrown when a required parameter is null /// - Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// /// Converts virtual machine disks from blob-based to managed disks. /// Virtual machine must be stop-deallocated before invoking this @@ -988,6 +1024,34 @@ public partial interface IVirtualMachinesOperations /// Task> BeginAssessPatchesWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); /// + /// Installs patches on the VM. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + /// + /// 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> BeginInstallPatchesWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)); + /// /// Run command on the VM. /// /// 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/ApplicationProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ApplicationProfile.cs new file mode 100644 index 000000000000..4b7ed0d431ce --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ApplicationProfile.cs @@ -0,0 +1,56 @@ +// +// 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; + + /// + /// Contains the list of gallery applications that should be made available + /// to the VM/VMSS + /// + public partial class ApplicationProfile + { + /// + /// Initializes a new instance of the ApplicationProfile class. + /// + public ApplicationProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ApplicationProfile class. + /// + /// Specifies the gallery + /// applications that should be made available to the VM/VMSS + public ApplicationProfile(IList galleryApplications = default(IList)) + { + GalleryApplications = galleryApplications; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the gallery applications that should be made + /// available to the VM/VMSS + /// + [JsonProperty(PropertyName = "galleryApplications")] + public IList GalleryApplications { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/AvailablePatchSummary.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/AvailablePatchSummary.cs index a3968ca58762..322c7909b592 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/AvailablePatchSummary.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/AvailablePatchSummary.cs @@ -32,9 +32,10 @@ public AvailablePatchSummary() /// /// The overall success or failure status of the /// operation. It remains "InProgress" until the operation completes. - /// At that point it will become "Failed", "Succeeded", or - /// "CompletedWithWarnings.". Possible values include: 'InProgress', - /// 'Failed', 'Succeeded', 'CompletedWithWarnings' + /// At that point it will become "Unknown", "Failed", "Succeeded", or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', + /// 'CompletedWithWarnings' /// The activity ID of the operation /// that produced this result. It is used to correlate across CRP and /// extension logs. @@ -74,9 +75,9 @@ public AvailablePatchSummary() /// /// Gets the overall success or failure status of the operation. It /// remains "InProgress" until the operation completes. At that point - /// it will become "Failed", "Succeeded", or "CompletedWithWarnings.". - /// Possible values include: 'InProgress', 'Failed', 'Succeeded', - /// 'CompletedWithWarnings' + /// it will become "Unknown", "Failed", "Succeeded", or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' /// [JsonProperty(PropertyName = "status")] public string Status { get; private set; } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DataDisk.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DataDisk.cs index 39c430dc8860..4adc5176ab56 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DataDisk.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DataDisk.cs @@ -66,6 +66,20 @@ public DataDisk() /// Specifies whether the data disk is in /// process of detachment from the /// VirtualMachine/VirtualMachineScaleset + /// Specifies the detach behavior to be used + /// while detaching a disk or which is already in the process of + /// detachment from the virtual machine. Supported values: + /// **ForceDetach**. <br><br> detachOption: **ForceDetach** + /// is applicable only for managed data disks. If a previous detachment + /// attempt of the data disk did not complete due to an unexpected + /// failure from the virtual machine and the disk is still not released + /// then use force-detach as a last resort option to detach the disk + /// forcibly from the VM. All writes might not have been flushed when + /// using this detach behavior. <br><br> This feature is + /// still in preview mode and is not supported for + /// VirtualMachineScaleSet. To force-detach a data disk update + /// toBeDetached to 'true' along with setting detachOption: + /// 'ForceDetach'. Possible values include: 'ForceDetach' /// Specifies the Read-Write IOPS for /// the managed disk when StorageAccountType is UltraSSD_LRS. Returned /// only for VirtualMachine ScaleSet VM disks. Can be updated only via @@ -75,7 +89,7 @@ public DataDisk() /// UltraSSD_LRS. Returned only for VirtualMachine ScaleSet VM disks. /// Can be updated only via updates to the VirtualMachine Scale /// Set. - public DataDisk(int lun, string createOption, string name = default(string), VirtualHardDisk vhd = default(VirtualHardDisk), VirtualHardDisk image = default(VirtualHardDisk), CachingTypes? caching = default(CachingTypes?), bool? writeAcceleratorEnabled = default(bool?), int? diskSizeGB = default(int?), ManagedDiskParameters managedDisk = default(ManagedDiskParameters), bool? toBeDetached = default(bool?), long? diskIOPSReadWrite = default(long?), long? diskMBpsReadWrite = default(long?)) + public DataDisk(int lun, string createOption, string name = default(string), VirtualHardDisk vhd = default(VirtualHardDisk), VirtualHardDisk image = default(VirtualHardDisk), CachingTypes? caching = default(CachingTypes?), bool? writeAcceleratorEnabled = default(bool?), int? diskSizeGB = default(int?), ManagedDiskParameters managedDisk = default(ManagedDiskParameters), bool? toBeDetached = default(bool?), string detachOption = default(string), long? diskIOPSReadWrite = default(long?), long? diskMBpsReadWrite = default(long?)) { Lun = lun; Name = name; @@ -87,6 +101,7 @@ public DataDisk() DiskSizeGB = diskSizeGB; ManagedDisk = managedDisk; ToBeDetached = toBeDetached; + DetachOption = detachOption; DiskIOPSReadWrite = diskIOPSReadWrite; DiskMBpsReadWrite = diskMBpsReadWrite; CustomInit(); @@ -183,6 +198,25 @@ public DataDisk() [JsonProperty(PropertyName = "toBeDetached")] public bool? ToBeDetached { get; set; } + /// + /// Gets or sets specifies the detach behavior to be used while + /// detaching a disk or which is already in the process of detachment + /// from the virtual machine. Supported values: **ForceDetach**. + /// &lt;br&gt;&lt;br&gt; detachOption: **ForceDetach** + /// is applicable only for managed data disks. If a previous detachment + /// attempt of the data disk did not complete due to an unexpected + /// failure from the virtual machine and the disk is still not released + /// then use force-detach as a last resort option to detach the disk + /// forcibly from the VM. All writes might not have been flushed when + /// using this detach behavior. &lt;br&gt;&lt;br&gt; + /// This feature is still in preview mode and is not supported for + /// VirtualMachineScaleSet. To force-detach a data disk update + /// toBeDetached to 'true' along with setting detachOption: + /// 'ForceDetach'. Possible values include: 'ForceDetach' + /// + [JsonProperty(PropertyName = "detachOption")] + public string DetachOption { get; set; } + /// /// Gets specifies the Read-Write IOPS for the managed disk when /// StorageAccountType is UltraSSD_LRS. Returned only for diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs index 03c9b92e68a8..bb23e586e178 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroup.cs @@ -54,8 +54,8 @@ public DedicatedHostGroup() /// machines or virtual machine scale sets can be placed automatically /// on the dedicated host group. Automatic placement means resources /// are allocated on dedicated hosts, that are chosen by Azure, under - /// the dedicated host group. The value is defaulted to 'true' when not - /// provided. <br><br>Minimum api-version: + /// the dedicated host group. The value is defaulted to 'false' when + /// not provided. <br><br>Minimum api-version: /// 2020-06-01. /// Availability Zone to use for this host group. /// Only single zone is supported. The zone can be assigned only during @@ -104,7 +104,7 @@ public DedicatedHostGroup() /// scale sets can be placed automatically on the dedicated host group. /// Automatic placement means resources are allocated on dedicated /// hosts, that are chosen by Azure, under the dedicated host group. - /// The value is defaulted to 'true' when not provided. + /// The value is defaulted to 'false' when not provided. /// &lt;br&gt;&lt;br&gt;Minimum api-version: /// 2020-06-01. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs index c021f69c8e5b..cdd31b9d1d48 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DedicatedHostGroupUpdate.cs @@ -47,8 +47,8 @@ public DedicatedHostGroupUpdate() /// machines or virtual machine scale sets can be placed automatically /// on the dedicated host group. Automatic placement means resources /// are allocated on dedicated hosts, that are chosen by Azure, under - /// the dedicated host group. The value is defaulted to 'true' when not - /// provided. <br><br>Minimum api-version: + /// the dedicated host group. The value is defaulted to 'false' when + /// not provided. <br><br>Minimum api-version: /// 2020-06-01. /// Availability Zone to use for this host group. /// Only single zone is supported. The zone can be assigned only during @@ -97,7 +97,7 @@ public DedicatedHostGroupUpdate() /// scale sets can be placed automatically on the dedicated host group. /// Automatic placement means resources are allocated on dedicated /// hosts, that are chosen by Azure, under the dedicated host group. - /// The value is defaulted to 'true' when not provided. + /// The value is defaulted to 'false' when not provided. /// &lt;br&gt;&lt;br&gt;Minimum api-version: /// 2020-06-01. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DiskDetachOptionTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DiskDetachOptionTypes.cs new file mode 100644 index 000000000000..9244426d7ec0 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/DiskDetachOptionTypes.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for DiskDetachOptionTypes. + /// + public static class DiskDetachOptionTypes + { + public const string ForceDetach = "ForceDetach"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocation.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocation.cs new file mode 100644 index 000000000000..5e8cf1371fd0 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocation.cs @@ -0,0 +1,78 @@ +// +// 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 Newtonsoft.Json; + using System.Linq; + + /// + /// ExtendedLocation complex type. + /// + public partial class ExtendedLocation + { + /// + /// Initializes a new instance of the ExtendedLocation class. + /// + public ExtendedLocation() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExtendedLocation class. + /// + /// The name of the extended location. + public ExtendedLocation(string name) + { + Name = name; + CustomInit(); + } + /// + /// Static constructor for ExtendedLocation class. + /// + static ExtendedLocation() + { + Type = "EdgeZone"; + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the extended location. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// The type of the extended location. + /// + [JsonProperty(PropertyName = "type")] + public static string Type { get; private set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Name == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Name"); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocationTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocationTypes.cs new file mode 100644 index 000000000000..77e0b2c66958 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ExtendedLocationTypes.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for ExtendedLocationTypes. + /// + public static class ExtendedLocationTypes + { + public const string EdgeZone = "EdgeZone"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs index 3164fc5d8259..df6b6a84056c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Gallery.cs @@ -44,12 +44,13 @@ public Gallery() /// Gallery resource. This property is updatable. /// The current state of the /// gallery. - public Gallery(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string)) + public Gallery(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string), SharingProfile sharingProfile = default(SharingProfile)) : base(location, id, name, type, tags) { Description = description; Identifier = identifier; ProvisioningState = provisioningState; + SharingProfile = sharingProfile; CustomInit(); } @@ -81,6 +82,11 @@ public Gallery() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// + [JsonProperty(PropertyName = "properties.sharingProfile")] + public SharingProfile SharingProfile { get; set; } + /// /// Validate the object. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs index 3705c404cf17..f6e7ac008e70 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryApplicationVersionPublishingProfile.cs @@ -17,7 +17,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// The publishing profile of a gallery Image Version. + /// The publishing profile of a gallery image version. /// public partial class GalleryApplicationVersionPublishingProfile : GalleryArtifactPublishingProfileBase { @@ -45,9 +45,9 @@ public GalleryApplicationVersionPublishingProfile() /// deployed from the latest version of the Image Definition won't use /// this Image Version. /// The timestamp for when the gallery - /// Image Version is published. + /// image version is published. /// The end of life date of the gallery - /// Image Version. This property can be used for decommissioning + /// image version. This property can be used for decommissioning /// purposes. This property is updatable. /// Specifies the storage account type /// to be used to store the image. This property is not updatable. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs index 1b6b478f2b6b..8f21c927feef 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactPublishingProfileBase.cs @@ -44,9 +44,9 @@ public GalleryArtifactPublishingProfileBase() /// deployed from the latest version of the Image Definition won't use /// this Image Version. /// The timestamp for when the gallery - /// Image Version is published. + /// image version is published. /// The end of life date of the gallery - /// Image Version. This property can be used for decommissioning + /// image version. This property can be used for decommissioning /// purposes. This property is updatable. /// Specifies the storage account type /// to be used to store the image. This property is not updatable. @@ -93,13 +93,13 @@ public GalleryArtifactPublishingProfileBase() public bool? ExcludeFromLatest { get; set; } /// - /// Gets the timestamp for when the gallery Image Version is published. + /// Gets the timestamp for when the gallery image version is published. /// [JsonProperty(PropertyName = "publishedDate")] public System.DateTime? PublishedDate { get; private set; } /// - /// Gets or sets the end of life date of the gallery Image Version. + /// Gets or sets the end of life date of the gallery image version. /// This property can be used for decommissioning purposes. This /// property is updatable. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs index 7617dbe21556..ebe95fdfc09b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryArtifactVersionSource.cs @@ -32,10 +32,14 @@ public GalleryArtifactVersionSource() /// class. /// /// The id of the gallery artifact version source. Can - /// specify a disk uri, snapshot uri, or user image. - public GalleryArtifactVersionSource(string id = default(string)) + /// specify a disk uri, snapshot uri, user image or storage account + /// resource. + /// The uri of the gallery artifact version source. + /// Currently used to specify vhd/blob source. + public GalleryArtifactVersionSource(string id = default(string), string uri = default(string)) { Id = id; + Uri = uri; CustomInit(); } @@ -46,10 +50,18 @@ public GalleryArtifactVersionSource() /// /// Gets or sets the id of the gallery artifact version source. Can - /// specify a disk uri, snapshot uri, or user image. + /// specify a disk uri, snapshot uri, user image or storage account + /// resource. /// [JsonProperty(PropertyName = "id")] public string Id { get; set; } + /// + /// Gets or sets the uri of the gallery artifact version source. + /// Currently used to specify vhd/blob source. + /// + [JsonProperty(PropertyName = "uri")] + public string Uri { get; set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs index 276cb3aeaae5..62dbb59864df 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImage.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Definition that you want + /// Specifies information about the gallery image definition that you want /// to create or update. /// [Rest.Serialization.JsonTransformation] @@ -49,22 +49,23 @@ public GalleryImage() /// Resource name /// Resource type /// Resource tags - /// The description of this gallery Image - /// Definition resource. This property is updatable. - /// The Eula agreement for the gallery Image - /// Definition. + /// The description of this gallery image + /// definition resource. This property is updatable. + /// The Eula agreement for the gallery image + /// definition. /// The privacy statement /// uri. /// The release note uri. /// The hypervisor generation of the /// Virtual Machine. Applicable to OS disks only. Possible values /// include: 'V1', 'V2' + /// A list of gallery image features. /// The end of life date of the gallery - /// Image Definition. This property can be used for decommissioning + /// image definition. This property can be used for decommissioning /// purposes. This property is updatable. /// The current state of the gallery - /// Image Definition. - public GalleryImage(string location, OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) + /// image definition. + public GalleryImage(string location, OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), IList features = default(IList), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) : base(location, id, name, type, tags) { Description = description; @@ -74,6 +75,7 @@ public GalleryImage() OsType = osType; OsState = osState; HyperVGeneration = hyperVGeneration; + Features = features; EndOfLifeDate = endOfLifeDate; Identifier = identifier; Recommended = recommended; @@ -89,14 +91,14 @@ public GalleryImage() partial void CustomInit(); /// - /// Gets or sets the description of this gallery Image Definition + /// Gets or sets the description of this gallery image definition /// resource. This property is updatable. /// [JsonProperty(PropertyName = "properties.description")] public string Description { get; set; } /// - /// Gets or sets the Eula agreement for the gallery Image Definition. + /// Gets or sets the Eula agreement for the gallery image definition. /// [JsonProperty(PropertyName = "properties.eula")] public string Eula { get; set; } @@ -141,7 +143,13 @@ public GalleryImage() public string HyperVGeneration { get; set; } /// - /// Gets or sets the end of life date of the gallery Image Definition. + /// Gets or sets a list of gallery image features. + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image definition. /// This property can be used for decommissioning purposes. This /// property is updatable. /// @@ -169,7 +177,7 @@ public GalleryImage() public ImagePurchasePlan PurchasePlan { get; set; } /// - /// Gets the current state of the gallery Image Definition. + /// Gets the current state of the gallery image definition. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs new file mode 100644 index 000000000000..2aa52c29b60b --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageFeature.cs @@ -0,0 +1,59 @@ +// +// 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; + + /// + /// A feature for gallery image. + /// + public partial class GalleryImageFeature + { + /// + /// Initializes a new instance of the GalleryImageFeature class. + /// + public GalleryImageFeature() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GalleryImageFeature class. + /// + /// The name of the gallery image feature. + /// The value of the gallery image feature. + public GalleryImageFeature(string name = default(string), string value = default(string)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the gallery image feature. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the value of the gallery image feature. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs index b18ce093894f..5f3835b6879f 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageIdentifier.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// This is the gallery Image Definition identifier. + /// This is the gallery image definition identifier. /// public partial class GalleryImageIdentifier { @@ -30,11 +30,11 @@ public GalleryImageIdentifier() /// /// Initializes a new instance of the GalleryImageIdentifier class. /// - /// The name of the gallery Image Definition + /// The name of the gallery image definition /// publisher. - /// The name of the gallery Image Definition + /// The name of the gallery image definition /// offer. - /// The name of the gallery Image Definition + /// The name of the gallery image definition /// SKU. public GalleryImageIdentifier(string publisher, string offer, string sku) { @@ -50,19 +50,19 @@ public GalleryImageIdentifier(string publisher, string offer, string sku) partial void CustomInit(); /// - /// Gets or sets the name of the gallery Image Definition publisher. + /// Gets or sets the name of the gallery image definition publisher. /// [JsonProperty(PropertyName = "publisher")] public string Publisher { get; set; } /// - /// Gets or sets the name of the gallery Image Definition offer. + /// Gets or sets the name of the gallery image definition offer. /// [JsonProperty(PropertyName = "offer")] public string Offer { get; set; } /// - /// Gets or sets the name of the gallery Image Definition SKU. + /// Gets or sets the name of the gallery image definition SKU. /// [JsonProperty(PropertyName = "sku")] public string Sku { get; set; } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs index 4ac822d3c550..de806c8b415b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageUpdate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Definition that you want + /// Specifies information about the gallery image definition that you want /// to update. /// [Rest.Serialization.JsonTransformation] @@ -48,22 +48,23 @@ public GalleryImageUpdate() /// Resource name /// Resource type /// Resource tags - /// The description of this gallery Image - /// Definition resource. This property is updatable. - /// The Eula agreement for the gallery Image - /// Definition. + /// The description of this gallery image + /// definition resource. This property is updatable. + /// The Eula agreement for the gallery image + /// definition. /// The privacy statement /// uri. /// The release note uri. /// The hypervisor generation of the /// Virtual Machine. Applicable to OS disks only. Possible values /// include: 'V1', 'V2' + /// A list of gallery image features. /// The end of life date of the gallery - /// Image Definition. This property can be used for decommissioning + /// image definition. This property can be used for decommissioning /// purposes. This property is updatable. /// The current state of the gallery - /// Image Definition. - public GalleryImageUpdate(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) + /// image definition. + public GalleryImageUpdate(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), string eula = default(string), string privacyStatementUri = default(string), string releaseNoteUri = default(string), string hyperVGeneration = default(string), IList features = default(IList), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan), string provisioningState = default(string)) : base(id, name, type, tags) { Description = description; @@ -73,6 +74,7 @@ public GalleryImageUpdate() OsType = osType; OsState = osState; HyperVGeneration = hyperVGeneration; + Features = features; EndOfLifeDate = endOfLifeDate; Identifier = identifier; Recommended = recommended; @@ -88,14 +90,14 @@ public GalleryImageUpdate() partial void CustomInit(); /// - /// Gets or sets the description of this gallery Image Definition + /// Gets or sets the description of this gallery image definition /// resource. This property is updatable. /// [JsonProperty(PropertyName = "properties.description")] public string Description { get; set; } /// - /// Gets or sets the Eula agreement for the gallery Image Definition. + /// Gets or sets the Eula agreement for the gallery image definition. /// [JsonProperty(PropertyName = "properties.eula")] public string Eula { get; set; } @@ -140,7 +142,13 @@ public GalleryImageUpdate() public string HyperVGeneration { get; set; } /// - /// Gets or sets the end of life date of the gallery Image Definition. + /// Gets or sets a list of gallery image features. + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image definition. /// This property can be used for decommissioning purposes. This /// property is updatable. /// @@ -168,7 +176,7 @@ public GalleryImageUpdate() public ImagePurchasePlan PurchasePlan { get; set; } /// - /// Gets the current state of the gallery Image Definition. + /// Gets the current state of the gallery image definition. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs index a7ad1dea5fab..707a553ae2c5 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersion.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Version that you want to + /// Specifies information about the gallery image version that you want to /// create or update. /// [Rest.Serialization.JsonTransformation] @@ -41,7 +41,7 @@ public GalleryImageVersion() /// Resource type /// Resource tags /// The current state of the gallery - /// Image Version. + /// image version. public GalleryImageVersion(string location, GalleryImageVersionStorageProfile storageProfile, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), GalleryImageVersionPublishingProfile publishingProfile = default(GalleryImageVersionPublishingProfile), string provisioningState = default(string), ReplicationStatus replicationStatus = default(ReplicationStatus)) : base(location, id, name, type, tags) { @@ -63,7 +63,7 @@ public GalleryImageVersion() public GalleryImageVersionPublishingProfile PublishingProfile { get; set; } /// - /// Gets the current state of the gallery Image Version. + /// Gets the current state of the gallery image version. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs index 6881266310aa..d047e097275a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionPublishingProfile.cs @@ -15,7 +15,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// The publishing profile of a gallery Image Version. + /// The publishing profile of a gallery image Version. /// public partial class GalleryImageVersionPublishingProfile : GalleryArtifactPublishingProfileBase { @@ -43,9 +43,9 @@ public GalleryImageVersionPublishingProfile() /// deployed from the latest version of the Image Definition won't use /// this Image Version. /// The timestamp for when the gallery - /// Image Version is published. + /// image version is published. /// The end of life date of the gallery - /// Image Version. This property can be used for decommissioning + /// image version. This property can be used for decommissioning /// purposes. This property is updatable. /// Specifies the storage account type /// to be used to store the image. This property is not updatable. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs index 95a7c06e84e8..174e5218e0fe 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryImageVersionUpdate.cs @@ -18,7 +18,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Specifies information about the gallery Image Version that you want to + /// Specifies information about the gallery image version that you want to /// update. /// [Rest.Serialization.JsonTransformation] @@ -40,7 +40,7 @@ public GalleryImageVersionUpdate() /// Resource type /// Resource tags /// The current state of the gallery - /// Image Version. + /// image version. public GalleryImageVersionUpdate(GalleryImageVersionStorageProfile storageProfile, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), GalleryImageVersionPublishingProfile publishingProfile = default(GalleryImageVersionPublishingProfile), string provisioningState = default(string), ReplicationStatus replicationStatus = default(ReplicationStatus)) : base(id, name, type, tags) { @@ -62,7 +62,7 @@ public GalleryImageVersionUpdate() public GalleryImageVersionPublishingProfile PublishingProfile { get; set; } /// - /// Gets the current state of the gallery Image Version. + /// Gets the current state of the gallery image version. /// /// /// The provisioning state, which only appears in the response. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs new file mode 100644 index 000000000000..22f0125b9557 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GallerySharingPermissionTypes.cs @@ -0,0 +1,22 @@ +// +// 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 GallerySharingPermissionTypes. + /// + public static class GallerySharingPermissionTypes + { + public const string Private = "Private"; + public const string Groups = "Groups"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs index e46c769da8b3..23ea5f90f3c5 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/GalleryUpdate.cs @@ -43,12 +43,13 @@ public GalleryUpdate() /// Gallery resource. This property is updatable. /// The current state of the /// gallery. - public GalleryUpdate(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string)) + public GalleryUpdate(string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string description = default(string), GalleryIdentifier identifier = default(GalleryIdentifier), string provisioningState = default(string), SharingProfile sharingProfile = default(SharingProfile)) : base(id, name, type, tags) { Description = description; Identifier = identifier; ProvisioningState = provisioningState; + SharingProfile = sharingProfile; CustomInit(); } @@ -80,5 +81,10 @@ public GalleryUpdate() [JsonProperty(PropertyName = "properties.provisioningState")] public string ProvisioningState { get; private set; } + /// + /// + [JsonProperty(PropertyName = "properties.sharingProfile")] + public SharingProfile SharingProfile { get; set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/HardwareProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/HardwareProfile.cs index 93319ecbc5b0..d82198706c79 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/HardwareProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/HardwareProfile.cs @@ -29,21 +29,24 @@ public HardwareProfile() /// /// Initializes a new instance of the HardwareProfile class. /// - /// Specifies the size of the virtual machine. For - /// more information about virtual machine sizes, see [Sizes for - /// virtual - /// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - /// <br><br> The available VM sizes depend on region and - /// availability set. For a list of available sizes use these APIs: - /// <br><br> [List all available virtual machine sizes in - /// an availability + /// Specifies the size of the virtual machine. + /// <br><br> The enum data type is currently deprecated and + /// will be removed by December 23rd 2023. <br><br> + /// Recommended way to get the list of available sizes is using these + /// APIs: <br><br> [List all available virtual machine + /// sizes in an availability /// set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) /// <br><br> [List all available virtual machine sizes in a - /// region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + /// region]( + /// https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) /// <br><br> [List all available virtual machine sizes for /// resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - /// Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', - /// 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', + /// For more information about virtual machine sizes, see [Sizes for + /// virtual + /// machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). + /// <br><br> The available VM sizes depend on region and + /// availability set. Possible values include: 'Basic_A0', 'Basic_A1', + /// 'Basic_A2', 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', /// 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', /// 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', @@ -104,40 +107,44 @@ public HardwareProfile() partial void CustomInit(); /// - /// Gets or sets specifies the size of the virtual machine. For more - /// information about virtual machine sizes, see [Sizes for virtual - /// machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-sizes?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json). - /// &lt;br&gt;&lt;br&gt; The available VM sizes depend - /// on region and availability set. For a list of available sizes use - /// these APIs: &lt;br&gt;&lt;br&gt; [List all - /// available virtual machine sizes in an availability + /// Gets or sets specifies the size of the virtual machine. + /// &lt;br&gt;&lt;br&gt; The enum data type is + /// currently deprecated and will be removed by December 23rd 2023. + /// &lt;br&gt;&lt;br&gt; Recommended way to get the + /// list of available sizes is using these APIs: + /// &lt;br&gt;&lt;br&gt; [List all available virtual + /// machine sizes in an availability /// set](https://docs.microsoft.com/rest/api/compute/availabilitysets/listavailablesizes) /// &lt;br&gt;&lt;br&gt; [List all available virtual - /// machine sizes in a - /// region](https://docs.microsoft.com/rest/api/compute/virtualmachinesizes/list) + /// machine sizes in a region]( + /// https://docs.microsoft.com/en-us/rest/api/compute/resourceskus/list) /// &lt;br&gt;&lt;br&gt; [List all available virtual /// machine sizes for /// resizing](https://docs.microsoft.com/rest/api/compute/virtualmachines/listavailablesizes). - /// Possible values include: 'Basic_A0', 'Basic_A1', 'Basic_A2', - /// 'Basic_A3', 'Basic_A4', 'Standard_A0', 'Standard_A1', - /// 'Standard_A2', 'Standard_A3', 'Standard_A4', 'Standard_A5', - /// 'Standard_A6', 'Standard_A7', 'Standard_A8', 'Standard_A9', - /// 'Standard_A10', 'Standard_A11', 'Standard_A1_v2', 'Standard_A2_v2', - /// 'Standard_A4_v2', 'Standard_A8_v2', 'Standard_A2m_v2', - /// 'Standard_A4m_v2', 'Standard_A8m_v2', 'Standard_B1s', - /// 'Standard_B1ms', 'Standard_B2s', 'Standard_B2ms', 'Standard_B4ms', - /// 'Standard_B8ms', 'Standard_D1', 'Standard_D2', 'Standard_D3', - /// 'Standard_D4', 'Standard_D11', 'Standard_D12', 'Standard_D13', - /// 'Standard_D14', 'Standard_D1_v2', 'Standard_D2_v2', - /// 'Standard_D3_v2', 'Standard_D4_v2', 'Standard_D5_v2', - /// 'Standard_D2_v3', 'Standard_D4_v3', 'Standard_D8_v3', - /// 'Standard_D16_v3', 'Standard_D32_v3', 'Standard_D64_v3', - /// 'Standard_D2s_v3', 'Standard_D4s_v3', 'Standard_D8s_v3', - /// 'Standard_D16s_v3', 'Standard_D32s_v3', 'Standard_D64s_v3', - /// 'Standard_D11_v2', 'Standard_D12_v2', 'Standard_D13_v2', - /// 'Standard_D14_v2', 'Standard_D15_v2', 'Standard_DS1', - /// 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', 'Standard_DS11', - /// 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', + /// For more information about virtual machine sizes, see [Sizes for + /// virtual + /// machines](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes). + /// &lt;br&gt;&lt;br&gt; The available VM sizes depend + /// on region and availability set. Possible values include: + /// 'Basic_A0', 'Basic_A1', 'Basic_A2', 'Basic_A3', 'Basic_A4', + /// 'Standard_A0', 'Standard_A1', 'Standard_A2', 'Standard_A3', + /// 'Standard_A4', 'Standard_A5', 'Standard_A6', 'Standard_A7', + /// 'Standard_A8', 'Standard_A9', 'Standard_A10', 'Standard_A11', + /// 'Standard_A1_v2', 'Standard_A2_v2', 'Standard_A4_v2', + /// 'Standard_A8_v2', 'Standard_A2m_v2', 'Standard_A4m_v2', + /// 'Standard_A8m_v2', 'Standard_B1s', 'Standard_B1ms', 'Standard_B2s', + /// 'Standard_B2ms', 'Standard_B4ms', 'Standard_B8ms', 'Standard_D1', + /// 'Standard_D2', 'Standard_D3', 'Standard_D4', 'Standard_D11', + /// 'Standard_D12', 'Standard_D13', 'Standard_D14', 'Standard_D1_v2', + /// 'Standard_D2_v2', 'Standard_D3_v2', 'Standard_D4_v2', + /// 'Standard_D5_v2', 'Standard_D2_v3', 'Standard_D4_v3', + /// 'Standard_D8_v3', 'Standard_D16_v3', 'Standard_D32_v3', + /// 'Standard_D64_v3', 'Standard_D2s_v3', 'Standard_D4s_v3', + /// 'Standard_D8s_v3', 'Standard_D16s_v3', 'Standard_D32s_v3', + /// 'Standard_D64s_v3', 'Standard_D11_v2', 'Standard_D12_v2', + /// 'Standard_D13_v2', 'Standard_D14_v2', 'Standard_D15_v2', + /// 'Standard_DS1', 'Standard_DS2', 'Standard_DS3', 'Standard_DS4', + /// 'Standard_DS11', 'Standard_DS12', 'Standard_DS13', 'Standard_DS14', /// 'Standard_DS1_v2', 'Standard_DS2_v2', 'Standard_DS3_v2', /// 'Standard_DS4_v2', 'Standard_DS5_v2', 'Standard_DS11_v2', /// 'Standard_DS12_v2', 'Standard_DS13_v2', 'Standard_DS14_v2', diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Image.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Image.cs index 75c0fef474e3..5affb9549c32 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Image.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/Image.cs @@ -49,13 +49,16 @@ public Image() /// Gets the HyperVGenerationType of the /// VirtualMachine created from the image. Possible values include: /// 'V1', 'V2' - public Image(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SubResource sourceVirtualMachine = default(SubResource), ImageStorageProfile storageProfile = default(ImageStorageProfile), string provisioningState = default(string), string hyperVGeneration = default(string)) + /// The extended location of the + /// Image. + public Image(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), SubResource sourceVirtualMachine = default(SubResource), ImageStorageProfile storageProfile = default(ImageStorageProfile), string provisioningState = default(string), string hyperVGeneration = default(string), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, type, tags) { SourceVirtualMachine = sourceVirtualMachine; StorageProfile = storageProfile; ProvisioningState = provisioningState; HyperVGeneration = hyperVGeneration; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -91,6 +94,12 @@ public Image() [JsonProperty(PropertyName = "properties.hyperVGeneration")] public string HyperVGeneration { get; set; } + /// + /// Gets or sets the extended location of the Image. + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// @@ -104,6 +113,10 @@ public override void Validate() { StorageProfile.Validate(); } + if (ExtendedLocation != null) + { + ExtendedLocation.Validate(); + } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs index 8c15c2873d2e..491af12db0e4 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ImagePurchasePlan.cs @@ -14,7 +14,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Describes the gallery Image Definition purchase plan. This is used by + /// Describes the gallery image definition purchase plan. This is used by /// marketplace images. /// public partial class ImagePurchasePlan diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LastPatchInstallationSummary.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LastPatchInstallationSummary.cs index d1f509272630..3afaee59807a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LastPatchInstallationSummary.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LastPatchInstallationSummary.cs @@ -33,24 +33,16 @@ public LastPatchInstallationSummary() /// /// The overall success or failure status of the /// operation. It remains "InProgress" until the operation completes. - /// At that point it will become "Failed", "Succeeded", or - /// "CompletedWithWarnings.". Possible values include: 'InProgress', - /// 'Failed', 'Succeeded', 'CompletedWithWarnings' + /// At that point it will become "Unknown", "Failed", "Succeeded", or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', + /// 'CompletedWithWarnings' /// The activity ID of the /// operation that produced this result. It is used to correlate across /// CRP and extension logs. /// Describes whether the /// operation ran out of time before it completed all its intended /// actions - /// The reboot status of the machine after - /// the patch operation. It will be in "NotNeeded" status if reboot is - /// not needed after the patch operation. "Required" will be the status - /// once the patch is applied and machine is required to reboot. - /// "Started" will be the reboot status when the machine has started to - /// reboot. "Failed" will be the status if the machine is failed to - /// reboot. "Completed" will be the status once the machine is rebooted - /// successfully. Possible values include: 'NotNeeded', 'Required', - /// 'Started', 'Failed', 'Completed' /// The number of all available /// patches but not going to be installed because it didn't match a /// classification or inclusion list entry. @@ -68,17 +60,14 @@ public LastPatchInstallationSummary() /// began. /// The UTC timestamp when the operation /// began. - /// The person or system account that started - /// the operation /// The errors that were encountered during /// execution of the operation. The details array contains the list of /// them. - public LastPatchInstallationSummary(string status = default(string), string installationActivityId = default(string), bool? maintenanceWindowExceeded = default(bool?), string rebootStatus = default(string), int? notSelectedPatchCount = default(int?), int? excludedPatchCount = default(int?), int? pendingPatchCount = default(int?), int? installedPatchCount = default(int?), int? failedPatchCount = default(int?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? lastModifiedTime = default(System.DateTime?), string startedBy = default(string), ApiError error = default(ApiError)) + public LastPatchInstallationSummary(string status = default(string), string installationActivityId = default(string), bool? maintenanceWindowExceeded = default(bool?), int? notSelectedPatchCount = default(int?), int? excludedPatchCount = default(int?), int? pendingPatchCount = default(int?), int? installedPatchCount = default(int?), int? failedPatchCount = default(int?), System.DateTime? startTime = default(System.DateTime?), System.DateTime? lastModifiedTime = default(System.DateTime?), ApiError error = default(ApiError)) { Status = status; InstallationActivityId = installationActivityId; MaintenanceWindowExceeded = maintenanceWindowExceeded; - RebootStatus = rebootStatus; NotSelectedPatchCount = notSelectedPatchCount; ExcludedPatchCount = excludedPatchCount; PendingPatchCount = pendingPatchCount; @@ -86,7 +75,6 @@ public LastPatchInstallationSummary() FailedPatchCount = failedPatchCount; StartTime = startTime; LastModifiedTime = lastModifiedTime; - StartedBy = startedBy; Error = error; CustomInit(); } @@ -99,9 +87,9 @@ public LastPatchInstallationSummary() /// /// Gets the overall success or failure status of the operation. It /// remains "InProgress" until the operation completes. At that point - /// it will become "Failed", "Succeeded", or "CompletedWithWarnings.". - /// Possible values include: 'InProgress', 'Failed', 'Succeeded', - /// 'CompletedWithWarnings' + /// it will become "Unknown", "Failed", "Succeeded", or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' /// [JsonProperty(PropertyName = "status")] public string Status { get; private set; } @@ -120,20 +108,6 @@ public LastPatchInstallationSummary() [JsonProperty(PropertyName = "maintenanceWindowExceeded")] public bool? MaintenanceWindowExceeded { get; private set; } - /// - /// Gets the reboot status of the machine after the patch operation. It - /// will be in "NotNeeded" status if reboot is not needed after the - /// patch operation. "Required" will be the status once the patch is - /// applied and machine is required to reboot. "Started" will be the - /// reboot status when the machine has started to reboot. "Failed" will - /// be the status if the machine is failed to reboot. "Completed" will - /// be the status once the machine is rebooted successfully. Possible - /// values include: 'NotNeeded', 'Required', 'Started', 'Failed', - /// 'Completed' - /// - [JsonProperty(PropertyName = "rebootStatus")] - public string RebootStatus { get; private set; } - /// /// Gets the number of all available patches but not going to be /// installed because it didn't match a classification or inclusion @@ -180,12 +154,6 @@ public LastPatchInstallationSummary() [JsonProperty(PropertyName = "lastModifiedTime")] public System.DateTime? LastModifiedTime { get; private set; } - /// - /// Gets the person or system account that started the operation - /// - [JsonProperty(PropertyName = "startedBy")] - public string StartedBy { get; private set; } - /// /// Gets the errors that were encountered during execution of the /// operation. The details array contains the list of them. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs index 4594ed63cf39..1ca79999bdbb 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxConfiguration.cs @@ -45,11 +45,14 @@ public LinuxConfiguration() /// request body, default behavior is to set it to true. This will /// ensure that VM Agent is installed on the VM so that extensions can /// be added to the VM later. - public LinuxConfiguration(bool? disablePasswordAuthentication = default(bool?), SshConfiguration ssh = default(SshConfiguration), bool? provisionVMAgent = default(bool?)) + /// Specifies settings related to VM Guest + /// Patching on Linux. + public LinuxConfiguration(bool? disablePasswordAuthentication = default(bool?), SshConfiguration ssh = default(SshConfiguration), bool? provisionVMAgent = default(bool?), LinuxPatchSettings patchSettings = default(LinuxPatchSettings)) { DisablePasswordAuthentication = disablePasswordAuthentication; Ssh = ssh; ProvisionVMAgent = provisionVMAgent; + PatchSettings = patchSettings; CustomInit(); } @@ -82,5 +85,12 @@ public LinuxConfiguration() [JsonProperty(PropertyName = "provisionVMAgent")] public bool? ProvisionVMAgent { get; set; } + /// + /// Gets or sets specifies settings related to VM Guest Patching on + /// Linux. + /// + [JsonProperty(PropertyName = "patchSettings")] + public LinuxPatchSettings PatchSettings { get; set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxParameters.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxParameters.cs new file mode 100644 index 000000000000..4deea634136d --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxParameters.cs @@ -0,0 +1,85 @@ +// +// 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; + + /// + /// Input for InstallPatches on a Linux VM, as directly received by the API + /// + public partial class LinuxParameters + { + /// + /// Initializes a new instance of the LinuxParameters class. + /// + public LinuxParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinuxParameters class. + /// + /// The update classifications + /// to select when installing patches for Linux. + /// packages to include in the + /// patch operation. Format: packageName_packageVersion + /// packages to exclude in the + /// patch operation. Format: packageName_packageVersion + /// This is used as a maintenance run + /// identifier for Auto VM Guest Patching in Linux. + public LinuxParameters(IList classificationsToInclude = default(IList), IList packageNameMasksToInclude = default(IList), IList packageNameMasksToExclude = default(IList), string maintenanceRunId = default(string)) + { + ClassificationsToInclude = classificationsToInclude; + PackageNameMasksToInclude = packageNameMasksToInclude; + PackageNameMasksToExclude = packageNameMasksToExclude; + MaintenanceRunId = maintenanceRunId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the update classifications to select when installing + /// patches for Linux. + /// + [JsonProperty(PropertyName = "classificationsToInclude")] + public IList ClassificationsToInclude { get; set; } + + /// + /// Gets or sets packages to include in the patch operation. Format: + /// packageName_packageVersion + /// + [JsonProperty(PropertyName = "packageNameMasksToInclude")] + public IList PackageNameMasksToInclude { get; set; } + + /// + /// Gets or sets packages to exclude in the patch operation. Format: + /// packageName_packageVersion + /// + [JsonProperty(PropertyName = "packageNameMasksToExclude")] + public IList PackageNameMasksToExclude { get; set; } + + /// + /// Gets or sets this is used as a maintenance run identifier for Auto + /// VM Guest Patching in Linux. + /// + [JsonProperty(PropertyName = "maintenanceRunId")] + public string MaintenanceRunId { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxPatchSettings.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxPatchSettings.cs new file mode 100644 index 000000000000..b330cbd7884a --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxPatchSettings.cs @@ -0,0 +1,66 @@ +// +// 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; + + /// + /// Specifies settings related to VM Guest Patching on Linux. + /// + public partial class LinuxPatchSettings + { + /// + /// Initializes a new instance of the LinuxPatchSettings class. + /// + public LinuxPatchSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the LinuxPatchSettings class. + /// + /// Specifies the mode of VM Guest Patching to + /// IaaS virtual machine.<br /><br /> Possible values + /// are:<br /><br /> **ImageDefault** - The virtual + /// machine's default patching configuration is used. <br + /// /><br /> **AutomaticByPlatform** - The virtual machine + /// will be automatically updated by the platform. The property + /// provisionVMAgent must be true. Possible values include: + /// 'ImageDefault', 'AutomaticByPlatform' + public LinuxPatchSettings(string patchMode = default(string)) + { + PatchMode = patchMode; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the mode of VM Guest Patching to IaaS + /// virtual machine.&lt;br /&gt;&lt;br /&gt; Possible + /// values are:&lt;br /&gt;&lt;br /&gt; + /// **ImageDefault** - The virtual machine's default patching + /// configuration is used. &lt;br /&gt;&lt;br /&gt; + /// **AutomaticByPlatform** - The virtual machine will be automatically + /// updated by the platform. The property provisionVMAgent must be + /// true. Possible values include: 'ImageDefault', + /// 'AutomaticByPlatform' + /// + [JsonProperty(PropertyName = "patchMode")] + public string PatchMode { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxVMGuestPatchMode.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxVMGuestPatchMode.cs new file mode 100644 index 000000000000..403817291610 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/LinuxVMGuestPatchMode.cs @@ -0,0 +1,22 @@ +// +// 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 LinuxVMGuestPatchMode. + /// + public static class LinuxVMGuestPatchMode + { + public const string ImageDefault = "ImageDefault"; + public const string AutomaticByPlatform = "AutomaticByPlatform"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationMode.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationMode.cs new file mode 100644 index 000000000000..6333b9b1a1c9 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/OrchestrationMode.cs @@ -0,0 +1,60 @@ +// +// 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 Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for OrchestrationMode. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum OrchestrationMode + { + [EnumMember(Value = "Uniform")] + Uniform, + [EnumMember(Value = "Flexible")] + Flexible + } + internal static class OrchestrationModeEnumExtension + { + internal static string ToSerializedValue(this OrchestrationMode? value) + { + return value == null ? null : ((OrchestrationMode)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this OrchestrationMode value) + { + switch( value ) + { + case OrchestrationMode.Uniform: + return "Uniform"; + case OrchestrationMode.Flexible: + return "Flexible"; + } + return null; + } + + internal static OrchestrationMode? ParseOrchestrationMode(this string value) + { + switch( value ) + { + case "Uniform": + return OrchestrationMode.Uniform; + case "Flexible": + return OrchestrationMode.Flexible; + } + return null; + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchAssessmentState.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchAssessmentState.cs index d39f3abf8514..e38d2040f788 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchAssessmentState.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchAssessmentState.cs @@ -16,11 +16,7 @@ namespace Microsoft.Azure.Management.Compute.Models /// public static class PatchAssessmentState { - public const string Installed = "Installed"; - public const string Failed = "Failed"; - public const string Excluded = "Excluded"; - public const string NotSelected = "NotSelected"; - public const string Pending = "Pending"; + public const string Unknown = "Unknown"; public const string Available = "Available"; } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationDetail.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationDetail.cs new file mode 100644 index 000000000000..6dc51bd5402f --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationDetail.cs @@ -0,0 +1,104 @@ +// +// 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; + + /// + /// Information about a specific patch that was encountered during an + /// installation action. + /// + public partial class PatchInstallationDetail + { + /// + /// Initializes a new instance of the PatchInstallationDetail class. + /// + public PatchInstallationDetail() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PatchInstallationDetail class. + /// + /// A unique identifier for the patch. + /// The friendly name of the patch. + /// The version string of the package. It may + /// conform to Semantic Versioning. Only applies to Linux. + /// The KBID of the patch. Only applies to Windows + /// patches. + /// The classification(s) of the patch as + /// provided by the patch publisher. + /// The state of the patch after the + /// installation operation completed. Possible values include: + /// 'Unknown', 'Installed', 'Failed', 'Excluded', 'NotSelected', + /// 'Pending' + public PatchInstallationDetail(string patchId = default(string), string name = default(string), string version = default(string), string kbId = default(string), IList classifications = default(IList), string installationState = default(string)) + { + PatchId = patchId; + Name = name; + Version = version; + KbId = kbId; + Classifications = classifications; + InstallationState = installationState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets a unique identifier for the patch. + /// + [JsonProperty(PropertyName = "patchId")] + public string PatchId { get; private set; } + + /// + /// Gets the friendly name of the patch. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets the version string of the package. It may conform to Semantic + /// Versioning. Only applies to Linux. + /// + [JsonProperty(PropertyName = "version")] + public string Version { get; private set; } + + /// + /// Gets the KBID of the patch. Only applies to Windows patches. + /// + [JsonProperty(PropertyName = "kbId")] + public string KbId { get; private set; } + + /// + /// Gets the classification(s) of the patch as provided by the patch + /// publisher. + /// + [JsonProperty(PropertyName = "classifications")] + public IList Classifications { get; private set; } + + /// + /// Gets the state of the patch after the installation operation + /// completed. Possible values include: 'Unknown', 'Installed', + /// 'Failed', 'Excluded', 'NotSelected', 'Pending' + /// + [JsonProperty(PropertyName = "installationState")] + public string InstallationState { get; private set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationState.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationState.cs new file mode 100644 index 000000000000..6ca7103442ba --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchInstallationState.cs @@ -0,0 +1,26 @@ +// +// 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 PatchInstallationState. + /// + public static class PatchInstallationState + { + public const string Unknown = "Unknown"; + public const string Installed = "Installed"; + public const string Failed = "Failed"; + public const string Excluded = "Excluded"; + public const string NotSelected = "NotSelected"; + public const string Pending = "Pending"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchOperationStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchOperationStatus.cs index 36860e3d4230..0d9c96f755a1 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchOperationStatus.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PatchOperationStatus.cs @@ -16,6 +16,7 @@ namespace Microsoft.Azure.Management.Compute.Models /// public static class PatchOperationStatus { + public const string Unknown = "Unknown"; public const string InProgress = "InProgress"; public const string Failed = "Failed"; public const string Succeeded = "Succeeded"; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs new file mode 100644 index 000000000000..7a1e494e0651 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirResource.cs @@ -0,0 +1,59 @@ +// +// 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; + + /// + /// The Resource model definition. + /// + public partial class PirResource + { + /// + /// Initializes a new instance of the PirResource class. + /// + public PirResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PirResource class. + /// + /// Resource name + /// Resource location + public PirResource(string name = default(string), string location = default(string)) + { + Name = name; + Location = location; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets resource name + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; private set; } + + /// + /// Gets resource location + /// + [JsonProperty(PropertyName = "location")] + public string Location { get; private set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs new file mode 100644 index 000000000000..1ee9785ad48c --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/PirSharedGalleryResource.cs @@ -0,0 +1,58 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Microsoft.Rest.Serialization; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Base information about the shared gallery resource in pir. + /// + [Rest.Serialization.JsonTransformation] + public partial class PirSharedGalleryResource : PirResource + { + /// + /// Initializes a new instance of the PirSharedGalleryResource class. + /// + public PirSharedGalleryResource() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the PirSharedGalleryResource class. + /// + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + public PirSharedGalleryResource(string name = default(string), string location = default(string), string uniqueId = default(string)) + : base(name, location) + { + UniqueId = uniqueId; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the unique id of this shared gallery. + /// + [JsonProperty(PropertyName = "identifier.uniqueId")] + public string UniqueId { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs index 1723a9663fe3..a40af552a406 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/RegionalReplicationStatus.cs @@ -29,7 +29,7 @@ public RegionalReplicationStatus() /// /// Initializes a new instance of the RegionalReplicationStatus class. /// - /// The region to which the gallery Image Version + /// The region to which the gallery image version /// is being replicated to. /// This is the regional replication state. /// Possible values include: 'Unknown', 'Replicating', 'Completed', @@ -53,7 +53,7 @@ public RegionalReplicationStatus() partial void CustomInit(); /// - /// Gets the region to which the gallery Image Version is being + /// Gets the region to which the gallery image version is being /// replicated to. /// [JsonProperty(PropertyName = "region")] diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs index 17e4a4ad55a5..5263ab577613 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/ReplicationStatus.cs @@ -16,7 +16,7 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// This is the replication status of the gallery Image Version. + /// This is the replication status of the gallery image version. /// public partial class ReplicationStatus { 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..cf56aac6c64f 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,20 @@ 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)) + /// Allow VMSS to ignore AZ + /// boundaries when constructing upgrade batches. Take into + /// consideration the Update Domain and maxBatchInstancePercent to + /// determine the batch size. + /// Upgrade all unhealthy + /// instances in a scale set before any healthy instances. + 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 +115,21 @@ public RollingUpgradePolicy() [JsonProperty(PropertyName = "pauseTimeBetweenBatches")] public string PauseTimeBetweenBatches { get; set; } + /// + /// Gets or sets allow VMSS to ignore AZ boundaries when constructing + /// upgrade batches. Take into consideration the Update Domain and + /// maxBatchInstancePercent to determine the batch size. + /// + [JsonProperty(PropertyName = "enableCrossZoneUpgrade")] + public bool? EnableCrossZoneUpgrade { get; set; } + + /// + /// Gets or sets upgrade all unhealthy instances in a scale set before + /// any healthy instances. + /// + [JsonProperty(PropertyName = "prioritizeUnhealthyInstances")] + public bool? PrioritizeUnhealthyInstances { get; set; } + /// /// Validate the object. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs index 323d109564f2..0be80d5c515a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityProfile.cs @@ -30,6 +30,9 @@ public SecurityProfile() /// /// Initializes a new instance of the SecurityProfile class. /// + /// Specifies the security settings like + /// secure boot and vTPM used while creating the virtual machine. + /// <br><br>Minimum api-version: 2020-12-01 /// This property can be used by user in /// the request to enable or disable the Host Encryption for the /// virtual machine or virtual machine scale set. This will enable the @@ -37,9 +40,16 @@ public SecurityProfile() /// itself. <br><br> Default: The Encryption at host will /// be disabled unless this property is set to true for the /// resource. - public SecurityProfile(bool? encryptionAtHost = default(bool?)) + /// Specifies the SecurityType of the + /// virtual machine. It is set as TrustedLaunch to enable UefiSettings. + /// <br><br> Default: UefiSettings will not be enabled + /// unless this property is set as TrustedLaunch. Possible values + /// include: 'TrustedLaunch' + public SecurityProfile(UefiSettings uefiSettings = default(UefiSettings), bool? encryptionAtHost = default(bool?), SecurityTypes? securityType = default(SecurityTypes?)) { + UefiSettings = uefiSettings; EncryptionAtHost = encryptionAtHost; + SecurityType = securityType; CustomInit(); } @@ -48,6 +58,14 @@ public SecurityProfile() /// partial void CustomInit(); + /// + /// Gets or sets specifies the security settings like secure boot and + /// vTPM used while creating the virtual machine. + /// &lt;br&gt;&lt;br&gt;Minimum api-version: 2020-12-01 + /// + [JsonProperty(PropertyName = "uefiSettings")] + public UefiSettings UefiSettings { get; set; } + /// /// Gets or sets this property can be used by user in the request to /// enable or disable the Host Encryption for the virtual machine or @@ -60,5 +78,15 @@ public SecurityProfile() [JsonProperty(PropertyName = "encryptionAtHost")] public bool? EncryptionAtHost { get; set; } + /// + /// Gets or sets specifies the SecurityType of the virtual machine. It + /// is set as TrustedLaunch to enable UefiSettings. + /// &lt;br&gt;&lt;br&gt; Default: UefiSettings will not + /// be enabled unless this property is set as TrustedLaunch. Possible + /// values include: 'TrustedLaunch' + /// + [JsonProperty(PropertyName = "securityType")] + public SecurityTypes? SecurityType { get; set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs new file mode 100644 index 000000000000..aad5bca9275b --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SecurityTypes.cs @@ -0,0 +1,54 @@ +// +// 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 Newtonsoft.Json.Converters; + using System.Runtime; + using System.Runtime.Serialization; + + /// + /// Defines values for SecurityTypes. + /// + [JsonConverter(typeof(StringEnumConverter))] + public enum SecurityTypes + { + [EnumMember(Value = "TrustedLaunch")] + TrustedLaunch + } + internal static class SecurityTypesEnumExtension + { + internal static string ToSerializedValue(this SecurityTypes? value) + { + return value == null ? null : ((SecurityTypes)value).ToSerializedValue(); + } + + internal static string ToSerializedValue(this SecurityTypes value) + { + switch( value ) + { + case SecurityTypes.TrustedLaunch: + return "TrustedLaunch"; + } + return null; + } + + internal static SecurityTypes? ParseSecurityTypes(this string value) + { + switch( value ) + { + case "TrustedLaunch": + return SecurityTypes.TrustedLaunch; + } + return null; + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs new file mode 100644 index 000000000000..dcd358cd68e3 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SelectPermissions.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for SelectPermissions. + /// + public static class SelectPermissions + { + public const string Permissions = "Permissions"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs new file mode 100644 index 000000000000..aef86d0b185c --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGallery.cs @@ -0,0 +1,48 @@ +// +// 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 System.Linq; + + /// + /// Specifies information about the Shared Gallery that you want to create + /// or update. + /// + public partial class SharedGallery : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGallery class. + /// + public SharedGallery() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGallery class. + /// + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + public SharedGallery(string name = default(string), string location = default(string), string uniqueId = default(string)) + : base(name, location, uniqueId) + { + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs new file mode 100644 index 000000000000..e64cdf38245e --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImage.cs @@ -0,0 +1,157 @@ +// +// 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; + + /// + /// Specifies information about the gallery image definition that you want + /// to create or update. + /// + [Rest.Serialization.JsonTransformation] + public partial class SharedGalleryImage : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGalleryImage class. + /// + public SharedGalleryImage() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGalleryImage class. + /// + /// This property allows you to specify the type + /// of the OS that is included in the disk when creating a VM from a + /// managed image. <br><br> Possible values are: + /// <br><br> **Windows** <br><br> **Linux**. + /// Possible values include: 'Windows', 'Linux' + /// This property allows the user to specify + /// whether the virtual machines created under this image are + /// 'Generalized' or 'Specialized'. Possible values include: + /// 'Generalized', 'Specialized' + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + /// The end of life date of the gallery + /// image definition. This property can be used for decommissioning + /// purposes. This property is updatable. + /// The hypervisor generation of the + /// Virtual Machine. Applicable to OS disks only. Possible values + /// include: 'V1', 'V2' + /// A list of gallery image features. + public SharedGalleryImage(OperatingSystemTypes osType, OperatingSystemStateTypes osState, GalleryImageIdentifier identifier, string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? endOfLifeDate = default(System.DateTime?), RecommendedMachineConfiguration recommended = default(RecommendedMachineConfiguration), Disallowed disallowed = default(Disallowed), string hyperVGeneration = default(string), IList features = default(IList), ImagePurchasePlan purchasePlan = default(ImagePurchasePlan)) + : base(name, location, uniqueId) + { + OsType = osType; + OsState = osState; + EndOfLifeDate = endOfLifeDate; + Identifier = identifier; + Recommended = recommended; + Disallowed = disallowed; + HyperVGeneration = hyperVGeneration; + Features = features; + PurchasePlan = purchasePlan; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the type of the OS + /// that is included in the disk when creating a VM from a managed + /// image. &lt;br&gt;&lt;br&gt; Possible values are: + /// &lt;br&gt;&lt;br&gt; **Windows** + /// &lt;br&gt;&lt;br&gt; **Linux**. Possible values + /// include: 'Windows', 'Linux' + /// + [JsonProperty(PropertyName = "properties.osType")] + public OperatingSystemTypes OsType { get; set; } + + /// + /// Gets or sets this property allows the user to specify whether the + /// virtual machines created under this image are 'Generalized' or + /// 'Specialized'. Possible values include: 'Generalized', + /// 'Specialized' + /// + [JsonProperty(PropertyName = "properties.osState")] + public OperatingSystemStateTypes OsState { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image definition. + /// This property can be used for decommissioning purposes. This + /// property is updatable. + /// + [JsonProperty(PropertyName = "properties.endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.identifier")] + public GalleryImageIdentifier Identifier { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.recommended")] + public RecommendedMachineConfiguration Recommended { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.disallowed")] + public Disallowed Disallowed { get; set; } + + /// + /// Gets or sets the hypervisor generation of the Virtual Machine. + /// Applicable to OS disks only. Possible values include: 'V1', 'V2' + /// + [JsonProperty(PropertyName = "properties.hyperVGeneration")] + public string HyperVGeneration { get; set; } + + /// + /// Gets or sets a list of gallery image features. + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + + /// + /// + [JsonProperty(PropertyName = "properties.purchasePlan")] + public ImagePurchasePlan PurchasePlan { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (Identifier == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "Identifier"); + } + if (Identifier != null) + { + Identifier.Validate(); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs new file mode 100644 index 000000000000..b51fcbd0b480 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedGalleryImageVersion.cs @@ -0,0 +1,76 @@ +// +// 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.Linq; + + /// + /// Specifies information about the gallery image version that you want to + /// create or update. + /// + [Rest.Serialization.JsonTransformation] + public partial class SharedGalleryImageVersion : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGalleryImageVersion class. + /// + public SharedGalleryImageVersion() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGalleryImageVersion class. + /// + /// Resource name + /// Resource location + /// The unique id of this shared + /// gallery. + /// The published date of the gallery image + /// version Definition. This property can be used for decommissioning + /// purposes. This property is updatable. + /// The end of life date of the gallery + /// image version Definition. This property can be used for + /// decommissioning purposes. This property is updatable. + public SharedGalleryImageVersion(string name = default(string), string location = default(string), string uniqueId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? endOfLifeDate = default(System.DateTime?)) + : base(name, location, uniqueId) + { + PublishedDate = publishedDate; + EndOfLifeDate = endOfLifeDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the published date of the gallery image version + /// Definition. This property can be used for decommissioning purposes. + /// This property is updatable. + /// + [JsonProperty(PropertyName = "properties.publishedDate")] + public System.DateTime? PublishedDate { get; set; } + + /// + /// Gets or sets the end of life date of the gallery image version + /// Definition. This property can be used for decommissioning purposes. + /// This property is updatable. + /// + [JsonProperty(PropertyName = "properties.endOfLifeDate")] + public System.DateTime? EndOfLifeDate { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs new file mode 100644 index 000000000000..463c15183c04 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharedToValues.cs @@ -0,0 +1,21 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + + /// + /// Defines values for SharedToValues. + /// + public static class SharedToValues + { + public const string Tenant = "tenant"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs new file mode 100644 index 000000000000..772a9e641f95 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfile.cs @@ -0,0 +1,68 @@ +// +// 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; + + /// + /// Profile for gallery sharing to subscription or tenant + /// + public partial class SharingProfile + { + /// + /// Initializes a new instance of the SharingProfile class. + /// + public SharingProfile() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharingProfile class. + /// + /// This property allows you to specify the + /// permission of sharing gallery. <br><br> Possible values + /// are: <br><br> **Private** <br><br> + /// **Groups**. Possible values include: 'Private', 'Groups' + /// A list of sharing profile groups. + public SharingProfile(string permissions = default(string), IList groups = default(IList)) + { + Permissions = permissions; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the permission of + /// sharing gallery. &lt;br&gt;&lt;br&gt; Possible + /// values are: &lt;br&gt;&lt;br&gt; **Private** + /// &lt;br&gt;&lt;br&gt; **Groups**. Possible values + /// include: 'Private', 'Groups' + /// + [JsonProperty(PropertyName = "permissions")] + public string Permissions { get; set; } + + /// + /// Gets a list of sharing profile groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; private set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs new file mode 100644 index 000000000000..7a8e4df6262c --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroup.cs @@ -0,0 +1,71 @@ +// +// 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; + + /// + /// Group of the gallery sharing profile + /// + public partial class SharingProfileGroup + { + /// + /// Initializes a new instance of the SharingProfileGroup class. + /// + public SharingProfileGroup() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharingProfileGroup class. + /// + /// This property allows you to specify the type of + /// sharing group. <br><br> Possible values are: + /// <br><br> **Subscriptions** <br><br> + /// **AADTenants**. Possible values include: 'Subscriptions', + /// 'AADTenants' + /// A list of subscription/tenant ids the gallery is + /// aimed to be shared to. + public SharingProfileGroup(string type = default(string), IList ids = default(IList)) + { + Type = type; + Ids = ids; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the type of + /// sharing group. &lt;br&gt;&lt;br&gt; Possible values + /// are: &lt;br&gt;&lt;br&gt; **Subscriptions** + /// &lt;br&gt;&lt;br&gt; **AADTenants**. Possible + /// values include: 'Subscriptions', 'AADTenants' + /// + [JsonProperty(PropertyName = "type")] + public string Type { get; set; } + + /// + /// Gets or sets a list of subscription/tenant ids the gallery is aimed + /// to be shared to. + /// + [JsonProperty(PropertyName = "ids")] + public IList Ids { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs new file mode 100644 index 000000000000..1f1724bed836 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingProfileGroupTypes.cs @@ -0,0 +1,22 @@ +// +// 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 SharingProfileGroupTypes. + /// + public static class SharingProfileGroupTypes + { + public const string Subscriptions = "Subscriptions"; + public const string AADTenants = "AADTenants"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs new file mode 100644 index 000000000000..a51aa0ad30dc --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdate.cs @@ -0,0 +1,85 @@ +// +// 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.Azure; + using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; + using System.Linq; + + /// + /// Specifies information about the gallery sharing profile update. + /// + public partial class SharingUpdate : IResource + { + /// + /// Initializes a new instance of the SharingUpdate class. + /// + public SharingUpdate() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharingUpdate class. + /// + /// This property allows you to specify the + /// operation type of gallery sharing update. <br><br> + /// Possible values are: <br><br> **Add** + /// <br><br> **Remove** <br><br> **Reset**. + /// Possible values include: 'Add', 'Remove', 'Reset' + /// A list of sharing profile groups. + public SharingUpdate(string operationType, IList groups = default(IList)) + { + OperationType = operationType; + Groups = groups; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets this property allows you to specify the operation type + /// of gallery sharing update. &lt;br&gt;&lt;br&gt; + /// Possible values are: &lt;br&gt;&lt;br&gt; **Add** + /// &lt;br&gt;&lt;br&gt; **Remove** + /// &lt;br&gt;&lt;br&gt; **Reset**. Possible values + /// include: 'Add', 'Remove', 'Reset' + /// + [JsonProperty(PropertyName = "operationType")] + public string OperationType { get; set; } + + /// + /// Gets or sets a list of sharing profile groups. + /// + [JsonProperty(PropertyName = "groups")] + public IList Groups { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (OperationType == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "OperationType"); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs new file mode 100644 index 000000000000..821acf46873f --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/SharingUpdateOperationTypes.cs @@ -0,0 +1,23 @@ +// +// 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 SharingUpdateOperationTypes. + /// + public static class SharingUpdateOperationTypes + { + public const string Add = "Add"; + public const string Remove = "Remove"; + public const string Reset = "Reset"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UefiSettings.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UefiSettings.cs new file mode 100644 index 000000000000..09b95b6c3d09 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/UefiSettings.cs @@ -0,0 +1,69 @@ +// +// 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; + + /// + /// Specifies the security settings like secure boot and vTPM used while + /// creating the virtual machine. <br><br>Minimum api-version: + /// 2020-12-01 + /// + public partial class UefiSettings + { + /// + /// Initializes a new instance of the UefiSettings class. + /// + public UefiSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the UefiSettings class. + /// + /// Specifies whether secure boot + /// should be enabled on the virtual machine. + /// <br><br>Minimum api-version: 2020-12-01 + /// Specifies whether vTPM should be enabled + /// on the virtual machine. <br><br>Minimum api-version: + /// 2020-12-01 + public UefiSettings(bool? secureBootEnabled = default(bool?), bool? vTpmEnabled = default(bool?)) + { + SecureBootEnabled = secureBootEnabled; + VTpmEnabled = vTpmEnabled; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies whether secure boot should be enabled on the + /// virtual machine. &lt;br&gt;&lt;br&gt;Minimum + /// api-version: 2020-12-01 + /// + [JsonProperty(PropertyName = "secureBootEnabled")] + public bool? SecureBootEnabled { get; set; } + + /// + /// Gets or sets specifies whether vTPM should be enabled on the + /// virtual machine. &lt;br&gt;&lt;br&gt;Minimum + /// api-version: 2020-12-01 + /// + [JsonProperty(PropertyName = "vTpmEnabled")] + public bool? VTpmEnabled { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGalleryApplication.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGalleryApplication.cs new file mode 100644 index 000000000000..92f61431fa60 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGalleryApplication.cs @@ -0,0 +1,116 @@ +// +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for +// license information. +// +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is +// regenerated. +// + +namespace Microsoft.Azure.Management.Compute.Models +{ + using Microsoft.Rest; + using Newtonsoft.Json; + using System.Linq; + + /// + /// Specifies the required information to reference a compute gallery + /// application version + /// + public partial class VMGalleryApplication + { + /// + /// Initializes a new instance of the VMGalleryApplication class. + /// + public VMGalleryApplication() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VMGalleryApplication class. + /// + /// Specifies the + /// GalleryApplicationVersion reference in URL form. e.g. + /// /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} + /// Optional, Specifies a passthrough value for more + /// generic context. + /// Optional, Specifies the order in which the + /// packages have to be installed, has no effect if manuallyManaged is + /// set to true + /// Specifies whether the gallery + /// application would be manually managed. If set to true, the + /// VMApplicationExtension would not manage the gallery + /// application + /// Optional, Specifies the uri to + /// an azure blob that will replace the default configuration for the + /// package if provided + public VMGalleryApplication(string packageReferenceId, string tags = default(string), int? order = default(int?), bool? manuallyManaged = default(bool?), string configurationReference = default(string)) + { + Tags = tags; + Order = order; + ManuallyManaged = manuallyManaged; + PackageReferenceId = packageReferenceId; + ConfigurationReference = configurationReference; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets optional, Specifies a passthrough value for more + /// generic context. + /// + [JsonProperty(PropertyName = "tags")] + public string Tags { get; set; } + + /// + /// Gets or sets optional, Specifies the order in which the packages + /// have to be installed, has no effect if manuallyManaged is set to + /// true + /// + [JsonProperty(PropertyName = "order")] + public int? Order { get; set; } + + /// + /// Gets or sets specifies whether the gallery application would be + /// manually managed. If set to true, the VMApplicationExtension would + /// not manage the gallery application + /// + [JsonProperty(PropertyName = "manuallyManaged")] + public bool? ManuallyManaged { get; set; } + + /// + /// Gets or sets specifies the GalleryApplicationVersion reference in + /// URL form. e.g. + /// /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/applications/{application}/versions/{version} + /// + [JsonProperty(PropertyName = "packageReferenceId")] + public string PackageReferenceId { get; set; } + + /// + /// Gets or sets optional, Specifies the uri to an azure blob that will + /// replace the default configuration for the package if provided + /// + [JsonProperty(PropertyName = "configurationReference")] + public string ConfigurationReference { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (PackageReferenceId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "PackageReferenceId"); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationLinux.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationLinux.cs new file mode 100644 index 000000000000..0cc53c8e44fc --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationLinux.cs @@ -0,0 +1,23 @@ +// +// 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 VMGuestPatchClassificationLinux. + /// + public static class VMGuestPatchClassificationLinux + { + public const string Critical = "Critical"; + public const string Security = "Security"; + public const string Other = "Other"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationWindows.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationWindows.cs new file mode 100644 index 000000000000..e98f65e64153 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchClassificationWindows.cs @@ -0,0 +1,28 @@ +// +// 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 VMGuestPatchClassificationWindows. + /// + public static class VMGuestPatchClassificationWindows + { + public const string Critical = "Critical"; + public const string Security = "Security"; + public const string UpdateRollUp = "UpdateRollUp"; + public const string FeaturePack = "FeaturePack"; + public const string ServicePack = "ServicePack"; + public const string Definition = "Definition"; + public const string Tools = "Tools"; + public const string Updates = "Updates"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootBehavior.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootBehavior.cs new file mode 100644 index 000000000000..87a76dded6d9 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootBehavior.cs @@ -0,0 +1,24 @@ +// +// 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 VMGuestPatchRebootBehavior. + /// + public static class VMGuestPatchRebootBehavior + { + public const string Unknown = "Unknown"; + public const string NeverReboots = "NeverReboots"; + public const string AlwaysRequiresReboot = "AlwaysRequiresReboot"; + public const string CanRequestReboot = "CanRequestReboot"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootSetting.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootSetting.cs new file mode 100644 index 000000000000..ebfef92400a4 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootSetting.cs @@ -0,0 +1,23 @@ +// +// 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 VMGuestPatchRebootSetting. + /// + public static class VMGuestPatchRebootSetting + { + public const string IfRequired = "IfRequired"; + public const string Never = "Never"; + public const string Always = "Always"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootStatus.cs new file mode 100644 index 000000000000..f9bf1a04138e --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VMGuestPatchRebootStatus.cs @@ -0,0 +1,26 @@ +// +// 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 VMGuestPatchRebootStatus. + /// + public static class VMGuestPatchRebootStatus + { + public const string Unknown = "Unknown"; + public const string NotNeeded = "NotNeeded"; + public const string Required = "Required"; + public const string Started = "Started"; + public const string Failed = "Failed"; + public const string Completed = "Completed"; + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs index 497be8511c7d..712142f6324b 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachine.cs @@ -48,6 +48,8 @@ public VirtualMachine() /// Enter any required information and then click **Save**. /// Specifies the hardware settings for /// the virtual machine. + /// Specifies the gallery applications + /// that should be made available to the VM/VMSS /// Specifies the storage settings for the /// virtual machine disks. /// Specifies additional @@ -92,6 +94,18 @@ public VirtualMachine() /// the proximity placement group that the virtual machine should be /// assigned to. <br><br>Minimum api-version: /// 2018-04-01. + /// Specifies the scale set logical + /// fault domain into which the Virtual Machine will be created. By + /// default, the Virtual Machine will by automatically assigned to a + /// fault domain that best maintains balance across available fault + /// domains.<br><li>This is applicable only if the + /// 'virtualMachineScaleSet' property of this Virtual Machine is + /// set.<li>The Virtual Machine Scale Set that is referenced, + /// must have 'platformFaultDomainCount' &gt; 1.<li>This + /// property cannot be updated once the Virtual Machine is + /// created.<li>Fault domain assignment can be viewed in the + /// Virtual Machine Instance View.<br><br>Minimum + /// api‐version: 2020‐12‐01 /// Specifies the priority for the virtual /// machine. <br><br>Minimum api-version: 2019-03-01. /// Possible values include: 'Regular', 'Low', 'Spot' @@ -142,11 +156,14 @@ public VirtualMachine() /// The identity of the virtual machine, if /// configured. /// The virtual machine zones. - public VirtualMachine(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource virtualMachineScaleSet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), SubResource host = default(SubResource), SubResource hostGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), string extensionsTimeBudget = default(string), IList resources = default(IList), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList)) + /// The extended location of the Virtual + /// Machine. + public VirtualMachine(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), ApplicationProfile applicationProfile = default(ApplicationProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource virtualMachineScaleSet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), int? platformFaultDomain = default(int?), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), SubResource host = default(SubResource), SubResource hostGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), string extensionsTimeBudget = default(string), IList resources = default(IList), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, type, tags) { Plan = plan; HardwareProfile = hardwareProfile; + ApplicationProfile = applicationProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; @@ -156,6 +173,7 @@ public VirtualMachine() AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; + PlatformFaultDomain = platformFaultDomain; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; @@ -169,6 +187,7 @@ public VirtualMachine() Resources = resources; Identity = identity; Zones = zones; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -196,6 +215,13 @@ public VirtualMachine() [JsonProperty(PropertyName = "properties.hardwareProfile")] public HardwareProfile HardwareProfile { get; set; } + /// + /// Gets or sets specifies the gallery applications that should be made + /// available to the VM/VMSS + /// + [JsonProperty(PropertyName = "properties.applicationProfile")] + public ApplicationProfile ApplicationProfile { get; set; } + /// /// Gets or sets specifies the storage settings for the virtual machine /// disks. @@ -285,6 +311,24 @@ public VirtualMachine() [JsonProperty(PropertyName = "properties.proximityPlacementGroup")] public SubResource ProximityPlacementGroup { get; set; } + /// + /// Gets or sets specifies the scale set logical fault domain into + /// which the Virtual Machine will be created. By default, the Virtual + /// Machine will by automatically assigned to a fault domain that best + /// maintains balance across available fault + /// domains.&lt;br&gt;&lt;li&gt;This is applicable only + /// if the 'virtualMachineScaleSet' property of this Virtual Machine is + /// set.&lt;li&gt;The Virtual Machine Scale Set that is + /// referenced, must have 'platformFaultDomainCount' &amp;gt; + /// 1.&lt;li&gt;This property cannot be updated once the + /// Virtual Machine is created.&lt;li&gt;Fault domain + /// assignment can be viewed in the Virtual Machine Instance + /// View.&lt;br&gt;&lt;br&gt;Minimum api‐version: + /// 2020‐12‐01 + /// + [JsonProperty(PropertyName = "properties.platformFaultDomain")] + public int? PlatformFaultDomain { get; set; } + /// /// Gets or sets specifies the priority for the virtual machine. /// &lt;br&gt;&lt;br&gt;Minimum api-version: @@ -401,6 +445,12 @@ public VirtualMachine() [JsonProperty(PropertyName = "zones")] public IList Zones { get; set; } + /// + /// Gets or sets the extended location of the Virtual Machine. + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// @@ -424,6 +474,10 @@ public override void Validate() } } } + if (ExtendedLocation != null) + { + ExtendedLocation.Validate(); + } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.cs index 3547230ce763..9bb2a7c3e50c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineAssessPatchesResult.cs @@ -35,9 +35,10 @@ public VirtualMachineAssessPatchesResult() /// /// The overall success or failure status of the /// operation. It remains "InProgress" until the operation completes. - /// At that point it will become "Failed", "Succeeded", or - /// "CompletedWithWarnings.". Possible values include: 'InProgress', - /// 'Failed', 'Succeeded', 'CompletedWithWarnings' + /// At that point it will become "Unknown", "Failed", "Succeeded", or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', + /// 'CompletedWithWarnings' /// The activity ID of the operation /// that produced this result. It is used to correlate across CRP and /// extension logs. @@ -51,12 +52,12 @@ public VirtualMachineAssessPatchesResult() /// excluding critical and security. /// The UTC timestamp when the operation /// began. - /// The list of patches that have been detected - /// as available for installation. + /// The list of patches that have been + /// detected as available for installation. /// The errors that were encountered during /// execution of the operation. The details array contains the list of /// them. - public VirtualMachineAssessPatchesResult(string status = default(string), string assessmentActivityId = default(string), bool? rebootPending = default(bool?), int? criticalAndSecurityPatchCount = default(int?), int? otherPatchCount = default(int?), System.DateTime? startDateTime = default(System.DateTime?), IList patches = default(IList), ApiError error = default(ApiError)) + public VirtualMachineAssessPatchesResult(string status = default(string), string assessmentActivityId = default(string), bool? rebootPending = default(bool?), int? criticalAndSecurityPatchCount = default(int?), int? otherPatchCount = default(int?), System.DateTime? startDateTime = default(System.DateTime?), IList availablePatches = default(IList), ApiError error = default(ApiError)) { Status = status; AssessmentActivityId = assessmentActivityId; @@ -64,7 +65,7 @@ public VirtualMachineAssessPatchesResult() CriticalAndSecurityPatchCount = criticalAndSecurityPatchCount; OtherPatchCount = otherPatchCount; StartDateTime = startDateTime; - Patches = patches; + AvailablePatches = availablePatches; Error = error; CustomInit(); } @@ -77,9 +78,9 @@ public VirtualMachineAssessPatchesResult() /// /// Gets the overall success or failure status of the operation. It /// remains "InProgress" until the operation completes. At that point - /// it will become "Failed", "Succeeded", or "CompletedWithWarnings.". - /// Possible values include: 'InProgress', 'Failed', 'Succeeded', - /// 'CompletedWithWarnings' + /// it will become "Unknown", "Failed", "Succeeded", or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' /// [JsonProperty(PropertyName = "status")] public string Status { get; private set; } @@ -123,8 +124,8 @@ public VirtualMachineAssessPatchesResult() /// Gets the list of patches that have been detected as available for /// installation. /// - [JsonProperty(PropertyName = "patches")] - public IList Patches { get; private set; } + [JsonProperty(PropertyName = "availablePatches")] + public IList AvailablePatches { get; private set; } /// /// Gets the errors that were encountered during execution of the diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImage.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImage.cs index 8a2b6409b7e4..a938c57910a2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImage.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImage.cs @@ -42,12 +42,14 @@ public VirtualMachineImage() /// virtual machine. For more information about using tags, see [Using /// tags to organize your Azure /// resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). + /// The extended location of the Virtual + /// Machine. /// Possible values include: 'V1', /// 'V2' /// Specifies disallowed configuration for the /// VirtualMachine created from the image - public VirtualMachineImage(string name, string location, string id = default(string), IDictionary tags = default(IDictionary), PurchasePlan plan = default(PurchasePlan), OSDiskImage osDiskImage = default(OSDiskImage), IList dataDiskImages = default(IList), AutomaticOSUpgradeProperties automaticOSUpgradeProperties = default(AutomaticOSUpgradeProperties), string hyperVGeneration = default(string), DisallowedConfiguration disallowed = default(DisallowedConfiguration)) - : base(name, location, id, tags) + public VirtualMachineImage(string name, string location, string id = default(string), IDictionary tags = default(IDictionary), ExtendedLocation extendedLocation = default(ExtendedLocation), PurchasePlan plan = default(PurchasePlan), OSDiskImage osDiskImage = default(OSDiskImage), IList dataDiskImages = default(IList), AutomaticOSUpgradeProperties automaticOSUpgradeProperties = default(AutomaticOSUpgradeProperties), string hyperVGeneration = default(string), DisallowedConfiguration disallowed = default(DisallowedConfiguration), IList features = default(IList)) + : base(name, location, id, tags, extendedLocation) { Plan = plan; OsDiskImage = osDiskImage; @@ -55,6 +57,7 @@ public VirtualMachineImage() AutomaticOSUpgradeProperties = automaticOSUpgradeProperties; HyperVGeneration = hyperVGeneration; Disallowed = disallowed; + Features = features; CustomInit(); } @@ -96,6 +99,11 @@ public VirtualMachineImage() [JsonProperty(PropertyName = "properties.disallowed")] public DisallowedConfiguration Disallowed { get; set; } + /// + /// + [JsonProperty(PropertyName = "properties.features")] + public IList Features { get; set; } + /// /// Validate the object. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageFeature.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageFeature.cs new file mode 100644 index 000000000000..5b38dfe6711a --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageFeature.cs @@ -0,0 +1,60 @@ +// +// 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; + + /// + /// Specifies additional capabilities supported by the image + /// + public partial class VirtualMachineImageFeature + { + /// + /// Initializes a new instance of the VirtualMachineImageFeature class. + /// + public VirtualMachineImageFeature() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineImageFeature class. + /// + /// The name of the feature. + /// The corresponding value for the + /// feature. + public VirtualMachineImageFeature(string name = default(string), string value = default(string)) + { + Name = name; + Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the name of the feature. + /// + [JsonProperty(PropertyName = "name")] + public string Name { get; set; } + + /// + /// Gets or sets the corresponding value for the feature. + /// + [JsonProperty(PropertyName = "value")] + public string Value { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageResource.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageResource.cs index 880249a5672c..174b5698e0ec 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageResource.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineImageResource.cs @@ -42,12 +42,15 @@ public VirtualMachineImageResource() /// virtual machine. For more information about using tags, see [Using /// tags to organize your Azure /// resources](https://docs.microsoft.com/azure/azure-resource-manager/resource-group-using-tags.md). - public VirtualMachineImageResource(string name, string location, string id = default(string), IDictionary tags = default(IDictionary)) + /// The extended location of the Virtual + /// Machine. + public VirtualMachineImageResource(string name, string location, string id = default(string), IDictionary tags = default(IDictionary), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(id) { Name = name; Location = location; Tags = tags; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -77,6 +80,12 @@ public VirtualMachineImageResource() [JsonProperty(PropertyName = "tags")] public IDictionary Tags { get; set; } + /// + /// Gets or sets the extended location of the Virtual Machine. + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// @@ -93,6 +102,10 @@ public virtual void Validate() { throw new ValidationException(ValidationRules.CannotBeNull, "Location"); } + if (ExtendedLocation != null) + { + ExtendedLocation.Validate(); + } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesParameters.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesParameters.cs new file mode 100644 index 000000000000..e7170d046d5b --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesParameters.cs @@ -0,0 +1,107 @@ +// +// 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 Newtonsoft.Json; + using System.Linq; + + /// + /// Input for InstallPatches as directly received by the API + /// + public partial class VirtualMachineInstallPatchesParameters + { + /// + /// Initializes a new instance of the + /// VirtualMachineInstallPatchesParameters class. + /// + public VirtualMachineInstallPatchesParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VirtualMachineInstallPatchesParameters class. + /// + /// Specifies the maximum amount of time + /// that the operation will run. It must be an ISO 8601-compliant + /// duration string such as PT4H (4 hours) + /// Defines when it is acceptable to reboot + /// a VM during a software update operation. Possible values include: + /// 'IfRequired', 'Never', 'Always' + /// Input for InstallPatches on a + /// Windows VM, as directly received by the API + /// Input for InstallPatches on a Linux + /// VM, as directly received by the API + public VirtualMachineInstallPatchesParameters(string maximumDuration, string rebootSetting, WindowsParameters windowsParameters = default(WindowsParameters), LinuxParameters linuxParameters = default(LinuxParameters)) + { + MaximumDuration = maximumDuration; + RebootSetting = rebootSetting; + WindowsParameters = windowsParameters; + LinuxParameters = linuxParameters; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the maximum amount of time that the + /// operation will run. It must be an ISO 8601-compliant duration + /// string such as PT4H (4 hours) + /// + [JsonProperty(PropertyName = "maximumDuration")] + public string MaximumDuration { get; set; } + + /// + /// Gets or sets defines when it is acceptable to reboot a VM during a + /// software update operation. Possible values include: 'IfRequired', + /// 'Never', 'Always' + /// + [JsonProperty(PropertyName = "rebootSetting")] + public string RebootSetting { get; set; } + + /// + /// Gets or sets input for InstallPatches on a Windows VM, as directly + /// received by the API + /// + [JsonProperty(PropertyName = "windowsParameters")] + public WindowsParameters WindowsParameters { get; set; } + + /// + /// Gets or sets input for InstallPatches on a Linux VM, as directly + /// received by the API + /// + [JsonProperty(PropertyName = "linuxParameters")] + public LinuxParameters LinuxParameters { get; set; } + + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (MaximumDuration == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "MaximumDuration"); + } + if (RebootSetting == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "RebootSetting"); + } + } + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.cs new file mode 100644 index 000000000000..53d2c65fe027 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineInstallPatchesResult.cs @@ -0,0 +1,179 @@ +// +// 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 result summary of an installation operation. + /// + public partial class VirtualMachineInstallPatchesResult + { + /// + /// Initializes a new instance of the + /// VirtualMachineInstallPatchesResult class. + /// + public VirtualMachineInstallPatchesResult() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the + /// VirtualMachineInstallPatchesResult class. + /// + /// The overall success or failure status of the + /// operation. It remains "InProgress" until the operation completes. + /// At that point it will become "Failed", "Succeeded", "Unknown" or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', + /// 'CompletedWithWarnings' + /// The activity ID of the + /// operation that produced this result. It is used to correlate across + /// CRP and extension logs. + /// The reboot state of the VM following + /// completion of the operation. Possible values include: 'Unknown', + /// 'NotNeeded', 'Required', 'Started', 'Failed', 'Completed' + /// Whether the operation ran + /// out of time before it completed all its intended actions. + /// The number of patches that were + /// not installed due to the user blocking their installation. + /// The number of patches that were + /// detected as available for install, but did not meet the operation's + /// criteria. + /// The number of patches that were + /// identified as meeting the installation criteria, but were not able + /// to be installed. Typically this happens when + /// maintenanceWindowExceeded == true. + /// The number of patches + /// successfully installed. + /// The number of patches that could not + /// be installed due to some issue. See errors for details. + /// The patches that were installed during the + /// operation. + /// The UTC timestamp when the operation + /// began. + /// The errors that were encountered during + /// execution of the operation. The details array contains the list of + /// them. + public VirtualMachineInstallPatchesResult(string status = default(string), string installationActivityId = default(string), string rebootStatus = default(string), bool? maintenanceWindowExceeded = default(bool?), int? excludedPatchCount = default(int?), int? notSelectedPatchCount = default(int?), int? pendingPatchCount = default(int?), int? installedPatchCount = default(int?), int? failedPatchCount = default(int?), IList patches = default(IList), System.DateTime? startDateTime = default(System.DateTime?), ApiError error = default(ApiError)) + { + Status = status; + InstallationActivityId = installationActivityId; + RebootStatus = rebootStatus; + MaintenanceWindowExceeded = maintenanceWindowExceeded; + ExcludedPatchCount = excludedPatchCount; + NotSelectedPatchCount = notSelectedPatchCount; + PendingPatchCount = pendingPatchCount; + InstalledPatchCount = installedPatchCount; + FailedPatchCount = failedPatchCount; + Patches = patches; + StartDateTime = startDateTime; + Error = error; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets the overall success or failure status of the operation. It + /// remains "InProgress" until the operation completes. At that point + /// it will become "Failed", "Succeeded", "Unknown" or + /// "CompletedWithWarnings.". Possible values include: 'Unknown', + /// 'InProgress', 'Failed', 'Succeeded', 'CompletedWithWarnings' + /// + [JsonProperty(PropertyName = "status")] + public string Status { get; private set; } + + /// + /// Gets the activity ID of the operation that produced this result. It + /// is used to correlate across CRP and extension logs. + /// + [JsonProperty(PropertyName = "installationActivityId")] + public string InstallationActivityId { get; private set; } + + /// + /// Gets the reboot state of the VM following completion of the + /// operation. Possible values include: 'Unknown', 'NotNeeded', + /// 'Required', 'Started', 'Failed', 'Completed' + /// + [JsonProperty(PropertyName = "rebootStatus")] + public string RebootStatus { get; private set; } + + /// + /// Gets whether the operation ran out of time before it completed all + /// its intended actions. + /// + [JsonProperty(PropertyName = "maintenanceWindowExceeded")] + public bool? MaintenanceWindowExceeded { get; private set; } + + /// + /// Gets the number of patches that were not installed due to the user + /// blocking their installation. + /// + [JsonProperty(PropertyName = "excludedPatchCount")] + public int? ExcludedPatchCount { get; private set; } + + /// + /// Gets the number of patches that were detected as available for + /// install, but did not meet the operation's criteria. + /// + [JsonProperty(PropertyName = "notSelectedPatchCount")] + public int? NotSelectedPatchCount { get; private set; } + + /// + /// Gets the number of patches that were identified as meeting the + /// installation criteria, but were not able to be installed. Typically + /// this happens when maintenanceWindowExceeded == true. + /// + [JsonProperty(PropertyName = "pendingPatchCount")] + public int? PendingPatchCount { get; private set; } + + /// + /// Gets the number of patches successfully installed. + /// + [JsonProperty(PropertyName = "installedPatchCount")] + public int? InstalledPatchCount { get; private set; } + + /// + /// Gets the number of patches that could not be installed due to some + /// issue. See errors for details. + /// + [JsonProperty(PropertyName = "failedPatchCount")] + public int? FailedPatchCount { get; private set; } + + /// + /// Gets the patches that were installed during the operation. + /// + [JsonProperty(PropertyName = "patches")] + public IList Patches { get; private set; } + + /// + /// Gets the UTC timestamp when the operation began. + /// + [JsonProperty(PropertyName = "startDateTime")] + public System.DateTime? StartDateTime { get; private set; } + + /// + /// Gets the errors that were encountered during execution of the + /// operation. The details array contains the list of them. + /// + [JsonProperty(PropertyName = "error")] + public ApiError Error { get; private set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePatchStatus.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePatchStatus.cs index bc09fb9fe98c..bd1b95c7f635 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePatchStatus.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachinePatchStatus.cs @@ -11,6 +11,8 @@ namespace Microsoft.Azure.Management.Compute.Models { using Newtonsoft.Json; + using System.Collections; + using System.Collections.Generic; using System.Linq; /// @@ -34,10 +36,13 @@ public VirtualMachinePatchStatus() /// The installation summary /// of the latest installation operation for the virtual /// machine. - public VirtualMachinePatchStatus(AvailablePatchSummary availablePatchSummary = default(AvailablePatchSummary), LastPatchInstallationSummary lastPatchInstallationSummary = default(LastPatchInstallationSummary)) + /// The enablement status of the + /// specified patchMode + public VirtualMachinePatchStatus(AvailablePatchSummary availablePatchSummary = default(AvailablePatchSummary), LastPatchInstallationSummary lastPatchInstallationSummary = default(LastPatchInstallationSummary), IList configurationStatuses = default(IList)) { AvailablePatchSummary = availablePatchSummary; LastPatchInstallationSummary = lastPatchInstallationSummary; + ConfigurationStatuses = configurationStatuses; CustomInit(); } @@ -60,5 +65,11 @@ public VirtualMachinePatchStatus() [JsonProperty(PropertyName = "lastPatchInstallationSummary")] public LastPatchInstallationSummary LastPatchInstallationSummary { get; set; } + /// + /// Gets the enablement status of the specified patchMode + /// + [JsonProperty(PropertyName = "configurationStatuses")] + public IList ConfigurationStatuses { get; private set; } + } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSet.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSet.cs index a6592646caf3..df3fcdf217e2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSet.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSet.cs @@ -88,12 +88,17 @@ public VirtualMachineScaleSet() /// Specifies the scale-in policy that /// decides which virtual machines are chosen for removal when a /// Virtual Machine Scale Set is scaled-in. + /// Specifies the orchestration mode + /// for the virtual machine scale set. Possible values include: + /// 'Uniform', 'Flexible' /// The identity of the virtual machine scale /// set, if configured. /// The virtual machine scale set zones. NOTE: /// Availability zones can only be set when you create the scale /// set - public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), AutomaticRepairsPolicy automaticRepairsPolicy = default(AutomaticRepairsPolicy), VirtualMachineScaleSetVMProfile virtualMachineProfile = default(VirtualMachineScaleSetVMProfile), string provisioningState = default(string), bool? overprovision = default(bool?), bool? doNotRunExtensionsOnOverprovisionedVMs = default(bool?), string uniqueId = default(string), bool? singlePlacementGroup = default(bool?), bool? zoneBalance = default(bool?), int? platformFaultDomainCount = default(int?), SubResource proximityPlacementGroup = default(SubResource), SubResource hostGroup = default(SubResource), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), ScaleInPolicy scaleInPolicy = default(ScaleInPolicy), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList zones = default(IList)) + /// The extended location of the Virtual + /// Machine Scale Set. + public VirtualMachineScaleSet(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), Sku sku = default(Sku), Plan plan = default(Plan), UpgradePolicy upgradePolicy = default(UpgradePolicy), AutomaticRepairsPolicy automaticRepairsPolicy = default(AutomaticRepairsPolicy), VirtualMachineScaleSetVMProfile virtualMachineProfile = default(VirtualMachineScaleSetVMProfile), string provisioningState = default(string), bool? overprovision = default(bool?), bool? doNotRunExtensionsOnOverprovisionedVMs = default(bool?), string uniqueId = default(string), bool? singlePlacementGroup = default(bool?), bool? zoneBalance = default(bool?), int? platformFaultDomainCount = default(int?), SubResource proximityPlacementGroup = default(SubResource), SubResource hostGroup = default(SubResource), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), ScaleInPolicy scaleInPolicy = default(ScaleInPolicy), OrchestrationMode? orchestrationMode = default(OrchestrationMode?), VirtualMachineScaleSetIdentity identity = default(VirtualMachineScaleSetIdentity), IList zones = default(IList), ExtendedLocation extendedLocation = default(ExtendedLocation)) : base(location, id, name, type, tags) { Sku = sku; @@ -112,8 +117,10 @@ public VirtualMachineScaleSet() HostGroup = hostGroup; AdditionalCapabilities = additionalCapabilities; ScaleInPolicy = scaleInPolicy; + OrchestrationMode = orchestrationMode; Identity = identity; Zones = zones; + ExtendedLocation = extendedLocation; CustomInit(); } @@ -245,6 +252,13 @@ public VirtualMachineScaleSet() [JsonProperty(PropertyName = "properties.scaleInPolicy")] public ScaleInPolicy ScaleInPolicy { get; set; } + /// + /// Gets or sets specifies the orchestration mode for the virtual + /// machine scale set. Possible values include: 'Uniform', 'Flexible' + /// + [JsonProperty(PropertyName = "properties.orchestrationMode")] + public OrchestrationMode? OrchestrationMode { get; set; } + /// /// Gets or sets the identity of the virtual machine scale set, if /// configured. @@ -259,6 +273,13 @@ public VirtualMachineScaleSet() [JsonProperty(PropertyName = "zones")] public IList Zones { get; set; } + /// + /// Gets or sets the extended location of the Virtual Machine Scale + /// Set. + /// + [JsonProperty(PropertyName = "extendedLocation")] + public ExtendedLocation ExtendedLocation { get; set; } + /// /// Validate the object. /// @@ -276,6 +297,10 @@ public override void Validate() { VirtualMachineProfile.Validate(); } + if (ExtendedLocation != null) + { + ExtendedLocation.Validate(); + } } } } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs index 1873c3afa8b1..681057f69d5a 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs @@ -33,6 +33,8 @@ public VirtualMachineScaleSetUpdateVMProfile() /// /// The virtual machine scale set OS /// profile. + /// Specifies the gallery applications + /// that should be made available to the VM/VMSS /// The virtual machine scale set storage /// profile. /// The virtual machine scale set network @@ -50,9 +52,10 @@ public VirtualMachineScaleSetUpdateVMProfile() /// 2019-03-01. /// Specifies Scheduled Event /// related configurations. - public VirtualMachineScaleSetUpdateVMProfile(VirtualMachineScaleSetUpdateOSProfile osProfile = default(VirtualMachineScaleSetUpdateOSProfile), VirtualMachineScaleSetUpdateStorageProfile storageProfile = default(VirtualMachineScaleSetUpdateStorageProfile), VirtualMachineScaleSetUpdateNetworkProfile networkProfile = default(VirtualMachineScaleSetUpdateNetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), VirtualMachineScaleSetExtensionProfile extensionProfile = default(VirtualMachineScaleSetExtensionProfile), string licenseType = default(string), BillingProfile billingProfile = default(BillingProfile), ScheduledEventsProfile scheduledEventsProfile = default(ScheduledEventsProfile)) + public VirtualMachineScaleSetUpdateVMProfile(VirtualMachineScaleSetUpdateOSProfile osProfile = default(VirtualMachineScaleSetUpdateOSProfile), ApplicationProfile applicationProfile = default(ApplicationProfile), VirtualMachineScaleSetUpdateStorageProfile storageProfile = default(VirtualMachineScaleSetUpdateStorageProfile), VirtualMachineScaleSetUpdateNetworkProfile networkProfile = default(VirtualMachineScaleSetUpdateNetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), VirtualMachineScaleSetExtensionProfile extensionProfile = default(VirtualMachineScaleSetExtensionProfile), string licenseType = default(string), BillingProfile billingProfile = default(BillingProfile), ScheduledEventsProfile scheduledEventsProfile = default(ScheduledEventsProfile)) { OsProfile = osProfile; + ApplicationProfile = applicationProfile; StorageProfile = storageProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; @@ -75,6 +78,13 @@ public VirtualMachineScaleSetUpdateVMProfile() [JsonProperty(PropertyName = "osProfile")] public VirtualMachineScaleSetUpdateOSProfile OsProfile { get; set; } + /// + /// Gets or sets specifies the gallery applications that should be made + /// available to the VM/VMSS + /// + [JsonProperty(PropertyName = "applicationProfile")] + public ApplicationProfile ApplicationProfile { get; set; } + /// /// Gets or sets the virtual machine scale set storage profile. /// diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs index 42f9b67e1fd0..4d64ba5ad581 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVM.cs @@ -48,6 +48,8 @@ public VirtualMachineScaleSetVM() /// view. /// Specifies the hardware settings for /// the virtual machine. + /// Specifies the gallery applications + /// that should be made available to the VM/VMSS /// Specifies the storage settings for the /// virtual machine disks. /// Specifies additional @@ -107,7 +109,7 @@ public VirtualMachineScaleSetVM() /// The virtual machine child extension /// resources. /// The virtual machine zones. - public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string instanceId = default(string), Sku sku = default(Sku), bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), SecurityProfile securityProfile = default(SecurityProfile), NetworkProfile networkProfile = default(NetworkProfile), VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration = default(VirtualMachineScaleSetVMNetworkProfileConfiguration), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), string modelDefinitionApplied = default(string), VirtualMachineScaleSetVMProtectionPolicy protectionPolicy = default(VirtualMachineScaleSetVMProtectionPolicy), Plan plan = default(Plan), IList resources = default(IList), IList zones = default(IList)) + public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), IDictionary tags = default(IDictionary), string instanceId = default(string), Sku sku = default(Sku), bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), ApplicationProfile applicationProfile = default(ApplicationProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), SecurityProfile securityProfile = default(SecurityProfile), NetworkProfile networkProfile = default(NetworkProfile), VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration = default(VirtualMachineScaleSetVMNetworkProfileConfiguration), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), string modelDefinitionApplied = default(string), VirtualMachineScaleSetVMProtectionPolicy protectionPolicy = default(VirtualMachineScaleSetVMProtectionPolicy), Plan plan = default(Plan), IList resources = default(IList), IList zones = default(IList)) : base(location, id, name, type, tags) { InstanceId = instanceId; @@ -116,6 +118,7 @@ public VirtualMachineScaleSetVM() VmId = vmId; InstanceView = instanceView; HardwareProfile = hardwareProfile; + ApplicationProfile = applicationProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; @@ -177,6 +180,13 @@ public VirtualMachineScaleSetVM() [JsonProperty(PropertyName = "properties.hardwareProfile")] public HardwareProfile HardwareProfile { get; set; } + /// + /// Gets or sets specifies the gallery applications that should be made + /// available to the VM/VMSS + /// + [JsonProperty(PropertyName = "properties.applicationProfile")] + public ApplicationProfile ApplicationProfile { get; set; } + /// /// Gets or sets specifies the storage settings for the virtual machine /// disks. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMProfile.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMProfile.cs index 0b95b2695cf3..fca9177e2f23 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMProfile.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineScaleSetVMProfile.cs @@ -33,6 +33,8 @@ public VirtualMachineScaleSetVMProfile() /// /// Specifies the operating system settings for /// the virtual machines in the scale set. + /// Specifies the gallery applications + /// that should be made available to the VM/VMSS /// Specifies the storage settings for the /// virtual machine disks. /// Specifies properties of the network @@ -73,9 +75,10 @@ public VirtualMachineScaleSetVMProfile() /// 2019-03-01. /// Specifies Scheduled Event /// related configurations. - public VirtualMachineScaleSetVMProfile(VirtualMachineScaleSetOSProfile osProfile = default(VirtualMachineScaleSetOSProfile), VirtualMachineScaleSetStorageProfile storageProfile = default(VirtualMachineScaleSetStorageProfile), VirtualMachineScaleSetNetworkProfile networkProfile = default(VirtualMachineScaleSetNetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), VirtualMachineScaleSetExtensionProfile extensionProfile = default(VirtualMachineScaleSetExtensionProfile), string licenseType = default(string), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), ScheduledEventsProfile scheduledEventsProfile = default(ScheduledEventsProfile)) + public VirtualMachineScaleSetVMProfile(VirtualMachineScaleSetOSProfile osProfile = default(VirtualMachineScaleSetOSProfile), ApplicationProfile applicationProfile = default(ApplicationProfile), VirtualMachineScaleSetStorageProfile storageProfile = default(VirtualMachineScaleSetStorageProfile), VirtualMachineScaleSetNetworkProfile networkProfile = default(VirtualMachineScaleSetNetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), VirtualMachineScaleSetExtensionProfile extensionProfile = default(VirtualMachineScaleSetExtensionProfile), string licenseType = default(string), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), ScheduledEventsProfile scheduledEventsProfile = default(ScheduledEventsProfile)) { OsProfile = osProfile; + ApplicationProfile = applicationProfile; StorageProfile = storageProfile; NetworkProfile = networkProfile; SecurityProfile = securityProfile; @@ -101,6 +104,13 @@ public VirtualMachineScaleSetVMProfile() [JsonProperty(PropertyName = "osProfile")] public VirtualMachineScaleSetOSProfile OsProfile { get; set; } + /// + /// Gets or sets specifies the gallery applications that should be made + /// available to the VM/VMSS + /// + [JsonProperty(PropertyName = "applicationProfile")] + public ApplicationProfile ApplicationProfile { get; set; } + /// /// Gets or sets specifies the storage settings for the virtual machine /// disks. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.cs index 274c3f085e3c..bc709ce1f948 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineSoftwarePatchProperties.cs @@ -37,12 +37,12 @@ public VirtualMachineSoftwarePatchProperties() /// The friendly name of the patch. /// The version number of the patch. This /// property applies only to Linux patches. - /// The KBID of the patch. Only applies to Windows + /// The KBID of the patch. Only applies to Windows /// patches. /// The classification(s) of the patch as /// provided by the patch publisher. /// Describes the reboot requirements of - /// the patch. Possible values include: 'NeverReboots', + /// the patch. Possible values include: 'Unknown', 'NeverReboots', /// 'AlwaysRequiresReboot', 'CanRequestReboot' /// The activity ID of the operation that /// produced this result. It is used to correlate across CRP and @@ -51,15 +51,14 @@ public VirtualMachineSoftwarePatchProperties() /// published this patch. /// The UTC timestamp of the last /// update to this patch record. - /// Describes the outcome of an install - /// operation for a given patch. Possible values include: 'Installed', - /// 'Failed', 'Excluded', 'NotSelected', 'Pending', 'Available' - public VirtualMachineSoftwarePatchProperties(string patchId = default(string), string name = default(string), string version = default(string), string kbid = default(string), IList classifications = default(IList), string rebootBehavior = default(string), string activityId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? lastModifiedDateTime = default(System.DateTime?), string assessmentState = default(string)) + /// Describes the availability of a given + /// patch. Possible values include: 'Unknown', 'Available' + public VirtualMachineSoftwarePatchProperties(string patchId = default(string), string name = default(string), string version = default(string), string kbId = default(string), IList classifications = default(IList), string rebootBehavior = default(string), string activityId = default(string), System.DateTime? publishedDate = default(System.DateTime?), System.DateTime? lastModifiedDateTime = default(System.DateTime?), string assessmentState = default(string)) { PatchId = patchId; Name = name; Version = version; - Kbid = kbid; + KbId = kbId; Classifications = classifications; RebootBehavior = rebootBehavior; ActivityId = activityId; @@ -96,8 +95,8 @@ public VirtualMachineSoftwarePatchProperties() /// /// Gets the KBID of the patch. Only applies to Windows patches. /// - [JsonProperty(PropertyName = "kbid")] - public string Kbid { get; private set; } + [JsonProperty(PropertyName = "kbId")] + public string KbId { get; private set; } /// /// Gets the classification(s) of the patch as provided by the patch @@ -108,7 +107,7 @@ public VirtualMachineSoftwarePatchProperties() /// /// Gets describes the reboot requirements of the patch. Possible - /// values include: 'NeverReboots', 'AlwaysRequiresReboot', + /// values include: 'Unknown', 'NeverReboots', 'AlwaysRequiresReboot', /// 'CanRequestReboot' /// [JsonProperty(PropertyName = "rebootBehavior")] @@ -134,9 +133,8 @@ public VirtualMachineSoftwarePatchProperties() public System.DateTime? LastModifiedDateTime { get; private set; } /// - /// Gets describes the outcome of an install operation for a given - /// patch. Possible values include: 'Installed', 'Failed', 'Excluded', - /// 'NotSelected', 'Pending', 'Available' + /// Gets describes the availability of a given patch. Possible values + /// include: 'Unknown', 'Available' /// [JsonProperty(PropertyName = "assessmentState")] public string AssessmentState { get; private set; } diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineUpdate.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineUpdate.cs index 4704c63cde82..3880a7a2c199 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineUpdate.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/VirtualMachineUpdate.cs @@ -44,6 +44,8 @@ public VirtualMachineUpdate() /// Enter any required information and then click **Save**. /// Specifies the hardware settings for /// the virtual machine. + /// Specifies the gallery applications + /// that should be made available to the VM/VMSS /// Specifies the storage settings for the /// virtual machine disks. /// Specifies additional @@ -88,6 +90,18 @@ public VirtualMachineUpdate() /// the proximity placement group that the virtual machine should be /// assigned to. <br><br>Minimum api-version: /// 2018-04-01. + /// Specifies the scale set logical + /// fault domain into which the Virtual Machine will be created. By + /// default, the Virtual Machine will by automatically assigned to a + /// fault domain that best maintains balance across available fault + /// domains.<br><li>This is applicable only if the + /// 'virtualMachineScaleSet' property of this Virtual Machine is + /// set.<li>The Virtual Machine Scale Set that is referenced, + /// must have 'platformFaultDomainCount' &gt; 1.<li>This + /// property cannot be updated once the Virtual Machine is + /// created.<li>Fault domain assignment can be viewed in the + /// Virtual Machine Instance View.<br><br>Minimum + /// api‐version: 2020‐12‐01 /// Specifies the priority for the virtual /// machine. <br><br>Minimum api-version: 2019-03-01. /// Possible values include: 'Regular', 'Low', 'Spot' @@ -136,11 +150,12 @@ public VirtualMachineUpdate() /// The identity of the virtual machine, if /// configured. /// The virtual machine zones. - public VirtualMachineUpdate(IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource virtualMachineScaleSet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), SubResource host = default(SubResource), SubResource hostGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), string extensionsTimeBudget = default(string), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList)) + public VirtualMachineUpdate(IDictionary tags = default(IDictionary), Plan plan = default(Plan), HardwareProfile hardwareProfile = default(HardwareProfile), ApplicationProfile applicationProfile = default(ApplicationProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), NetworkProfile networkProfile = default(NetworkProfile), SecurityProfile securityProfile = default(SecurityProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), SubResource availabilitySet = default(SubResource), SubResource virtualMachineScaleSet = default(SubResource), SubResource proximityPlacementGroup = default(SubResource), int? platformFaultDomain = default(int?), string priority = default(string), string evictionPolicy = default(string), BillingProfile billingProfile = default(BillingProfile), SubResource host = default(SubResource), SubResource hostGroup = default(SubResource), string provisioningState = default(string), VirtualMachineInstanceView instanceView = default(VirtualMachineInstanceView), string licenseType = default(string), string vmId = default(string), string extensionsTimeBudget = default(string), VirtualMachineIdentity identity = default(VirtualMachineIdentity), IList zones = default(IList)) : base(tags) { Plan = plan; HardwareProfile = hardwareProfile; + ApplicationProfile = applicationProfile; StorageProfile = storageProfile; AdditionalCapabilities = additionalCapabilities; OsProfile = osProfile; @@ -150,6 +165,7 @@ public VirtualMachineUpdate() AvailabilitySet = availabilitySet; VirtualMachineScaleSet = virtualMachineScaleSet; ProximityPlacementGroup = proximityPlacementGroup; + PlatformFaultDomain = platformFaultDomain; Priority = priority; EvictionPolicy = evictionPolicy; BillingProfile = billingProfile; @@ -189,6 +205,13 @@ public VirtualMachineUpdate() [JsonProperty(PropertyName = "properties.hardwareProfile")] public HardwareProfile HardwareProfile { get; set; } + /// + /// Gets or sets specifies the gallery applications that should be made + /// available to the VM/VMSS + /// + [JsonProperty(PropertyName = "properties.applicationProfile")] + public ApplicationProfile ApplicationProfile { get; set; } + /// /// Gets or sets specifies the storage settings for the virtual machine /// disks. @@ -278,6 +301,24 @@ public VirtualMachineUpdate() [JsonProperty(PropertyName = "properties.proximityPlacementGroup")] public SubResource ProximityPlacementGroup { get; set; } + /// + /// Gets or sets specifies the scale set logical fault domain into + /// which the Virtual Machine will be created. By default, the Virtual + /// Machine will by automatically assigned to a fault domain that best + /// maintains balance across available fault + /// domains.&lt;br&gt;&lt;li&gt;This is applicable only + /// if the 'virtualMachineScaleSet' property of this Virtual Machine is + /// set.&lt;li&gt;The Virtual Machine Scale Set that is + /// referenced, must have 'platformFaultDomainCount' &amp;gt; + /// 1.&lt;li&gt;This property cannot be updated once the + /// Virtual Machine is created.&lt;li&gt;Fault domain + /// assignment can be viewed in the Virtual Machine Instance + /// View.&lt;br&gt;&lt;br&gt;Minimum api‐version: + /// 2020‐12‐01 + /// + [JsonProperty(PropertyName = "properties.platformFaultDomain")] + public int? PlatformFaultDomain { get; set; } + /// /// Gets or sets specifies the priority for the virtual machine. /// &lt;br&gt;&lt;br&gt;Minimum api-version: diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs index 615ddbafcfb6..e7e53c0d01f2 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsConfiguration.cs @@ -51,11 +51,11 @@ public WindowsConfiguration() /// Specifies additional /// base-64 encoded XML formatted information that can be included in /// the Unattend.xml file, which is used by Windows Setup. - /// Specifies settings related to in-guest - /// patching (KBs). + /// Specifies settings related to VM Guest + /// Patching on Windows. /// Specifies the Windows Remote Management /// listeners. This enables remote Windows PowerShell. - public WindowsConfiguration(bool? provisionVMAgent = default(bool?), bool? enableAutomaticUpdates = default(bool?), string timeZone = default(string), IList additionalUnattendContent = default(IList), PatchSettings patchSettings = default(PatchSettings), WinRMConfiguration winRM = default(WinRMConfiguration)) + public WindowsConfiguration(bool? provisionVMAgent = default(bool?), bool? enableAutomaticUpdates = default(bool?), string timeZone = default(string), IList additionalUnattendContent = default(IList), WindowsPatchSettings patchSettings = default(WindowsPatchSettings), WinRMConfiguration winRM = default(WinRMConfiguration)) { ProvisionVMAgent = provisionVMAgent; EnableAutomaticUpdates = enableAutomaticUpdates; @@ -112,10 +112,11 @@ public WindowsConfiguration() public IList AdditionalUnattendContent { get; set; } /// - /// Gets or sets specifies settings related to in-guest patching (KBs). + /// Gets or sets specifies settings related to VM Guest Patching on + /// Windows. /// [JsonProperty(PropertyName = "patchSettings")] - public PatchSettings PatchSettings { get; set; } + public WindowsPatchSettings PatchSettings { get; set; } /// /// Gets or sets specifies the Windows Remote Management listeners. diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsParameters.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsParameters.cs new file mode 100644 index 000000000000..230533edc19d --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsParameters.cs @@ -0,0 +1,97 @@ +// +// 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; + + /// + /// Input for InstallPatches on a Windows VM, as directly received by the + /// API + /// + public partial class WindowsParameters + { + /// + /// Initializes a new instance of the WindowsParameters class. + /// + public WindowsParameters() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindowsParameters class. + /// + /// The update classifications + /// to select when installing patches for Windows. + /// Kbs to include in the patch + /// operation + /// Kbs to exclude in the patch + /// operation + /// Filters out Kbs that don't + /// have an InstallationRebootBehavior of 'NeverReboots' when this is + /// set to true. + /// This is used to install patches + /// that were published on or before this given max published + /// date. + public WindowsParameters(IList classificationsToInclude = default(IList), IList kbNumbersToInclude = default(IList), IList kbNumbersToExclude = default(IList), bool? excludeKbsRequiringReboot = default(bool?), System.DateTime? maxPatchPublishDate = default(System.DateTime?)) + { + ClassificationsToInclude = classificationsToInclude; + KbNumbersToInclude = kbNumbersToInclude; + KbNumbersToExclude = kbNumbersToExclude; + ExcludeKbsRequiringReboot = excludeKbsRequiringReboot; + MaxPatchPublishDate = maxPatchPublishDate; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets the update classifications to select when installing + /// patches for Windows. + /// + [JsonProperty(PropertyName = "classificationsToInclude")] + public IList ClassificationsToInclude { get; set; } + + /// + /// Gets or sets kbs to include in the patch operation + /// + [JsonProperty(PropertyName = "kbNumbersToInclude")] + public IList KbNumbersToInclude { get; set; } + + /// + /// Gets or sets kbs to exclude in the patch operation + /// + [JsonProperty(PropertyName = "kbNumbersToExclude")] + public IList KbNumbersToExclude { get; set; } + + /// + /// Gets or sets filters out Kbs that don't have an + /// InstallationRebootBehavior of 'NeverReboots' when this is set to + /// true. + /// + [JsonProperty(PropertyName = "excludeKbsRequiringReboot")] + public bool? ExcludeKbsRequiringReboot { get; set; } + + /// + /// Gets or sets this is used to install patches that were published on + /// or before this given max published date. + /// + [JsonProperty(PropertyName = "maxPatchPublishDate")] + public System.DateTime? MaxPatchPublishDate { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsPatchSettings.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsPatchSettings.cs new file mode 100644 index 000000000000..fc02a235c109 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsPatchSettings.cs @@ -0,0 +1,93 @@ +// +// 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; + + /// + /// Specifies settings related to VM Guest Patching on Windows. + /// + public partial class WindowsPatchSettings + { + /// + /// Initializes a new instance of the WindowsPatchSettings class. + /// + public WindowsPatchSettings() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the WindowsPatchSettings class. + /// + /// Specifies the mode of VM Guest Patching to + /// IaaS virtual machine.<br /><br /> Possible values + /// are:<br /><br /> **Manual** - You control the + /// application of patches to a virtual machine. You do this by + /// applying patches manually inside the VM. In this mode, automatic + /// updates are disabled; the property + /// WindowsConfiguration.enableAutomaticUpdates must be false<br + /// /><br /> **AutomaticByOS** - The virtual machine will + /// automatically be updated by the OS. The property + /// WindowsConfiguration.enableAutomaticUpdates must be true. <br + /// /><br /> ** AutomaticByPlatform** - the virtual machine + /// will automatically updated by the platform. The properties + /// provisionVMAgent and WindowsConfiguration.enableAutomaticUpdates + /// must be true. Possible values include: 'Manual', 'AutomaticByOS', + /// 'AutomaticByPlatform' + /// Enables customers to patch their + /// Azure VMs without requiring a reboot. For enableHotpatching, the + /// 'provisionVMAgent' must be set to true and 'patchMode' must be set + /// to 'AutomaticByPlatform'. + public WindowsPatchSettings(string patchMode = default(string), bool? enableHotpatching = default(bool?)) + { + PatchMode = patchMode; + EnableHotpatching = enableHotpatching; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + /// + /// Gets or sets specifies the mode of VM Guest Patching to IaaS + /// virtual machine.&lt;br /&gt;&lt;br /&gt; Possible + /// values are:&lt;br /&gt;&lt;br /&gt; **Manual** - + /// You control the application of patches to a virtual machine. You + /// do this by applying patches manually inside the VM. In this mode, + /// automatic updates are disabled; the property + /// WindowsConfiguration.enableAutomaticUpdates must be false&lt;br + /// /&gt;&lt;br /&gt; **AutomaticByOS** - The virtual + /// machine will automatically be updated by the OS. The property + /// WindowsConfiguration.enableAutomaticUpdates must be true. + /// &lt;br /&gt;&lt;br /&gt; ** AutomaticByPlatform** - + /// the virtual machine will automatically updated by the platform. The + /// properties provisionVMAgent and + /// WindowsConfiguration.enableAutomaticUpdates must be true. Possible + /// values include: 'Manual', 'AutomaticByOS', 'AutomaticByPlatform' + /// + [JsonProperty(PropertyName = "patchMode")] + public string PatchMode { get; set; } + + /// + /// Gets or sets enables customers to patch their Azure VMs without + /// requiring a reboot. For enableHotpatching, the 'provisionVMAgent' + /// must be set to true and 'patchMode' must be set to + /// 'AutomaticByPlatform'. + /// + [JsonProperty(PropertyName = "enableHotpatching")] + public bool? EnableHotpatching { get; set; } + + } +} diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsVMGuestPatchMode.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsVMGuestPatchMode.cs new file mode 100644 index 000000000000..e3c4970c7b0f --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/Models/WindowsVMGuestPatchMode.cs @@ -0,0 +1,23 @@ +// +// 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 WindowsVMGuestPatchMode. + /// + public static class WindowsVMGuestPatchMode + { + public const string Manual = "Manual"; + public const string AutomaticByOS = "AutomaticByOS"; + public const string AutomaticByPlatform = "AutomaticByPlatform"; + } +} 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..2c057e9039d5 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,51 +19,44 @@ 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"), - new Tuple("Compute", "Galleries", "2019-12-01"), - new Tuple("Compute", "GalleryApplicationVersions", "2019-12-01"), - 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", "Galleries", "2020-09-30"), + new Tuple("Compute", "GalleryApplicationVersions", "2020-09-30"), + new Tuple("Compute", "GalleryApplications", "2020-09-30"), + new Tuple("Compute", "GalleryImageVersions", "2020-09-30"), + new Tuple("Compute", "GalleryImages", "2020-09-30"), + new Tuple("Compute", "GallerySharingProfile", "2020-09-30"), + 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", "SharedGalleries", "2020-09-30"), + new Tuple("Compute", "SharedGalleryImageVersions", "2020-09-30"), + new Tuple("Compute", "SharedGalleryImages", "2020-09-30"), 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", "VirtualMachineImagesEdgeZone", "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/SharedGalleriesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs new file mode 100644 index 000000000000..409b39892dba --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperations.cs @@ -0,0 +1,615 @@ +// +// 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; + + /// + /// SharedGalleriesOperations operations. + /// + internal partial class SharedGalleriesOperations : IServiceOperations, ISharedGalleriesOperations + { + /// + /// Initializes a new instance of the SharedGalleriesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SharedGalleriesOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// 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 location, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("sharedTo", sharedTo); + 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}/providers/Microsoft.Compute/locations/{location}/sharedGalleries").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (sharedTo != null) + { + _queryParameters.Add(string.Format("sharedTo={0}", System.Uri.EscapeDataString(sharedTo))); + } + 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; + } + + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// 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 location, string galleryUniqueName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + 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}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + 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("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; + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// 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/SharedGalleriesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs new file mode 100644 index 000000000000..fbc46821ac94 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleriesOperationsExtensions.cs @@ -0,0 +1,141 @@ +// +// 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 SharedGalleriesOperations. + /// + public static partial class SharedGalleriesOperationsExtensions + { + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + public static IPage List(this ISharedGalleriesOperations operations, string location, string sharedTo = default(string)) + { + return operations.ListAsync(location, sharedTo).GetAwaiter().GetResult(); + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISharedGalleriesOperations operations, string location, string sharedTo = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, sharedTo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + public static SharedGallery Get(this ISharedGalleriesOperations operations, string location, string galleryUniqueName) + { + return operations.GetAsync(location, galleryUniqueName).GetAwaiter().GetResult(); + } + + /// + /// Get a shared gallery by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISharedGalleriesOperations operations, string location, string galleryUniqueName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, galleryUniqueName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISharedGalleriesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List shared galleries by subscription id or tenant id. + /// + /// + /// 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 ISharedGalleriesOperations 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/SharedGalleryImageVersionsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs new file mode 100644 index 000000000000..f86e48b89e02 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperations.cs @@ -0,0 +1,656 @@ +// +// 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; + + /// + /// SharedGalleryImageVersionsOperations operations. + /// + internal partial class SharedGalleryImageVersionsOperations : IServiceOperations, ISharedGalleryImageVersionsOperations + { + /// + /// Initializes a new instance of the SharedGalleryImageVersionsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SharedGalleryImageVersionsOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// 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 location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + if (galleryImageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("galleryImageName", galleryImageName); + tracingParameters.Add("sharedTo", sharedTo); + 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}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (sharedTo != null) + { + _queryParameters.Add(string.Format("sharedTo={0}", System.Uri.EscapeDataString(sharedTo))); + } + 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; + } + + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. + /// Digits must be within the range of a 32-bit integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + /// + /// 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 location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + if (galleryImageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); + } + if (galleryImageVersionName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageVersionName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("galleryImageName", galleryImageName); + tracingParameters.Add("galleryImageVersionName", galleryImageVersionName); + 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}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}/versions/{galleryImageVersionName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName)); + _url = _url.Replace("{galleryImageVersionName}", System.Uri.EscapeDataString(galleryImageVersionName)); + 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("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; + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// 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/SharedGalleryImageVersionsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs new file mode 100644 index 000000000000..30ce93c9da32 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImageVersionsOperationsExtensions.cs @@ -0,0 +1,175 @@ +// +// 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 SharedGalleryImageVersionsOperations. + /// + public static partial class SharedGalleryImageVersionsOperationsExtensions + { + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + public static IPage List(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string)) + { + return operations.ListAsync(location, galleryUniqueName, galleryImageName, sharedTo).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string sharedTo = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, galleryUniqueName, galleryImageName, sharedTo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. + /// Digits must be within the range of a 32-bit integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + public static SharedGalleryImageVersion Get(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName) + { + return operations.GetAsync(location, galleryUniqueName, galleryImageName, galleryImageVersionName).GetAwaiter().GetResult(); + } + + /// + /// Get a shared gallery image version by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The name of the gallery image version to be created. Needs to follow + /// semantic version name pattern: The allowed characters are digit and period. + /// Digits must be within the range of a 32-bit integer. Format: + /// <MajorVersion>.<MinorVersion>.<Patch> + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISharedGalleryImageVersionsOperations operations, string location, string galleryUniqueName, string galleryImageName, string galleryImageVersionName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, galleryUniqueName, galleryImageName, galleryImageVersionName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISharedGalleryImageVersionsOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery image versions by subscription id or tenant id. + /// + /// + /// 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 ISharedGalleryImageVersionsOperations 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/SharedGalleryImagesOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs new file mode 100644 index 000000000000..e6d129ddf34d --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperations.cs @@ -0,0 +1,634 @@ +// +// 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; + + /// + /// SharedGalleryImagesOperations operations. + /// + internal partial class SharedGalleryImagesOperations : IServiceOperations, ISharedGalleryImagesOperations + { + /// + /// Initializes a new instance of the SharedGalleryImagesOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal SharedGalleryImagesOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// 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 location, string galleryUniqueName, string sharedTo = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("sharedTo", sharedTo); + 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}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + List _queryParameters = new List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (sharedTo != null) + { + _queryParameters.Add(string.Format("sharedTo={0}", System.Uri.EscapeDataString(sharedTo))); + } + 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; + } + + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// 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 location, string galleryUniqueName, string galleryImageName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (galleryUniqueName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryUniqueName"); + } + if (galleryImageName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "galleryImageName"); + } + string apiVersion = "2020-09-30"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("galleryUniqueName", galleryUniqueName); + tracingParameters.Add("galleryImageName", galleryImageName); + 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}/providers/Microsoft.Compute/locations/{location}/sharedGalleries/{galleryUniqueName}/images/{galleryImageName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{galleryUniqueName}", System.Uri.EscapeDataString(galleryUniqueName)); + _url = _url.Replace("{galleryImageName}", System.Uri.EscapeDataString(galleryImageName)); + 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("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; + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// 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/SharedGalleryImagesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs new file mode 100644 index 000000000000..6f7b97ca6e91 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/SharedGalleryImagesOperationsExtensions.cs @@ -0,0 +1,155 @@ +// +// 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 SharedGalleryImagesOperations. + /// + public static partial class SharedGalleryImagesOperationsExtensions + { + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + public static IPage List(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string sharedTo = default(string)) + { + return operations.ListAsync(location, galleryUniqueName, sharedTo).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The query parameter to decide what shared galleries to fetch when doing + /// listing operations. Possible values include: 'tenant' + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string sharedTo = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, galleryUniqueName, sharedTo, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + public static SharedGalleryImage Get(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string galleryImageName) + { + return operations.GetAsync(location, galleryUniqueName, galleryImageName).GetAwaiter().GetResult(); + } + + /// + /// Get a shared gallery image by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// Resource location. + /// + /// + /// The unique name of the Shared Gallery. + /// + /// + /// The name of the Shared Gallery Image Definition from which the Image + /// Versions are to be listed. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this ISharedGalleryImagesOperations operations, string location, string galleryUniqueName, string galleryImageName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, galleryUniqueName, galleryImageName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static IPage ListNext(this ISharedGalleryImagesOperations operations, string nextPageLink) + { + return operations.ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// List shared gallery images by subscription id or tenant id. + /// + /// + /// 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 ISharedGalleryImagesOperations 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/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/VirtualMachineImagesEdgeZoneOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesEdgeZoneOperations.cs new file mode 100644 index 000000000000..b4f675fffcaf --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesEdgeZoneOperations.cs @@ -0,0 +1,1143 @@ +// +// 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; + + /// + /// VirtualMachineImagesEdgeZoneOperations operations. + /// + internal partial class VirtualMachineImagesEdgeZoneOperations : IServiceOperations, IVirtualMachineImagesEdgeZoneOperations + { + /// + /// Initializes a new instance of the VirtualMachineImagesEdgeZoneOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal VirtualMachineImagesEdgeZoneOperations(ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// Gets a virtual machine image in an edge zone. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// A valid image SKU version. + /// + /// + /// 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 location, string edgeZone, string publisherName, string offer, string skus, string version, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (edgeZone == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "edgeZone"); + } + if (publisherName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publisherName"); + } + if (offer == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "offer"); + } + if (skus == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skus"); + } + if (version == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "version"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("edgeZone", edgeZone); + tracingParameters.Add("publisherName", publisherName); + tracingParameters.Add("offer", offer); + tracingParameters.Add("skus", skus); + tracingParameters.Add("version", version); + 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}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions/{version}").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{edgeZone}", System.Uri.EscapeDataString(edgeZone)); + _url = _url.Replace("{publisherName}", System.Uri.EscapeDataString(publisherName)); + _url = _url.Replace("{offer}", System.Uri.EscapeDataString(offer)); + _url = _url.Replace("{skus}", System.Uri.EscapeDataString(skus)); + _url = _url.Replace("{version}", System.Uri.EscapeDataString(version)); + _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("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; + } + + /// + /// Gets a list of all virtual machine image versions for the specified + /// location, edge zone, publisher, offer, and SKU. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// An integer value specifying the number of images to return that matches + /// supplied values. + /// + /// + /// Specifies the order of the results returned. Formatted as an OData query. + /// + /// + /// 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 location, string edgeZone, string publisherName, string offer, string skus, string expand = default(string), int? top = default(int?), string orderby = default(string), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (edgeZone == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "edgeZone"); + } + if (publisherName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publisherName"); + } + if (offer == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "offer"); + } + if (skus == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "skus"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("edgeZone", edgeZone); + tracingParameters.Add("publisherName", publisherName); + tracingParameters.Add("offer", offer); + tracingParameters.Add("skus", skus); + tracingParameters.Add("expand", expand); + tracingParameters.Add("top", top); + tracingParameters.Add("orderby", orderby); + 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}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus/{skus}/versions").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{edgeZone}", System.Uri.EscapeDataString(edgeZone)); + _url = _url.Replace("{publisherName}", System.Uri.EscapeDataString(publisherName)); + _url = _url.Replace("{offer}", System.Uri.EscapeDataString(offer)); + _url = _url.Replace("{skus}", System.Uri.EscapeDataString(skus)); + _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 (top != null) + { + _queryParameters.Add(string.Format("$top={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(top, Client.SerializationSettings).Trim('"')))); + } + if (orderby != null) + { + _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); + } + 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; + } + + /// + /// Gets a list of virtual machine image offers for the specified location, + /// edge zone and publisher. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// 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>> ListOffersWithHttpMessagesAsync(string location, string edgeZone, string publisherName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (edgeZone == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "edgeZone"); + } + if (publisherName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publisherName"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("edgeZone", edgeZone); + tracingParameters.Add("publisherName", publisherName); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListOffers", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{edgeZone}", System.Uri.EscapeDataString(edgeZone)); + _url = _url.Replace("{publisherName}", System.Uri.EscapeDataString(publisherName)); + _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("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; + } + + /// + /// Gets a list of virtual machine image publishers for the specified Azure + /// location and edge zone. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// 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>> ListPublishersWithHttpMessagesAsync(string location, string edgeZone, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (edgeZone == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "edgeZone"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("edgeZone", edgeZone); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListPublishers", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{edgeZone}", System.Uri.EscapeDataString(edgeZone)); + _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("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; + } + + /// + /// Gets a list of virtual machine image SKUs for the specified location, edge + /// zone, publisher, and offer. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// 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>> ListSkusWithHttpMessagesAsync(string location, string edgeZone, string publisherName, string offer, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + if (location == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "location"); + } + if (edgeZone == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "edgeZone"); + } + if (publisherName == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "publisherName"); + } + if (offer == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "offer"); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-12-01"; + // Tracing + bool _shouldTrace = ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = ServiceClientTracing.NextInvocationId.ToString(); + Dictionary tracingParameters = new Dictionary(); + tracingParameters.Add("location", location); + tracingParameters.Add("edgeZone", edgeZone); + tracingParameters.Add("publisherName", publisherName); + tracingParameters.Add("offer", offer); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "ListSkus", tracingParameters); + } + // Construct URL + var _baseUrl = Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/edgeZones/{edgeZone}/publishers/{publisherName}/artifacttypes/vmimage/offers/{offer}/skus").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{edgeZone}", System.Uri.EscapeDataString(edgeZone)); + _url = _url.Replace("{publisherName}", System.Uri.EscapeDataString(publisherName)); + _url = _url.Replace("{offer}", System.Uri.EscapeDataString(offer)); + _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("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/VirtualMachineImagesEdgeZoneOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesEdgeZoneOperationsExtensions.cs new file mode 100644 index 000000000000..b7c0df8deb58 --- /dev/null +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineImagesEdgeZoneOperationsExtensions.cs @@ -0,0 +1,315 @@ +// +// 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; + + /// + /// Extension methods for VirtualMachineImagesEdgeZoneOperations. + /// + public static partial class VirtualMachineImagesEdgeZoneOperationsExtensions + { + /// + /// Gets a virtual machine image in an edge zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// A valid image SKU version. + /// + public static VirtualMachineImage Get(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, string offer, string skus, string version) + { + return operations.GetAsync(location, edgeZone, publisherName, offer, skus, version).GetAwaiter().GetResult(); + } + + /// + /// Gets a virtual machine image in an edge zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// A valid image SKU version. + /// + /// + /// The cancellation token. + /// + public static async Task GetAsync(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, string offer, string skus, string version, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(location, edgeZone, publisherName, offer, skus, version, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of all virtual machine image versions for the specified + /// location, edge zone, publisher, offer, and SKU. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// An integer value specifying the number of images to return that matches + /// supplied values. + /// + /// + /// Specifies the order of the results returned. Formatted as an OData query. + /// + public static IList List(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, string offer, string skus, string expand = default(string), int? top = default(int?), string orderby = default(string)) + { + return operations.ListAsync(location, edgeZone, publisherName, offer, skus, expand, top, orderby).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of all virtual machine image versions for the specified + /// location, edge zone, publisher, offer, and SKU. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// A valid image SKU. + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// An integer value specifying the number of images to return that matches + /// supplied values. + /// + /// + /// Specifies the order of the results returned. Formatted as an OData query. + /// + /// + /// The cancellation token. + /// + public static async Task> ListAsync(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, string offer, string skus, string expand = default(string), int? top = default(int?), string orderby = default(string), CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(location, edgeZone, publisherName, offer, skus, expand, top, orderby, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of virtual machine image offers for the specified location, + /// edge zone and publisher. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + public static IList ListOffers(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName) + { + return operations.ListOffersAsync(location, edgeZone, publisherName).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of virtual machine image offers for the specified location, + /// edge zone and publisher. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// The cancellation token. + /// + public static async Task> ListOffersAsync(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListOffersWithHttpMessagesAsync(location, edgeZone, publisherName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of virtual machine image publishers for the specified Azure + /// location and edge zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + public static IList ListPublishers(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone) + { + return operations.ListPublishersAsync(location, edgeZone).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of virtual machine image publishers for the specified Azure + /// location and edge zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// The cancellation token. + /// + public static async Task> ListPublishersAsync(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListPublishersWithHttpMessagesAsync(location, edgeZone, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + /// + /// Gets a list of virtual machine image SKUs for the specified location, edge + /// zone, publisher, and offer. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + public static IList ListSkus(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, string offer) + { + return operations.ListSkusAsync(location, edgeZone, publisherName, offer).GetAwaiter().GetResult(); + } + + /// + /// Gets a list of virtual machine image SKUs for the specified location, edge + /// zone, publisher, and offer. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of a supported Azure region. + /// + /// + /// The name of the edge zone. + /// + /// + /// A valid image publisher. + /// + /// + /// A valid image publisher offer. + /// + /// + /// The cancellation token. + /// + public static async Task> ListSkusAsync(this IVirtualMachineImagesEdgeZoneOperations operations, string location, string edgeZone, string publisherName, string offer, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.ListSkusWithHttpMessagesAsync(location, edgeZone, publisherName, offer, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + + } +} 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/VirtualMachineScaleSetVMsOperations.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs index 7a513780a284..496e00e7def5 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperations.cs @@ -177,16 +177,20 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) /// /// The instance ID of the virtual machine. /// + /// + /// Optional parameter to force delete a virtual machine from a VM scale set. + /// (Feature in Preview) + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, forceDeletion, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -245,7 +249,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 +457,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 +660,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 +989,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 +1220,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 +1436,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 +1632,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 +1817,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 +2014,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; @@ -2199,6 +2203,10 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) /// /// The instance ID of the virtual machine. /// + /// + /// Optional parameter to force delete a virtual machine from a VM scale set. + /// (Feature in Preview) + /// /// /// Headers that will be added to request. /// @@ -2217,7 +2225,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2235,7 +2243,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; @@ -2246,6 +2254,7 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmScaleSetName", vmScaleSetName); tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("forceDeletion", forceDeletion); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); @@ -2258,6 +2267,10 @@ internal VirtualMachineScaleSetVMsOperations(ComputeManagementClient client) _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDeletion != null) + { + _queryParameters.Add(string.Format("forceDeletion={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDeletion, Client.SerializationSettings).Trim('"')))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2424,7 +2437,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 +2624,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 +2806,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 +2989,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 +3171,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 +3367,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/VirtualMachineScaleSetVMsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperationsExtensions.cs index 41dc7e73a605..888c670a294f 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetVMsOperationsExtensions.cs @@ -240,9 +240,13 @@ public static VirtualMachineScaleSetVM Update(this IVirtualMachineScaleSetVMsOpe /// /// The instance ID of the virtual machine. /// - public static void Delete(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId) + /// + /// Optional parameter to force delete a virtual machine from a VM scale set. + /// (Feature in Preview) + /// + public static void Delete(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?)) { - operations.DeleteAsync(resourceGroupName, vmScaleSetName, instanceId).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, vmScaleSetName, instanceId, forceDeletion).GetAwaiter().GetResult(); } /// @@ -260,12 +264,16 @@ public static void Delete(this IVirtualMachineScaleSetVMsOperations operations, /// /// The instance ID of the virtual machine. /// + /// + /// Optional parameter to force delete a virtual machine from a VM scale set. + /// (Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1026,9 +1034,13 @@ public static VirtualMachineScaleSetVM BeginUpdate(this IVirtualMachineScaleSetV /// /// The instance ID of the virtual machine. /// - public static void BeginDelete(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId) + /// + /// Optional parameter to force delete a virtual machine from a VM scale set. + /// (Feature in Preview) + /// + public static void BeginDelete(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?)) { - operations.BeginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId).GetAwaiter().GetResult(); + operations.BeginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId, forceDeletion).GetAwaiter().GetResult(); } /// @@ -1046,12 +1058,16 @@ public static void BeginDelete(this IVirtualMachineScaleSetVMsOperations operati /// /// The instance ID of the virtual machine. /// + /// + /// Optional parameter to force delete a virtual machine from a VM scale set. + /// (Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task BeginDeleteAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteAsync(this IVirtualMachineScaleSetVMsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// 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..be44f885b822 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperations.cs @@ -109,16 +109,19 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The name of the VM scale set. /// + /// + /// Optional parameter to force delete a VM scale set. (Feature in Preview) + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, forceDeletion, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -166,7 +169,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; @@ -357,16 +360,20 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The virtual machine scale set instance ids. /// + /// + /// Optional parameter to force delete virtual machines from the VM scale set. + /// (Feature in Preview) + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -414,7 +421,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 +608,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 +789,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 +980,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 +1174,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 +1599,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 +1799,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 +2023,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 +2249,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; @@ -2408,6 +2415,9 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The name of the VM scale set. /// + /// + /// Optional parameter to force delete a VM scale set. (Feature in Preview) + /// /// /// Headers that will be added to request. /// @@ -2426,7 +2436,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2440,7 +2450,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; @@ -2450,6 +2460,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("forceDeletion", forceDeletion); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); @@ -2461,6 +2472,10 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDeletion != null) + { + _queryParameters.Add(string.Format("forceDeletion={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDeletion, Client.SerializationSettings).Trim('"')))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -2620,7 +2635,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) { @@ -2777,6 +2792,10 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// The virtual machine scale set instance ids. /// + /// + /// Optional parameter to force delete virtual machines from the VM scale set. + /// (Feature in Preview) + /// /// /// Headers that will be added to request. /// @@ -2795,7 +2814,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2813,7 +2832,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) { @@ -2828,6 +2847,7 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("forceDeletion", forceDeletion); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("vmInstanceIDs", vmInstanceIDs); tracingParameters.Add("cancellationToken", cancellationToken); @@ -2840,6 +2860,10 @@ internal VirtualMachineScaleSetsOperations(ComputeManagementClient client) _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDeletion != null) + { + _queryParameters.Add(string.Format("forceDeletion={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDeletion, Client.SerializationSettings).Trim('"')))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -3010,7 +3034,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 +3230,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 +3421,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 +3613,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 +3807,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 +4001,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 +4191,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 +4377,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 +4574,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/VirtualMachineScaleSetsOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs index d4f6d015812f..03ca3608f8e4 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachineScaleSetsOperationsExtensions.cs @@ -127,9 +127,12 @@ public static VirtualMachineScaleSet Update(this IVirtualMachineScaleSetsOperati /// /// The name of the VM scale set. /// - public static void Delete(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName) + /// + /// Optional parameter to force delete a VM scale set. (Feature in Preview) + /// + public static void Delete(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?)) { - operations.DeleteAsync(resourceGroupName, vmScaleSetName).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, vmScaleSetName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -144,12 +147,15 @@ public static void Delete(this IVirtualMachineScaleSetsOperations operations, st /// /// The name of the VM scale set. /// + /// + /// Optional parameter to force delete a VM scale set. (Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -258,9 +264,13 @@ public static VirtualMachineScaleSet Get(this IVirtualMachineScaleSetsOperations /// /// The virtual machine scale set instance ids. /// - public static void DeleteInstances(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds) + /// + /// Optional parameter to force delete virtual machines from the VM scale set. + /// (Feature in Preview) + /// + public static void DeleteInstances(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?)) { - operations.DeleteInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds).GetAwaiter().GetResult(); + operations.DeleteInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion).GetAwaiter().GetResult(); } /// @@ -278,12 +288,16 @@ public static void DeleteInstances(this IVirtualMachineScaleSetsOperations opera /// /// The virtual machine scale set instance ids. /// + /// + /// Optional parameter to force delete virtual machines from the VM scale set. + /// (Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task DeleteInstancesAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteInstancesAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1120,9 +1134,12 @@ public static VirtualMachineScaleSet BeginUpdate(this IVirtualMachineScaleSetsOp /// /// The name of the VM scale set. /// - public static void BeginDelete(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName) + /// + /// Optional parameter to force delete a VM scale set. (Feature in Preview) + /// + public static void BeginDelete(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?)) { - operations.BeginDeleteAsync(resourceGroupName, vmScaleSetName).GetAwaiter().GetResult(); + operations.BeginDeleteAsync(resourceGroupName, vmScaleSetName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -1137,12 +1154,15 @@ public static void BeginDelete(this IVirtualMachineScaleSetsOperations operation /// /// The name of the VM scale set. /// + /// + /// Optional parameter to force delete a VM scale set. (Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task BeginDeleteAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1211,9 +1231,13 @@ public static void BeginDelete(this IVirtualMachineScaleSetsOperations operation /// /// The virtual machine scale set instance ids. /// - public static void BeginDeleteInstances(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds) + /// + /// Optional parameter to force delete virtual machines from the VM scale set. + /// (Feature in Preview) + /// + public static void BeginDeleteInstances(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?)) { - operations.BeginDeleteInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds).GetAwaiter().GetResult(); + operations.BeginDeleteInstancesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion).GetAwaiter().GetResult(); } /// @@ -1231,12 +1255,16 @@ public static void BeginDeleteInstances(this IVirtualMachineScaleSetsOperations /// /// The virtual machine scale set instance ids. /// + /// + /// Optional parameter to force delete virtual machines from the VM scale set. + /// (Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task BeginDeleteInstancesAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteInstancesAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, IList instanceIds, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginDeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginDeleteInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// 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..e722b9908b88 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; @@ -329,16 +329,19 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines.(Feature in Preview) + /// /// /// The headers that will be added to request. /// /// /// The cancellation token. /// - public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { // Send request - AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, customHeaders, cancellationToken).ConfigureAwait(false); + AzureOperationResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, customHeaders, cancellationToken).ConfigureAwait(false); return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } @@ -391,7 +394,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 +593,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 +836,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 +1006,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 +1189,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 +1385,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 +1731,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 +1949,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; @@ -2100,6 +2103,31 @@ internal VirtualMachinesOperations(ComputeManagementClient client) return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Installs patches on the VM. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async Task> InstallPatchesWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + { + // Send request + AzureOperationResponse _response = await BeginInstallPatchesWithHttpMessagesAsync(resourceGroupName, vmName, installPatchesInput, customHeaders, cancellationToken).ConfigureAwait(false); + return await Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Run command on the VM. /// @@ -2181,7 +2209,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 +2422,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 +2648,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; @@ -2710,7 +2738,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) HttpStatusCode _statusCode = _httpResponse.StatusCode; cancellationToken.ThrowIfCancellationRequested(); string _responseContent = null; - if ((int)_statusCode != 200 && (int)_statusCode != 201) + if ((int)_statusCode != 200) { var ex = new CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); try @@ -2770,24 +2798,6 @@ internal VirtualMachinesOperations(ComputeManagementClient client) 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); @@ -2804,6 +2814,9 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines.(Feature in Preview) + /// /// /// Headers that will be added to request. /// @@ -2822,7 +2835,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) /// /// A response object containing the response body and response headers. /// - public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) + public async Task BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), Dictionary> customHeaders = null, CancellationToken cancellationToken = default(CancellationToken)) { if (resourceGroupName == null) { @@ -2836,7 +2849,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; @@ -2846,6 +2859,7 @@ internal VirtualMachinesOperations(ComputeManagementClient client) Dictionary tracingParameters = new Dictionary(); tracingParameters.Add("resourceGroupName", resourceGroupName); tracingParameters.Add("vmName", vmName); + tracingParameters.Add("forceDeletion", forceDeletion); tracingParameters.Add("apiVersion", apiVersion); tracingParameters.Add("cancellationToken", cancellationToken); ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); @@ -2857,6 +2871,10 @@ internal VirtualMachinesOperations(ComputeManagementClient client) _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(Client.SubscriptionId)); List _queryParameters = new List(); + if (forceDeletion != null) + { + _queryParameters.Add(string.Format("forceDeletion={0}", System.Uri.EscapeDataString(Rest.Serialization.SafeJsonConvert.SerializeObject(forceDeletion, Client.SerializationSettings).Trim('"')))); + } if (apiVersion != null) { _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); @@ -3010,7 +3028,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 +3202,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 +3382,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 +3560,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 +3733,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 +3906,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 +4080,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 +4259,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 +4445,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 +4621,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; @@ -4753,6 +4771,218 @@ internal VirtualMachinesOperations(ComputeManagementClient client) return _result; } + /// + /// Installs patches on the VM. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + /// + /// 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> BeginInstallPatchesWithHttpMessagesAsync(string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput, 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 (installPatchesInput == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "installPatchesInput"); + } + if (installPatchesInput != null) + { + installPatchesInput.Validate(); + } + if (Client.SubscriptionId == null) + { + throw new ValidationException(ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + string apiVersion = "2020-12-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("installPatchesInput", installPatchesInput); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("cancellationToken", cancellationToken); + ServiceClientTracing.Enter(_invocationId, this, "BeginInstallPatches", 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}/installPatches").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 (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("POST"); + _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(installPatchesInput != null) + { + _requestContent = Rest.Serialization.SafeJsonConvert.SerializeObject(installPatchesInput, 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 != 202) + { + 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; + } + /// /// Run command on the VM. /// @@ -4808,7 +5038,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; diff --git a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs index 495ef93f9b68..1c7bc104a93c 100644 --- a/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs +++ b/sdk/compute/Microsoft.Azure.Management.Compute/src/Generated/VirtualMachinesOperationsExtensions.cs @@ -213,9 +213,12 @@ public static VirtualMachine Update(this IVirtualMachinesOperations operations, /// /// The name of the virtual machine. /// - public static void Delete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName) + /// + /// Optional parameter to force delete virtual machines.(Feature in Preview) + /// + public static void Delete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?)) { - operations.DeleteAsync(resourceGroupName, vmName).GetAwaiter().GetResult(); + operations.DeleteAsync(resourceGroupName, vmName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -230,12 +233,15 @@ public static void Delete(this IVirtualMachinesOperations operations, string res /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines.(Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task DeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -987,6 +993,52 @@ public static VirtualMachineAssessPatchesResult AssessPatches(this IVirtualMachi } } + /// + /// Installs patches on the VM. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + public static VirtualMachineInstallPatchesResult InstallPatches(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput) + { + return operations.InstallPatchesAsync(resourceGroupName, vmName, installPatchesInput).GetAwaiter().GetResult(); + } + + /// + /// Installs patches on the VM. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + /// + /// The cancellation token. + /// + public static async Task InstallPatchesAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.InstallPatchesWithHttpMessagesAsync(resourceGroupName, vmName, installPatchesInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Run command on the VM. /// @@ -1187,9 +1239,12 @@ public static VirtualMachine BeginUpdate(this IVirtualMachinesOperations operati /// /// The name of the virtual machine. /// - public static void BeginDelete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName) + /// + /// Optional parameter to force delete virtual machines.(Feature in Preview) + /// + public static void BeginDelete(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?)) { - operations.BeginDeleteAsync(resourceGroupName, vmName).GetAwaiter().GetResult(); + operations.BeginDeleteAsync(resourceGroupName, vmName, forceDeletion).GetAwaiter().GetResult(); } /// @@ -1204,12 +1259,15 @@ public static void BeginDelete(this IVirtualMachinesOperations operations, strin /// /// The name of the virtual machine. /// + /// + /// Optional parameter to force delete virtual machines.(Feature in Preview) + /// /// /// The cancellation token. /// - public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, CancellationToken cancellationToken = default(CancellationToken)) + public static async Task BeginDeleteAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, bool? forceDeletion = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) { - (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, null, cancellationToken).ConfigureAwait(false)).Dispose(); + (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, forceDeletion, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// @@ -1617,6 +1675,52 @@ public static VirtualMachineAssessPatchesResult BeginAssessPatches(this IVirtual } } + /// + /// Installs patches on the VM. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + public static VirtualMachineInstallPatchesResult BeginInstallPatches(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput) + { + return operations.BeginInstallPatchesAsync(resourceGroupName, vmName, installPatchesInput).GetAwaiter().GetResult(); + } + + /// + /// Installs patches on the VM. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. + /// + /// + /// The name of the virtual machine. + /// + /// + /// Input for InstallPatches as directly received by the API + /// + /// + /// The cancellation token. + /// + public static async Task BeginInstallPatchesAsync(this IVirtualMachinesOperations operations, string resourceGroupName, string vmName, VirtualMachineInstallPatchesParameters installPatchesInput, CancellationToken cancellationToken = default(CancellationToken)) + { + using (var _result = await operations.BeginInstallPatchesWithHttpMessagesAsync(resourceGroupName, vmName, installPatchesInput, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Run command on the VM. ///