diff --git a/src/Compute/Compute.Management.Sdk/Generated/AvailabilitySetsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/AvailabilitySetsOperations.cs index 935fd6b707eb..9368cffe39a1 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/AvailabilitySetsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/AvailabilitySetsOperations.cs @@ -84,7 +84,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -303,7 +303,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -527,7 +527,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -764,7 +764,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1004,7 +1004,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1234,7 +1234,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1439,7 +1439,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1679,7 +1679,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; MigrateToVirtualMachineScaleSetInput parameters = new MigrateToVirtualMachineScaleSetInput(); if(virtualMachineScaleSetFlexible != null) { @@ -1901,7 +1901,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; MigrateToVirtualMachineScaleSetInput parameters = new MigrateToVirtualMachineScaleSetInput(); if(virtualMachineScaleSetFlexible != null) { @@ -2122,7 +2122,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2351,7 +2351,7 @@ internal AvailabilitySetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "availabilitySetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; ConvertToVirtualMachineScaleSetInput parameters = new ConvertToVirtualMachineScaleSetInput(); if(virtualMachineScaleSetName != null) { diff --git a/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationGroupsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationGroupsOperations.cs index ea0acd5c6efc..e7b1ae119839 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationGroupsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationGroupsOperations.cs @@ -98,7 +98,7 @@ internal CapacityReservationGroupsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -331,7 +331,7 @@ internal CapacityReservationGroupsOperations (ComputeManagementClient client) } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -569,7 +569,7 @@ internal CapacityReservationGroupsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -814,7 +814,7 @@ internal CapacityReservationGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityReservationGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1073,7 +1073,7 @@ internal CapacityReservationGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityReservationGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1307,7 +1307,7 @@ internal CapacityReservationGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityReservationGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperations.cs index 5e27cb30cb28..798b3d6dcb28 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperations.cs @@ -114,7 +114,7 @@ internal CapacityReservationsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -359,7 +359,7 @@ internal CapacityReservationsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -587,8 +587,13 @@ internal CapacityReservationsOperations (ComputeManagementClient client) /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The name of the resource group. The name is case insensitive. @@ -700,7 +705,7 @@ internal CapacityReservationsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityReservationName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -981,7 +986,7 @@ internal CapacityReservationsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityReservationName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1153,8 +1158,13 @@ internal CapacityReservationsOperations (ComputeManagementClient client) /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The name of the resource group. The name is case insensitive. @@ -1225,7 +1235,7 @@ internal CapacityReservationsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "capacityReservationName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperationsExtensions.cs index 59c4269589e7..a2390b53c665 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperationsExtensions.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/CapacityReservationsOperationsExtensions.cs @@ -220,8 +220,13 @@ public static CapacityReservation Update(this ICapacityReservationsOperations op /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The operations group for this extension method. @@ -244,8 +249,13 @@ public static void Delete(this ICapacityReservationsOperations operations, strin /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The operations group for this extension method. @@ -364,8 +374,13 @@ public static CapacityReservation BeginUpdate(this ICapacityReservationsOperatio /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The operations group for this extension method. @@ -388,8 +403,13 @@ public static void BeginDelete(this ICapacityReservationsOperations operations, /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The operations group for this extension method. diff --git a/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleriesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleriesOperations.cs index 8e0bd30d8a73..f35d5e17a293 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleriesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleriesOperations.cs @@ -101,7 +101,7 @@ internal CommunityGalleriesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "publicGalleryName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImageVersionsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImageVersionsOperations.cs index 9ef4d936a2ec..f67fff1fd092 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImageVersionsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImageVersionsOperations.cs @@ -109,7 +109,7 @@ internal CommunityGalleryImageVersionsOperations (ComputeManagementClient client throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -352,7 +352,7 @@ internal CommunityGalleryImageVersionsOperations (ComputeManagementClient client throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "galleryImageVersionName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImagesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImagesOperations.cs index ae601dd8c6d5..c7971bdee392 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImagesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/CommunityGalleryImagesOperations.cs @@ -101,7 +101,7 @@ internal CommunityGalleryImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "publicGalleryName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -331,7 +331,7 @@ internal CommunityGalleryImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/ComputeManagementClient.cs b/src/Compute/Compute.Management.Sdk/Generated/ComputeManagementClient.cs index 33ba9e75e47a..627cd7b81f9b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/ComputeManagementClient.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/ComputeManagementClient.cs @@ -156,6 +156,10 @@ public partial class ComputeManagementClient : Microsoft.Rest.ServiceClient public virtual IVirtualMachineScaleSetVMSOperations VirtualMachineScaleSetVMS { get; private set; } /// + /// Gets the IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations + /// + public virtual IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations VirtualMachineScaleSetVMDiagnosticRunCommands { get; private set; } + /// /// Gets the IVirtualMachineScaleSetVMExtensionsOperations /// public virtual IVirtualMachineScaleSetVMExtensionsOperations VirtualMachineScaleSetVMExtensions { get; private set; } @@ -164,6 +168,10 @@ public partial class ComputeManagementClient : Microsoft.Rest.ServiceClient public virtual IVirtualMachineScaleSetVMRunCommandsOperations VirtualMachineScaleSetVMRunCommands { get; private set; } /// + /// Gets the IVirtualMachineDiagnosticRunCommandsOperations + /// + public virtual IVirtualMachineDiagnosticRunCommandsOperations VirtualMachineDiagnosticRunCommands { get; private set; } + /// /// Gets the IVirtualMachineExtensionsOperations /// public virtual IVirtualMachineExtensionsOperations VirtualMachineExtensions { get; private set; } @@ -188,6 +196,10 @@ public partial class ComputeManagementClient : Microsoft.Rest.ServiceClient public virtual IDiskRestorePointOperations DiskRestorePoint { get; private set; } /// + /// Gets the ITenantLevelGallerySharingOperations + /// + public virtual ITenantLevelGallerySharingOperations TenantLevelGallerySharing { get; private set; } + /// /// Gets the IGalleriesOperations /// public virtual IGalleriesOperations Galleries { get; private set; } @@ -216,6 +228,10 @@ public partial class ComputeManagementClient : Microsoft.Rest.ServiceClient public virtual ISharedGalleryImageVersionsOperations SharedGalleryImageVersions { get; private set; } /// + /// Gets the IGallerySharingOperations + /// + public virtual IGallerySharingOperations GallerySharing { get; private set; } + /// /// Gets the IGalleryApplicationsOperations /// public virtual IGalleryApplicationsOperations GalleryApplications { get; private set; } @@ -522,14 +538,17 @@ private void Initialize() this.VirtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsOperations(this); this.VirtualMachineScaleSetLifeCycleHookEvents = new VirtualMachineScaleSetLifeCycleHookEventsOperations(this); this.VirtualMachineScaleSetVMS = new VirtualMachineScaleSetVMSOperations(this); + this.VirtualMachineScaleSetVMDiagnosticRunCommands = new VirtualMachineScaleSetVMDiagnosticRunCommandsOperations(this); this.VirtualMachineScaleSetVMExtensions = new VirtualMachineScaleSetVMExtensionsOperations(this); this.VirtualMachineScaleSetVMRunCommands = new VirtualMachineScaleSetVMRunCommandsOperations(this); + this.VirtualMachineDiagnosticRunCommands = new VirtualMachineDiagnosticRunCommandsOperations(this); this.VirtualMachineExtensions = new VirtualMachineExtensionsOperations(this); this.DiskAccesses = new DiskAccessesOperations(this); this.DiskEncryptionSets = new DiskEncryptionSetsOperations(this); this.Disks = new DisksOperations(this); this.Snapshots = new SnapshotsOperations(this); this.DiskRestorePoint = new DiskRestorePointOperations(this); + this.TenantLevelGallerySharing = new TenantLevelGallerySharingOperations(this); this.Galleries = new GalleriesOperations(this); this.CommunityGalleries = new CommunityGalleriesOperations(this); this.CommunityGalleryImages = new CommunityGalleryImagesOperations(this); @@ -537,6 +556,7 @@ private void Initialize() this.SharedGalleries = new SharedGalleriesOperations(this); this.SharedGalleryImages = new SharedGalleryImagesOperations(this); this.SharedGalleryImageVersions = new SharedGalleryImageVersionsOperations(this); + this.GallerySharing = new GallerySharingOperations(this); this.GalleryApplications = new GalleryApplicationsOperations(this); this.GalleryApplicationVersions = new GalleryApplicationVersionsOperations(this); this.GalleryImages = new GalleryImagesOperations(this); diff --git a/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostGroupsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostGroupsOperations.cs index 5738d0ae761a..3ad5ccf5735f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostGroupsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostGroupsOperations.cs @@ -81,7 +81,7 @@ internal DedicatedHostGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -297,7 +297,7 @@ internal DedicatedHostGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -527,7 +527,7 @@ internal DedicatedHostGroupsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -771,7 +771,7 @@ internal DedicatedHostGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1029,7 +1029,7 @@ internal DedicatedHostGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1259,7 +1259,7 @@ internal DedicatedHostGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostsOperations.cs index 306d20602680..d6aece4795af 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/DedicatedHostsOperations.cs @@ -107,7 +107,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -347,7 +347,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -671,7 +671,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -978,7 +978,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1259,7 +1259,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1512,7 +1512,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1732,7 +1732,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1965,7 +1965,7 @@ internal DedicatedHostsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "hostName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/DiskAccessesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/DiskAccessesOperations.cs index 151a1bc42ad4..896a4751bed5 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/DiskAccessesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/DiskAccessesOperations.cs @@ -79,7 +79,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -520,7 +520,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskAccessName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -831,7 +831,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskAccessName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1069,7 +1069,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1361,7 +1361,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskAccessName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1601,7 +1601,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskAccessName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1858,7 +1858,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskAccessName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; DiskAccessUpdate diskAccess = new DiskAccessUpdate(); if(tags != null) { @@ -2114,7 +2114,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskAccessName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2338,7 +2338,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; PrivateEndpointConnection privateEndpointConnection = new PrivateEndpointConnection(); if(privateLinkServiceConnectionState != null) { @@ -2604,7 +2604,7 @@ internal DiskAccessesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "privateEndpointConnectionName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/DiskEncryptionSetsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/DiskEncryptionSetsOperations.cs index 86ca79783111..a0173bb75368 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/DiskEncryptionSetsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/DiskEncryptionSetsOperations.cs @@ -79,7 +79,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -520,7 +520,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskEncryptionSetName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -832,7 +832,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskEncryptionSetName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1073,7 +1073,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskEncryptionSetName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1335,7 +1335,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskEncryptionSetName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1586,7 +1586,7 @@ internal DiskEncryptionSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskEncryptionSetName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/DiskRestorePointOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/DiskRestorePointOperations.cs index e511e19812b8..fc89fa8ea748 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/DiskRestorePointOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/DiskRestorePointOperations.cs @@ -114,7 +114,7 @@ internal DiskRestorePointOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmRestorePointName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -359,7 +359,7 @@ internal DiskRestorePointOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskRestorePointName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -678,7 +678,7 @@ internal DiskRestorePointOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskRestorePointName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -929,7 +929,7 @@ internal DiskRestorePointOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskRestorePointName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/DisksOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/DisksOperations.cs index b3a2490d33b4..7801d048c1a9 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/DisksOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/DisksOperations.cs @@ -79,7 +79,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -519,7 +519,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -887,7 +887,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1147,7 +1147,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1397,7 +1397,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1618,7 +1618,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1850,7 +1850,7 @@ internal DisksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "diskName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/GalleriesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/GalleriesOperations.cs index 941c477118dc..1eb1f5afc58b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/GalleriesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/GalleriesOperations.cs @@ -79,7 +79,7 @@ internal GalleriesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal GalleriesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -531,7 +531,7 @@ internal GalleriesOperations (ComputeManagementClient client) } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -856,7 +856,7 @@ internal GalleriesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "galleryName", "^[^_\\W][\\w-._]{0,79}(? + /// GallerySharingOperations operations. + /// + internal partial class GallerySharingOperations : Microsoft.Rest.IServiceOperations, IGallerySharingOperations + { + /// + /// Initializes a new instance of the GallerySharingOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal GallerySharingOperations (ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> AcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginAcceptWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> RejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRejectWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// 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 System.Threading.Tasks.Task> BeginAcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); + } + if (location != null) + { + if (location.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); + } + } + if (sharedGallerySubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sharedGallerySubscriptionId"); + } + if (sharedGallerySubscriptionId != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(sharedGallerySubscriptionId, "^[^_\\W][\\w-._]{0,79}(? tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("location", location); + tracingParameters.Add("sharedGallerySubscriptionId", sharedGallerySubscriptionId); + tracingParameters.Add("sharedGalleryName", sharedGalleryName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginAccept", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGallerySubscriptions/{sharedGallerySubscriptionId}/sharedGalleries/{sharedGalleryName}/accept").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{sharedGallerySubscriptionId}", System.Uri.EscapeDataString(sharedGallerySubscriptionId)); + _url = _url.Replace("{sharedGalleryName}", System.Uri.EscapeDataString(sharedGalleryName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// 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 System.Threading.Tasks.Task> BeginRejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); + } + if (location != null) + { + if (location.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); + } + } + if (sharedGallerySubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sharedGallerySubscriptionId"); + } + if (sharedGallerySubscriptionId != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(sharedGallerySubscriptionId, "^[^_\\W][\\w-._]{0,79}(? tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("location", location); + tracingParameters.Add("sharedGallerySubscriptionId", sharedGallerySubscriptionId); + tracingParameters.Add("sharedGalleryName", sharedGalleryName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginReject", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/providers/Microsoft.Compute/locations/{location}/sharedGallerySubscriptions/{sharedGallerySubscriptionId}/sharedGalleries/{sharedGalleryName}/reject").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{sharedGallerySubscriptionId}", System.Uri.EscapeDataString(sharedGallerySubscriptionId)); + _url = _url.Replace("{sharedGalleryName}", System.Uri.EscapeDataString(sharedGalleryName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/GallerySharingOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/GallerySharingOperationsExtensions.cs new file mode 100644 index 000000000000..16bb28492b3f --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/GallerySharingOperationsExtensions.cs @@ -0,0 +1,196 @@ +// 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.Azure; + using Models; + + /// + /// Extension methods for GallerySharingOperations + /// + public static partial class GallerySharingOperationsExtensions + { + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + public static GallerySharingAcceptHeaders Accept(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((IGallerySharingOperations)operations).AcceptAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task AcceptAsync(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.AcceptWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + public static GallerySharingRejectHeaders Reject(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((IGallerySharingOperations)operations).RejectAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RejectAsync(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RejectWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + public static GallerySharingAcceptHeaders BeginAccept(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((IGallerySharingOperations)operations).BeginAcceptAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginAcceptAsync(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginAcceptWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + public static GallerySharingRejectHeaders BeginReject(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((IGallerySharingOperations)operations).BeginRejectAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRejectAsync(this IGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRejectWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + } +} diff --git a/src/Compute/Compute.Management.Sdk/Generated/GallerySharingProfileOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/GallerySharingProfileOperations.cs index 1287c8ec9bac..e7122b81a4b8 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/GallerySharingProfileOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/GallerySharingProfileOperations.cs @@ -147,7 +147,7 @@ internal GallerySharingProfileOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "galleryName", "^[^_\\W][\\w-._]{0,79}(? /// /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The name of the resource group. The name is case insensitive. @@ -257,15 +267,25 @@ public partial interface ICapacityReservationsOperations /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The operation to delete a capacity reservation. This operation is allowed /// only when all the associated resources are disassociated from the capacity /// reservation. Please refer to https://aka.ms/CapacityReservation for more - /// details. Note: Block capacity reservations cannot be deleted after it has - /// been successfully allocated until the schedule end time. + /// details. Note: Block capacity reservations cannot be deleted after they + /// have been successfully allocated until the schedule end time. Future + /// capacity reservations (Minimum API version: 2026-04-01) can be deleted if + /// their reservation state is one of: Pending, Declined, FulfillmentFailed, or + /// Approved. Otherwise, Future capacity reservations in the Committed, Live, + /// or PartiallyFulfilled state cannot be deleted until minimumCommitmentDays + /// have elapsed since their scheduled start date. /// /// /// The name of the resource group. The name is case insensitive. diff --git a/src/Compute/Compute.Management.Sdk/Generated/IComputeManagementClient.cs b/src/Compute/Compute.Management.Sdk/Generated/IComputeManagementClient.cs index 48ec3cf1e689..d63e8bfde4e7 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/IComputeManagementClient.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/IComputeManagementClient.cs @@ -187,6 +187,11 @@ public partial interface IComputeManagementClient : System.IDisposable /// IVirtualMachineScaleSetVMSOperations VirtualMachineScaleSetVMS { get; } + /// + /// Gets the IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations + /// + IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations VirtualMachineScaleSetVMDiagnosticRunCommands { get; } + /// /// Gets the IVirtualMachineScaleSetVMExtensionsOperations /// @@ -197,6 +202,11 @@ public partial interface IComputeManagementClient : System.IDisposable /// IVirtualMachineScaleSetVMRunCommandsOperations VirtualMachineScaleSetVMRunCommands { get; } + /// + /// Gets the IVirtualMachineDiagnosticRunCommandsOperations + /// + IVirtualMachineDiagnosticRunCommandsOperations VirtualMachineDiagnosticRunCommands { get; } + /// /// Gets the IVirtualMachineExtensionsOperations /// @@ -227,6 +237,11 @@ public partial interface IComputeManagementClient : System.IDisposable /// IDiskRestorePointOperations DiskRestorePoint { get; } + /// + /// Gets the ITenantLevelGallerySharingOperations + /// + ITenantLevelGallerySharingOperations TenantLevelGallerySharing { get; } + /// /// Gets the IGalleriesOperations /// @@ -262,6 +277,11 @@ public partial interface IComputeManagementClient : System.IDisposable /// ISharedGalleryImageVersionsOperations SharedGalleryImageVersions { get; } + /// + /// Gets the IGallerySharingOperations + /// + IGallerySharingOperations GallerySharing { get; } + /// /// Gets the IGalleryApplicationsOperations /// diff --git a/src/Compute/Compute.Management.Sdk/Generated/IGallerySharingOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/IGallerySharingOperations.cs new file mode 100644 index 000000000000..8416b5f8495c --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/IGallerySharingOperations.cs @@ -0,0 +1,121 @@ +// 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.Azure; + using Models; + + /// + /// GallerySharingOperations operations. + /// + public partial interface IGallerySharingOperations + { + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> AcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> RejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// Accept sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginAcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// Reject sharing of a subscription-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginRejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/ISnapshotsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/ISnapshotsOperations.cs index a3fefa726fdc..03746080d87f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/ISnapshotsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/ISnapshotsOperations.cs @@ -228,6 +228,78 @@ public partial interface ISnapshotsOperations /// System.Threading.Tasks.Task RevokeAccessWithHttpMessagesAsync(string resourceGroupName, string snapshotName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy 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 + /// + System.Threading.Tasks.Task> UpdateImmutabilityPolicyWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy lock 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 + /// + System.Threading.Tasks.Task> UpdateImmutabilityPolicyLockWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Creates or updates a snapshot. /// @@ -372,6 +444,78 @@ public partial interface ISnapshotsOperations /// System.Threading.Tasks.Task BeginRevokeAccessWithHttpMessagesAsync(string resourceGroupName, string snapshotName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy 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 + /// + System.Threading.Tasks.Task> BeginUpdateImmutabilityPolicyWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy lock 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 + /// + System.Threading.Tasks.Task> BeginUpdateImmutabilityPolicyLockWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Lists snapshots under a subscription. /// diff --git a/src/Compute/Compute.Management.Sdk/Generated/ITenantLevelGallerySharingOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/ITenantLevelGallerySharingOperations.cs new file mode 100644 index 000000000000..d77dbd430fa0 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/ITenantLevelGallerySharingOperations.cs @@ -0,0 +1,121 @@ +// 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.Azure; + using Models; + + /// + /// TenantLevelGallerySharingOperations operations. + /// + public partial interface ITenantLevelGallerySharingOperations + { + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> AcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> RejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginAcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginRejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineDiagnosticRunCommandsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineDiagnosticRunCommandsOperations.cs new file mode 100644 index 000000000000..592c1373a32e --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineDiagnosticRunCommandsOperations.cs @@ -0,0 +1,285 @@ +// 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.Azure; + using Models; + + /// + /// VirtualMachineDiagnosticRunCommandsOperations operations. + /// + public partial interface IVirtualMachineDiagnosticRunCommandsOperations + { + /// + /// The operation to get all diagnostic run commands of a Virtual Machine. + /// + /// + /// The operation to get all diagnostic run commands of a Virtual Machine. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// 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 + /// + System.Threading.Tasks.Task>> DiagnosticListByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to get the diagnostic run command. + /// + /// + /// The operation to get the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> GetByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic 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 + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Update Virtual Machine Diagnostic 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 + /// + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic 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 + /// + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Update Virtual Machine Diagnostic 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 + /// + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to get all diagnostic run commands of a Virtual Machine. + /// + /// + /// The operation to get all diagnostic 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 + /// + System.Threading.Tasks.Task>> DiagnosticListByVirtualMachineNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineExtensionImagesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineExtensionImagesOperations.cs index b8a7461eeb0b..2db99859316e 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineExtensionImagesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineExtensionImagesOperations.cs @@ -63,6 +63,11 @@ public partial interface IVirtualMachineExtensionImagesOperations /// /// /// + /// + /// Expand the response to include additional read-only metadata. Allowed + /// values: `properties` — returns extended metadata (`releaseCategory`, + /// `urgencyLevel`, `runProfile`). + /// /// /// The headers that will be added to request. /// @@ -75,7 +80,7 @@ public partial interface IVirtualMachineExtensionImagesOperations /// /// Thrown when unable to deserialize the response /// - System.Threading.Tasks.Task>> ListVersionsWithHttpMessagesAsync(string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + System.Threading.Tasks.Task>> ListVersionsWithHttpMessagesAsync(string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); /// /// Gets a virtual machine extension image. diff --git a/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations.cs new file mode 100644 index 000000000000..6616e42e0b10 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations.cs @@ -0,0 +1,311 @@ +// 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.Azure; + using Models; + + /// + /// VirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations. + /// + public partial interface IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations + { + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// 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 + /// + System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to get the VMSS VM diagnostic run command. + /// + /// + /// The operation to get the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic 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 + /// + System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Resource create parameters. + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic 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 + /// + System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Resource create parameters. + /// + /// + /// 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 + /// + System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetsOperations.cs index ae2220e22df6..bf8958171bf6 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/IVirtualMachineScaleSetsOperations.cs @@ -441,6 +441,34 @@ public partial interface IVirtualMachineScaleSetsOperations /// System.Threading.Tasks.Task UpdateInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, System.Collections.Generic.IList instanceIds, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + /// + /// The input object for the MigrateVMAvailabilityZone API. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> MigrateVMAvailabilityZoneWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Gets list of OS upgrades on a VM scale set instance. /// @@ -1017,6 +1045,34 @@ public partial interface IVirtualMachineScaleSetsOperations /// System.Threading.Tasks.Task BeginUpdateInstancesWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, System.Collections.Generic.IList instanceIds, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + /// + /// The input object for the MigrateVMAvailabilityZone API. + /// + /// + /// The headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + System.Threading.Tasks.Task> BeginMigrateVMAvailabilityZoneWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)); + /// /// Perform maintenance on one or more virtual machines in a VM scale set. /// Operation on instances which are not eligible for perform maintenance will diff --git a/src/Compute/Compute.Management.Sdk/Generated/ImagesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/ImagesOperations.cs index 278a5acb6fc8..b2ed9223ccdb 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/ImagesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/ImagesOperations.cs @@ -81,7 +81,7 @@ internal ImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -297,7 +297,7 @@ internal ImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -525,7 +525,7 @@ internal ImagesOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -839,7 +839,7 @@ internal ImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "imageName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1110,7 +1110,7 @@ internal ImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "imageName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1371,7 +1371,7 @@ internal ImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "imageName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/InterconnectBlocksOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/InterconnectBlocksOperations.cs index 9136b67b6a31..a1db30e60a2d 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/InterconnectBlocksOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/InterconnectBlocksOperations.cs @@ -80,7 +80,7 @@ internal InterconnectBlocksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -296,7 +296,7 @@ internal InterconnectBlocksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -526,7 +526,7 @@ internal InterconnectBlocksOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -845,7 +845,7 @@ internal InterconnectBlocksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "interconnectBlockName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1117,7 +1117,7 @@ internal InterconnectBlocksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "interconnectBlockName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1362,7 +1362,7 @@ internal InterconnectBlocksOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "interconnectBlockName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/LogAnalyticsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/LogAnalyticsOperations.cs index 915fda873af1..e8d9ad2fd71f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/LogAnalyticsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/LogAnalyticsOperations.cs @@ -151,7 +151,7 @@ internal LogAnalyticsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -382,7 +382,7 @@ internal LogAnalyticsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/AdditionalDiskProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/AdditionalDiskProperties.cs new file mode 100644 index 000000000000..8804de96480d --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/AdditionalDiskProperties.cs @@ -0,0 +1,64 @@ +// 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 additional properties for a managed disk that can be set at the + /// time of implicit creation of the disk. + /// + public partial class AdditionalDiskProperties + { + /// + /// Initializes a new instance of the AdditionalDiskProperties class. + /// + public AdditionalDiskProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the AdditionalDiskProperties class. + /// + + /// Specifies the managed disk properties that can be set at the time of + /// implicit creation of the disk. + /// + public AdditionalDiskProperties(ManagedDiskProperties managedDiskProperties = default(ManagedDiskProperties)) + + { + this.ManagedDiskProperties = managedDiskProperties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets specifies the managed disk properties that can be set at the + /// time of implicit creation of the disk. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "managedDiskProperties")] + public ManagedDiskProperties ManagedDiskProperties {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.ManagedDiskProperties != null) + { + this.ManagedDiskProperties.Validate(); + } + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservation.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservation.cs index 2e8b65024e3e..079609a781f7 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservation.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservation.cs @@ -57,13 +57,16 @@ public CapacityReservation() /// The availability zones. /// - /// Defines the schedule for Block-type capacity reservations. Specifies the - /// schedule during which capacity reservation is active and VM or VMSS - /// resource can be allocated using reservation. This property is required and - /// only supported when the capacity reservation group type is 'Block'. The - /// scheduleProfile, start, and end fields are immutable after creation. - /// Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Defines the schedule for Block and Future capacity reservations. Specifies + /// the schedule during which capacity reservation is active and VM or VMSS + /// resource can be allocated using reservation. For Block capacity + /// reservations, the scheduleProfile, start, and end fields are immutable + /// after creation. Please refer to https://aka.ms/blockcapacityreservation for + /// more details. Minimum API version for Block capacity reservations: + /// 2025-04-01. Future capacity reservations must use this property with only a + /// start time, which can be changed until the ‘modifiableUntil’ time. Please + /// refer to https://aka.ms/futurecapacityreservation for more details. Minimum + /// API version for Future capacity reservations: 2026-04-01. /// /// A unique id generated and assigned to the capacity reservation by the @@ -138,13 +141,17 @@ public CapacityReservation() public System.Collections.Generic.IList Zones {get; set; } /// - /// Gets or sets defines the schedule for Block-type capacity reservations. - /// Specifies the schedule during which capacity reservation is active and VM - /// or VMSS resource can be allocated using reservation. This property is - /// required and only supported when the capacity reservation group type is - /// 'Block'. The scheduleProfile, start, and end fields are immutable after - /// creation. Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Gets or sets defines the schedule for Block and Future capacity + /// reservations. Specifies the schedule during which capacity reservation is + /// active and VM or VMSS resource can be allocated using reservation. For + /// Block capacity reservations, the scheduleProfile, start, and end fields are + /// immutable after creation. Please refer to + /// https://aka.ms/blockcapacityreservation for more details. Minimum API + /// version for Block capacity reservations: 2025-04-01. Future capacity + /// reservations must use this property with only a start time, which can be + /// changed until the ‘modifiableUntil’ time. Please refer to + /// https://aka.ms/futurecapacityreservation for more details. Minimum API + /// version for Future capacity reservations: 2026-04-01. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scheduleProfile")] public ScheduleProfile ScheduleProfile {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroup.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroup.cs index 461e531f82b8..4f507182f573 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroup.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroup.cs @@ -50,11 +50,18 @@ public CapacityReservationGroup() /// /// Indicates the type of capacity reservation. Allowed values are 'Block' for - /// block capacity reservations and 'Targeted' for reservations that enable a - /// VM to consume a specific capacity reservation when a capacity reservation - /// group is provided. The reservation type is immutable and cannot be changed - /// after it is assigned. - /// Possible values include: 'Targeted', 'Block' + /// block capacity reservations that enable a VM to consume capacity only from + /// this capacity block when it is associated using a capacity reservation + /// group, 'Targeted' for reservations that enable a VM to consume capacity + /// from an explicitly associated capacity reservation group and fall back to + /// the publicly available capacity if the reservation is full, and 'Open' for + /// reservations that a VM consumes when it is eligible from an implicitly + /// associated capacity reservation group with the matching VM size and zone + /// without associating that capacity reservation group and fall back to the + /// publicly available capacity if the reservation is full. The reservation + /// type is immutable and cannot be changed after the capacity reservation + /// group is created. + /// Possible values include: 'Targeted', 'Block', 'Open' /// A list of all capacity reservation resource ids that belong to capacity /// reservation group. @@ -105,10 +112,17 @@ public CapacityReservationGroup() /// /// Gets or sets indicates the type of capacity reservation. Allowed values are - /// 'Block' for block capacity reservations and 'Targeted' for reservations - /// that enable a VM to consume a specific capacity reservation when a capacity - /// reservation group is provided. The reservation type is immutable and cannot - /// be changed after it is assigned. Possible values include: 'Targeted', 'Block' + /// 'Block' for block capacity reservations that enable a VM to consume + /// capacity only from this capacity block when it is associated using a + /// capacity reservation group, 'Targeted' for reservations that enable a VM to + /// consume capacity from an explicitly associated capacity reservation group + /// and fall back to the publicly available capacity if the reservation is + /// full, and 'Open' for reservations that a VM consumes when it is eligible + /// from an implicitly associated capacity reservation group with the matching + /// VM size and zone without associating that capacity reservation group and + /// fall back to the publicly available capacity if the reservation is full. + /// The reservation type is immutable and cannot be changed after the capacity + /// reservation group is created. Possible values include: 'Targeted', 'Block', 'Open' /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.reservationType")] public string ReservationType {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupProperties.cs index eebe8ec1576f..e375aac1463b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupProperties.cs @@ -48,11 +48,18 @@ public CapacityReservationGroupProperties() /// /// Indicates the type of capacity reservation. Allowed values are 'Block' for - /// block capacity reservations and 'Targeted' for reservations that enable a - /// VM to consume a specific capacity reservation when a capacity reservation - /// group is provided. The reservation type is immutable and cannot be changed - /// after it is assigned. - /// Possible values include: 'Targeted', 'Block' + /// block capacity reservations that enable a VM to consume capacity only from + /// this capacity block when it is associated using a capacity reservation + /// group, 'Targeted' for reservations that enable a VM to consume capacity + /// from an explicitly associated capacity reservation group and fall back to + /// the publicly available capacity if the reservation is full, and 'Open' for + /// reservations that a VM consumes when it is eligible from an implicitly + /// associated capacity reservation group with the matching VM size and zone + /// without associating that capacity reservation group and fall back to the + /// publicly available capacity if the reservation is full. The reservation + /// type is immutable and cannot be changed after the capacity reservation + /// group is created. + /// Possible values include: 'Targeted', 'Block', 'Open' public CapacityReservationGroupProperties(System.Collections.Generic.IList capacityReservations = default(System.Collections.Generic.IList), System.Collections.Generic.IList virtualMachinesAssociated = default(System.Collections.Generic.IList), CapacityReservationGroupInstanceView instanceView = default(CapacityReservationGroupInstanceView), ResourceSharingProfile sharingProfile = default(ResourceSharingProfile), string reservationType = default(string)) { @@ -107,10 +114,17 @@ public CapacityReservationGroupProperties() /// /// Gets or sets indicates the type of capacity reservation. Allowed values are - /// 'Block' for block capacity reservations and 'Targeted' for reservations - /// that enable a VM to consume a specific capacity reservation when a capacity - /// reservation group is provided. The reservation type is immutable and cannot - /// be changed after it is assigned. Possible values include: 'Targeted', 'Block' + /// 'Block' for block capacity reservations that enable a VM to consume + /// capacity only from this capacity block when it is associated using a + /// capacity reservation group, 'Targeted' for reservations that enable a VM to + /// consume capacity from an explicitly associated capacity reservation group + /// and fall back to the publicly available capacity if the reservation is + /// full, and 'Open' for reservations that a VM consumes when it is eligible + /// from an implicitly associated capacity reservation group with the matching + /// VM size and zone without associating that capacity reservation group and + /// fall back to the publicly available capacity if the reservation is full. + /// The reservation type is immutable and cannot be changed after the capacity + /// reservation group is created. Possible values include: 'Targeted', 'Block', 'Open' /// [Newtonsoft.Json.JsonProperty(PropertyName = "reservationType")] public string ReservationType {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupUpdate.cs index 6baaf9652235..eeaebf438805 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationGroupUpdate.cs @@ -30,11 +30,18 @@ public CapacityReservationGroupUpdate() /// /// Indicates the type of capacity reservation. Allowed values are 'Block' for - /// block capacity reservations and 'Targeted' for reservations that enable a - /// VM to consume a specific capacity reservation when a capacity reservation - /// group is provided. The reservation type is immutable and cannot be changed - /// after it is assigned. - /// Possible values include: 'Targeted', 'Block' + /// block capacity reservations that enable a VM to consume capacity only from + /// this capacity block when it is associated using a capacity reservation + /// group, 'Targeted' for reservations that enable a VM to consume capacity + /// from an explicitly associated capacity reservation group and fall back to + /// the publicly available capacity if the reservation is full, and 'Open' for + /// reservations that a VM consumes when it is eligible from an implicitly + /// associated capacity reservation group with the matching VM size and zone + /// without associating that capacity reservation group and fall back to the + /// publicly available capacity if the reservation is full. The reservation + /// type is immutable and cannot be changed after the capacity reservation + /// group is created. + /// Possible values include: 'Targeted', 'Block', 'Open' /// A list of all capacity reservation resource ids that belong to capacity /// reservation group. @@ -78,10 +85,17 @@ public CapacityReservationGroupUpdate() /// /// Gets or sets indicates the type of capacity reservation. Allowed values are - /// 'Block' for block capacity reservations and 'Targeted' for reservations - /// that enable a VM to consume a specific capacity reservation when a capacity - /// reservation group is provided. The reservation type is immutable and cannot - /// be changed after it is assigned. Possible values include: 'Targeted', 'Block' + /// 'Block' for block capacity reservations that enable a VM to consume + /// capacity only from this capacity block when it is associated using a + /// capacity reservation group, 'Targeted' for reservations that enable a VM to + /// consume capacity from an explicitly associated capacity reservation group + /// and fall back to the publicly available capacity if the reservation is + /// full, and 'Open' for reservations that a VM consumes when it is eligible + /// from an implicitly associated capacity reservation group with the matching + /// VM size and zone without associating that capacity reservation group and + /// fall back to the publicly available capacity if the reservation is full. + /// The reservation type is immutable and cannot be changed after the capacity + /// reservation group is created. Possible values include: 'Targeted', 'Block', 'Open' /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.reservationType")] public string ReservationType {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceView.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceView.cs index b7adc685d3c4..08852a0218f5 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceView.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceView.cs @@ -31,11 +31,17 @@ public CapacityReservationInstanceView() /// The resource status information. /// - public CapacityReservationInstanceView(CapacityReservationUtilization utilizationInfo = default(CapacityReservationUtilization), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList)) + + /// The reservation state information for a capacity reservation, this detail + /// is primarily provided for Future capacity reservations. Minimum API + /// version: 2026-04-01. + /// + public CapacityReservationInstanceView(CapacityReservationUtilization utilizationInfo = default(CapacityReservationUtilization), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), CapacityReservationStateInfo reservationStateInfo = default(CapacityReservationStateInfo)) { this.UtilizationInfo = utilizationInfo; this.Statuses = statuses; + this.ReservationStateInfo = reservationStateInfo; CustomInit(); } @@ -56,5 +62,13 @@ public CapacityReservationInstanceView() /// [Newtonsoft.Json.JsonProperty(PropertyName = "statuses")] public System.Collections.Generic.IList Statuses {get; set; } + + /// + /// Gets or sets the reservation state information for a capacity reservation, + /// this detail is primarily provided for Future capacity reservations. Minimum + /// API version: 2026-04-01. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "reservationStateInfo")] + public CapacityReservationStateInfo ReservationStateInfo {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceViewWithName.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceViewWithName.cs index 0cd9ca524cee..0e2223f007e5 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceViewWithName.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationInstanceViewWithName.cs @@ -32,11 +32,16 @@ public CapacityReservationInstanceViewWithName() /// The resource status information. /// + /// The reservation state information for a capacity reservation, this detail + /// is primarily provided for Future capacity reservations. Minimum API + /// version: 2026-04-01. + /// + /// The name of the capacity reservation. /// - public CapacityReservationInstanceViewWithName(CapacityReservationUtilization utilizationInfo = default(CapacityReservationUtilization), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), string name = default(string)) + public CapacityReservationInstanceViewWithName(CapacityReservationUtilization utilizationInfo = default(CapacityReservationUtilization), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), CapacityReservationStateInfo reservationStateInfo = default(CapacityReservationStateInfo), string name = default(string)) - : base(utilizationInfo, statuses) + : base(utilizationInfo, statuses, reservationStateInfo) { this.Name = name; CustomInit(); diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProfile.cs index 942684d4fcbc..901b4dad4da9 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProfile.cs @@ -29,10 +29,18 @@ public CapacityReservationProfile() /// capacity has been reserved. Please refer to /// https://aka.ms/CapacityReservation for more details. /// - public CapacityReservationProfile(SubResource capacityReservationGroup = default(SubResource)) + + /// Specifies whether the virtual machine is explicitly opted out from being + /// associated with any capacity reservation. When set to true, the virtual + /// machine will not be allowed to implicitly or explicitly associate with any + /// type of capacity reservation and will consume capacity from the publicly + /// available capacity. Minimum api-version: 2026-04-01. + /// + public CapacityReservationProfile(SubResource capacityReservationGroup = default(SubResource), bool? disableCapacityReservationAssignment = default(bool?)) { this.CapacityReservationGroup = capacityReservationGroup; + this.DisableCapacityReservationAssignment = disableCapacityReservationAssignment; CustomInit(); } @@ -50,5 +58,15 @@ public CapacityReservationProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "capacityReservationGroup")] public SubResource CapacityReservationGroup {get; set; } + + /// + /// Gets or sets specifies whether the virtual machine is explicitly opted out + /// from being associated with any capacity reservation. When set to true, the + /// virtual machine will not be allowed to implicitly or explicitly associate + /// with any type of capacity reservation and will consume capacity from the + /// publicly available capacity. Minimum api-version: 2026-04-01. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "disableCapacityReservationAssignment")] + public bool? DisableCapacityReservationAssignment {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProperties.cs index 6aa053d70279..915504c24261 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationProperties.cs @@ -52,13 +52,16 @@ public CapacityReservationProperties() /// Minimum api-version: 2021-11-01. /// - /// Defines the schedule for Block-type capacity reservations. Specifies the - /// schedule during which capacity reservation is active and VM or VMSS - /// resource can be allocated using reservation. This property is required and - /// only supported when the capacity reservation group type is 'Block'. The - /// scheduleProfile, start, and end fields are immutable after creation. - /// Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Defines the schedule for Block and Future capacity reservations. Specifies + /// the schedule during which capacity reservation is active and VM or VMSS + /// resource can be allocated using reservation. For Block capacity + /// reservations, the scheduleProfile, start, and end fields are immutable + /// after creation. Please refer to https://aka.ms/blockcapacityreservation for + /// more details. Minimum API version for Block capacity reservations: + /// 2025-04-01. Future capacity reservations must use this property with only a + /// start time, which can be changed until the ‘modifiableUntil’ time. Please + /// refer to https://aka.ms/futurecapacityreservation for more details. Minimum + /// API version for Future capacity reservations: 2026-04-01. /// public CapacityReservationProperties(string reservationId = default(string), int? platformFaultDomainCount = default(int?), System.Collections.Generic.IList virtualMachinesAssociated = default(System.Collections.Generic.IList), System.DateTime? provisioningTime = default(System.DateTime?), string provisioningState = default(string), CapacityReservationInstanceView instanceView = default(CapacityReservationInstanceView), System.DateTime? timeCreated = default(System.DateTime?), ScheduleProfile scheduleProfile = default(ScheduleProfile)) @@ -130,13 +133,17 @@ public CapacityReservationProperties() public System.DateTime? TimeCreated {get; private set; } /// - /// Gets or sets defines the schedule for Block-type capacity reservations. - /// Specifies the schedule during which capacity reservation is active and VM - /// or VMSS resource can be allocated using reservation. This property is - /// required and only supported when the capacity reservation group type is - /// 'Block'. The scheduleProfile, start, and end fields are immutable after - /// creation. Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Gets or sets defines the schedule for Block and Future capacity + /// reservations. Specifies the schedule during which capacity reservation is + /// active and VM or VMSS resource can be allocated using reservation. For + /// Block capacity reservations, the scheduleProfile, start, and end fields are + /// immutable after creation. Please refer to + /// https://aka.ms/blockcapacityreservation for more details. Minimum API + /// version for Block capacity reservations: 2025-04-01. Future capacity + /// reservations must use this property with only a start time, which can be + /// changed until the ‘modifiableUntil’ time. Please refer to + /// https://aka.ms/futurecapacityreservation for more details. Minimum API + /// version for Future capacity reservations: 2026-04-01. /// [Newtonsoft.Json.JsonProperty(PropertyName = "scheduleProfile")] public ScheduleProfile ScheduleProfile {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationStateInfo.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationStateInfo.cs new file mode 100644 index 000000000000..48bce330e7af --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationStateInfo.cs @@ -0,0 +1,49 @@ +// 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; + + /// + /// Details related to the current state for a Future capacity reservation. + /// + public partial class CapacityReservationStateInfo + { + /// + /// Initializes a new instance of the CapacityReservationStateInfo class. + /// + public CapacityReservationStateInfo() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the CapacityReservationStateInfo class. + /// + + /// The current state of the capacity reservation. + /// Possible values include: 'Pending', 'Declined', 'Approved', + /// 'FulfillmentFailed', 'Committed', 'Live', 'PartiallyFulfilled' + public CapacityReservationStateInfo(string reservationState = default(string)) + + { + this.ReservationState = reservationState; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the current state of the capacity reservation. Possible values include: 'Pending', 'Declined', 'Approved', 'FulfillmentFailed', 'Committed', 'Live', 'PartiallyFulfilled' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "reservationState")] + public string ReservationState {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationType.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationType.cs new file mode 100644 index 000000000000..28dc3d2f965c --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationType.cs @@ -0,0 +1,53 @@ +// 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 CapacityReservationType. + /// + + + public static class CapacityReservationType + { + /// + /// The virtual machine is not eligible to be implicitly associated with an + /// open capacity reservation and is not explicitly associated with any + /// capacity reservation group, so it will consume capacity from the publicly + /// available capacity. + /// + public const string NotEligible = "NotEligible"; + /// + /// The virtual machine will consume capacity from a specific matching capacity + /// reservation when associated with a capacity reservation group resource of + /// type targeted, but can fall back to consume capacity from the publicly + /// available capacity if there is no capacity available in the targeted + /// reservation. + /// + public const string Targeted = "Targeted"; + /// + /// The virtual machine if eligible will implicitly associate and consume any + /// available capacity from a matching open capacity reservation created or + /// shared in the subscription. **Note:** The VM should not be explicitly + /// associated with the open capacity reservation group resource containing the + /// matching reservation. + /// + public const string Open = "Open"; + /// + /// The virtual machine has capacity reservation assignment disabled and will + /// not be allowed to implicitly or explicitly associate with any type of + /// capacity reservation. + /// + public const string Disabled = "Disabled"; + /// + /// The virtual machine consumes capacity from a specific matching capacity + /// reservation when associated with a capacity reservation group resource of + /// type block, and will hit capacity failures if there is no available + /// capacity in the block reservation. + /// + public const string Block = "Block"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUpdate.cs index 47f0a86be497..709206b387f2 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUpdate.cs @@ -42,13 +42,16 @@ public CapacityReservationUpdate() /// Block capacity reservations. /// - /// Defines the schedule for Block-type capacity reservations. Specifies the - /// schedule during which capacity reservation is active and VM or VMSS - /// resource can be allocated using reservation. This property is required and - /// only supported when the capacity reservation group type is 'Block'. The - /// scheduleProfile, start, and end fields are immutable after creation. - /// Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Defines the schedule for Block and Future capacity reservations. Specifies + /// the schedule during which capacity reservation is active and VM or VMSS + /// resource can be allocated using reservation. For Block capacity + /// reservations, the scheduleProfile, start, and end fields are immutable + /// after creation. Please refer to https://aka.ms/blockcapacityreservation for + /// more details. Minimum API version for Block capacity reservations: + /// 2025-04-01. Future capacity reservations must use this property with only a + /// start time, which can be changed until the ‘modifiableUntil’ time. Please + /// refer to https://aka.ms/futurecapacityreservation for more details. Minimum + /// API version for Future capacity reservations: 2026-04-01. /// /// A unique id generated and assigned to the capacity reservation by the @@ -116,13 +119,17 @@ public CapacityReservationUpdate() public Sku Sku {get; set; } /// - /// Gets or sets defines the schedule for Block-type capacity reservations. - /// Specifies the schedule during which capacity reservation is active and VM - /// or VMSS resource can be allocated using reservation. This property is - /// required and only supported when the capacity reservation group type is - /// 'Block'. The scheduleProfile, start, and end fields are immutable after - /// creation. Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Gets or sets defines the schedule for Block and Future capacity + /// reservations. Specifies the schedule during which capacity reservation is + /// active and VM or VMSS resource can be allocated using reservation. For + /// Block capacity reservations, the scheduleProfile, start, and end fields are + /// immutable after creation. Please refer to + /// https://aka.ms/blockcapacityreservation for more details. Minimum API + /// version for Block capacity reservations: 2025-04-01. Future capacity + /// reservations must use this property with only a start time, which can be + /// changed until the ‘modifiableUntil’ time. Please refer to + /// https://aka.ms/futurecapacityreservation for more details. Minimum API + /// version for Future capacity reservations: 2026-04-01. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.scheduleProfile")] public ScheduleProfile ScheduleProfile {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUtilization.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUtilization.cs index 2198d613d424..ce1c09c4e480 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUtilization.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/CapacityReservationUtilization.cs @@ -33,11 +33,21 @@ public CapacityReservationUtilization() /// A list of all virtual machines resource ids allocated against the capacity /// reservation. /// - public CapacityReservationUtilization(int? currentCapacity = default(int?), System.Collections.Generic.IList virtualMachinesAllocated = default(System.Collections.Generic.IList)) + + /// For open capacity reservations, this provides a map of the used reserved + /// capacity count keyed by the subscription id (a GUID) that is consuming the + /// capacity, i.e. each entry maps a consuming subscription id to the count of + /// reserved capacity it is currently using. This is populated only for open + /// capacity reservations and is not reported for targeted and block capacity + /// reservations, which instead report allocation through + /// virtualMachinesAllocated. Minimum api-version: 2026-04-01. + /// + public CapacityReservationUtilization(int? currentCapacity = default(int?), System.Collections.Generic.IList virtualMachinesAllocated = default(System.Collections.Generic.IList), System.Collections.Generic.IDictionary usedReservedCountBySubscription = default(System.Collections.Generic.IDictionary)) { this.CurrentCapacity = currentCapacity; this.VirtualMachinesAllocated = virtualMachinesAllocated; + this.UsedReservedCountBySubscription = usedReservedCountBySubscription; CustomInit(); } @@ -61,5 +71,17 @@ public CapacityReservationUtilization() /// [Newtonsoft.Json.JsonProperty(PropertyName = "virtualMachinesAllocated")] public System.Collections.Generic.IList VirtualMachinesAllocated {get; private set; } + + /// + /// Gets for open capacity reservations, this provides a map of the used + /// reserved capacity count keyed by the subscription id (a GUID) that is + /// consuming the capacity, i.e. each entry maps a consuming subscription id to + /// the count of reserved capacity it is currently using. This is populated + /// only for open capacity reservations and is not reported for targeted and + /// block capacity reservations, which instead report allocation through + /// virtualMachinesAllocated. Minimum api-version: 2026-04-01. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "usedReservedCountBySubscription")] + public System.Collections.Generic.IDictionary UsedReservedCountBySubscription {get; private set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ConfidentialVMVersion.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ConfidentialVMVersion.cs new file mode 100644 index 000000000000..68216a71cbd0 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ConfidentialVMVersion.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 ConfidentialVMVersion. + /// + + + public static class ConfidentialVMVersion + { + /// + /// V1 indicates the resource does not have an associated Virtual Machine + /// Metadata. + /// + public const string V1 = "V1"; + /// + /// V2 indicates the resource has an associated Virtual Machine Metadata. + /// + public const string V2 = "V2"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/DataDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/DataDisk.cs index 04173b5a9931..e097a783cabc 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/DataDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/DataDisk.cs @@ -286,7 +286,10 @@ public virtual void Validate() - + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskApiVersion.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskApiVersion.cs new file mode 100644 index 000000000000..bee266a6fafe --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskApiVersion.cs @@ -0,0 +1,25 @@ +// 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 DiskApiVersion. + /// + + + public static class DiskApiVersion + { + /// + /// The 2025-01-02 Disk RP API version. + /// + public const string TwoThousandTwentyFive0102 = "2025-01-02"; + /// + /// The 2026-03-02 Disk RP API version. + /// + public const string TwoThousandTwentySix0302 = "2026-03-02"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskAvailabilityPolicy.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskAvailabilityPolicy.cs new file mode 100644 index 000000000000..ab52561e048d --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskAvailabilityPolicy.cs @@ -0,0 +1,49 @@ +// 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; + + /// + /// In the case of an availability or connectivity issue with the disk, specify + /// the behavior of your VM. + /// + public partial class DiskAvailabilityPolicy + { + /// + /// Initializes a new instance of the DiskAvailabilityPolicy class. + /// + public DiskAvailabilityPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the DiskAvailabilityPolicy class. + /// + + /// Determines how to handle disks with slow I/O. + /// Possible values include: 'None', 'AutomaticReattach' + public DiskAvailabilityPolicy(string actionOnDiskDelay = default(string)) + + { + this.ActionOnDiskDelay = actionOnDiskDelay; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets determines how to handle disks with slow I/O. Possible values include: 'None', 'AutomaticReattach' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "actionOnDiskDelay")] + public string ActionOnDiskDelay {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePoint.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePoint.cs index 376a7be73eb5..ec995a4b2d27 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePoint.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePoint.cs @@ -98,7 +98,12 @@ public DiskRestorePoint() /// PremiumV2_LRS disks. Supported values are 512 and 4096. 4096 is the /// default. /// - public DiskRestorePoint(string id = default(string), string name = default(string), string type = default(string), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), Encryption encryption = default(Encryption), System.DateTime? timeCreated = default(System.DateTime?), string sourceResourceId = default(string), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), string familyId = default(string), string sourceUniqueId = default(string), bool? supportsHibernation = default(bool?), string networkAccessPolicy = default(string), string publicNetworkAccess = default(string), string diskAccessId = default(string), double? completionPercent = default(double?), string replicationState = default(string), string sourceResourceLocation = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), int? logicalSectorSize = default(int?)) + + /// The state of snapshot which determines the access availability of the + /// snapshot. + /// Possible values include: 'Unknown', 'Pending', 'Available', + /// 'InstantAccess', 'AvailableWithInstantAccess' + public DiskRestorePoint(string id = default(string), string name = default(string), string type = default(string), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), Encryption encryption = default(Encryption), System.DateTime? timeCreated = default(System.DateTime?), string sourceResourceId = default(string), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), string familyId = default(string), string sourceUniqueId = default(string), bool? supportsHibernation = default(bool?), string networkAccessPolicy = default(string), string publicNetworkAccess = default(string), string diskAccessId = default(string), double? completionPercent = default(double?), string replicationState = default(string), string sourceResourceLocation = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), int? logicalSectorSize = default(int?), string snapshotAccessState = default(string)) : base(id, name, type) { @@ -120,6 +125,7 @@ public DiskRestorePoint() this.SourceResourceLocation = sourceResourceLocation; this.SecurityProfile = securityProfile; this.LogicalSectorSize = logicalSectorSize; + this.SnapshotAccessState = snapshotAccessState; CustomInit(); } @@ -246,6 +252,13 @@ public DiskRestorePoint() /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.logicalSectorSize")] public int? LogicalSectorSize {get; private set; } + + /// + /// Gets the state of snapshot which determines the access availability of the + /// snapshot. Possible values include: 'Unknown', 'Pending', 'Available', 'InstantAccess', 'AvailableWithInstantAccess' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.snapshotAccessState")] + public string SnapshotAccessState {get; private set; } /// /// Validate the object. /// @@ -271,6 +284,7 @@ public virtual void Validate() + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePointProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePointProperties.cs index 683d38d1f686..1237a43996ee 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePointProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskRestorePointProperties.cs @@ -86,7 +86,12 @@ public DiskRestorePointProperties() /// PremiumV2_LRS disks. Supported values are 512 and 4096. 4096 is the /// default. /// - public DiskRestorePointProperties(System.DateTime? timeCreated = default(System.DateTime?), string sourceResourceId = default(string), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), string familyId = default(string), string sourceUniqueId = default(string), Encryption encryption = default(Encryption), bool? supportsHibernation = default(bool?), string networkAccessPolicy = default(string), string publicNetworkAccess = default(string), string diskAccessId = default(string), double? completionPercent = default(double?), string replicationState = default(string), string sourceResourceLocation = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), int? logicalSectorSize = default(int?)) + + /// The state of snapshot which determines the access availability of the + /// snapshot. + /// Possible values include: 'Unknown', 'Pending', 'Available', + /// 'InstantAccess', 'AvailableWithInstantAccess' + public DiskRestorePointProperties(System.DateTime? timeCreated = default(System.DateTime?), string sourceResourceId = default(string), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), string familyId = default(string), string sourceUniqueId = default(string), Encryption encryption = default(Encryption), bool? supportsHibernation = default(bool?), string networkAccessPolicy = default(string), string publicNetworkAccess = default(string), string diskAccessId = default(string), double? completionPercent = default(double?), string replicationState = default(string), string sourceResourceLocation = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), int? logicalSectorSize = default(int?), string snapshotAccessState = default(string)) { this.TimeCreated = timeCreated; @@ -107,6 +112,7 @@ public DiskRestorePointProperties() this.SourceResourceLocation = sourceResourceLocation; this.SecurityProfile = securityProfile; this.LogicalSectorSize = logicalSectorSize; + this.SnapshotAccessState = snapshotAccessState; CustomInit(); } @@ -233,6 +239,13 @@ public DiskRestorePointProperties() /// [Newtonsoft.Json.JsonProperty(PropertyName = "logicalSectorSize")] public int? LogicalSectorSize {get; private set; } + + /// + /// Gets the state of snapshot which determines the access availability of the + /// snapshot. Possible values include: 'Unknown', 'Pending', 'Available', 'InstantAccess', 'AvailableWithInstantAccess' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "snapshotAccessState")] + public string SnapshotAccessState {get; private set; } /// /// Validate the object. /// @@ -258,6 +271,7 @@ public virtual void Validate() + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskSecurityProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskSecurityProfile.cs index 8e77b1e71d49..fafe2db692eb 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/DiskSecurityProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/DiskSecurityProfile.cs @@ -34,11 +34,15 @@ public DiskSecurityProfile() /// ResourceId of the disk encryption set associated to Confidential VM /// supported disk encrypted with customer managed key /// - public DiskSecurityProfile(string securityType = default(string), string secureVMDiskEncryptionSetId = default(string)) + + /// Indicates the version of Confidential VM for the resource. + /// Possible values include: 'V1', 'V2' + public DiskSecurityProfile(string securityType = default(string), string secureVMDiskEncryptionSetId = default(string), string confidentialVMVersion = default(string)) { this.SecurityType = securityType; this.SecureVMDiskEncryptionSetId = secureVMDiskEncryptionSetId; + this.ConfidentialVMVersion = confidentialVMVersion; CustomInit(); } @@ -61,5 +65,11 @@ public DiskSecurityProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "secureVMDiskEncryptionSetId")] public string SecureVMDiskEncryptionSetId {get; set; } + + /// + /// Gets indicates the version of Confidential VM for the resource. Possible values include: 'V1', 'V2' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "confidentialVMVersion")] + public string ConfidentialVMVersion {get; private set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ExtensionFeatureMetadata.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ExtensionFeatureMetadata.cs new file mode 100644 index 000000000000..73d7677d998e --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ExtensionFeatureMetadata.cs @@ -0,0 +1,51 @@ +// 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; + + /// + /// Additional metadata about extension features, including compliance and + /// capability tags. + /// + public partial class ExtensionFeatureMetadata + { + /// + /// Initializes a new instance of the ExtensionFeatureMetadata class. + /// + public ExtensionFeatureMetadata() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExtensionFeatureMetadata class. + /// + + /// List of additional metadata properties (e.g., compliance flags, supported + /// features). + /// + public ExtensionFeatureMetadata(System.Collections.Generic.IList extensionFeatureTags = default(System.Collections.Generic.IList)) + + { + this.ExtensionFeatureTags = extensionFeatureTags; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets list of additional metadata properties (e.g., compliance + /// flags, supported features). + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "extensionFeatureTags")] + public System.Collections.Generic.IList ExtensionFeatureTags {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ExtensionFeatureTag.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ExtensionFeatureTag.cs new file mode 100644 index 000000000000..ef985264ae34 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ExtensionFeatureTag.cs @@ -0,0 +1,73 @@ +// 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; + + /// + /// Represents a key-value pair for extension feature metadata. + /// + public partial class ExtensionFeatureTag + { + /// + /// Initializes a new instance of the ExtensionFeatureTag class. + /// + public ExtensionFeatureTag() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ExtensionFeatureTag class. + /// + + /// The key of the feature tag. + /// + + /// The value of the feature tag. + /// + public ExtensionFeatureTag(string key, string value = default(string)) + + { + this.Key = key; + this.Value = value; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the key of the feature tag. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "key")] + public string Key {get; set; } + + /// + /// Gets or sets the value of the feature tag. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "value")] + public string Value {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Key == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Key"); + } + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/GallerySharingAcceptHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/GallerySharingAcceptHeaders.cs new file mode 100644 index 000000000000..d5136e8b4d84 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/GallerySharingAcceptHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class GallerySharingAcceptHeaders + { + /// + /// Initializes a new instance of the GallerySharingAcceptHeaders class. + /// + public GallerySharingAcceptHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GallerySharingAcceptHeaders class. + /// + + /// + /// + + /// + /// + public GallerySharingAcceptHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/GallerySharingRejectHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/GallerySharingRejectHeaders.cs new file mode 100644 index 000000000000..2d7d1459ae5a --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/GallerySharingRejectHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class GallerySharingRejectHeaders + { + /// + /// Initializes a new instance of the GallerySharingRejectHeaders class. + /// + public GallerySharingRejectHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the GallerySharingRejectHeaders class. + /// + + /// + /// + + /// + /// + public GallerySharingRejectHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/HardwareProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/HardwareProfile.cs index 55fd50ca6b6a..94105f91f612 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/HardwareProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/HardwareProfile.cs @@ -86,11 +86,18 @@ public HardwareProfile() /// is not supported for VirtualMachineScaleSet. Please follow the instructions /// in [VM Customization](https://aka.ms/vmcustomization) for more details. /// - public HardwareProfile(string vmSize = default(string), VMSizeProperties vmSizeProperties = default(VMSizeProperties)) + + /// Specifies the processor mode for the virtual machine or virtual machine + /// scale set. Optional; if omitted, the platform default applies (currently + /// Deterministic). This property can be updated on a running VM or VMSS + /// without deallocation or reboot. Minimum api-version: 2026-04-01. + /// Possible values include: 'Deterministic', 'Opportunistic' + public HardwareProfile(string vmSize = default(string), VMSizeProperties vmSizeProperties = default(VMSizeProperties), string processorMode = default(string)) { this.VmSize = vmSize; this.VmSizeProperties = vmSizeProperties; + this.ProcessorMode = processorMode; CustomInit(); } @@ -126,5 +133,15 @@ public HardwareProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "vmSizeProperties")] public VMSizeProperties VmSizeProperties {get; set; } + + /// + /// Gets or sets specifies the processor mode for the virtual machine or + /// virtual machine scale set. Optional; if omitted, the platform default + /// applies (currently Deterministic). This property can be updated on a + /// running VM or VMSS without deallocation or reboot. Minimum api-version: + /// 2026-04-01. Possible values include: 'Deterministic', 'Opportunistic' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "processorMode")] + public string ProcessorMode {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/HostEndpointSettings.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/HostEndpointSettings.cs index d31e6b665f73..9422b7d5d4a0 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/HostEndpointSettings.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/HostEndpointSettings.cs @@ -34,11 +34,16 @@ public HostEndpointSettings() /// Specifies the InVMAccessControlProfileVersion resource id in the format of /// /subscriptions/{SubscriptionId}/resourceGroups/{ResourceGroupName}/providers/Microsoft.Compute/galleries/{galleryName}/inVMAccessControlProfiles/{profile}/versions/{version} /// - public HostEndpointSettings(string mode = default(string), string inVMAccessControlProfileReferenceId = default(string)) + + /// When set to true, instructs the GuestProxyAgent inside the VM to load + /// additional access control rules defined in a local file on the VM. + /// + public HostEndpointSettings(string mode = default(string), string inVMAccessControlProfileReferenceId = default(string), bool? useLocalFileRules = default(bool?)) { this.Mode = mode; this.InVMAccessControlProfileReferenceId = inVMAccessControlProfileReferenceId; + this.UseLocalFileRules = useLocalFileRules; CustomInit(); } @@ -65,5 +70,12 @@ public HostEndpointSettings() /// [Newtonsoft.Json.JsonProperty(PropertyName = "inVMAccessControlProfileReferenceId")] public string InVMAccessControlProfileReferenceId {get; set; } + + /// + /// Gets or sets when set to true, instructs the GuestProxyAgent inside the VM + /// to load additional access control rules defined in a local file on the VM. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "useLocalFileRules")] + public bool? UseLocalFileRules {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicy.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicy.cs new file mode 100644 index 000000000000..a447f4ec4a50 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicy.cs @@ -0,0 +1,88 @@ +// 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; + + /// + /// The immutability policy currently applied to a snapshot. + /// + public partial class ImmutabilityPolicy + { + /// + /// Initializes a new instance of the ImmutabilityPolicy class. + /// + public ImmutabilityPolicy() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImmutabilityPolicy class. + /// + + /// The immutability duration for the snapshot, in number of days. + /// + + /// The type of the immutability policy. + /// Possible values include: 'Unlocked', 'Locked' + + /// The time when the immutability policy was set on the snapshot. + /// + + /// The time when the immutability policy will expire on the snapshot. + /// + + /// Indicates whether the immutability policy has expired. + /// + public ImmutabilityPolicy(int? immutabilityDurationDays = default(int?), string type = default(string), System.DateTime? policyStartTime = default(System.DateTime?), System.DateTime? policyExpirationTime = default(System.DateTime?), bool? isPolicyExpired = default(bool?)) + + { + this.ImmutabilityDurationDays = immutabilityDurationDays; + this.Type = type; + this.PolicyStartTime = policyStartTime; + this.PolicyExpirationTime = policyExpirationTime; + this.IsPolicyExpired = isPolicyExpired; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets the immutability duration for the snapshot, in number of days. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "immutabilityDurationDays")] + public int? ImmutabilityDurationDays {get; private set; } + + /// + /// Gets the type of the immutability policy. Possible values include: 'Unlocked', 'Locked' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; private set; } + + /// + /// Gets the time when the immutability policy was set on the snapshot. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "policyStartTime")] + public System.DateTime? PolicyStartTime {get; private set; } + + /// + /// Gets the time when the immutability policy will expire on the snapshot. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "policyExpirationTime")] + public System.DateTime? PolicyExpirationTime {get; private set; } + + /// + /// Gets indicates whether the immutability policy has expired. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "isPolicyExpired")] + public bool? IsPolicyExpired {get; private set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyData.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyData.cs new file mode 100644 index 000000000000..4d9785b32b01 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Compute.Models +{ + using System.Linq; + + /// + /// Data used for updating the immutability policy of a snapshot. + /// + public partial class ImmutabilityPolicyData + { + /// + /// Initializes a new instance of the ImmutabilityPolicyData class. + /// + public ImmutabilityPolicyData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImmutabilityPolicyData class. + /// + + /// The immutability duration for the snapshot, in number of days. + /// + + /// The type of the immutability policy. 'Unlocked' allows the policy to be + /// modified by privileged users; 'Locked' prevents reduction of the + /// immutability duration but allows extension of the lock period. + /// Possible values include: 'Unlocked', 'Locked' + public ImmutabilityPolicyData(int immutabilityDurationDays, string type) + + { + this.ImmutabilityDurationDays = immutabilityDurationDays; + this.Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the immutability duration for the snapshot, in number of days. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "immutabilityDurationDays")] + public int ImmutabilityDurationDays {get; set; } + + /// + /// Gets or sets the type of the immutability policy. 'Unlocked' allows the + /// policy to be modified by privileged users; 'Locked' prevents reduction of + /// the immutability duration but allows extension of the lock period. Possible values include: 'Unlocked', 'Locked' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Type == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type"); + } + if (this.ImmutabilityDurationDays < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "ImmutabilityDurationDays", 1); + } + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyLockData.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyLockData.cs new file mode 100644 index 000000000000..be3963210642 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyLockData.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.Management.Compute.Models +{ + using System.Linq; + + /// + /// Data used for locking the immutability policy of a snapshot. + /// + public partial class ImmutabilityPolicyLockData + { + /// + /// Initializes a new instance of the ImmutabilityPolicyLockData class. + /// + public ImmutabilityPolicyLockData() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ImmutabilityPolicyLockData class. + /// + + /// The immutability duration for the snapshot, in number of days. + /// + + /// The type of the immutability policy. 'Unlocked' allows the policy to be + /// modified by privileged users; 'Locked' prevents reduction of the + /// immutability duration but allows extension of the lock period. + /// Possible values include: 'Unlocked', 'Locked' + public ImmutabilityPolicyLockData(int immutabilityDurationDays, string type) + + { + this.ImmutabilityDurationDays = immutabilityDurationDays; + this.Type = type; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the immutability duration for the snapshot, in number of days. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "immutabilityDurationDays")] + public int ImmutabilityDurationDays {get; set; } + + /// + /// Gets or sets the type of the immutability policy. 'Unlocked' allows the + /// policy to be modified by privileged users; 'Locked' prevents reduction of + /// the immutability duration but allows extension of the lock period. Possible values include: 'Unlocked', 'Locked' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.Type == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "Type"); + } + if (this.ImmutabilityDurationDays < 0) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "ImmutabilityDurationDays", 0); + } + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyType.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyType.cs new file mode 100644 index 000000000000..771c0f9556b5 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ImmutabilityPolicyType.cs @@ -0,0 +1,27 @@ +// 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 ImmutabilityPolicyType. + /// + + + public static class ImmutabilityPolicyType + { + /// + /// Privileged users can modify the snapshot's immutability policy, if it is + /// unlocked type. + /// + public const string Unlocked = "Unlocked"; + /// + /// The snapshot immutability policy duration cannot be reduced but can be + /// extended. The policy cannot be removed until the lock period expires. + /// + public const string Locked = "Locked"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ListVersionsExpandOptions.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ListVersionsExpandOptions.cs new file mode 100644 index 000000000000..41270e00d191 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ListVersionsExpandOptions.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 ListVersionsExpandOptions. + /// + + + public static class ListVersionsExpandOptions + { + /// + /// Expand to include all properties in the response. + /// + public const string Properties = "properties"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskParameters.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskParameters.cs index 526dbfb089b3..593c111f31b6 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskParameters.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskParameters.cs @@ -38,13 +38,19 @@ public ManagedDiskParameters() /// Specifies the security profile for the managed disk. /// - public ManagedDiskParameters(string id = default(string), string storageAccountType = default(string), DiskEncryptionSetParameters diskEncryptionSet = default(DiskEncryptionSetParameters), VMDiskSecurityProfile securityProfile = default(VMDiskSecurityProfile)) + + /// Specifies additional properties for the managed disk that can be set at the + /// time of implicit creation of the disk. This property is not captured for + /// Restore Points. + /// + public ManagedDiskParameters(string id = default(string), string storageAccountType = default(string), DiskEncryptionSetParameters diskEncryptionSet = default(DiskEncryptionSetParameters), VMDiskSecurityProfile securityProfile = default(VMDiskSecurityProfile), AdditionalDiskProperties additionalDiskProperties = default(AdditionalDiskProperties)) : base(id) { this.StorageAccountType = storageAccountType; this.DiskEncryptionSet = diskEncryptionSet; this.SecurityProfile = securityProfile; + this.AdditionalDiskProperties = additionalDiskProperties; CustomInit(); } @@ -74,5 +80,29 @@ public ManagedDiskParameters() /// [Newtonsoft.Json.JsonProperty(PropertyName = "securityProfile")] public VMDiskSecurityProfile SecurityProfile {get; set; } + + /// + /// Gets or sets specifies additional properties for the managed disk that can + /// be set at the time of implicit creation of the disk. This property is not + /// captured for Restore Points. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalDiskProperties")] + public AdditionalDiskProperties AdditionalDiskProperties {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + if (this.AdditionalDiskProperties != null) + { + this.AdditionalDiskProperties.Validate(); + } + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskProperties.cs new file mode 100644 index 000000000000..9c058cf6c279 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ManagedDiskProperties.cs @@ -0,0 +1,207 @@ +// 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 the properties of a managed disk that can be set at the time of + /// implicit creation of the disk. + /// + public partial class ManagedDiskProperties + { + /// + /// Initializes a new instance of the ManagedDiskProperties class. + /// + public ManagedDiskProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the ManagedDiskProperties class. + /// + + /// Performance tier of the disk (e.g., P4, S10) as described here: + /// https://azure.microsoft.com/en-us/pricing/details/managed-disks/. Does not + /// apply to Ultra disks. + /// + + /// Set to true to enable bursting beyond the provisioned performance target of + /// the disk. Bursting is disabled by default. Does not apply to Ultra disks. + /// + + /// Set this flag to true to get a boost on the performance target of the disk + /// deployed. This flag can only be set on disk creation time and cannot be + /// disabled after enabled. + /// + + /// Setting this property to true improves reliability and performance of data + /// disks that are frequently (more than 5 times a day) detached from one + /// virtual machine and attached to another. This property should not be set + /// for disks that are not detached and attached frequently as it causes the + /// disks to not align with the fault domain of the virtual machine. + /// + + /// In the case of an availability or connectivity issue with the disk, specify + /// the behavior of your VM. + /// + + /// The maximum number of VMs that can attach to the disk at the same time. + /// Value greater than one indicates a disk that can be mounted on multiple VMs + /// at the same time. Applies to data disks only. + /// + + /// Policy for accessing the disk via network. + /// Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' + + /// Azure resource Id of the DiskAccess resource for using private endpoints on + /// disks. + /// + + /// The total number of IOPS that will be allowed across all VMs mounting the + /// shared disk as ReadOnly. One operation can transfer between 4k and 256k + /// bytes. + /// + + /// The total throughput (MBps) that will be allowed across all VMs mounting + /// the shared disk as ReadOnly. MBps means millions of bytes per second - MB + /// here uses the ISO notation, of powers of 10. + /// + + /// Logical sector size in bytes for Ultra Disks. Supported values are 512 and + /// 4096. 4096 is the default. + /// + public ManagedDiskProperties(string tier = default(string), bool? burstingEnabled = default(bool?), bool? performancePlus = default(bool?), bool? optimizedForFrequentAttach = default(bool?), DiskAvailabilityPolicy availabilityPolicy = default(DiskAvailabilityPolicy), int? maxShares = default(int?), string networkAccessPolicy = default(string), string diskAccessId = default(string), long? diskIopsReadOnly = default(long?), long? diskMBpsReadOnly = default(long?), int? logicalSectorSize = default(int?)) + + { + this.Tier = tier; + this.BurstingEnabled = burstingEnabled; + this.PerformancePlus = performancePlus; + this.OptimizedForFrequentAttach = optimizedForFrequentAttach; + this.AvailabilityPolicy = availabilityPolicy; + this.MaxShares = maxShares; + this.NetworkAccessPolicy = networkAccessPolicy; + this.DiskAccessId = diskAccessId; + this.DiskIOPSReadOnly = diskIopsReadOnly; + this.DiskMBpsReadOnly = diskMBpsReadOnly; + this.LogicalSectorSize = logicalSectorSize; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets performance tier of the disk (e.g., P4, S10) as described + /// here: https://azure.microsoft.com/en-us/pricing/details/managed-disks/. + /// Does not apply to Ultra disks. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "tier")] + public string Tier {get; set; } + + /// + /// Gets or sets set to true to enable bursting beyond the provisioned + /// performance target of the disk. Bursting is disabled by default. Does not + /// apply to Ultra disks. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "burstingEnabled")] + public bool? BurstingEnabled {get; set; } + + /// + /// Gets or sets set this flag to true to get a boost on the performance target + /// of the disk deployed. This flag can only be set on disk creation time and + /// cannot be disabled after enabled. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "performancePlus")] + public bool? PerformancePlus {get; set; } + + /// + /// Gets or sets setting this property to true improves reliability and + /// performance of data disks that are frequently (more than 5 times a day) + /// detached from one virtual machine and attached to another. This property + /// should not be set for disks that are not detached and attached frequently + /// as it causes the disks to not align with the fault domain of the virtual + /// machine. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "optimizedForFrequentAttach")] + public bool? OptimizedForFrequentAttach {get; set; } + + /// + /// Gets or sets in the case of an availability or connectivity issue with the + /// disk, specify the behavior of your VM. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "availabilityPolicy")] + public DiskAvailabilityPolicy AvailabilityPolicy {get; set; } + + /// + /// Gets or sets the maximum number of VMs that can attach to the disk at the + /// same time. Value greater than one indicates a disk that can be mounted on + /// multiple VMs at the same time. Applies to data disks only. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "maxShares")] + public int? MaxShares {get; set; } + + /// + /// Gets or sets policy for accessing the disk via network. Possible values include: 'AllowAll', 'AllowPrivate', 'DenyAll' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "networkAccessPolicy")] + public string NetworkAccessPolicy {get; set; } + + /// + /// Gets or sets azure resource Id of the DiskAccess resource for using private + /// endpoints on disks. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskAccessId")] + public string DiskAccessId {get; set; } + + /// + /// Gets or sets the total number of IOPS that will be allowed across all VMs + /// mounting the shared disk as ReadOnly. One operation can transfer between 4k + /// and 256k bytes. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskIOPSReadOnly")] + public long? DiskIOPSReadOnly {get; set; } + + /// + /// Gets or sets the total throughput (MBps) that will be allowed across all + /// VMs mounting the shared disk as ReadOnly. MBps means millions of bytes per + /// second - MB here uses the ISO notation, of powers of 10. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskMBpsReadOnly")] + public long? DiskMBpsReadOnly {get; set; } + + /// + /// Gets or sets logical sector size in bytes for Ultra Disks. Supported values + /// are 512 and 4096. 4096 is the default. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "logicalSectorSize")] + public int? LogicalSectorSize {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + if (this.MaxShares != null) + { + if (this.MaxShares < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.InclusiveMinimum, "MaxShares", 1); + } + } + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/MigrateVMAvailabilityZoneInput.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/MigrateVMAvailabilityZoneInput.cs new file mode 100644 index 000000000000..2e78a7fff8a3 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/MigrateVMAvailabilityZoneInput.cs @@ -0,0 +1,79 @@ +// 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; + + /// + /// The input for MigrateVMAvailabilityZone. + /// + public partial class MigrateVMAvailabilityZoneInput + { + /// + /// Initializes a new instance of the MigrateVMAvailabilityZoneInput class. + /// + public MigrateVMAvailabilityZoneInput() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the MigrateVMAvailabilityZoneInput class. + /// + + /// The virtual machine scale set instance ids to be migrated to the target + /// availability zone. + /// + + /// The target logical availability zone ("1", "2" or "3") to migrate the + /// virtual machine scale set instances to. If omitted, the platform selects + /// the target zone. + /// + public MigrateVMAvailabilityZoneInput(System.Collections.Generic.IList instanceIds, string targetZone = default(string)) + + { + this.InstanceIds = instanceIds; + this.TargetZone = targetZone; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the virtual machine scale set instance ids to be migrated to + /// the target availability zone. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "instanceIds")] + public System.Collections.Generic.IList InstanceIds {get; set; } + + /// + /// Gets or sets the target logical availability zone ("1", "2" or "3") to + /// migrate the virtual machine scale set instances to. If omitted, the + /// platform selects the target zone. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "targetZone")] + public string TargetZone {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + if (this.InstanceIds == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "InstanceIds"); + } + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/OSDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/OSDisk.cs index cb6c7afc8cc2..28e47f1f2162 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/OSDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/OSDisk.cs @@ -239,7 +239,10 @@ public virtual void Validate() - + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } } } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ProcessorMode.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ProcessorMode.cs new file mode 100644 index 000000000000..0e8f76545fb7 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ProcessorMode.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 ProcessorMode. + /// + + + public static class ProcessorMode + { + /// + /// Ensures predictable and consistent processor frequency at the base/nominal + /// level. Turbo/Boost is disabled. + /// + public const string Deterministic = "Deterministic"; + /// + /// Allows higher frequency bursts when thermal and power headroom permits. + /// + public const string Opportunistic = "Opportunistic"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ReleaseCategory.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ReleaseCategory.cs new file mode 100644 index 000000000000..3f59223f31e3 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ReleaseCategory.cs @@ -0,0 +1,37 @@ +// 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 ReleaseCategory. + /// + + + public static class ReleaseCategory + { + /// + /// Other type of change. + /// + public const string Other = "Other"; + /// + /// Bug fix change. + /// + public const string BugFix = "BugFix"; + /// + /// Security fix change. + /// + public const string SecurityFix = "SecurityFix"; + /// + /// Compatibility update change. + /// + public const string CompatibilityUpdate = "CompatibilityUpdate"; + /// + /// New feature change. + /// + public const string NewFeature = "NewFeature"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationState.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationState.cs new file mode 100644 index 000000000000..222efe4be66b --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationState.cs @@ -0,0 +1,55 @@ +// 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 ReservationState. + /// + + + public static class ReservationState + { + /// + /// The capacity reservation request has been submitted and is awaiting + /// evaluation. + /// + public const string Pending = "Pending"; + /// + /// The capacity reservation request was rejected, and will not change again + /// without user action. + /// + public const string Declined = "Declined"; + /// + /// The capacity reservation request has been approved by Azure and is awaiting + /// fulfillment. + /// + public const string Approved = "Approved"; + /// + /// A failure occurred while attempting to fulfill the capacity reservation + /// request. + /// + public const string FulfillmentFailed = "FulfillmentFailed"; + /// + /// The capacity reservation is locked and cannot be updated or deleted prior + /// to going live. + /// + public const string Committed = "Committed"; + /// + /// The capacity reservation is active and available for use, and cannot be + /// modified or deleted until the minimum commitment period has elapsed. + /// + public const string Live = "Live"; + /// + /// Azure was only able to deliver a portion of the requested capacity. The + /// capacity reservation cannot be modified or deleted until the minimum + /// commitment period has elapsed. The portion of fulfilled capacity can be + /// viewed by inspecting the capacity reservation's instance view, displayed as + /// currentCapacity within the utilizationInfo. + /// + public const string PartiallyFulfilled = "PartiallyFulfilled"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationType.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationType.cs index 885310f64cbc..05103c31a7c2 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationType.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ReservationType.cs @@ -14,14 +14,24 @@ namespace Microsoft.Azure.Management.Compute.Models public static class ReservationType { /// - /// To consume on demand allocated capacity reservation when a capacity - /// reservation group is provided. + /// Reservations that enable a VM to consume capacity from an explicitly + /// associated capacity reservation group and fall back to the publicly + /// available capacity if the reservation is full. /// public const string Targeted = "Targeted"; /// - /// To consume scheduled allocated block capacity reservation when a capacity - /// reservation group is provided. + /// Block capacity reservations that enable a VM to consume capacity only from + /// this capacity block when it is associated using a capacity reservation + /// group. /// public const string Block = "Block"; + /// + /// Reservations that a VM consumes when it is eligible from an implicitly + /// associated capacity reservation group with the matching VM size and zone + /// without associating that capacity reservation group, and fall back to the + /// publicly available capacity if the reservation is full. Minimum + /// api-version: 2026-04-01. + /// + public const string Open = "Open"; } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMDataDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMDataDisk.cs index 066ae66ef040..6866c808eb12 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMDataDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMDataDisk.cs @@ -106,5 +106,21 @@ public RestorePointSourceVMDataDisk() /// [Newtonsoft.Json.JsonProperty(PropertyName = "writeAcceleratorEnabled")] public bool? WriteAcceleratorEnabled {get; private set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } + + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMOSDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMOSDisk.cs index c842524c9a40..c722a2224a51 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMOSDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMOSDisk.cs @@ -129,7 +129,10 @@ public virtual void Validate() } - + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } } } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMStorageProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMStorageProfile.cs index d84eb0008484..566919e8f2f8 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMStorageProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/RestorePointSourceVMStorageProfile.cs @@ -82,7 +82,16 @@ public virtual void Validate() { this.OsDisk.Validate(); } - + if (this.DataDisks != null) + { + foreach (var element in this.DataDisks) + { + if (element != null) + { + element.Validate(); + } + } + } } } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeRunningStatus.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeRunningStatus.cs index 2038f73da4aa..e61b45bce46b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeRunningStatus.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeRunningStatus.cs @@ -25,8 +25,8 @@ public RollingUpgradeRunningStatus() /// /// Code indicating the current status of the upgrade. - /// Possible values include: 'RollingForward', 'Cancelled', 'Completed', - /// 'Faulted' + /// Possible values include: 'RollingForward', 'RollingBack', 'Cancelled', + /// 'Completed', 'Faulted' /// Start time of the upgrade. /// @@ -53,7 +53,7 @@ public RollingUpgradeRunningStatus() /// - /// Gets code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + /// Gets code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'RollingBack', 'Cancelled', 'Completed', 'Faulted' /// [Newtonsoft.Json.JsonProperty(PropertyName = "code")] public RollingUpgradeStatusCode? Code {get; private set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeStatusCode.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeStatusCode.cs index 6707a88dc56a..41faebc3b8a1 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeStatusCode.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/RollingUpgradeStatusCode.cs @@ -16,6 +16,8 @@ public enum RollingUpgradeStatusCode { [System.Runtime.Serialization.EnumMember(Value = "RollingForward")] RollingForward, + [System.Runtime.Serialization.EnumMember(Value = "RollingBack")] + RollingBack, [System.Runtime.Serialization.EnumMember(Value = "Cancelled")] Cancelled, [System.Runtime.Serialization.EnumMember(Value = "Completed")] @@ -35,6 +37,8 @@ internal static string ToSerializedValue(this RollingUpgradeStatusCode value) { case RollingUpgradeStatusCode.RollingForward: return "RollingForward"; + case RollingUpgradeStatusCode.RollingBack: + return "RollingBack"; case RollingUpgradeStatusCode.Cancelled: return "Cancelled"; case RollingUpgradeStatusCode.Completed: @@ -50,6 +54,8 @@ internal static string ToSerializedValue(this RollingUpgradeStatusCode value) { case "RollingForward": return RollingUpgradeStatusCode.RollingForward; + case "RollingBack": + return RollingUpgradeStatusCode.RollingBack; case "Cancelled": return RollingUpgradeStatusCode.Cancelled; case "Completed": diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/RunProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/RunProfile.cs new file mode 100644 index 000000000000..2cb6aac3818a --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/RunProfile.cs @@ -0,0 +1,33 @@ +// 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 RunProfile. + /// + + + public static class RunProfile + { + /// + /// Other execution profile. + /// + public const string Other = "Other"; + /// + /// Run once execution profile. + /// + public const string RunOnce = "RunOnce"; + /// + /// Long running execution profile. + /// + public const string LongRunning = "LongRunning"; + /// + /// Hybrid execution profile. + /// + public const string Hybrid = "Hybrid"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ScheduleProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ScheduleProfile.cs index f0c2bd6da89d..e602e8e473ab 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/ScheduleProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ScheduleProfile.cs @@ -8,13 +8,16 @@ namespace Microsoft.Azure.Management.Compute.Models using System.Linq; /// - /// Defines the schedule for Block-type capacity reservations. Specifies the - /// schedule during which capacity reservation is active and VM or VMSS - /// resource can be allocated using reservation. This property is required and - /// only supported when the capacity reservation group type is 'Block'. The - /// scheduleProfile, start, and end fields are immutable after creation. - /// Minimum API version: 2025-04-01. Please refer to - /// https://aka.ms/blockcapacityreservation for more details. + /// Defines the schedule for Block and Future capacity reservations. Specifies + /// the schedule during which capacity reservation is active and VM or VMSS + /// resource can be allocated using reservation. For Block capacity + /// reservations, the scheduleProfile, start, and end fields are immutable + /// after creation. Please refer to https://aka.ms/blockcapacityreservation for + /// more details. Minimum API version for Block capacity reservations: + /// 2025-04-01. Future capacity reservations must use this property with only a + /// start time, which can be changed until the ‘modifiableUntil’ time. Please + /// refer to https://aka.ms/futurecapacityreservation for more details. Minimum + /// API version for Future capacity reservations: 2026-04-01. /// public partial class ScheduleProfile { @@ -30,20 +33,35 @@ public ScheduleProfile() /// Initializes a new instance of the ScheduleProfile class. /// - /// The required start date for block capacity reservations. Must be today or - /// within 56 days in the future. For same-day scheduling, requests must be - /// submitted before 11:30 AM UTC. Example: 2025-06-27. + /// The required start date for Block or Future capacity reservations. Block + /// capacity reservations: Must be today or within 56 days in the future. For + /// same-day scheduling, requests must be submitted before 11:30 AM UTC. Future + /// capacity reservations: Must be at least 7 days in the future, and maximum 6 + /// months in the future. Minimum API version for Future capacity reservations: + /// 2026-04-01. Example: 2025-06-27, applicable for both Block and Future + /// capacity reservations. /// - /// The required end date for block capacity reservations. Must be after the + /// The required end date for Block capacity reservations. Must be after the /// start date, with a duration of either 1–14 whole days or 3–26 whole weeks. /// Example: 2025-06-28. /// - public ScheduleProfile(string start = default(string), string end = default(string)) + + /// The minimum number of days that must pass after the start date before a + /// Future capacity reservation can be updated or deleted once it has been + /// committed. Will be populated with a default value if not provided. + /// + + /// The date/time until which a Future capacity reservation can be updated or + /// deleted. Read-only. + /// + public ScheduleProfile(string start = default(string), string end = default(string), int? minimumCommitmentDays = default(int?), System.DateTime? modifiableUntil = default(System.DateTime?)) { this.Start = start; this.End = end; + this.MinimumCommitmentDays = minimumCommitmentDays; + this.ModifiableUntil = modifiableUntil; CustomInit(); } @@ -54,19 +72,38 @@ public ScheduleProfile() /// - /// Gets or sets the required start date for block capacity reservations. Must - /// be today or within 56 days in the future. For same-day scheduling, requests - /// must be submitted before 11:30 AM UTC. Example: 2025-06-27. + /// Gets or sets the required start date for Block or Future capacity + /// reservations. Block capacity reservations: Must be today or within 56 days + /// in the future. For same-day scheduling, requests must be submitted before + /// 11:30 AM UTC. Future capacity reservations: Must be at least 7 days in the + /// future, and maximum 6 months in the future. Minimum API version for Future + /// capacity reservations: 2026-04-01. Example: 2025-06-27, applicable for both + /// Block and Future capacity reservations. /// [Newtonsoft.Json.JsonProperty(PropertyName = "start")] public string Start {get; set; } /// - /// Gets or sets the required end date for block capacity reservations. Must be + /// Gets or sets the required end date for Block capacity reservations. Must be /// after the start date, with a duration of either 1–14 whole days or 3–26 /// whole weeks. Example: 2025-06-28. /// [Newtonsoft.Json.JsonProperty(PropertyName = "end")] public string End {get; set; } + + /// + /// Gets or sets the minimum number of days that must pass after the start date + /// before a Future capacity reservation can be updated or deleted once it has + /// been committed. Will be populated with a default value if not provided. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "minimumCommitmentDays")] + public int? MinimumCommitmentDays {get; set; } + + /// + /// Gets the date/time until which a Future capacity reservation can be updated + /// or deleted. Read-only. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "modifiableUntil")] + public System.DateTime? ModifiableUntil {get; private set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/ShareInviteStatus.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/ShareInviteStatus.cs new file mode 100644 index 000000000000..28e900f80945 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/ShareInviteStatus.cs @@ -0,0 +1,20 @@ +// 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 ShareInviteStatus. + /// + + + public static class ShareInviteStatus + { + public const string Pending = "Pending"; + public const string Accepted = "Accepted"; + public const string Rejected = "Rejected"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGalleryInvite.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGalleryInvite.cs new file mode 100644 index 000000000000..1aa96a23a219 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGalleryInvite.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 System.Linq; + + /// + /// Specifies information about the Shared Gallery Subscription that hosts + /// shared galleries shared at subscription level. + /// + public partial class SharedGalleryInvite : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGalleryInvite class. + /// + public SharedGalleryInvite() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGalleryInvite class. + /// + + /// Resource name + /// + + /// Resource location + /// + + /// The unique id of this shared gallery. + /// + + /// The resource-specific properties for this resource. + /// + public SharedGalleryInvite(string name = default(string), string location = default(string), string uniqueId = default(string), SharedGalleryInviteProperties properties = default(SharedGalleryInviteProperties)) + + : base(name, location, uniqueId) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource-specific properties for this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SharedGalleryInviteProperties Properties {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGalleryInviteProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGalleryInviteProperties.cs new file mode 100644 index 000000000000..cc1979cf0c0a --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGalleryInviteProperties.cs @@ -0,0 +1,92 @@ +// 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; + + /// + /// The shared gallery invite's properties + /// + public partial class SharedGalleryInviteProperties + { + /// + /// Initializes a new instance of the SharedGalleryInviteProperties class. + /// + public SharedGalleryInviteProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGalleryInviteProperties class. + /// + + /// The type of sharing group. Possible values are: **Subscriptions,** + /// **AADTenants.** + /// Possible values include: 'Subscriptions', 'AADTenants' + + /// id of the subscription that hosts the shared gallery. + /// + + /// shared gallery name that was originally shared. + /// + + /// location of the shared gallery. + /// + + /// The status of the invite. Possible values are: **Pending,** **Accepted,** + /// **Rejected.** + /// Possible values include: 'Pending', 'Accepted', 'Rejected' + public SharedGalleryInviteProperties(string type = default(string), string sharedGallerySubscriptionId = default(string), string sharedGalleryName = default(string), string location = default(string), string status = default(string)) + + { + this.Type = type; + this.SharedGallerySubscriptionId = sharedGallerySubscriptionId; + this.SharedGalleryName = sharedGalleryName; + this.Location = location; + this.Status = status; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the type of sharing group. Possible values are: + /// **Subscriptions,** **AADTenants.** Possible values include: 'Subscriptions', 'AADTenants' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "type")] + public string Type {get; set; } + + /// + /// Gets or sets id of the subscription that hosts the shared gallery. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sharedGallerySubscriptionId")] + public string SharedGallerySubscriptionId {get; set; } + + /// + /// Gets or sets shared gallery name that was originally shared. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "sharedGalleryName")] + public string SharedGalleryName {get; set; } + + /// + /// Gets or sets location of the shared gallery. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "location")] + public string Location {get; set; } + + /// + /// Gets or sets the status of the invite. Possible values are: **Pending,** + /// **Accepted,** **Rejected.** Possible values include: 'Pending', 'Accepted', 'Rejected' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "status")] + public string Status {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGallerySubscription.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGallerySubscription.cs new file mode 100644 index 000000000000..fcba262f6e52 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGallerySubscription.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 System.Linq; + + /// + /// Specifies information about the Invite for a Shared Gallery shared at + /// subscription level. + /// + public partial class SharedGallerySubscription : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the SharedGallerySubscription class. + /// + public SharedGallerySubscription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGallerySubscription class. + /// + + /// Resource name + /// + + /// Resource location + /// + + /// The unique id of this shared gallery. + /// + + /// The resource-specific properties for this resource. + /// + public SharedGallerySubscription(string name = default(string), string location = default(string), string uniqueId = default(string), SharedGallerySubscriptionProperties properties = default(SharedGallerySubscriptionProperties)) + + : base(name, location, uniqueId) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource-specific properties for this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SharedGallerySubscriptionProperties Properties {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGallerySubscriptionProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGallerySubscriptionProperties.cs new file mode 100644 index 000000000000..9ab9b6e988a9 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SharedGallerySubscriptionProperties.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; + + /// + /// The shared gallery hosting subscription's properties + /// + public partial class SharedGallerySubscriptionProperties + { + /// + /// Initializes a new instance of the SharedGallerySubscriptionProperties class. + /// + public SharedGallerySubscriptionProperties() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SharedGallerySubscriptionProperties class. + /// + + /// id of the subscription that hosts the shared gallery. + /// + public SharedGallerySubscriptionProperties(string id = default(string)) + + { + this.Id = id; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets id of the subscription that hosts the shared gallery. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "id")] + public string Id {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/Snapshot.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/Snapshot.cs index 97d9f2993f6d..538fb129781f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/Snapshot.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/Snapshot.cs @@ -74,6 +74,10 @@ public Snapshot() /// managed keys or platform managed keys. /// + /// The immutability policy currently applied to this snapshot. Present only + /// when an immutability policy has been configured. + /// + /// The time when the snapshot was created. /// @@ -144,7 +148,7 @@ public Snapshot() /// snapshot. /// Possible values include: 'Unknown', 'Pending', 'Available', /// 'InstantAccess', 'AvailableWithInstantAccess' - public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string managedBy = default(string), SnapshotSku sku = default(SnapshotSku), ExtendedLocation extendedLocation = default(ExtendedLocation), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), CreationData creationData = default(CreationData), string diskState = default(string), Encryption encryption = default(Encryption), System.DateTime? timeCreated = default(System.DateTime?), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), int? diskSizeGb = default(int?), long? diskSizeBytes = default(long?), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), bool? incremental = default(bool?), string incrementalSnapshotFamilyId = default(string), string networkAccessPolicy = default(string), string diskAccessId = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), bool? supportsHibernation = default(bool?), string publicNetworkAccess = default(string), double? completionPercent = default(double?), CopyCompletionError copyCompletionError = default(CopyCompletionError), string dataAccessAuthMode = default(string), string snapshotAccessState = default(string)) + public Snapshot(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string managedBy = default(string), SnapshotSku sku = default(SnapshotSku), ExtendedLocation extendedLocation = default(ExtendedLocation), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), CreationData creationData = default(CreationData), string diskState = default(string), Encryption encryption = default(Encryption), ImmutabilityPolicy immutabilityPolicy = default(ImmutabilityPolicy), System.DateTime? timeCreated = default(System.DateTime?), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), int? diskSizeGb = default(int?), long? diskSizeBytes = default(long?), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), bool? incremental = default(bool?), string incrementalSnapshotFamilyId = default(string), string networkAccessPolicy = default(string), string diskAccessId = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), bool? supportsHibernation = default(bool?), string publicNetworkAccess = default(string), double? completionPercent = default(double?), CopyCompletionError copyCompletionError = default(CopyCompletionError), string dataAccessAuthMode = default(string), string snapshotAccessState = default(string)) : base(location, id, name, type, tags) { @@ -156,6 +160,7 @@ public Snapshot() this.CreationData = creationData; this.DiskState = diskState; this.Encryption = encryption; + this.ImmutabilityPolicy = immutabilityPolicy; this.TimeCreated = timeCreated; this.OsType = osType; this.HyperVGeneration = hyperVGeneration; @@ -240,6 +245,13 @@ public Snapshot() [Newtonsoft.Json.JsonProperty(PropertyName = "properties.encryption")] public Encryption Encryption {get; set; } + /// + /// Gets the immutability policy currently applied to this snapshot. Present + /// only when an immutability policy has been configured. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.immutabilityPolicy")] + public ImmutabilityPolicy ImmutabilityPolicy {get; private set; } + /// /// Gets the time when the snapshot was created. /// @@ -393,6 +405,7 @@ public override void Validate() + if (this.EncryptionSettingsCollection != null) { this.EncryptionSettingsCollection.Validate(); diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotProperties.cs index 99599cad7f0c..9b573a4c7109 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotProperties.cs @@ -114,7 +114,11 @@ public SnapshotProperties() /// snapshot. /// Possible values include: 'Unknown', 'Pending', 'Available', /// 'InstantAccess', 'AvailableWithInstantAccess' - public SnapshotProperties(CreationData creationData, System.DateTime? timeCreated = default(System.DateTime?), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), int? diskSizeGb = default(int?), long? diskSizeBytes = default(long?), string diskState = default(string), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), bool? incremental = default(bool?), string incrementalSnapshotFamilyId = default(string), Encryption encryption = default(Encryption), string networkAccessPolicy = default(string), string diskAccessId = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), bool? supportsHibernation = default(bool?), string publicNetworkAccess = default(string), double? completionPercent = default(double?), CopyCompletionError copyCompletionError = default(CopyCompletionError), string dataAccessAuthMode = default(string), string snapshotAccessState = default(string)) + + /// The immutability policy currently applied to this snapshot. Present only + /// when an immutability policy has been configured. + /// + public SnapshotProperties(CreationData creationData, System.DateTime? timeCreated = default(System.DateTime?), OperatingSystemTypes? osType = default(OperatingSystemTypes?), string hyperVGeneration = default(string), PurchasePlan purchasePlan = default(PurchasePlan), SupportedCapabilities supportedCapabilities = default(SupportedCapabilities), int? diskSizeGb = default(int?), long? diskSizeBytes = default(long?), string diskState = default(string), string uniqueId = default(string), EncryptionSettingsCollection encryptionSettingsCollection = default(EncryptionSettingsCollection), string provisioningState = default(string), bool? incremental = default(bool?), string incrementalSnapshotFamilyId = default(string), Encryption encryption = default(Encryption), string networkAccessPolicy = default(string), string diskAccessId = default(string), DiskSecurityProfile securityProfile = default(DiskSecurityProfile), bool? supportsHibernation = default(bool?), string publicNetworkAccess = default(string), double? completionPercent = default(double?), CopyCompletionError copyCompletionError = default(CopyCompletionError), string dataAccessAuthMode = default(string), string snapshotAccessState = default(string), ImmutabilityPolicy immutabilityPolicy = default(ImmutabilityPolicy)) { this.TimeCreated = timeCreated; @@ -141,6 +145,7 @@ public SnapshotProperties() this.CopyCompletionError = copyCompletionError; this.DataAccessAuthMode = dataAccessAuthMode; this.SnapshotAccessState = snapshotAccessState; + this.ImmutabilityPolicy = immutabilityPolicy; CustomInit(); } @@ -311,6 +316,13 @@ public SnapshotProperties() /// [Newtonsoft.Json.JsonProperty(PropertyName = "snapshotAccessState")] public string SnapshotAccessState {get; private set; } + + /// + /// Gets the immutability policy currently applied to this snapshot. Present + /// only when an immutability policy has been configured. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "immutabilityPolicy")] + public ImmutabilityPolicy ImmutabilityPolicy {get; private set; } /// /// Validate the object. /// @@ -353,6 +365,7 @@ public virtual void Validate() } + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotsUpdateImmutabilityPolicyHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotsUpdateImmutabilityPolicyHeaders.cs new file mode 100644 index 000000000000..dfcaeb3a5ceb --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotsUpdateImmutabilityPolicyHeaders.cs @@ -0,0 +1,65 @@ +// 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; + + public partial class SnapshotsUpdateImmutabilityPolicyHeaders + { + /// + /// Initializes a new instance of the SnapshotsUpdateImmutabilityPolicyHeaders class. + /// + public SnapshotsUpdateImmutabilityPolicyHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnapshotsUpdateImmutabilityPolicyHeaders class. + /// + + /// + /// + + /// + /// + + /// + /// + public SnapshotsUpdateImmutabilityPolicyHeaders(string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) + + { + this.AzureAsyncOperation = azureAsyncOperation; + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotsUpdateImmutabilityPolicyLockHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotsUpdateImmutabilityPolicyLockHeaders.cs new file mode 100644 index 000000000000..f449048c0acf --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/SnapshotsUpdateImmutabilityPolicyLockHeaders.cs @@ -0,0 +1,65 @@ +// 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; + + public partial class SnapshotsUpdateImmutabilityPolicyLockHeaders + { + /// + /// Initializes a new instance of the SnapshotsUpdateImmutabilityPolicyLockHeaders class. + /// + public SnapshotsUpdateImmutabilityPolicyLockHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the SnapshotsUpdateImmutabilityPolicyLockHeaders class. + /// + + /// + /// + + /// + /// + + /// + /// + public SnapshotsUpdateImmutabilityPolicyLockHeaders(string azureAsyncOperation = default(string), string location = default(string), int? retryAfter = default(int?)) + + { + this.AzureAsyncOperation = azureAsyncOperation; + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Azure-AsyncOperation")] + public string AzureAsyncOperation {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/StorageProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/StorageProfile.cs index 69a0542b099b..cad9f54790cc 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/StorageProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/StorageProfile.cs @@ -57,7 +57,12 @@ public StorageProfile() /// zone. This is applicable only for VMs with placement property set. Please /// note that this change is irreversible. Minimum api-version: 2024-11-01. /// - public StorageProfile(ImageReference imageReference = default(ImageReference), OSDisk osDisk = default(OSDisk), System.Collections.Generic.IList dataDisks = default(System.Collections.Generic.IList), string diskControllerType = default(string), bool? alignRegionalDisksToVMZone = default(bool?)) + + /// Specifies the Disk API version used when applying additionalDiskProperties + /// to managed disks. The value must be in the format YYYY-MM-DD (e.g., + /// "2026-03-02"). + /// Possible values include: '2025-01-02', '2026-03-02' + public StorageProfile(ImageReference imageReference = default(ImageReference), OSDisk osDisk = default(OSDisk), System.Collections.Generic.IList dataDisks = default(System.Collections.Generic.IList), string diskControllerType = default(string), bool? alignRegionalDisksToVMZone = default(bool?), string diskApiVersion = default(string)) { this.ImageReference = imageReference; @@ -65,6 +70,7 @@ public StorageProfile() this.DataDisks = dataDisks; this.DiskControllerType = diskControllerType; this.AlignRegionalDisksToVMZone = alignRegionalDisksToVMZone; + this.DiskApiVersion = diskApiVersion; CustomInit(); } @@ -123,6 +129,14 @@ public StorageProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "alignRegionalDisksToVMZone")] public bool? AlignRegionalDisksToVMZone {get; set; } + + /// + /// Gets or sets specifies the Disk API version used when applying + /// additionalDiskProperties to managed disks. The value must be in the format + /// YYYY-MM-DD (e.g., "2026-03-02"). Possible values include: '2025-01-02', '2026-03-02' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskApiVersion")] + public string DiskApiVersion {get; set; } /// /// Validate the object. /// @@ -147,6 +161,7 @@ public virtual void Validate() } } + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelGallerySharingAcceptHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelGallerySharingAcceptHeaders.cs new file mode 100644 index 000000000000..9c099b6ef7ab --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelGallerySharingAcceptHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class TenantLevelGallerySharingAcceptHeaders + { + /// + /// Initializes a new instance of the TenantLevelGallerySharingAcceptHeaders class. + /// + public TenantLevelGallerySharingAcceptHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantLevelGallerySharingAcceptHeaders class. + /// + + /// + /// + + /// + /// + public TenantLevelGallerySharingAcceptHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelGallerySharingRejectHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelGallerySharingRejectHeaders.cs new file mode 100644 index 000000000000..5a83e49bd8a7 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelGallerySharingRejectHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class TenantLevelGallerySharingRejectHeaders + { + /// + /// Initializes a new instance of the TenantLevelGallerySharingRejectHeaders class. + /// + public TenantLevelGallerySharingRejectHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantLevelGallerySharingRejectHeaders class. + /// + + /// + /// + + /// + /// + public TenantLevelGallerySharingRejectHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelSharedGalleryInvite.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelSharedGalleryInvite.cs new file mode 100644 index 000000000000..1e262e0a7680 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelSharedGalleryInvite.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 System.Linq; + + /// + /// Specifies information about the Invite for a Shared Gallery shared at + /// tenant level. + /// + public partial class TenantLevelSharedGalleryInvite : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the TenantLevelSharedGalleryInvite class. + /// + public TenantLevelSharedGalleryInvite() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantLevelSharedGalleryInvite class. + /// + + /// Resource name + /// + + /// Resource location + /// + + /// The unique id of this shared gallery. + /// + + /// The resource-specific properties for this resource. + /// + public TenantLevelSharedGalleryInvite(string name = default(string), string location = default(string), string uniqueId = default(string), SharedGalleryInviteProperties properties = default(SharedGalleryInviteProperties)) + + : base(name, location, uniqueId) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource-specific properties for this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SharedGalleryInviteProperties Properties {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelSharedGallerySubscription.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelSharedGallerySubscription.cs new file mode 100644 index 000000000000..02addad713f5 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/TenantLevelSharedGallerySubscription.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 System.Linq; + + /// + /// Specifies information about the Shared Gallery Subscription that that hosts + /// shared galleries shared at tenant level. + /// + public partial class TenantLevelSharedGallerySubscription : PirSharedGalleryResource + { + /// + /// Initializes a new instance of the TenantLevelSharedGallerySubscription class. + /// + public TenantLevelSharedGallerySubscription() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the TenantLevelSharedGallerySubscription class. + /// + + /// Resource name + /// + + /// Resource location + /// + + /// The unique id of this shared gallery. + /// + + /// The resource-specific properties for this resource. + /// + public TenantLevelSharedGallerySubscription(string name = default(string), string location = default(string), string uniqueId = default(string), SharedGallerySubscriptionProperties properties = default(SharedGallerySubscriptionProperties)) + + : base(name, location, uniqueId) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets the resource-specific properties for this resource. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public SharedGallerySubscriptionProperties Properties {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeOperationHistoryStatus.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeOperationHistoryStatus.cs index 3a999e97d1bb..57b2ec57239f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeOperationHistoryStatus.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeOperationHistoryStatus.cs @@ -25,8 +25,8 @@ public UpgradeOperationHistoryStatus() /// /// Code indicating the current status of the upgrade. - /// Possible values include: 'RollingForward', 'Cancelled', 'Completed', - /// 'Faulted' + /// Possible values include: 'RollingForward', 'RollingBack', 'Cancelled', + /// 'Completed', 'Faulted' /// Start time of the upgrade. /// @@ -49,7 +49,7 @@ public UpgradeOperationHistoryStatus() /// - /// Gets code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'Cancelled', 'Completed', 'Faulted' + /// Gets code indicating the current status of the upgrade. Possible values include: 'RollingForward', 'RollingBack', 'Cancelled', 'Completed', 'Faulted' /// [Newtonsoft.Json.JsonProperty(PropertyName = "code")] public UpgradeState? Code {get; private set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeState.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeState.cs index aabcc6a25690..36d6a2584090 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeState.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/UpgradeState.cs @@ -16,6 +16,8 @@ public enum UpgradeState { [System.Runtime.Serialization.EnumMember(Value = "RollingForward")] RollingForward, + [System.Runtime.Serialization.EnumMember(Value = "RollingBack")] + RollingBack, [System.Runtime.Serialization.EnumMember(Value = "Cancelled")] Cancelled, [System.Runtime.Serialization.EnumMember(Value = "Completed")] @@ -35,6 +37,8 @@ internal static string ToSerializedValue(this UpgradeState value) { case UpgradeState.RollingForward: return "RollingForward"; + case UpgradeState.RollingBack: + return "RollingBack"; case UpgradeState.Cancelled: return "Cancelled"; case UpgradeState.Completed: @@ -50,6 +54,8 @@ internal static string ToSerializedValue(this UpgradeState value) { case "RollingForward": return UpgradeState.RollingForward; + case "RollingBack": + return UpgradeState.RollingBack; case "Cancelled": return UpgradeState.Cancelled; case "Completed": diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/UrgencyLevel.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/UrgencyLevel.cs new file mode 100644 index 000000000000..96f7e122f34e --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/UrgencyLevel.cs @@ -0,0 +1,29 @@ +// 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 UrgencyLevel. + /// + + + public static class UrgencyLevel + { + /// + /// Regular urgency level. + /// + public const string Regular = "Regular"; + /// + /// Expedited urgency level. + /// + public const string Expedited = "Expedited"; + /// + /// Emergency urgency level. + /// + public const string Emergency = "Emergency"; + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachine.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachine.cs index 8b00ee293e40..b78ffe0ef2b4 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachine.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachine.cs @@ -145,7 +145,7 @@ public VirtualMachine() /// Specifies the priority for the virtual machine. Minimum api-version: /// 2019-03-01 - /// Possible values include: 'Regular', 'Low', 'Spot' + /// Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// Specifies the eviction policy for the Azure Spot virtual machine and Azure /// Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and @@ -445,7 +445,7 @@ public VirtualMachine() /// /// Gets or sets specifies the priority for the virtual machine. Minimum - /// api-version: 2019-03-01 Possible values include: 'Regular', 'Low', 'Spot' + /// api-version: 2019-03-01 Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.priority")] public string Priority {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommand.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommand.cs new file mode 100644 index 000000000000..e5990f86fb9b --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommand.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 System.Linq; + + /// + /// Describes a Virtual Machine diagnostic run command. + /// + public partial class VirtualMachineDiagnosticRunCommand : TrackedResource + { + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommand class. + /// + public VirtualMachineDiagnosticRunCommand() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommand class. + /// + + /// Fully qualified resource ID for the resource. Ex - + /// /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + + /// The name of the resource + /// + + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or + /// "Microsoft.Storage/storageAccounts" + /// + + /// Resource tags. + /// + + /// The geo-location where the resource lives + /// + + /// Describes the properties of a Virtual Machine diagnostic run command. + /// + public VirtualMachineDiagnosticRunCommand(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), VirtualMachineRunCommandProperties properties = default(VirtualMachineRunCommandProperties)) + + : base(location, id, name, type, tags) + { + this.Properties = properties; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets describes the properties of a Virtual Machine diagnostic run + /// command. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties")] + public VirtualMachineRunCommandProperties Properties {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public override void Validate() + { + base.Validate(); + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..30fc56ae6937 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders class. + /// + public VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineDiagnosticRunCommandsCreateOrUpdateHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsDeleteHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsDeleteHeaders.cs new file mode 100644 index 000000000000..05585e356a8e --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsDeleteHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineDiagnosticRunCommandsDeleteHeaders + { + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsDeleteHeaders class. + /// + public VirtualMachineDiagnosticRunCommandsDeleteHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsDeleteHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineDiagnosticRunCommandsDeleteHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsUpdateHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsUpdateHeaders.cs new file mode 100644 index 000000000000..364cd9f4ec49 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineDiagnosticRunCommandsUpdateHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineDiagnosticRunCommandsUpdateHeaders + { + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsUpdateHeaders class. + /// + public VirtualMachineDiagnosticRunCommandsUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsUpdateHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineDiagnosticRunCommandsUpdateHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtension.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtension.cs index 645f7a2a26a3..6182f664cce3 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtension.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtension.cs @@ -52,7 +52,9 @@ public VirtualMachineExtension() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -137,7 +139,10 @@ public VirtualMachineExtension() public string VirtualMachineExtensionType {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionHandlerInstanceView.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionHandlerInstanceView.cs index ce9fcdbd3e9f..bb2aee2b8bd6 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionHandlerInstanceView.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionHandlerInstanceView.cs @@ -27,7 +27,9 @@ public VirtualMachineExtensionHandlerInstanceView() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor.Patch.Hotfix version of the script handler. Azure + /// platform will deliver the latest Patch.Hotfix version in the Major.Minor + /// series. /// /// The extension handler status. @@ -55,7 +57,9 @@ public VirtualMachineExtensionHandlerInstanceView() public string Type {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor.Patch.Hotfix version of the script + /// handler. Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImage.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImage.cs index 5d130df8c5d4..f171edfe7ac9 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImage.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImage.cs @@ -42,6 +42,17 @@ public VirtualMachineExtensionImage() /// The geo-location where the resource lives /// + /// Categorizes the type of change introduced (e.g., BugFix, SecurityFix, + /// CompatibilityUpdate, NewFeature, Other). + /// Possible values include: 'Other', 'BugFix', 'SecurityFix', + /// 'CompatibilityUpdate', 'NewFeature' + + /// Indicates the urgency level for applying this extension update. + /// Possible values include: 'Regular', 'Expedited', 'Emergency' + + /// Specifies when and how the extension should be executed. + /// Possible values include: 'Other', 'RunOnce', 'LongRunning', 'Hybrid' + /// The operating system this extension supports. /// @@ -60,15 +71,27 @@ public VirtualMachineExtensionImage() /// Whether the handler can support multiple extensions. /// - public VirtualMachineExtensionImage(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string operatingSystem = default(string), string computeRole = default(string), string handlerSchema = default(string), bool? vmScaleSetEnabled = default(bool?), bool? supportsMultipleExtensions = default(bool?)) + + /// Summary of changes or updates in this extension version. + /// + + /// Additional metadata about extension features, including compliance and + /// capability tags. + /// + public VirtualMachineExtensionImage(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string releaseCategory = default(string), string urgencyLevel = default(string), string runProfile = default(string), string operatingSystem = default(string), string computeRole = default(string), string handlerSchema = default(string), bool? vmScaleSetEnabled = default(bool?), bool? supportsMultipleExtensions = default(bool?), string releaseNotes = default(string), ExtensionFeatureMetadata extensionFeatureMetadata = default(ExtensionFeatureMetadata)) : base(location, id, name, type, tags) { + this.ReleaseCategory = releaseCategory; + this.UrgencyLevel = urgencyLevel; + this.RunProfile = runProfile; this.OperatingSystem = operatingSystem; this.ComputeRole = computeRole; this.HandlerSchema = handlerSchema; this.VmScaleSetEnabled = vmScaleSetEnabled; this.SupportsMultipleExtensions = supportsMultipleExtensions; + this.ReleaseNotes = releaseNotes; + this.ExtensionFeatureMetadata = extensionFeatureMetadata; CustomInit(); } @@ -78,6 +101,25 @@ public VirtualMachineExtensionImage() partial void CustomInit(); + /// + /// Gets categorizes the type of change introduced (e.g., BugFix, SecurityFix, + /// CompatibilityUpdate, NewFeature, Other). Possible values include: 'Other', 'BugFix', 'SecurityFix', 'CompatibilityUpdate', 'NewFeature' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.releaseCategory")] + public string ReleaseCategory {get; private set; } + + /// + /// Gets indicates the urgency level for applying this extension update. Possible values include: 'Regular', 'Expedited', 'Emergency' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.urgencyLevel")] + public string UrgencyLevel {get; private set; } + + /// + /// Gets specifies when and how the extension should be executed. Possible values include: 'Other', 'RunOnce', 'LongRunning', 'Hybrid' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.runProfile")] + public string RunProfile {get; private set; } + /// /// Gets or sets the operating system this extension supports. /// @@ -111,6 +153,19 @@ public VirtualMachineExtensionImage() /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.supportsMultipleExtensions")] public bool? SupportsMultipleExtensions {get; set; } + + /// + /// Gets summary of changes or updates in this extension version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.releaseNotes")] + public string ReleaseNotes {get; private set; } + + /// + /// Gets additional metadata about extension features, including compliance and + /// capability tags. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.extensionFeatureMetadata")] + public ExtensionFeatureMetadata ExtensionFeatureMetadata {get; private set; } /// /// Validate the object. /// @@ -123,6 +178,11 @@ public override void Validate() + + + + + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImageProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImageProperties.cs index 143037da8f73..e0546917d113 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImageProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionImageProperties.cs @@ -42,7 +42,25 @@ public VirtualMachineExtensionImageProperties() /// Whether the handler can support multiple extensions. /// - public VirtualMachineExtensionImageProperties(string operatingSystem, string computeRole, string handlerSchema, bool? vmScaleSetEnabled = default(bool?), bool? supportsMultipleExtensions = default(bool?)) + + /// Summary of changes or updates in this extension version. + /// + + /// Categorizes the type of change introduced (e.g., BugFix, SecurityFix, + /// CompatibilityUpdate, NewFeature, Other). + /// Possible values include: 'Other', 'BugFix', 'SecurityFix', + /// 'CompatibilityUpdate', 'NewFeature' + + /// Indicates the urgency level for applying this extension update. + /// Possible values include: 'Regular', 'Expedited', 'Emergency' + + /// Specifies when and how the extension should be executed. + /// Possible values include: 'Other', 'RunOnce', 'LongRunning', 'Hybrid' + + /// Additional metadata about extension features, including compliance and + /// capability tags. + /// + public VirtualMachineExtensionImageProperties(string operatingSystem, string computeRole, string handlerSchema, bool? vmScaleSetEnabled = default(bool?), bool? supportsMultipleExtensions = default(bool?), string releaseNotes = default(string), string releaseCategory = default(string), string urgencyLevel = default(string), string runProfile = default(string), ExtensionFeatureMetadata extensionFeatureMetadata = default(ExtensionFeatureMetadata)) { this.OperatingSystem = operatingSystem; @@ -50,6 +68,11 @@ public VirtualMachineExtensionImageProperties() this.HandlerSchema = handlerSchema; this.VmScaleSetEnabled = vmScaleSetEnabled; this.SupportsMultipleExtensions = supportsMultipleExtensions; + this.ReleaseNotes = releaseNotes; + this.ReleaseCategory = releaseCategory; + this.UrgencyLevel = urgencyLevel; + this.RunProfile = runProfile; + this.ExtensionFeatureMetadata = extensionFeatureMetadata; CustomInit(); } @@ -92,6 +115,38 @@ public VirtualMachineExtensionImageProperties() /// [Newtonsoft.Json.JsonProperty(PropertyName = "supportsMultipleExtensions")] public bool? SupportsMultipleExtensions {get; set; } + + /// + /// Gets summary of changes or updates in this extension version. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "releaseNotes")] + public string ReleaseNotes {get; private set; } + + /// + /// Gets categorizes the type of change introduced (e.g., BugFix, SecurityFix, + /// CompatibilityUpdate, NewFeature, Other). Possible values include: 'Other', 'BugFix', 'SecurityFix', 'CompatibilityUpdate', 'NewFeature' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "releaseCategory")] + public string ReleaseCategory {get; private set; } + + /// + /// Gets indicates the urgency level for applying this extension update. Possible values include: 'Regular', 'Expedited', 'Emergency' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "urgencyLevel")] + public string UrgencyLevel {get; private set; } + + /// + /// Gets specifies when and how the extension should be executed. Possible values include: 'Other', 'RunOnce', 'LongRunning', 'Hybrid' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "runProfile")] + public string RunProfile {get; private set; } + + /// + /// Gets additional metadata about extension features, including compliance and + /// capability tags. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "extensionFeatureMetadata")] + public ExtensionFeatureMetadata ExtensionFeatureMetadata {get; private set; } /// /// Validate the object. /// @@ -115,6 +170,11 @@ public virtual void Validate() + + + + + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionInstanceView.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionInstanceView.cs index f22fe8683ed8..fa6e0422df92 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionInstanceView.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionInstanceView.cs @@ -30,7 +30,9 @@ public VirtualMachineExtensionInstanceView() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor.Patch.Hotfix version of the script handler. Azure + /// platform will deliver the latest Patch.Hotfix version in the Major.Minor + /// series. /// /// The resource status information. @@ -69,7 +71,9 @@ public VirtualMachineExtensionInstanceView() public string Type {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor.Patch.Hotfix version of the script + /// handler. Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionProperties.cs index 5e2779566a63..1736d4b70ce0 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionProperties.cs @@ -34,7 +34,9 @@ public VirtualMachineExtensionProperties() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -118,7 +120,10 @@ public VirtualMachineExtensionProperties() public string Type {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdate.cs index 3509850fc987..22a38c864e68 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdate.cs @@ -38,7 +38,9 @@ public VirtualMachineExtensionUpdate() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -110,7 +112,10 @@ public VirtualMachineExtensionUpdate() public string Type {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdateProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdateProperties.cs index d88798977b1b..0971194e0040 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdateProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineExtensionUpdateProperties.cs @@ -34,7 +34,9 @@ public VirtualMachineExtensionUpdateProperties() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -105,7 +107,10 @@ public VirtualMachineExtensionUpdateProperties() public string Type {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineInstanceView.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineInstanceView.cs index 1c1ee24915b3..37fef1e30823 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineInstanceView.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineInstanceView.cs @@ -85,7 +85,14 @@ public VirtualMachineInstanceView() /// The Interconnect runtime view of the Virtual Machine. Minimum api-version: /// 2026-03-01. /// - public VirtualMachineInstanceView(int? platformUpdateDomain = default(int?), int? platformFaultDomain = default(int?), string computerName = default(string), string osName = default(string), string osVersion = default(string), string hyperVGeneration = default(string), string rdpThumbPrint = default(string), VirtualMachineAgentInstanceView vmAgent = default(VirtualMachineAgentInstanceView), MaintenanceRedeployStatus maintenanceRedeployStatus = default(MaintenanceRedeployStatus), System.Collections.Generic.IList disks = default(System.Collections.Generic.IList), System.Collections.Generic.IList extensions = default(System.Collections.Generic.IList), VirtualMachineHealthStatus vmHealth = default(VirtualMachineHealthStatus), BootDiagnosticsInstanceView bootDiagnostics = default(BootDiagnosticsInstanceView), string assignedHost = default(string), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), VirtualMachinePatchStatus patchStatus = default(VirtualMachinePatchStatus), bool? isVMInStandbyPool = default(bool?), InterconnectInstanceView interconnectInstanceView = default(InterconnectInstanceView)) + + /// Specifies which type of capacity reservation the virtual machine will + /// consume capacity from if eligible or whether it is explicitly opted out + /// from being associated and consuming capacity from any reserved capacity + /// available in the subscription. Minimum api-version: 2026-04-01. + /// Possible values include: 'NotEligible', 'Targeted', 'Open', 'Disabled', + /// 'Block' + public VirtualMachineInstanceView(int? platformUpdateDomain = default(int?), int? platformFaultDomain = default(int?), string computerName = default(string), string osName = default(string), string osVersion = default(string), string hyperVGeneration = default(string), string rdpThumbPrint = default(string), VirtualMachineAgentInstanceView vmAgent = default(VirtualMachineAgentInstanceView), MaintenanceRedeployStatus maintenanceRedeployStatus = default(MaintenanceRedeployStatus), System.Collections.Generic.IList disks = default(System.Collections.Generic.IList), System.Collections.Generic.IList extensions = default(System.Collections.Generic.IList), VirtualMachineHealthStatus vmHealth = default(VirtualMachineHealthStatus), BootDiagnosticsInstanceView bootDiagnostics = default(BootDiagnosticsInstanceView), string assignedHost = default(string), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), VirtualMachinePatchStatus patchStatus = default(VirtualMachinePatchStatus), bool? isVMInStandbyPool = default(bool?), InterconnectInstanceView interconnectInstanceView = default(InterconnectInstanceView), string capacityReservationType = default(string)) { this.PlatformUpdateDomain = platformUpdateDomain; @@ -106,6 +113,7 @@ public VirtualMachineInstanceView() this.PatchStatus = patchStatus; this.IsVMInStandbyPool = isVMInStandbyPool; this.InterconnectInstanceView = interconnectInstanceView; + this.CapacityReservationType = capacityReservationType; CustomInit(); } @@ -232,5 +240,14 @@ public VirtualMachineInstanceView() /// [Newtonsoft.Json.JsonProperty(PropertyName = "interconnectInstanceView")] public InterconnectInstanceView InterconnectInstanceView {get; private set; } + + /// + /// Gets specifies which type of capacity reservation the virtual machine will + /// consume capacity from if eligible or whether it is explicitly opted out + /// from being associated and consuming capacity from any reserved capacity + /// available in the subscription. Minimum api-version: 2026-04-01. Possible values include: 'NotEligible', 'Targeted', 'Open', 'Disabled', 'Block' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityReservationType")] + public string CapacityReservationType {get; private set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineIpTag.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineIpTag.cs index c708c21ab442..ec9d9216bd88 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineIpTag.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineIpTag.cs @@ -29,11 +29,16 @@ public VirtualMachineIpTag() /// IP tag associated with the public IP. Example: SQL, Storage etc. /// - public VirtualMachineIpTag(string ipTagType = default(string), string tag = default(string)) + + /// The first party service tag resource identifier associated with the public + /// IP address. + /// + public VirtualMachineIpTag(string ipTagType = default(string), string tag = default(string), string firstPartyServiceTagId = default(string)) { this.IpTagType = ipTagType; this.Tag = tag; + this.FirstPartyServiceTagId = firstPartyServiceTagId; CustomInit(); } @@ -55,5 +60,12 @@ public VirtualMachineIpTag() /// [Newtonsoft.Json.JsonProperty(PropertyName = "tag")] public string Tag {get; set; } + + /// + /// Gets or sets the first party service tag resource identifier associated + /// with the public IP address. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "firstPartyServiceTagId")] + public string FirstPartyServiceTagId {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachinePriorityTypes.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachinePriorityTypes.cs index 17439848827d..3a0454f1859e 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachinePriorityTypes.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachinePriorityTypes.cs @@ -13,8 +13,30 @@ namespace Microsoft.Azure.Management.Compute.Models public static class VirtualMachinePriorityTypes { + /// + /// Regular Priority for a standalone virtual machine or the virtual machines + /// in the scale set. + /// This is the default priority and it will be used to deploy regular VM/VMSS. + /// public const string Regular = "Regular"; + /// + /// Low priority for a standalone virtual machine or the virtual machines in + /// the scale set. Will be Deprecated, use Spot instead. + /// public const string Low = "Low"; + /// + /// Spot priority for a standalone virtual machine or the virtual machines in + /// the scale set. + /// public const string Spot = "Spot"; + /// + /// SpotPlus priority for a standalone virtual machine or the virtual machines + /// in the scale set. + /// This is an enum value that will be used to deploy Azure Spot Plus VM/VMSS, + /// which is the next + /// generation of Azure Spot VM/VMSS with more reliability and longer running + /// time. + /// + public const string SpotPlus = "SpotPlus"; } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineProperties.cs index df9aa617fccc..18dbcc2635d5 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineProperties.cs @@ -82,7 +82,7 @@ public VirtualMachineProperties() /// Specifies the priority for the virtual machine. Minimum api-version: /// 2019-03-01 - /// Possible values include: 'Regular', 'Low', 'Spot' + /// Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// Specifies the eviction policy for the Azure Spot virtual machine and Azure /// Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and @@ -305,7 +305,7 @@ public VirtualMachineProperties() /// /// Gets or sets specifies the priority for the virtual machine. Minimum - /// api-version: 2019-03-01 Possible values include: 'Regular', 'Low', 'Spot' + /// api-version: 2019-03-01 Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// [Newtonsoft.Json.JsonProperty(PropertyName = "priority")] public string Priority {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetDataDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetDataDisk.cs index c4727a4a2189..b0b5a6c8636e 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetDataDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetDataDisk.cs @@ -197,7 +197,10 @@ public virtual void Validate() - + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } } } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtension.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtension.cs index d5300b7e4f25..bdf0d00f1e93 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtension.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtension.cs @@ -45,7 +45,9 @@ public VirtualMachineScaleSetExtension() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -141,7 +143,10 @@ public VirtualMachineScaleSetExtension() public string VirtualMachineExtensionType {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionProperties.cs index 15384dc1af65..71e2edb261b3 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionProperties.cs @@ -35,7 +35,9 @@ public VirtualMachineScaleSetExtensionProperties() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -116,7 +118,10 @@ public VirtualMachineScaleSetExtensionProperties() public string Type {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs index 7954d6ea097d..21442aa737eb 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetExtensionUpdate.cs @@ -45,7 +45,9 @@ public VirtualMachineScaleSetExtensionUpdate() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -141,7 +143,10 @@ public VirtualMachineScaleSetExtensionUpdate() public string VirtualMachineExtensionType {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs index 9636a76da897..6bb3aad90f47 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetHardwareProfile.cs @@ -28,10 +28,17 @@ public VirtualMachineScaleSetHardwareProfile() /// Minimum api-version: 2021-11-01. Please follow the instructions in [VM /// Customization](https://aka.ms/vmcustomization) for more details. /// - public VirtualMachineScaleSetHardwareProfile(VMSizeProperties vmSizeProperties = default(VMSizeProperties)) + + /// Specifies the processor mode for the virtual machine scale set. Optional; + /// if omitted, the platform default applies (currently Deterministic). This + /// property can be updated on a running VMSS without deallocation or reboot. + /// Minimum api-version: 2026-04-01. + /// Possible values include: 'Deterministic', 'Opportunistic' + public VirtualMachineScaleSetHardwareProfile(VMSizeProperties vmSizeProperties = default(VMSizeProperties), string processorMode = default(string)) { this.VmSizeProperties = vmSizeProperties; + this.ProcessorMode = processorMode; CustomInit(); } @@ -49,5 +56,14 @@ public VirtualMachineScaleSetHardwareProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "vmSizeProperties")] public VMSizeProperties VmSizeProperties {get; set; } + + /// + /// Gets or sets specifies the processor mode for the virtual machine scale + /// set. Optional; if omitted, the platform default applies (currently + /// Deterministic). This property can be updated on a running VMSS without + /// deallocation or reboot. Minimum api-version: 2026-04-01. Possible values include: 'Deterministic', 'Opportunistic' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "processorMode")] + public string ProcessorMode {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetIpTag.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetIpTag.cs index e5828e31b539..9f92f58c870d 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetIpTag.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetIpTag.cs @@ -29,11 +29,16 @@ public VirtualMachineScaleSetIpTag() /// IP tag associated with the public IP. Example: SQL, Storage etc. /// - public VirtualMachineScaleSetIpTag(string ipTagType = default(string), string tag = default(string)) + + /// The first party service tag resource identifier associated with the public + /// IP address. + /// + public VirtualMachineScaleSetIpTag(string ipTagType = default(string), string tag = default(string), string firstPartyServiceTagId = default(string)) { this.IpTagType = ipTagType; this.Tag = tag; + this.FirstPartyServiceTagId = firstPartyServiceTagId; CustomInit(); } @@ -55,5 +60,12 @@ public VirtualMachineScaleSetIpTag() /// [Newtonsoft.Json.JsonProperty(PropertyName = "tag")] public string Tag {get; set; } + + /// + /// Gets or sets the first party service tag resource identifier associated + /// with the public IP address. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "firstPartyServiceTagId")] + public string FirstPartyServiceTagId {get; set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetManagedDiskParameters.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetManagedDiskParameters.cs index e2a50130aa12..8033d0fe2ccb 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetManagedDiskParameters.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetManagedDiskParameters.cs @@ -35,12 +35,18 @@ public VirtualMachineScaleSetManagedDiskParameters() /// Specifies the security profile for the managed disk. /// - public VirtualMachineScaleSetManagedDiskParameters(string storageAccountType = default(string), DiskEncryptionSetParameters diskEncryptionSet = default(DiskEncryptionSetParameters), VMDiskSecurityProfile securityProfile = default(VMDiskSecurityProfile)) + + /// Specifies additional properties for the managed disk that can be set at the + /// time of implicit creation of the disk. This property is not captured for + /// Restore Points. + /// + public VirtualMachineScaleSetManagedDiskParameters(string storageAccountType = default(string), DiskEncryptionSetParameters diskEncryptionSet = default(DiskEncryptionSetParameters), VMDiskSecurityProfile securityProfile = default(VMDiskSecurityProfile), AdditionalDiskProperties additionalDiskProperties = default(AdditionalDiskProperties)) { this.StorageAccountType = storageAccountType; this.DiskEncryptionSet = diskEncryptionSet; this.SecurityProfile = securityProfile; + this.AdditionalDiskProperties = additionalDiskProperties; CustomInit(); } @@ -70,5 +76,29 @@ public VirtualMachineScaleSetManagedDiskParameters() /// [Newtonsoft.Json.JsonProperty(PropertyName = "securityProfile")] public VMDiskSecurityProfile SecurityProfile {get; set; } + + /// + /// Gets or sets specifies additional properties for the managed disk that can + /// be set at the time of implicit creation of the disk. This property is not + /// captured for Restore Points. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "additionalDiskProperties")] + public AdditionalDiskProperties AdditionalDiskProperties {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + if (this.AdditionalDiskProperties != null) + { + this.AdditionalDiskProperties.Validate(); + } + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetOSDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetOSDisk.cs index c92f0b33ad63..dd11c4b0006c 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetOSDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetOSDisk.cs @@ -220,7 +220,10 @@ public virtual void Validate() - + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } } } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetStorageProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetStorageProfile.cs index 24802b73b10b..42cd1b81f604 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetStorageProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetStorageProfile.cs @@ -46,13 +46,19 @@ public VirtualMachineScaleSetStorageProfile() /// Specifies the disk controller type configured for the virtual machines in /// the scale set. Minimum api-version: 2022-08-01 /// Possible values include: 'SCSI', 'NVMe' - public VirtualMachineScaleSetStorageProfile(ImageReference imageReference = default(ImageReference), VirtualMachineScaleSetOSDisk osDisk = default(VirtualMachineScaleSetOSDisk), System.Collections.Generic.IList dataDisks = default(System.Collections.Generic.IList), string diskControllerType = default(string)) + + /// Specifies the Disk API version used when applying additionalDiskProperties + /// to managed disks. The value must be in the format YYYY-MM-DD (e.g., + /// "2026-03-02"). + /// Possible values include: '2025-01-02', '2026-03-02' + public VirtualMachineScaleSetStorageProfile(ImageReference imageReference = default(ImageReference), VirtualMachineScaleSetOSDisk osDisk = default(VirtualMachineScaleSetOSDisk), System.Collections.Generic.IList dataDisks = default(System.Collections.Generic.IList), string diskControllerType = default(string), string diskApiVersion = default(string)) { this.ImageReference = imageReference; this.OsDisk = osDisk; this.DataDisks = dataDisks; this.DiskControllerType = diskControllerType; + this.DiskApiVersion = diskApiVersion; CustomInit(); } @@ -96,6 +102,14 @@ public VirtualMachineScaleSetStorageProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "diskControllerType")] public string DiskControllerType {get; set; } + + /// + /// Gets or sets specifies the Disk API version used when applying + /// additionalDiskProperties to managed disks. The value must be in the format + /// YYYY-MM-DD (e.g., "2026-03-02"). Possible values include: '2025-01-02', '2026-03-02' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskApiVersion")] + public string DiskApiVersion {get; set; } /// /// Validate the object. /// @@ -120,6 +134,7 @@ public virtual void Validate() } } + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdate.cs index f0ed96836609..96e24d447ec2 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdate.cs @@ -296,7 +296,10 @@ public virtual void Validate() } - + if (this.VirtualMachineProfile != null) + { + this.VirtualMachineProfile.Validate(); + } if (this.PriorityMixPolicy != null) diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.cs index 239adf5b106f..3c111b6600cc 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateOSDisk.cs @@ -154,5 +154,24 @@ public VirtualMachineScaleSetUpdateOSDisk() /// [Newtonsoft.Json.JsonProperty(PropertyName = "deleteOption")] public string DeleteOption {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + + + + + if (this.ManagedDisk != null) + { + this.ManagedDisk.Validate(); + } + + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateProperties.cs index eb40b19ace4d..5b38e65a5d5b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateProperties.cs @@ -227,7 +227,10 @@ public virtual void Validate() this.UpgradePolicy.Validate(); } - + if (this.VirtualMachineProfile != null) + { + this.VirtualMachineProfile.Validate(); + } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.cs index 3ed2f408c3c8..6130ef66a26d 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateStorageProfile.cs @@ -38,13 +38,19 @@ public VirtualMachineScaleSetUpdateStorageProfile() /// scale set before updating its disk controller type based on the upgrade /// mode configured for the scale set. Minimum api-version: 2022-08-01 /// Possible values include: 'SCSI', 'NVMe' - public VirtualMachineScaleSetUpdateStorageProfile(ImageReference imageReference = default(ImageReference), VirtualMachineScaleSetUpdateOSDisk osDisk = default(VirtualMachineScaleSetUpdateOSDisk), System.Collections.Generic.IList dataDisks = default(System.Collections.Generic.IList), string diskControllerType = default(string)) + + /// Specifies the Disk API version used when applying additionalDiskProperties + /// to managed disks. The value must be in the format YYYY-MM-DD (e.g., + /// "2026-03-02"). + /// Possible values include: '2025-01-02', '2026-03-02' + public VirtualMachineScaleSetUpdateStorageProfile(ImageReference imageReference = default(ImageReference), VirtualMachineScaleSetUpdateOSDisk osDisk = default(VirtualMachineScaleSetUpdateOSDisk), System.Collections.Generic.IList dataDisks = default(System.Collections.Generic.IList), string diskControllerType = default(string), string diskApiVersion = default(string)) { this.ImageReference = imageReference; this.OsDisk = osDisk; this.DataDisks = dataDisks; this.DiskControllerType = diskControllerType; + this.DiskApiVersion = diskApiVersion; CustomInit(); } @@ -81,5 +87,39 @@ public VirtualMachineScaleSetUpdateStorageProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "diskControllerType")] public string DiskControllerType {get; set; } + + /// + /// Gets or sets specifies the Disk API version used when applying + /// additionalDiskProperties to managed disks. The value must be in the format + /// YYYY-MM-DD (e.g., "2026-03-02"). Possible values include: '2025-01-02', '2026-03-02' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "diskApiVersion")] + public string DiskApiVersion {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + if (this.OsDisk != null) + { + this.OsDisk.Validate(); + } + if (this.DataDisks != null) + { + foreach (var element in this.DataDisks) + { + if (element != null) + { + element.Validate(); + } + } + } + + + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs index 9498736508b7..de702cc68ea1 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetUpdateVMProfile.cs @@ -174,5 +174,30 @@ public VirtualMachineScaleSetUpdateVMProfile() /// [Newtonsoft.Json.JsonProperty(PropertyName = "interconnectBlockProfile")] public InterconnectBlockProfile InterconnectBlockProfile {get; set; } + /// + /// Validate the object. + /// + /// + /// Thrown if validation fails + /// + public virtual void Validate() + { + + if (this.StorageProfile != null) + { + this.StorageProfile.Validate(); + } + + + + + + + + + + + + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVM.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVM.cs index 68680a38df65..3c1545736075 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVM.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVM.cs @@ -161,7 +161,14 @@ public VirtualMachineScaleSetVM() /// Specifies the Interconnect Block related details of a Scale Set VM /// instance. Minimum api-version: 2026-03-01. /// - public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string instanceId = default(string), Sku sku = default(Sku), Plan plan = default(Plan), System.Collections.Generic.IList resources = default(System.Collections.Generic.IList), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), VirtualMachineIdentity identity = default(VirtualMachineIdentity), string etag = default(string), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), SecurityProfile securityProfile = default(SecurityProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), string resilientVMDeletionStatus = default(string), VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration = default(VirtualMachineScaleSetVMNetworkProfileConfiguration), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), string modelDefinitionApplied = default(string), VirtualMachineScaleSetVMProtectionPolicy protectionPolicy = default(VirtualMachineScaleSetVMProtectionPolicy), string userData = default(string), System.DateTime? timeCreated = default(System.DateTime?), string virtualMachineResourceId = default(string), InterconnectBlockProfile interconnectBlockProfile = default(InterconnectBlockProfile)) + + /// Specifies information about the capacity reservation that is used to + /// allocate the virtual machine scale set VM instance. The capacity + /// reservation group is inherited from the parent virtual machine scale set + /// and cannot be changed on the individual scale set VM instance. Minimum + /// api-version: 2026-04-01. + /// + public VirtualMachineScaleSetVM(string location, string id = default(string), string name = default(string), string type = default(string), System.Collections.Generic.IDictionary tags = default(System.Collections.Generic.IDictionary), string instanceId = default(string), Sku sku = default(Sku), Plan plan = default(Plan), System.Collections.Generic.IList resources = default(System.Collections.Generic.IList), System.Collections.Generic.IList zones = default(System.Collections.Generic.IList), VirtualMachineIdentity identity = default(VirtualMachineIdentity), string etag = default(string), HardwareProfile hardwareProfile = default(HardwareProfile), StorageProfile storageProfile = default(StorageProfile), AdditionalCapabilities additionalCapabilities = default(AdditionalCapabilities), OSProfile osProfile = default(OSProfile), SecurityProfile securityProfile = default(SecurityProfile), NetworkProfile networkProfile = default(NetworkProfile), DiagnosticsProfile diagnosticsProfile = default(DiagnosticsProfile), bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), string resilientVMDeletionStatus = default(string), VirtualMachineScaleSetVMNetworkProfileConfiguration networkProfileConfiguration = default(VirtualMachineScaleSetVMNetworkProfileConfiguration), SubResource availabilitySet = default(SubResource), string provisioningState = default(string), string licenseType = default(string), string modelDefinitionApplied = default(string), VirtualMachineScaleSetVMProtectionPolicy protectionPolicy = default(VirtualMachineScaleSetVMProtectionPolicy), string userData = default(string), System.DateTime? timeCreated = default(System.DateTime?), string virtualMachineResourceId = default(string), InterconnectBlockProfile interconnectBlockProfile = default(InterconnectBlockProfile), CapacityReservationProfile capacityReservation = default(CapacityReservationProfile)) : base(location, id, name, type, tags) { @@ -193,6 +200,7 @@ public VirtualMachineScaleSetVM() this.TimeCreated = timeCreated; this.VirtualMachineResourceId = virtualMachineResourceId; this.InterconnectBlockProfile = interconnectBlockProfile; + this.CapacityReservation = capacityReservation; CustomInit(); } @@ -412,6 +420,16 @@ public VirtualMachineScaleSetVM() /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.interconnectBlockProfile")] public InterconnectBlockProfile InterconnectBlockProfile {get; set; } + + /// + /// Gets or sets specifies information about the capacity reservation that is + /// used to allocate the virtual machine scale set VM instance. The capacity + /// reservation group is inherited from the parent virtual machine scale set + /// and cannot be changed on the individual scale set VM instance. Minimum + /// api-version: 2026-04-01. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "properties.capacityReservation")] + public CapacityReservationProfile CapacityReservation {get; set; } /// /// Validate the object. /// @@ -459,6 +477,7 @@ public override void Validate() + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders.cs new file mode 100644 index 000000000000..25a030d62e0f --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders + { + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders class. + /// + public VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineScaleSetVMDiagnosticRunCommandsCreateOrUpdateHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders.cs new file mode 100644 index 000000000000..179a361c09f6 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders + { + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders class. + /// + public VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders.cs new file mode 100644 index 000000000000..3f595ffd7c0a --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders + { + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders class. + /// + public VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineScaleSetVMDiagnosticRunCommandsUpdateHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtension.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtension.cs index 9d282d2ebb56..bb9825bbe54b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtension.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtension.cs @@ -47,7 +47,9 @@ public VirtualMachineScaleSetVMExtension() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -153,7 +155,10 @@ public VirtualMachineScaleSetVMExtension() public string VirtualMachineExtensionType {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs index ef7d54099ce6..4c3fb156742c 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMExtensionUpdate.cs @@ -44,7 +44,9 @@ public VirtualMachineScaleSetVMExtensionUpdate() /// Specifies the type of the extension; an example is "CustomScriptExtension". /// - /// Specifies the version of the script handler. + /// Specifies the Major.Minor version of the script handler. Customer is able + /// to specify only the Major.Minor version of an extension, Azure platform + /// will deliver the latest Patch.Hotfix version in the Major.Minor series. /// /// Indicates whether the extension should use a newer minor version if one is @@ -130,7 +132,10 @@ public VirtualMachineScaleSetVMExtensionUpdate() public string VirtualMachineExtensionType {get; set; } /// - /// Gets or sets specifies the version of the script handler. + /// Gets or sets specifies the Major.Minor version of the script handler. + /// Customer is able to specify only the Major.Minor version of an extension, + /// Azure platform will deliver the latest Patch.Hotfix version in the + /// Major.Minor series. /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.typeHandlerVersion")] public string TypeHandlerVersion {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMInstanceView.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMInstanceView.cs index 3dee81e334ce..ab248dc45456 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMInstanceView.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMInstanceView.cs @@ -87,7 +87,15 @@ public VirtualMachineScaleSetVMInstanceView() /// The Interconnect runtime view of the Scale Set VM instance. Minimum /// api-version: 2026-03-01. /// - public VirtualMachineScaleSetVMInstanceView(int? platformUpdateDomain = default(int?), int? platformFaultDomain = default(int?), string rdpThumbPrint = default(string), VirtualMachineAgentInstanceView vmAgent = default(VirtualMachineAgentInstanceView), MaintenanceRedeployStatus maintenanceRedeployStatus = default(MaintenanceRedeployStatus), System.Collections.Generic.IList disks = default(System.Collections.Generic.IList), System.Collections.Generic.IList extensions = default(System.Collections.Generic.IList), VirtualMachineHealthStatus vmHealth = default(VirtualMachineHealthStatus), BootDiagnosticsInstanceView bootDiagnostics = default(BootDiagnosticsInstanceView), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), string assignedHost = default(string), string placementGroupId = default(string), string computerName = default(string), string osName = default(string), string osVersion = default(string), string hyperVGeneration = default(string), InterconnectInstanceView interconnectInstanceView = default(InterconnectInstanceView)) + + /// Specifies which type of capacity reservation the virtual machine scale set + /// VM instance will consume capacity from if eligible or whether it is + /// explicitly opted out from being associated and consuming capacity from any + /// reserved capacity available in the subscription. Minimum api-version: + /// 2026-04-01. + /// Possible values include: 'NotEligible', 'Targeted', 'Open', 'Disabled', + /// 'Block' + public VirtualMachineScaleSetVMInstanceView(int? platformUpdateDomain = default(int?), int? platformFaultDomain = default(int?), string rdpThumbPrint = default(string), VirtualMachineAgentInstanceView vmAgent = default(VirtualMachineAgentInstanceView), MaintenanceRedeployStatus maintenanceRedeployStatus = default(MaintenanceRedeployStatus), System.Collections.Generic.IList disks = default(System.Collections.Generic.IList), System.Collections.Generic.IList extensions = default(System.Collections.Generic.IList), VirtualMachineHealthStatus vmHealth = default(VirtualMachineHealthStatus), BootDiagnosticsInstanceView bootDiagnostics = default(BootDiagnosticsInstanceView), System.Collections.Generic.IList statuses = default(System.Collections.Generic.IList), string assignedHost = default(string), string placementGroupId = default(string), string computerName = default(string), string osName = default(string), string osVersion = default(string), string hyperVGeneration = default(string), InterconnectInstanceView interconnectInstanceView = default(InterconnectInstanceView), string capacityReservationType = default(string)) { this.PlatformUpdateDomain = platformUpdateDomain; @@ -107,6 +115,7 @@ public VirtualMachineScaleSetVMInstanceView() this.OsVersion = osVersion; this.HyperVGeneration = hyperVGeneration; this.InterconnectInstanceView = interconnectInstanceView; + this.CapacityReservationType = capacityReservationType; CustomInit(); } @@ -230,5 +239,15 @@ public VirtualMachineScaleSetVMInstanceView() /// [Newtonsoft.Json.JsonProperty(PropertyName = "interconnectInstanceView")] public InterconnectInstanceView InterconnectInstanceView {get; private set; } + + /// + /// Gets specifies which type of capacity reservation the virtual machine scale + /// set VM instance will consume capacity from if eligible or whether it is + /// explicitly opted out from being associated and consuming capacity from any + /// reserved capacity available in the subscription. Minimum api-version: + /// 2026-04-01. Possible values include: 'NotEligible', 'Targeted', 'Open', 'Disabled', 'Block' + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityReservationType")] + public string CapacityReservationType {get; private set; } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProfile.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProfile.cs index a1d5ab5644d5..3eb1bddd5754 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProfile.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProfile.cs @@ -61,7 +61,7 @@ public VirtualMachineScaleSetVMProfile() /// Specifies the priority for the virtual machines in the scale set. Minimum /// api-version: 2017-10-30-preview. - /// Possible values include: 'Regular', 'Low', 'Spot' + /// Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// Specifies the eviction policy for the Azure Spot virtual machine and Azure /// Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and @@ -201,7 +201,7 @@ public VirtualMachineScaleSetVMProfile() /// /// Gets or sets specifies the priority for the virtual machines in the scale - /// set. Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot' + /// set. Minimum api-version: 2017-10-30-preview. Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// [Newtonsoft.Json.JsonProperty(PropertyName = "priority")] public string Priority {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProperties.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProperties.cs index a9eb98b4d303..4bc40de1889b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProperties.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetVMProperties.cs @@ -116,7 +116,14 @@ public VirtualMachineScaleSetVMProperties() /// Specifies the Interconnect Block related details of a Scale Set VM /// instance. Minimum api-version: 2026-03-01. /// - public VirtualMachineScaleSetVMProperties(bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), string resilientVMDeletionStatus = default(string), 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), string userData = default(string), System.DateTime? timeCreated = default(System.DateTime?), string virtualMachineResourceId = default(string), InterconnectBlockProfile interconnectBlockProfile = default(InterconnectBlockProfile)) + + /// Specifies information about the capacity reservation that is used to + /// allocate the virtual machine scale set VM instance. The capacity + /// reservation group is inherited from the parent virtual machine scale set + /// and cannot be changed on the individual scale set VM instance. Minimum + /// api-version: 2026-04-01. + /// + public VirtualMachineScaleSetVMProperties(bool? latestModelApplied = default(bool?), string vmId = default(string), VirtualMachineScaleSetVMInstanceView instanceView = default(VirtualMachineScaleSetVMInstanceView), HardwareProfile hardwareProfile = default(HardwareProfile), string resilientVMDeletionStatus = default(string), 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), string userData = default(string), System.DateTime? timeCreated = default(System.DateTime?), string virtualMachineResourceId = default(string), InterconnectBlockProfile interconnectBlockProfile = default(InterconnectBlockProfile), CapacityReservationProfile capacityReservation = default(CapacityReservationProfile)) { this.LatestModelApplied = latestModelApplied; @@ -140,6 +147,7 @@ public VirtualMachineScaleSetVMProperties() this.TimeCreated = timeCreated; this.VirtualMachineResourceId = virtualMachineResourceId; this.InterconnectBlockProfile = interconnectBlockProfile; + this.CapacityReservation = capacityReservation; CustomInit(); } @@ -310,6 +318,16 @@ public VirtualMachineScaleSetVMProperties() /// [Newtonsoft.Json.JsonProperty(PropertyName = "interconnectBlockProfile")] public InterconnectBlockProfile InterconnectBlockProfile {get; set; } + + /// + /// Gets or sets specifies information about the capacity reservation that is + /// used to allocate the virtual machine scale set VM instance. The capacity + /// reservation group is inherited from the parent virtual machine scale set + /// and cannot be changed on the individual scale set VM instance. Minimum + /// api-version: 2026-04-01. + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "capacityReservation")] + public CapacityReservationProfile CapacityReservation {get; set; } /// /// Validate the object. /// @@ -340,6 +358,7 @@ public virtual void Validate() + } } } \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders.cs new file mode 100644 index 000000000000..448c842abb11 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders.cs @@ -0,0 +1,55 @@ +// 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; + + public partial class VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders + { + /// + /// Initializes a new instance of the VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders class. + /// + public VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders() + { + CustomInit(); + } + + /// + /// Initializes a new instance of the VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders class. + /// + + /// + /// + + /// + /// + public VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders(string location = default(string), int? retryAfter = default(int?)) + + { + this.Location = location; + this.RetryAfter = retryAfter; + CustomInit(); + } + + /// + /// An initialization method that performs custom operations like setting defaults + /// + partial void CustomInit(); + + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Location")] + public string Location {get; set; } + + /// + /// Gets or sets + /// + [Newtonsoft.Json.JsonProperty(PropertyName = "Retry-After")] + public int? RetryAfter {get; set; } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineUpdate.cs b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineUpdate.cs index 26be2ad544d4..5fdea0e02275 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineUpdate.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Models/VirtualMachineUpdate.cs @@ -111,7 +111,7 @@ public VirtualMachineUpdate() /// Specifies the priority for the virtual machine. Minimum api-version: /// 2019-03-01 - /// Possible values include: 'Regular', 'Low', 'Spot' + /// Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// Specifies the eviction policy for the Azure Spot virtual machine and Azure /// Spot scale set. For Azure Spot virtual machines, both 'Deallocate' and @@ -371,7 +371,7 @@ public VirtualMachineUpdate() /// /// Gets or sets specifies the priority for the virtual machine. Minimum - /// api-version: 2019-03-01 Possible values include: 'Regular', 'Low', 'Spot' + /// api-version: 2019-03-01 Possible values include: 'Regular', 'Low', 'Spot', 'SpotPlus' /// [Newtonsoft.Json.JsonProperty(PropertyName = "properties.priority")] public string Priority {get; set; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/Operations.cs b/src/Compute/Compute.Management.Sdk/Generated/Operations.cs index aeab21a8370d..929164b6e39c 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/Operations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/Operations.cs @@ -68,7 +68,7 @@ internal Operations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/ProximityPlacementGroupsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/ProximityPlacementGroupsOperations.cs index 536b7550241d..497b44e0d6e4 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/ProximityPlacementGroupsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/ProximityPlacementGroupsOperations.cs @@ -79,7 +79,7 @@ internal ProximityPlacementGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal ProximityPlacementGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -522,7 +522,7 @@ internal ProximityPlacementGroupsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -764,7 +764,7 @@ internal ProximityPlacementGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "proximityPlacementGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1018,7 +1018,7 @@ internal ProximityPlacementGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "proximityPlacementGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; ProximityPlacementGroupUpdate parameters = new ProximityPlacementGroupUpdate(); if(tags != null) { @@ -1253,7 +1253,7 @@ internal ProximityPlacementGroupsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "proximityPlacementGroupName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/RestorePointCollectionsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/RestorePointCollectionsOperations.cs index c4657b9eec1b..6571a93591b1 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/RestorePointCollectionsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/RestorePointCollectionsOperations.cs @@ -82,7 +82,7 @@ internal RestorePointCollectionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -296,7 +296,7 @@ internal RestorePointCollectionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -526,7 +526,7 @@ internal RestorePointCollectionsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -771,7 +771,7 @@ internal RestorePointCollectionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "restorePointCollectionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1029,7 +1029,7 @@ internal RestorePointCollectionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "restorePointCollectionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1283,7 +1283,7 @@ internal RestorePointCollectionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "restorePointCollectionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/RestorePointsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/RestorePointsOperations.cs index fe7552f332d0..2d037204a094 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/RestorePointsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/RestorePointsOperations.cs @@ -118,7 +118,7 @@ internal RestorePointsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -425,7 +425,7 @@ internal RestorePointsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "restorePointName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -696,7 +696,7 @@ internal RestorePointsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "restorePointName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/SharedGalleriesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/SharedGalleriesOperations.cs index d3f31975fd90..d20c30bbdf05 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SharedGalleriesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SharedGalleriesOperations.cs @@ -98,7 +98,7 @@ internal SharedGalleriesOperations (ComputeManagementClient client) } } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -323,7 +323,7 @@ internal SharedGalleriesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "galleryUniqueName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImageVersionsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImageVersionsOperations.cs index c3ff443c13f1..ab8da994d029 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImageVersionsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImageVersionsOperations.cs @@ -115,7 +115,7 @@ internal SharedGalleryImageVersionsOperations (ComputeManagementClient client) } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -364,7 +364,7 @@ internal SharedGalleryImageVersionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "galleryImageVersionName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImagesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImagesOperations.cs index 1d02dbe14e5f..6ad7c2842076 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImagesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SharedGalleryImagesOperations.cs @@ -106,7 +106,7 @@ internal SharedGalleryImagesOperations (ComputeManagementClient client) } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -342,7 +342,7 @@ internal SharedGalleryImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "galleryImageName"); } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperations.cs index f5aba33756d7..2363b69aa095 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperations.cs @@ -79,7 +79,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -293,7 +293,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -519,7 +519,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -808,6 +808,66 @@ internal SnapshotsOperations (ComputeManagementClient client) return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateImmutabilityPolicyWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateImmutabilityPolicyWithHttpMessagesAsync(resourceGroupName, snapshotName, immutabilityPolicyData, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy lock operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateImmutabilityPolicyLockWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateImmutabilityPolicyLockWithHttpMessagesAsync(resourceGroupName, snapshotName, immutabilityPolicyData, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Creates or updates a snapshot. /// @@ -888,7 +948,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1148,7 +1208,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1398,7 +1458,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1620,7 +1680,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1852,7 +1912,7 @@ internal SnapshotsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); } - string apiVersion = "2025-01-02"; + string apiVersion = "2026-03-02"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1992,6 +2052,530 @@ internal SnapshotsOperations (ComputeManagementClient client) + } + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy 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 System.Threading.Tasks.Task> BeginUpdateImmutabilityPolicyWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (immutabilityPolicyData == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "immutabilityPolicyData"); + } + if (immutabilityPolicyData != null) + { + immutabilityPolicyData.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (snapshotName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); + } + + string apiVersion = "2026-03-02"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("snapshotName", snapshotName); + + tracingParameters.Add("immutabilityPolicyData", immutabilityPolicyData); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateImmutabilityPolicy", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/updateImmutabilityPolicy").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{snapshotName}", System.Uri.EscapeDataString(snapshotName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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(immutabilityPolicyData != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(immutabilityPolicyData, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// Immutability policy data supplied in the body of the update immutability + /// policy lock 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 System.Threading.Tasks.Task> BeginUpdateImmutabilityPolicyLockWithHttpMessagesAsync(string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (immutabilityPolicyData == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "immutabilityPolicyData"); + } + if (immutabilityPolicyData != null) + { + immutabilityPolicyData.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (snapshotName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "snapshotName"); + } + + string apiVersion = "2026-03-02"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("snapshotName", snapshotName); + + tracingParameters.Add("immutabilityPolicyData", immutabilityPolicyData); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdateImmutabilityPolicyLock", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/snapshots/{snapshotName}/updateImmutabilityPolicyLock").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{snapshotName}", System.Uri.EscapeDataString(snapshotName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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(immutabilityPolicyData != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(immutabilityPolicyData, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } /// /// Lists snapshots under a subscription. diff --git a/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperationsExtensions.cs index 4a6f7e7d6a30..c8016fc9bd9d 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperationsExtensions.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SnapshotsOperationsExtensions.cs @@ -325,6 +325,100 @@ public static void RevokeAccess(this ISnapshotsOperations operations, string res (await operations.RevokeAccessWithHttpMessagesAsync(resourceGroupName, snapshotName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + public static Snapshot UpdateImmutabilityPolicy(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData) + { + return ((ISnapshotsOperations)operations).UpdateImmutabilityPolicyAsync(resourceGroupName, snapshotName, immutabilityPolicyData).GetAwaiter().GetResult(); + } + + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateImmutabilityPolicyAsync(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateImmutabilityPolicyWithHttpMessagesAsync(resourceGroupName, snapshotName, immutabilityPolicyData, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + public static Snapshot UpdateImmutabilityPolicyLock(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData) + { + return ((ISnapshotsOperations)operations).UpdateImmutabilityPolicyLockAsync(resourceGroupName, snapshotName, immutabilityPolicyData).GetAwaiter().GetResult(); + } + + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateImmutabilityPolicyLockAsync(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateImmutabilityPolicyLockWithHttpMessagesAsync(resourceGroupName, snapshotName, immutabilityPolicyData, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Creates or updates a snapshot. /// /// @@ -534,6 +628,100 @@ public static void BeginRevokeAccess(this ISnapshotsOperations operations, strin (await operations.BeginRevokeAccessWithHttpMessagesAsync(resourceGroupName, snapshotName, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + public static Snapshot BeginUpdateImmutabilityPolicy(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData) + { + return ((ISnapshotsOperations)operations).BeginUpdateImmutabilityPolicyAsync(resourceGroupName, snapshotName, immutabilityPolicyData).GetAwaiter().GetResult(); + } + + /// + /// Updates the immutability policy of a snapshot. Sets or extends an unlocked + /// immutability policy with the specified duration and type. If the snapshot + /// already has a locked policy, the request will be rejected. Use + /// updateImmutabilityPolicyLock to lock an immutability policy. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateImmutabilityPolicyAsync(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyData immutabilityPolicyData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateImmutabilityPolicyWithHttpMessagesAsync(resourceGroupName, snapshotName, immutabilityPolicyData, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + public static Snapshot BeginUpdateImmutabilityPolicyLock(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData) + { + return ((ISnapshotsOperations)operations).BeginUpdateImmutabilityPolicyLockAsync(resourceGroupName, snapshotName, immutabilityPolicyData).GetAwaiter().GetResult(); + } + + /// + /// Locks the immutability policy of a snapshot. Once locked, the policy cannot + /// be reduced or removed until the lock period expires. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the snapshot that is being created. The name can't be changed + /// after the snapshot is created. Supported characters for the name are a-z, + /// A-Z, 0-9, _ and -. The max name length is 80 characters. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateImmutabilityPolicyLockAsync(this ISnapshotsOperations operations, string resourceGroupName, string snapshotName, ImmutabilityPolicyLockData immutabilityPolicyData, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateImmutabilityPolicyLockWithHttpMessagesAsync(resourceGroupName, snapshotName, immutabilityPolicyData, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// /// Lists snapshots under a subscription. /// /// diff --git a/src/Compute/Compute.Management.Sdk/Generated/SoftDeletedResourceOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/SoftDeletedResourceOperations.cs index a0491ec60f03..926ff5e1ec68 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SoftDeletedResourceOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SoftDeletedResourceOperations.cs @@ -141,7 +141,7 @@ internal SoftDeletedResourceOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.Pattern, "artifactName", "^[a-zA-Z0-9]+([_]?[a-zA-Z0-9]+)*$"); } } - string apiVersion = "2025-03-03"; + string apiVersion = "2025-12-03"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/SshPublicKeysOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/SshPublicKeysOperations.cs index fb14853264a1..8bded8e5f214 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/SshPublicKeysOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/SshPublicKeysOperations.cs @@ -80,7 +80,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -519,7 +519,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sshPublicKeyName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -756,7 +756,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sshPublicKeyName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1014,7 +1014,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sshPublicKeyName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1244,7 +1244,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sshPublicKeyName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1459,7 +1459,7 @@ internal SshPublicKeysOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sshPublicKeyName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; SshGenerateKeyPairInputParameters parameters = new SshGenerateKeyPairInputParameters(); if(encryptionType != null) { diff --git a/src/Compute/Compute.Management.Sdk/Generated/TenantLevelGallerySharingOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/TenantLevelGallerySharingOperations.cs new file mode 100644 index 000000000000..1e84d3c95cc3 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/TenantLevelGallerySharingOperations.cs @@ -0,0 +1,540 @@ +// 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 System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// TenantLevelGallerySharingOperations operations. + /// + internal partial class TenantLevelGallerySharingOperations : Microsoft.Rest.IServiceOperations, ITenantLevelGallerySharingOperations + { + /// + /// Initializes a new instance of the TenantLevelGallerySharingOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal TenantLevelGallerySharingOperations (ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> AcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginAcceptWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> RejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginRejectWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// 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 System.Threading.Tasks.Task> BeginAcceptWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); + } + if (location != null) + { + if (location.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); + } + } + if (sharedGallerySubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sharedGallerySubscriptionId"); + } + if (sharedGallerySubscriptionId != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(sharedGallerySubscriptionId, "^[^_\\W][\\w-._]{0,79}(? tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("location", location); + tracingParameters.Add("sharedGallerySubscriptionId", sharedGallerySubscriptionId); + tracingParameters.Add("sharedGalleryName", sharedGalleryName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginAccept", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Compute/locations/{location}/tenantLevelSharedGallerySubscriptions/{sharedGallerySubscriptionId}/sharedGalleries/{sharedGalleryName}/accept").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{sharedGallerySubscriptionId}", System.Uri.EscapeDataString(sharedGallerySubscriptionId)); + _url = _url.Replace("{sharedGalleryName}", System.Uri.EscapeDataString(sharedGalleryName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// 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 System.Threading.Tasks.Task> BeginRejectWithHttpMessagesAsync(string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (location == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "location"); + } + if (location != null) + { + if (location.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); + } + } + if (sharedGallerySubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "sharedGallerySubscriptionId"); + } + if (sharedGallerySubscriptionId != null) + { + if (!System.Text.RegularExpressions.Regex.IsMatch(sharedGallerySubscriptionId, "^[^_\\W][\\w-._]{0,79}(? tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("location", location); + tracingParameters.Add("sharedGallerySubscriptionId", sharedGallerySubscriptionId); + tracingParameters.Add("sharedGalleryName", sharedGalleryName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginReject", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "providers/Microsoft.Compute/locations/{location}/tenantLevelSharedGallerySubscriptions/{sharedGallerySubscriptionId}/sharedGalleries/{sharedGalleryName}/reject").ToString(); + _url = _url.Replace("{location}", System.Uri.EscapeDataString(location)); + _url = _url.Replace("{sharedGallerySubscriptionId}", System.Uri.EscapeDataString(sharedGallerySubscriptionId)); + _url = _url.Replace("{sharedGalleryName}", System.Uri.EscapeDataString(sharedGalleryName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/TenantLevelGallerySharingOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/TenantLevelGallerySharingOperationsExtensions.cs new file mode 100644 index 000000000000..873fc5ab2b24 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/TenantLevelGallerySharingOperationsExtensions.cs @@ -0,0 +1,196 @@ +// 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.Azure; + using Models; + + /// + /// Extension methods for TenantLevelGallerySharingOperations + /// + public static partial class TenantLevelGallerySharingOperationsExtensions + { + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + public static TenantLevelGallerySharingAcceptHeaders Accept(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((ITenantLevelGallerySharingOperations)operations).AcceptAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task AcceptAsync(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.AcceptWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + public static TenantLevelGallerySharingRejectHeaders Reject(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((ITenantLevelGallerySharingOperations)operations).RejectAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task RejectAsync(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.RejectWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + public static TenantLevelGallerySharingAcceptHeaders BeginAccept(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((ITenantLevelGallerySharingOperations)operations).BeginAcceptAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Accept sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginAcceptAsync(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginAcceptWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + public static TenantLevelGallerySharingRejectHeaders BeginReject(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName) + { + return ((ITenantLevelGallerySharingOperations)operations).BeginRejectAsync(location, sharedGallerySubscriptionId, sharedGalleryName).GetAwaiter().GetResult(); + } + + /// + /// Reject sharing of a tenant-level shared gallery. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of Azure region. + /// + /// + /// The name of the SharedGallerySubscription + /// + /// + /// The name of the TenantLevelSharedGallerySubscription + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginRejectAsync(this ITenantLevelGallerySharingOperations operations, string location, string sharedGallerySubscriptionId, string sharedGalleryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginRejectWithHttpMessagesAsync(location, sharedGallerySubscriptionId, sharedGalleryName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + } +} diff --git a/src/Compute/Compute.Management.Sdk/Generated/UsageOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/UsageOperations.cs index 2cf0b97bc258..1d190e0c8395 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/UsageOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/UsageOperations.cs @@ -95,7 +95,7 @@ internal UsageOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineDiagnosticRunCommandsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineDiagnosticRunCommandsOperations.cs new file mode 100644 index 000000000000..7bb1fc1342e7 --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineDiagnosticRunCommandsOperations.cs @@ -0,0 +1,1535 @@ +// 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 System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// VirtualMachineDiagnosticRunCommandsOperations operations. + /// + internal partial class VirtualMachineDiagnosticRunCommandsOperations : Microsoft.Rest.IServiceOperations, IVirtualMachineDiagnosticRunCommandsOperations + { + /// + /// Initializes a new instance of the VirtualMachineDiagnosticRunCommandsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal VirtualMachineDiagnosticRunCommandsOperations (ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// The operation to get all diagnostic run commands of a Virtual Machine. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// 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 System.Threading.Tasks.Task>> DiagnosticListByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); + } + + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("expand", expand); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "DiagnosticListByVirtualMachine", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/diagnosticRunCommands").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to get the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// 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 System.Threading.Tasks.Task> GetByVirtualMachineWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("runCommandName", runCommandName); + tracingParameters.Add("expand", expand); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "GetByVirtualMachine", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic RunCommand + /// operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Update Virtual Machine Diagnostic RunCommand + /// operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic 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 System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (runCommand == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommand"); + } + if (runCommand != null) + { + runCommand.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("runCommandName", runCommandName); + + tracingParameters.Add("runCommand", runCommand); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Update Virtual Machine Diagnostic 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 System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (runCommand == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommand"); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("runCommandName", runCommandName); + + tracingParameters.Add("runCommand", runCommand); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// 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 System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmName, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmName", vmName); + tracingParameters.Add("runCommandName", runCommandName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachines/{vmName}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmName}", System.Uri.EscapeDataString(vmName)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to get all diagnostic 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 System.Threading.Tasks.Task>> DiagnosticListByVirtualMachineNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "DiagnosticListByVirtualMachineNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineDiagnosticRunCommandsOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineDiagnosticRunCommandsOperationsExtensions.cs new file mode 100644 index 000000000000..c6e050d6078a --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineDiagnosticRunCommandsOperationsExtensions.cs @@ -0,0 +1,415 @@ +// 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.Azure; + using Models; + + /// + /// Extension methods for VirtualMachineDiagnosticRunCommandsOperations + /// + public static partial class VirtualMachineDiagnosticRunCommandsOperationsExtensions + { + /// + /// The operation to get all diagnostic run commands of a Virtual Machine. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The expand expression to apply on the operation. + /// + public static Microsoft.Rest.Azure.IPage DiagnosticListByVirtualMachine(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string expand = default(string)) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).DiagnosticListByVirtualMachineAsync(resourceGroupName, vmName, expand).GetAwaiter().GetResult(); + } + + /// + /// The operation to get all diagnostic run commands of a Virtual Machine. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> DiagnosticListByVirtualMachineAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DiagnosticListByVirtualMachineWithHttpMessagesAsync(resourceGroupName, vmName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to get the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The expand expression to apply on the operation. + /// + public static VirtualMachineDiagnosticRunCommand GetByVirtualMachine(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, string expand = default(string)) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).GetByVirtualMachineAsync(resourceGroupName, vmName, runCommandName, expand).GetAwaiter().GetResult(); + } + + /// + /// The operation to get the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetByVirtualMachineAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetByVirtualMachineWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand CreateOrUpdate(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).CreateOrUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand Update(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).UpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommandsDeleteHeaders Delete(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).DeleteAsync(resourceGroupName, vmName, runCommandName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand BeginCreateOrUpdate(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to create or update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand BeginUpdate(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).BeginUpdateAsync(resourceGroupName, vmName, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to update the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommandsDeleteHeaders BeginDelete(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).BeginDeleteAsync(resourceGroupName, vmName, runCommandName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete the diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachine + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmName, string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmName, runCommandName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// The operation to get all diagnostic 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 Microsoft.Rest.Azure.IPage DiagnosticListByVirtualMachineNext(this IVirtualMachineDiagnosticRunCommandsOperations operations, string nextPageLink) + { + return ((IVirtualMachineDiagnosticRunCommandsOperations)operations).DiagnosticListByVirtualMachineNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// The operation to get all diagnostic 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 System.Threading.Tasks.Task> DiagnosticListByVirtualMachineNextAsync(this IVirtualMachineDiagnosticRunCommandsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DiagnosticListByVirtualMachineNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperations.cs index 7706d1c90e21..7688fca91cd0 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperations.cs @@ -101,7 +101,7 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "publisherName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -281,6 +281,11 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client /// /// /// + /// + /// Expand the response to include additional read-only metadata. Allowed + /// values: `properties` — returns extended metadata (`releaseCategory`, + /// `urgencyLevel`, `runProfile`). + /// /// /// Headers that will be added to request. /// @@ -302,7 +307,7 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client /// /// A response object containing the response body and response headers. /// - public async System.Threading.Tasks.Task>> ListVersionsWithHttpMessagesAsync(string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public async System.Threading.Tasks.Task>> ListVersionsWithHttpMessagesAsync(string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { @@ -343,7 +348,8 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client - string apiVersion = "2026-03-01"; + + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -358,6 +364,7 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client tracingParameters.Add("filter", filter); tracingParameters.Add("top", top); tracingParameters.Add("orderby", orderby); + tracingParameters.Add("expand", expand); tracingParameters.Add("cancellationToken", cancellationToken); @@ -389,6 +396,10 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client { _queryParameters.Add(string.Format("$orderby={0}", System.Uri.EscapeDataString(orderby))); } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } if (_queryParameters.Count > 0) { _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); @@ -598,7 +609,7 @@ internal VirtualMachineExtensionImagesOperations (ComputeManagementClient client throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "version"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs index 267379040157..205264ecf7e4 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionImagesOperationsExtensions.cs @@ -75,9 +75,14 @@ public static System.Collections.Generic.IList Lis /// /// /// - public static System.Collections.Generic.IList ListVersions(this IVirtualMachineExtensionImagesOperations operations, string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string)) + /// + /// Expand the response to include additional read-only metadata. Allowed + /// values: `properties` — returns extended metadata (`releaseCategory`, + /// `urgencyLevel`, `runProfile`). + /// + public static System.Collections.Generic.IList ListVersions(this IVirtualMachineExtensionImagesOperations operations, string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), string expand = default(string)) { - return ((IVirtualMachineExtensionImagesOperations)operations).ListVersionsAsync(location, publisherName, type, filter, top, orderby).GetAwaiter().GetResult(); + return ((IVirtualMachineExtensionImagesOperations)operations).ListVersionsAsync(location, publisherName, type, filter, top, orderby, expand).GetAwaiter().GetResult(); } /// @@ -104,12 +109,17 @@ public static System.Collections.Generic.IList Lis /// /// /// + /// + /// Expand the response to include additional read-only metadata. Allowed + /// values: `properties` — returns extended metadata (`releaseCategory`, + /// `urgencyLevel`, `runProfile`). + /// /// /// The cancellation token. /// - public static async System.Threading.Tasks.Task> ListVersionsAsync(this IVirtualMachineExtensionImagesOperations operations, string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + public static async System.Threading.Tasks.Task> ListVersionsAsync(this IVirtualMachineExtensionImagesOperations operations, string location, string publisherName, string type, string filter = default(string), int? top = default(int?), string orderby = default(string), string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { - using (var _result = await operations.ListVersionsWithHttpMessagesAsync(location, publisherName, type, filter, top, orderby, null, cancellationToken).ConfigureAwait(false)) + using (var _result = await operations.ListVersionsWithHttpMessagesAsync(location, publisherName, type, filter, top, orderby, expand, null, cancellationToken).ConfigureAwait(false)) { return _result.Body; } diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionsOperations.cs index d1c1c57f0d4c..d582c0e8bd2c 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineExtensionsOperations.cs @@ -109,7 +109,7 @@ internal VirtualMachineExtensionsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -352,7 +352,7 @@ internal VirtualMachineExtensionsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -685,7 +685,7 @@ internal VirtualMachineExtensionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -966,7 +966,7 @@ internal VirtualMachineExtensionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1219,7 +1219,7 @@ internal VirtualMachineExtensionsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesEdgeZoneOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesEdgeZoneOperations.cs index a7cfc6b74794..da3712d89078 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesEdgeZoneOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesEdgeZoneOperations.cs @@ -102,7 +102,7 @@ internal VirtualMachineImagesEdgeZoneOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "edgeZone"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -333,7 +333,7 @@ internal VirtualMachineImagesEdgeZoneOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "publisherName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -574,7 +574,7 @@ internal VirtualMachineImagesEdgeZoneOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "offer"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -838,7 +838,7 @@ internal VirtualMachineImagesEdgeZoneOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1113,7 +1113,7 @@ internal VirtualMachineImagesEdgeZoneOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesOperations.cs index 66b5a2edd71f..75bdff964dc3 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineImagesOperations.cs @@ -102,7 +102,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "edgeZone"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -317,7 +317,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -538,7 +538,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "publisherName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -769,7 +769,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "offer"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1022,7 +1022,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1287,7 +1287,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1544,7 +1544,7 @@ internal VirtualMachineImagesOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineRunCommandsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineRunCommandsOperations.cs index d823b729eb6d..45dffc1b9b9a 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineRunCommandsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineRunCommandsOperations.cs @@ -93,7 +93,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -316,7 +316,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -546,7 +546,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -789,7 +789,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1122,7 +1122,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1403,7 +1403,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1656,7 +1656,7 @@ internal VirtualMachineRunCommandsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetExtensionsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetExtensionsOperations.cs index b3f35cb5ae74..c25beb2d74d0 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetExtensionsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetExtensionsOperations.cs @@ -105,7 +105,7 @@ internal VirtualMachineScaleSetExtensionsOperations (ComputeManagementClient cli throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -343,7 +343,7 @@ internal VirtualMachineScaleSetExtensionsOperations (ComputeManagementClient cli } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -676,7 +676,7 @@ internal VirtualMachineScaleSetExtensionsOperations (ComputeManagementClient cli throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmssExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -957,7 +957,7 @@ internal VirtualMachineScaleSetExtensionsOperations (ComputeManagementClient cli throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmssExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1228,7 +1228,7 @@ internal VirtualMachineScaleSetExtensionsOperations (ComputeManagementClient cli throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmssExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetLifeCycleHookEventsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetLifeCycleHookEventsOperations.cs index a3d79e5b3b32..3cd6ca6bc5fd 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetLifeCycleHookEventsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetLifeCycleHookEventsOperations.cs @@ -106,7 +106,7 @@ internal VirtualMachineScaleSetLifeCycleHookEventsOperations (ComputeManagementC throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -340,7 +340,7 @@ internal VirtualMachineScaleSetLifeCycleHookEventsOperations (ComputeManagementC throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "lifecycleHookEventName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -584,7 +584,7 @@ internal VirtualMachineScaleSetLifeCycleHookEventsOperations (ComputeManagementC throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "lifecycleHookEventName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs index 2be6c43029cb..db0077ed601c 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetRollingUpgradesOperations.cs @@ -175,7 +175,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations (ComputeManagementClien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -400,7 +400,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations (ComputeManagementClien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -607,7 +607,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations (ComputeManagementClien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -812,7 +812,7 @@ internal VirtualMachineScaleSetRollingUpgradesOperations (ComputeManagementClien throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMDiagnosticRunCommandsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMDiagnosticRunCommandsOperations.cs new file mode 100644 index 000000000000..c6190aa76ddf --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMDiagnosticRunCommandsOperations.cs @@ -0,0 +1,1594 @@ +// 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 System.Linq; + using Microsoft.Rest; + using Microsoft.Rest.Azure; + using Models; + + /// + /// VirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations. + /// + internal partial class VirtualMachineScaleSetVMDiagnosticRunCommandsOperations : Microsoft.Rest.IServiceOperations, IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations + { + /// + /// Initializes a new instance of the VirtualMachineScaleSetVMDiagnosticRunCommandsOperations class. + /// + /// + /// Reference to the service client. + /// + /// + /// Thrown when a required parameter is null + /// + internal VirtualMachineScaleSetVMDiagnosticRunCommandsOperations (ComputeManagementClient client) + { + if (client == null) + { + throw new System.ArgumentNullException("client"); + } + this.Client = client; + } + + /// + /// Gets a reference to the ComputeManagementClient + /// + public ComputeManagementClient Client { get; private set; } + + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// 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 System.Threading.Tasks.Task>> ListWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmScaleSetName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); + } + + if (instanceId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); + } + + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("expand", expand); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "List", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/diagnosticRunCommands").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to get the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// 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 System.Threading.Tasks.Task> GetWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string), System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmScaleSetName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); + } + + if (instanceId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("runCommandName", runCommandName); + tracingParameters.Add("expand", expand); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "Get", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (apiVersion != null) + { + _queryParameters.Add(string.Format("api-version={0}", System.Uri.EscapeDataString(apiVersion))); + } + if (expand != null) + { + _queryParameters.Add(string.Format("$expand={0}", System.Uri.EscapeDataString(expand))); + } + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic RunCommand + /// operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> CreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Resource create parameters. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> UpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationResponse _response = await BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPutOrPatchOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> DeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Parameters supplied to the Create Virtual Machine Diagnostic 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 System.Threading.Tasks.Task> BeginCreateOrUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (runCommand == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommand"); + } + if (runCommand != null) + { + runCommand.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmScaleSetName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); + } + + if (instanceId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("runCommandName", runCommandName); + + tracingParameters.Add("runCommand", runCommand); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginCreateOrUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PUT"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 201) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + // Deserialize Response + if ((int)_statusCode == 201) + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + _result.Body = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// Resource create parameters. + /// + /// + /// 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 System.Threading.Tasks.Task> BeginUpdateWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (runCommand == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommand"); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmScaleSetName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); + } + + if (instanceId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("runCommandName", runCommandName); + + tracingParameters.Add("runCommand", runCommand); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginUpdate", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("PATCH"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(runCommand, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// 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 System.Threading.Tasks.Task> BeginDeleteWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmScaleSetName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); + } + + if (instanceId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); + } + + if (runCommandName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmScaleSetName", vmScaleSetName); + tracingParameters.Add("instanceId", instanceId); + tracingParameters.Add("runCommandName", runCommandName); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginDelete", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/virtualMachines/{instanceId}/diagnosticRunCommands/{runCommandName}").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); + _url = _url.Replace("{instanceId}", System.Uri.EscapeDataString(instanceId)); + _url = _url.Replace("{runCommandName}", System.Uri.EscapeDataString(runCommandName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("DELETE"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200 && (int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + /// + /// Thrown when the operation returned an invalid status code + /// + /// + /// Thrown when unable to deserialize the response + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// Thrown when a required parameter is null + /// + /// + /// A response object containing the response body and response headers. + /// + public async System.Threading.Tasks.Task>> ListNextWithHttpMessagesAsync(string nextPageLink, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + if (nextPageLink == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "nextPageLink"); + } + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("nextPageLink", nextPageLink); + + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "ListNext", tracingParameters); + } + // Construct URL + string _url = "{nextLink}"; + _url = _url.Replace("{nextLink}", nextPageLink); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.List(); + if (_queryParameters.Count > 0) + { + _url += (_url.Contains("?") ? "&" : "?") + string.Join("&", _queryParameters); + } + // Create HTTP transport objects + var _httpRequest = new System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("GET"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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 (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 200) + { + var ex = new ErrorResponseException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + ErrorResponse _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.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 = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject>(_responseContent, this.Client.DeserializationSettings); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the response.", _responseContent, ex); + } + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + + } + } +} \ No newline at end of file diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMDiagnosticRunCommandsOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMDiagnosticRunCommandsOperationsExtensions.cs new file mode 100644 index 000000000000..372ad9a6f96e --- /dev/null +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMDiagnosticRunCommandsOperationsExtensions.cs @@ -0,0 +1,467 @@ +// 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.Azure; + using Models; + + /// + /// Extension methods for VirtualMachineScaleSetVMDiagnosticRunCommandsOperations + /// + public static partial class VirtualMachineScaleSetVMDiagnosticRunCommandsOperationsExtensions + { + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The expand expression to apply on the operation. + /// + public static Microsoft.Rest.Azure.IPage List(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string)) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).ListAsync(resourceGroupName, vmScaleSetName, instanceId, expand).GetAwaiter().GetResult(); + } + + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to get the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The expand expression to apply on the operation. + /// + public static VirtualMachineDiagnosticRunCommand Get(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string)) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).GetAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, expand).GetAwaiter().GetResult(); + } + + /// + /// The operation to get the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The expand expression to apply on the operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task GetAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, string expand = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, expand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand CreateOrUpdate(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).CreateOrUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task CreateOrUpdateAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand Update(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).UpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task UpdateAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.UpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders Delete(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).DeleteAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task DeleteAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.DeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand BeginCreateOrUpdate(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).BeginCreateOrUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to create or update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginCreateOrUpdateAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineDiagnosticRunCommand runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineDiagnosticRunCommand BeginUpdate(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).BeginUpdateAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand).GetAwaiter().GetResult(); + } + + /// + /// The operation to update the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginUpdateAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, VirtualMachineRunCommandUpdate runCommand, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginUpdateWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, runCommand, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + public static VirtualMachineScaleSetVMDiagnosticRunCommandsDeleteHeaders BeginDelete(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).BeginDeleteAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName).GetAwaiter().GetResult(); + } + + /// + /// The operation to delete the VMSS VM diagnostic run command. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VirtualMachineScaleSet + /// + /// + /// The name of the VirtualMachineScaleSetVM + /// + /// + /// The name of the VirtualMachineDiagnosticRunCommand + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginDeleteAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string resourceGroupName, string vmScaleSetName, string instanceId, string runCommandName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceId, runCommandName, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + public static Microsoft.Rest.Azure.IPage ListNext(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string nextPageLink) + { + return ((IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations)operations).ListNextAsync(nextPageLink).GetAwaiter().GetResult(); + } + + /// + /// The operation to get all diagnostic run commands of an instance in Virtual + /// Machine Scaleset. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The NextLink from the previous successful call to List operation. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task> ListNextAsync(this IVirtualMachineScaleSetVMDiagnosticRunCommandsOperations operations, string nextPageLink, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Body; + } + } + } +} diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs index 5c1f724eb8c1..02e072ab2024 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMExtensionsOperations.cs @@ -118,7 +118,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations (ComputeManagementClient c } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -371,7 +371,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations (ComputeManagementClient c } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -723,7 +723,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations (ComputeManagementClient c throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1014,7 +1014,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations (ComputeManagementClient c throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1277,7 +1277,7 @@ internal VirtualMachineScaleSetVMExtensionsOperations (ComputeManagementClient c throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmExtensionName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs index e3d7fe64fb81..451b4069b96d 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMRunCommandsOperations.cs @@ -118,7 +118,7 @@ internal VirtualMachineScaleSetVMRunCommandsOperations (ComputeManagementClient } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -371,7 +371,7 @@ internal VirtualMachineScaleSetVMRunCommandsOperations (ComputeManagementClient } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -723,7 +723,7 @@ internal VirtualMachineScaleSetVMRunCommandsOperations (ComputeManagementClient throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1014,7 +1014,7 @@ internal VirtualMachineScaleSetVMRunCommandsOperations (ComputeManagementClient throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1277,7 +1277,7 @@ internal VirtualMachineScaleSetVMRunCommandsOperations (ComputeManagementClient throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "runCommandName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMsOperations.cs index 883352e175f0..598c3f6a8d7b 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetVMsOperations.cs @@ -122,7 +122,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -377,7 +377,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -768,7 +768,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1174,7 +1174,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1441,7 +1441,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1707,7 +1707,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1988,7 +1988,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2209,7 +2209,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2452,7 +2452,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2708,7 +2708,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2923,7 +2923,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3146,7 +3146,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3367,7 +3367,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3587,7 +3587,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3810,7 +3810,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4025,7 +4025,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4254,7 +4254,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4494,7 +4494,7 @@ internal VirtualMachineScaleSetVMSOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "instanceId"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperations.cs index 03488476ca00..e4f6b1d47f5f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperations.cs @@ -94,7 +94,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -295,7 +295,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -509,7 +509,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -739,7 +739,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1097,7 +1097,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VMScaleSetConvertToSinglePlacementGroupInput parameters = new VMScaleSetConvertToSinglePlacementGroupInput(); if(activePlacementGroupId != null) { @@ -1393,7 +1393,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1631,7 +1631,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1816,6 +1816,32 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); } + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + /// + /// The input object for the MigrateVMAvailabilityZone API. + /// + /// + /// Headers that will be added to request. + /// + /// + /// The cancellation token. + /// + public async System.Threading.Tasks.Task> MigrateVMAvailabilityZoneWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + // Send Request + Microsoft.Rest.Azure.AzureOperationHeaderResponse _response = await BeginMigrateVMAvailabilityZoneWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, body, customHeaders, cancellationToken).ConfigureAwait(false); + return await this.Client.GetPostOrDeleteOperationResultAsync(_response, customHeaders, cancellationToken).ConfigureAwait(false); + } + /// /// Gets list of OS upgrades on a VM scale set instance. /// @@ -1883,7 +1909,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2357,7 +2383,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2633,7 +2659,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2934,7 +2960,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3199,7 +3225,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3415,7 +3441,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -3657,7 +3683,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -3887,7 +3913,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); if(instanceIds != null) { @@ -4113,7 +4139,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceRequiredIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceRequiredIDs(); if(instanceIds != null) { @@ -4265,6 +4291,243 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) + } + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + /// + /// The input object for the MigrateVMAvailabilityZone API. + /// + /// + /// 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 System.Threading.Tasks.Task> BeginMigrateVMAvailabilityZoneWithHttpMessagesAsync(string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body, System.Collections.Generic.Dictionary> customHeaders = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + + + + + if (body == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "body"); + } + if (body != null) + { + body.Validate(); + } + if (this.Client.SubscriptionId == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "this.Client.SubscriptionId"); + } + if (this.Client.SubscriptionId != null) + { + if (this.Client.SubscriptionId.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "Client.SubscriptionId", 1); + } + } + if (resourceGroupName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "resourceGroupName"); + } + if (resourceGroupName != null) + { + if (resourceGroupName.Length > 90) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MaxLength, "resourceGroupName", 90); + } + if (resourceGroupName.Length < 1) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "resourceGroupName", 1); + } + } + if (vmScaleSetName == null) + { + throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); + } + + string apiVersion = "2026-04-01"; + // Tracing + bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; + string _invocationId = null; + if (_shouldTrace) + { + _invocationId = Microsoft.Rest.ServiceClientTracing.NextInvocationId.ToString(); + System.Collections.Generic.Dictionary tracingParameters = new System.Collections.Generic.Dictionary(); + tracingParameters.Add("apiVersion", apiVersion); + tracingParameters.Add("resourceGroupName", resourceGroupName); + tracingParameters.Add("vmScaleSetName", vmScaleSetName); + + tracingParameters.Add("body", body); + + tracingParameters.Add("cancellationToken", cancellationToken); + Microsoft.Rest.ServiceClientTracing.Enter(_invocationId, this, "BeginMigrateVMAvailabilityZone", tracingParameters); + } + // Construct URL + + var _baseUrl = this.Client.BaseUri.AbsoluteUri; + var _url = new System.Uri(new System.Uri(_baseUrl + (_baseUrl.EndsWith("/") ? "" : "/")), "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/virtualMachineScaleSets/{vmScaleSetName}/migrateVMAvailabilityZone").ToString(); + _url = _url.Replace("{subscriptionId}", System.Uri.EscapeDataString(this.Client.SubscriptionId)); + _url = _url.Replace("{resourceGroupName}", System.Uri.EscapeDataString(resourceGroupName)); + _url = _url.Replace("{vmScaleSetName}", System.Uri.EscapeDataString(vmScaleSetName)); + + System.Collections.Generic.List _queryParameters = new System.Collections.Generic.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 System.Net.Http.HttpRequestMessage(); + System.Net.Http.HttpResponseMessage _httpResponse = null; + _httpRequest.Method = new System.Net.Http.HttpMethod("POST"); + _httpRequest.RequestUri = new System.Uri(_url); + // Set Headers + if (this.Client.GenerateClientRequestId != null && this.Client.GenerateClientRequestId.Value) + { + _httpRequest.Headers.TryAddWithoutValidation("x-ms-client-request-id", System.Guid.NewGuid().ToString()); + } + if (this.Client.AcceptLanguage != null) + { + if (_httpRequest.Headers.Contains("accept-language")) + { + _httpRequest.Headers.Remove("accept-language"); + } + _httpRequest.Headers.TryAddWithoutValidation("accept-language", this.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(body != null) + { + _requestContent = Microsoft.Rest.Serialization.SafeJsonConvert.SerializeObject(body, this.Client.SerializationSettings); + _httpRequest.Content = new System.Net.Http.StringContent(_requestContent, System.Text.Encoding.UTF8); + _httpRequest.Content.Headers.ContentType =System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json; charset=utf-8"); + } + // Set Credentials + if (this.Client.Credentials != null) + { + cancellationToken.ThrowIfCancellationRequested(); + await this.Client.Credentials.ProcessHttpRequestAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + } + // Send Request + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.SendRequest(_invocationId, _httpRequest); + } + cancellationToken.ThrowIfCancellationRequested(); + _httpResponse = await this.Client.HttpClient.SendAsync(_httpRequest, cancellationToken).ConfigureAwait(false); + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.ReceiveResponse(_invocationId, _httpResponse); + } + + System.Net.HttpStatusCode _statusCode = _httpResponse.StatusCode; + cancellationToken.ThrowIfCancellationRequested(); + string _responseContent = null; + + if ((int)_statusCode != 202 && (int)_statusCode != 204) + { + var ex = new Microsoft.Rest.Azure.CloudException(string.Format("Operation returned an invalid status code '{0}'", _statusCode)); + try + { + _responseContent = await _httpResponse.Content.ReadAsStringAsync().ConfigureAwait(false); + CloudError _errorBody = Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject(_responseContent, this.Client.DeserializationSettings); + if (_errorBody != null) + { + ex = new Microsoft.Rest.Azure.CloudException(_errorBody.Message); + ex.Body = _errorBody; + } + } + catch (Newtonsoft.Json.JsonException) + { + // Ignore the exception + } + ex.Request = new Microsoft.Rest.HttpRequestMessageWrapper(_httpRequest, _requestContent); + ex.Response = new Microsoft.Rest.HttpResponseMessageWrapper(_httpResponse, _responseContent); + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + ex.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Error(_invocationId, ex); + } + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw ex; + } + // Create Result + var _result = new Microsoft.Rest.Azure.AzureOperationHeaderResponse(); + _result.Request = _httpRequest; + _result.Response = _httpResponse; + + if (_httpResponse.Headers.Contains("x-ms-request-id")) + { + _result.RequestId = _httpResponse.Headers.GetValues("x-ms-request-id").FirstOrDefault(); + } + try + { + _result.Headers = _httpResponse.GetHeadersAsJson().ToObject(Newtonsoft.Json.JsonSerializer.Create(this.Client.DeserializationSettings)); + } + catch (Newtonsoft.Json.JsonException ex) + { + _httpRequest.Dispose(); + if (_httpResponse != null) + { + _httpResponse.Dispose(); + } + throw new Microsoft.Rest.SerializationException("Unable to deserialize the headers.", _httpResponse.GetHeadersAsJson().ToString(), ex); + } + if (_shouldTrace) + { + Microsoft.Rest.ServiceClientTracing.Exit(_invocationId, _result); + } + return _result; + + + + + } /// /// Perform maintenance on one or more virtual machines in a VM scale set. @@ -4338,7 +4601,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -4568,7 +4831,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -4791,7 +5054,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5015,7 +5278,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -5238,7 +5501,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5456,7 +5719,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -5678,7 +5941,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { @@ -5906,7 +6169,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -6142,7 +6405,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -6359,7 +6622,7 @@ internal VirtualMachineScaleSetsOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmScaleSetName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; VirtualMachineScaleSetVMInstanceIDs vmInstanceIDs = new VirtualMachineScaleSetVMInstanceIDs(); if(instanceIds != null) { diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperationsExtensions.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperationsExtensions.cs index 3fcfb2821371..96b5e366fcb8 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperationsExtensions.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineScaleSetsOperationsExtensions.cs @@ -632,6 +632,47 @@ public static void UpdateInstances(this IVirtualMachineScaleSetsOperations opera (await operations.UpdateInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + public static VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders MigrateVMAvailabilityZone(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body) + { + return ((IVirtualMachineScaleSetsOperations)operations).MigrateVMAvailabilityZoneAsync(resourceGroupName, vmScaleSetName, body).GetAwaiter().GetResult(); + } + + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task MigrateVMAvailabilityZoneAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.MigrateVMAvailabilityZoneWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, body, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// /// Gets list of OS upgrades on a VM scale set instance. /// /// @@ -1439,6 +1480,47 @@ public static void BeginUpdateInstances(this IVirtualMachineScaleSetsOperations (await operations.BeginUpdateInstancesWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, instanceIds, null, cancellationToken).ConfigureAwait(false)).Dispose(); } /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + public static VirtualMachineScaleSetsMigrateVMAvailabilityZoneHeaders BeginMigrateVMAvailabilityZone(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body) + { + return ((IVirtualMachineScaleSetsOperations)operations).BeginMigrateVMAvailabilityZoneAsync(resourceGroupName, vmScaleSetName, body).GetAwaiter().GetResult(); + } + + /// + /// Migrates one or more virtual machines in a VM scale set to an availability + /// zone. + /// + /// + /// The operations group for this extension method. + /// + /// + /// The name of the resource group. The name is case insensitive. + /// + /// + /// The name of the VM scale set. + /// + /// + /// The cancellation token. + /// + public static async System.Threading.Tasks.Task BeginMigrateVMAvailabilityZoneAsync(this IVirtualMachineScaleSetsOperations operations, string resourceGroupName, string vmScaleSetName, MigrateVMAvailabilityZoneInput body, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + using (var _result = await operations.BeginMigrateVMAvailabilityZoneWithHttpMessagesAsync(resourceGroupName, vmScaleSetName, body, null, cancellationToken).ConfigureAwait(false)) + { + return _result.Headers; + } + } + /// /// Perform maintenance on one or more virtual machines in a VM scale set. /// Operation on instances which are not eligible for perform maintenance will /// be failed. Please refer to best practices for more details: diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineSizesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineSizesOperations.cs index 995d55fb66af..5a5397da9d3f 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineSizesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachineSizesOperations.cs @@ -94,7 +94,7 @@ internal VirtualMachineSizesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachinesOperations.cs b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachinesOperations.cs index 55f513dc2d00..02f9a346e775 100644 --- a/src/Compute/Compute.Management.Sdk/Generated/VirtualMachinesOperations.cs +++ b/src/Compute/Compute.Management.Sdk/Generated/VirtualMachinesOperations.cs @@ -94,7 +94,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.MinLength, "location", 1); } } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -310,7 +310,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -552,7 +552,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -795,7 +795,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1250,7 +1250,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1483,7 +1483,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -1891,7 +1891,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2144,7 +2144,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2375,7 +2375,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2625,7 +2625,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -2926,7 +2926,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3191,7 +3191,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3404,7 +3404,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3642,7 +3642,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -3900,7 +3900,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4131,7 +4131,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4345,7 +4345,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4574,7 +4574,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -4809,7 +4809,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5021,7 +5021,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5234,7 +5234,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5444,7 +5444,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5650,7 +5650,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -5865,7 +5865,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -6077,7 +6077,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -6296,7 +6296,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; @@ -6526,7 +6526,7 @@ internal VirtualMachinesOperations (ComputeManagementClient client) throw new Microsoft.Rest.ValidationException(Microsoft.Rest.ValidationRules.CannotBeNull, "vmName"); } - string apiVersion = "2026-03-01"; + string apiVersion = "2026-04-01"; // Tracing bool _shouldTrace = Microsoft.Rest.ServiceClientTracing.IsEnabled; string _invocationId = null; diff --git a/src/Compute/Compute.Management.Sdk/README.md b/src/Compute/Compute.Management.Sdk/README.md index a30e739491ea..0cf32f130f2e 100644 --- a/src/Compute/Compute.Management.Sdk/README.md +++ b/src/Compute/Compute.Management.Sdk/README.md @@ -24,14 +24,14 @@ title: ComputeManagementClient payload-flattening-threshold: 1 # Azure REST API Specs commit -commit: dddc9b49f352a218d85ca501656ad2270c0c2b2a +commit: f033bb63819c74607f4086c49ae7b07a22c35f78 input-file: - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/common-types/resource-management/v3/types.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/common-types/v1/common.json - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-03-01/ComputeRP.json - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-01-02/DiskRP.json - - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-03-03/GalleryRP.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-04-01/ComputeRP.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2026-03-02/DiskRP.json + - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2025-12-03/GalleryRP.json - https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/compute/resource-manager/Microsoft.Compute/Compute/stable/2021-07-01/skus.json output-folder: Generated diff --git a/src/Compute/Compute/ChangeLog.md b/src/Compute/Compute/ChangeLog.md index 69904e9cb86b..08b38872c058 100644 --- a/src/Compute/Compute/ChangeLog.md +++ b/src/Compute/Compute/ChangeLog.md @@ -20,6 +20,7 @@ --> ## Upcoming Release +* Updated ComputeRP-related cmdlets to use API version 2026-04-01, DiskRP-related cmdlets to use API version 2026-03-02, and GalleryRP-related cmdlets to use API version 2025-12-03. ## Version 11.8.0 * Deprecated installing the legacy Azure Enhanced Monitoring (AEM) extension for SAP on Virtual Machines (VMs); `Set-AzVMAEMExtension` now installs the new extension by default.