@@ -200,7 +200,7 @@ public static AvailabilitySet Get(this IAvailabilitySetsOperations operations, s
200200 /// </param>
201201 /// <param name='expand'>
202202 /// The expand expression to apply to the operation. Allowed values are
203- /// 'instanceView '.
203+ /// 'virtualMachines/$ref '.
204204 /// </param>
205205 public static IPage < AvailabilitySet > ListBySubscription ( this IAvailabilitySetsOperations operations , string expand = default ( string ) )
206206 {
@@ -215,7 +215,7 @@ public static AvailabilitySet Get(this IAvailabilitySetsOperations operations, s
215215 /// </param>
216216 /// <param name='expand'>
217217 /// The expand expression to apply to the operation. Allowed values are
218- /// 'instanceView '.
218+ /// 'virtualMachines/$ref '.
219219 /// </param>
220220 /// <param name='cancellationToken'>
221221 /// The cancellation token.
@@ -304,6 +304,239 @@ public static IEnumerable<VirtualMachineSize> ListAvailableSizes(this IAvailabil
304304 }
305305 }
306306
307+ /// <summary>
308+ /// Start migration operation on an Availability Set to move its Virtual
309+ /// Machines to a Virtual Machine Scale Set. This should be followed by a
310+ /// migrate operation on each Virtual Machine that triggers a downtime on the
311+ /// Virtual Machine.
312+ /// </summary>
313+ /// <param name='operations'>
314+ /// The operations group for this extension method.
315+ /// </param>
316+ /// <param name='resourceGroupName'>
317+ /// The name of the resource group.
318+ /// </param>
319+ /// <param name='availabilitySetName'>
320+ /// The name of the availability set.
321+ /// </param>
322+ /// <param name='virtualMachineScaleSetFlexible'>
323+ /// Specifies information about the Virtual Machine Scale Set that the
324+ /// Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01.
325+ /// </param>
326+ public static void StartMigrationToVirtualMachineScaleSet ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , SubResource virtualMachineScaleSetFlexible )
327+ {
328+ operations . StartMigrationToVirtualMachineScaleSetAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetFlexible ) . GetAwaiter ( ) . GetResult ( ) ;
329+ }
330+
331+ /// <summary>
332+ /// Start migration operation on an Availability Set to move its Virtual
333+ /// Machines to a Virtual Machine Scale Set. This should be followed by a
334+ /// migrate operation on each Virtual Machine that triggers a downtime on the
335+ /// Virtual Machine.
336+ /// </summary>
337+ /// <param name='operations'>
338+ /// The operations group for this extension method.
339+ /// </param>
340+ /// <param name='resourceGroupName'>
341+ /// The name of the resource group.
342+ /// </param>
343+ /// <param name='availabilitySetName'>
344+ /// The name of the availability set.
345+ /// </param>
346+ /// <param name='virtualMachineScaleSetFlexible'>
347+ /// Specifies information about the Virtual Machine Scale Set that the
348+ /// Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01.
349+ /// </param>
350+ /// <param name='cancellationToken'>
351+ /// The cancellation token.
352+ /// </param>
353+ public static async Task StartMigrationToVirtualMachineScaleSetAsync ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , SubResource virtualMachineScaleSetFlexible , CancellationToken cancellationToken = default ( CancellationToken ) )
354+ {
355+ ( await operations . StartMigrationToVirtualMachineScaleSetWithHttpMessagesAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetFlexible , null , cancellationToken ) . ConfigureAwait ( false ) ) . Dispose ( ) ;
356+ }
357+
358+ /// <summary>
359+ /// Cancel the migration operation on an Availability Set.
360+ /// </summary>
361+ /// <param name='operations'>
362+ /// The operations group for this extension method.
363+ /// </param>
364+ /// <param name='resourceGroupName'>
365+ /// The name of the resource group.
366+ /// </param>
367+ /// <param name='availabilitySetName'>
368+ /// The name of the availability set.
369+ /// </param>
370+ public static void CancelMigrationToVirtualMachineScaleSet ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName )
371+ {
372+ operations . CancelMigrationToVirtualMachineScaleSetAsync ( resourceGroupName , availabilitySetName ) . GetAwaiter ( ) . GetResult ( ) ;
373+ }
374+
375+ /// <summary>
376+ /// Cancel the migration operation on an Availability Set.
377+ /// </summary>
378+ /// <param name='operations'>
379+ /// The operations group for this extension method.
380+ /// </param>
381+ /// <param name='resourceGroupName'>
382+ /// The name of the resource group.
383+ /// </param>
384+ /// <param name='availabilitySetName'>
385+ /// The name of the availability set.
386+ /// </param>
387+ /// <param name='cancellationToken'>
388+ /// The cancellation token.
389+ /// </param>
390+ public static async Task CancelMigrationToVirtualMachineScaleSetAsync ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , CancellationToken cancellationToken = default ( CancellationToken ) )
391+ {
392+ ( await operations . CancelMigrationToVirtualMachineScaleSetWithHttpMessagesAsync ( resourceGroupName , availabilitySetName , null , cancellationToken ) . ConfigureAwait ( false ) ) . Dispose ( ) ;
393+ }
394+
395+ /// <summary>
396+ /// Validates that the Virtual Machines in the Availability Set can be migrated
397+ /// to the provided Virtual Machine Scale Set.
398+ /// </summary>
399+ /// <param name='operations'>
400+ /// The operations group for this extension method.
401+ /// </param>
402+ /// <param name='resourceGroupName'>
403+ /// The name of the resource group.
404+ /// </param>
405+ /// <param name='availabilitySetName'>
406+ /// The name of the availability set.
407+ /// </param>
408+ /// <param name='virtualMachineScaleSetFlexible'>
409+ /// Specifies information about the Virtual Machine Scale Set that the
410+ /// Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01.
411+ /// </param>
412+ public static void ValidateMigrationToVirtualMachineScaleSet ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , SubResource virtualMachineScaleSetFlexible )
413+ {
414+ operations . ValidateMigrationToVirtualMachineScaleSetAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetFlexible ) . GetAwaiter ( ) . GetResult ( ) ;
415+ }
416+
417+ /// <summary>
418+ /// Validates that the Virtual Machines in the Availability Set can be migrated
419+ /// to the provided Virtual Machine Scale Set.
420+ /// </summary>
421+ /// <param name='operations'>
422+ /// The operations group for this extension method.
423+ /// </param>
424+ /// <param name='resourceGroupName'>
425+ /// The name of the resource group.
426+ /// </param>
427+ /// <param name='availabilitySetName'>
428+ /// The name of the availability set.
429+ /// </param>
430+ /// <param name='virtualMachineScaleSetFlexible'>
431+ /// Specifies information about the Virtual Machine Scale Set that the
432+ /// Availability Set should be migrated to. Minimum api‐version: 2024‐11‐01.
433+ /// </param>
434+ /// <param name='cancellationToken'>
435+ /// The cancellation token.
436+ /// </param>
437+ public static async Task ValidateMigrationToVirtualMachineScaleSetAsync ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , SubResource virtualMachineScaleSetFlexible , CancellationToken cancellationToken = default ( CancellationToken ) )
438+ {
439+ ( await operations . ValidateMigrationToVirtualMachineScaleSetWithHttpMessagesAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetFlexible , null , cancellationToken ) . ConfigureAwait ( false ) ) . Dispose ( ) ;
440+ }
441+
442+ /// <summary>
443+ /// Create a new Flexible Virtual Machine Scale Set and migrate all the Virtual
444+ /// Machines in the Availability Set. This does not trigger a downtime on the
445+ /// Virtual Machines.
446+ /// </summary>
447+ /// <param name='operations'>
448+ /// The operations group for this extension method.
449+ /// </param>
450+ /// <param name='resourceGroupName'>
451+ /// The name of the resource group.
452+ /// </param>
453+ /// <param name='availabilitySetName'>
454+ /// The name of the availability set.
455+ /// </param>
456+ /// <param name='virtualMachineScaleSetName'>
457+ /// Specifies information about the Virtual Machine Scale Set that the
458+ /// Availability Set should be converted to.
459+ /// </param>
460+ public static void ConvertToVirtualMachineScaleSet ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , string virtualMachineScaleSetName = default ( string ) )
461+ {
462+ operations . ConvertToVirtualMachineScaleSetAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetName ) . GetAwaiter ( ) . GetResult ( ) ;
463+ }
464+
465+ /// <summary>
466+ /// Create a new Flexible Virtual Machine Scale Set and migrate all the Virtual
467+ /// Machines in the Availability Set. This does not trigger a downtime on the
468+ /// Virtual Machines.
469+ /// </summary>
470+ /// <param name='operations'>
471+ /// The operations group for this extension method.
472+ /// </param>
473+ /// <param name='resourceGroupName'>
474+ /// The name of the resource group.
475+ /// </param>
476+ /// <param name='availabilitySetName'>
477+ /// The name of the availability set.
478+ /// </param>
479+ /// <param name='virtualMachineScaleSetName'>
480+ /// Specifies information about the Virtual Machine Scale Set that the
481+ /// Availability Set should be converted to.
482+ /// </param>
483+ /// <param name='cancellationToken'>
484+ /// The cancellation token.
485+ /// </param>
486+ public static async Task ConvertToVirtualMachineScaleSetAsync ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , string virtualMachineScaleSetName = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) )
487+ {
488+ ( await operations . ConvertToVirtualMachineScaleSetWithHttpMessagesAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetName , null , cancellationToken ) . ConfigureAwait ( false ) ) . Dispose ( ) ;
489+ }
490+
491+ /// <summary>
492+ /// Create a new Flexible Virtual Machine Scale Set and migrate all the Virtual
493+ /// Machines in the Availability Set. This does not trigger a downtime on the
494+ /// Virtual Machines.
495+ /// </summary>
496+ /// <param name='operations'>
497+ /// The operations group for this extension method.
498+ /// </param>
499+ /// <param name='resourceGroupName'>
500+ /// The name of the resource group.
501+ /// </param>
502+ /// <param name='availabilitySetName'>
503+ /// The name of the availability set.
504+ /// </param>
505+ /// <param name='virtualMachineScaleSetName'>
506+ /// Specifies information about the Virtual Machine Scale Set that the
507+ /// Availability Set should be converted to.
508+ /// </param>
509+ public static void BeginConvertToVirtualMachineScaleSet ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , string virtualMachineScaleSetName = default ( string ) )
510+ {
511+ operations . BeginConvertToVirtualMachineScaleSetAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetName ) . GetAwaiter ( ) . GetResult ( ) ;
512+ }
513+
514+ /// <summary>
515+ /// Create a new Flexible Virtual Machine Scale Set and migrate all the Virtual
516+ /// Machines in the Availability Set. This does not trigger a downtime on the
517+ /// Virtual Machines.
518+ /// </summary>
519+ /// <param name='operations'>
520+ /// The operations group for this extension method.
521+ /// </param>
522+ /// <param name='resourceGroupName'>
523+ /// The name of the resource group.
524+ /// </param>
525+ /// <param name='availabilitySetName'>
526+ /// The name of the availability set.
527+ /// </param>
528+ /// <param name='virtualMachineScaleSetName'>
529+ /// Specifies information about the Virtual Machine Scale Set that the
530+ /// Availability Set should be converted to.
531+ /// </param>
532+ /// <param name='cancellationToken'>
533+ /// The cancellation token.
534+ /// </param>
535+ public static async Task BeginConvertToVirtualMachineScaleSetAsync ( this IAvailabilitySetsOperations operations , string resourceGroupName , string availabilitySetName , string virtualMachineScaleSetName = default ( string ) , CancellationToken cancellationToken = default ( CancellationToken ) )
536+ {
537+ ( await operations . BeginConvertToVirtualMachineScaleSetWithHttpMessagesAsync ( resourceGroupName , availabilitySetName , virtualMachineScaleSetName , null , cancellationToken ) . ConfigureAwait ( false ) ) . Dispose ( ) ;
538+ }
539+
307540 /// <summary>
308541 /// Lists all availability sets in a subscription.
309542 /// </summary>
0 commit comments