@@ -21,6 +21,48 @@ namespace Microsoft.Azure.Management.Sql
21
21
/// </summary>
22
22
public static partial class FailoverGroupsOperationsExtensions
23
23
{
24
+ /// <summary>
25
+ /// Lists the failover groups in a server.
26
+ /// </summary>
27
+ /// <param name='operations'>
28
+ /// The operations group for this extension method.
29
+ /// </param>
30
+ /// <param name='resourceGroupName'>
31
+ /// The name of the resource group that contains the resource. You can obtain
32
+ /// this value from the Azure Resource Manager API or the portal.
33
+ /// </param>
34
+ /// <param name='serverName'>
35
+ /// The name of the server containing the failover group.
36
+ /// </param>
37
+ public static IPage < FailoverGroup > ListByServer ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName )
38
+ {
39
+ return operations . ListByServerAsync ( resourceGroupName , serverName ) . GetAwaiter ( ) . GetResult ( ) ;
40
+ }
41
+
42
+ /// <summary>
43
+ /// Lists the failover groups in a server.
44
+ /// </summary>
45
+ /// <param name='operations'>
46
+ /// The operations group for this extension method.
47
+ /// </param>
48
+ /// <param name='resourceGroupName'>
49
+ /// The name of the resource group that contains the resource. You can obtain
50
+ /// this value from the Azure Resource Manager API or the portal.
51
+ /// </param>
52
+ /// <param name='serverName'>
53
+ /// The name of the server containing the failover group.
54
+ /// </param>
55
+ /// <param name='cancellationToken'>
56
+ /// The cancellation token.
57
+ /// </param>
58
+ public static async Task < IPage < FailoverGroup > > ListByServerAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , CancellationToken cancellationToken = default ( CancellationToken ) )
59
+ {
60
+ using ( var _result = await operations . ListByServerWithHttpMessagesAsync ( resourceGroupName , serverName , null , cancellationToken ) . ConfigureAwait ( false ) )
61
+ {
62
+ return _result . Body ;
63
+ }
64
+ }
65
+
24
66
/// <summary>
25
67
/// Gets a failover group.
26
68
/// </summary>
@@ -223,7 +265,7 @@ public static FailoverGroup Update(this IFailoverGroupsOperations operations, st
223
265
}
224
266
225
267
/// <summary>
226
- /// Lists the failover groups in a server.
268
+ /// Fails over from the current primary server to this server.
227
269
/// </summary>
228
270
/// <param name='operations'>
229
271
/// The operations group for this extension method.
@@ -235,13 +277,16 @@ public static FailoverGroup Update(this IFailoverGroupsOperations operations, st
235
277
/// <param name='serverName'>
236
278
/// The name of the server containing the failover group.
237
279
/// </param>
238
- public static IPage < FailoverGroup > ListByServer ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName )
280
+ /// <param name='failoverGroupName'>
281
+ /// The name of the failover group.
282
+ /// </param>
283
+ public static FailoverGroup Failover ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName )
239
284
{
240
- return operations . ListByServerAsync ( resourceGroupName , serverName ) . GetAwaiter ( ) . GetResult ( ) ;
285
+ return operations . FailoverAsync ( resourceGroupName , serverName , failoverGroupName ) . GetAwaiter ( ) . GetResult ( ) ;
241
286
}
242
287
243
288
/// <summary>
244
- /// Lists the failover groups in a server.
289
+ /// Fails over from the current primary server to this server.
245
290
/// </summary>
246
291
/// <param name='operations'>
247
292
/// The operations group for this extension method.
@@ -253,19 +298,23 @@ public static IPage<FailoverGroup> ListByServer(this IFailoverGroupsOperations o
253
298
/// <param name='serverName'>
254
299
/// The name of the server containing the failover group.
255
300
/// </param>
301
+ /// <param name='failoverGroupName'>
302
+ /// The name of the failover group.
303
+ /// </param>
256
304
/// <param name='cancellationToken'>
257
305
/// The cancellation token.
258
306
/// </param>
259
- public static async Task < IPage < FailoverGroup > > ListByServerAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , CancellationToken cancellationToken = default ( CancellationToken ) )
307
+ public static async Task < FailoverGroup > FailoverAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName , CancellationToken cancellationToken = default ( CancellationToken ) )
260
308
{
261
- using ( var _result = await operations . ListByServerWithHttpMessagesAsync ( resourceGroupName , serverName , null , cancellationToken ) . ConfigureAwait ( false ) )
309
+ using ( var _result = await operations . FailoverWithHttpMessagesAsync ( resourceGroupName , serverName , failoverGroupName , null , cancellationToken ) . ConfigureAwait ( false ) )
262
310
{
263
311
return _result . Body ;
264
312
}
265
313
}
266
314
267
315
/// <summary>
268
- /// Fails over from the current primary server to this server.
316
+ /// Fails over from the current primary server to this server. This operation
317
+ /// might result in data loss.
269
318
/// </summary>
270
319
/// <param name='operations'>
271
320
/// The operations group for this extension method.
@@ -280,13 +329,14 @@ public static IPage<FailoverGroup> ListByServer(this IFailoverGroupsOperations o
280
329
/// <param name='failoverGroupName'>
281
330
/// The name of the failover group.
282
331
/// </param>
283
- public static FailoverGroup Failover ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName )
332
+ public static FailoverGroup ForceFailoverAllowDataLoss ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName )
284
333
{
285
- return operations . FailoverAsync ( resourceGroupName , serverName , failoverGroupName ) . GetAwaiter ( ) . GetResult ( ) ;
334
+ return operations . ForceFailoverAllowDataLossAsync ( resourceGroupName , serverName , failoverGroupName ) . GetAwaiter ( ) . GetResult ( ) ;
286
335
}
287
336
288
337
/// <summary>
289
- /// Fails over from the current primary server to this server.
338
+ /// Fails over from the current primary server to this server. This operation
339
+ /// might result in data loss.
290
340
/// </summary>
291
341
/// <param name='operations'>
292
342
/// The operations group for this extension method.
@@ -304,17 +354,17 @@ public static FailoverGroup Failover(this IFailoverGroupsOperations operations,
304
354
/// <param name='cancellationToken'>
305
355
/// The cancellation token.
306
356
/// </param>
307
- public static async Task < FailoverGroup > FailoverAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName , CancellationToken cancellationToken = default ( CancellationToken ) )
357
+ public static async Task < FailoverGroup > ForceFailoverAllowDataLossAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName , CancellationToken cancellationToken = default ( CancellationToken ) )
308
358
{
309
- using ( var _result = await operations . FailoverWithHttpMessagesAsync ( resourceGroupName , serverName , failoverGroupName , null , cancellationToken ) . ConfigureAwait ( false ) )
359
+ using ( var _result = await operations . ForceFailoverAllowDataLossWithHttpMessagesAsync ( resourceGroupName , serverName , failoverGroupName , null , cancellationToken ) . ConfigureAwait ( false ) )
310
360
{
311
361
return _result . Body ;
312
362
}
313
363
}
314
364
315
365
/// <summary>
316
366
/// Fails over from the current primary server to this server. This operation
317
- /// might result in data loss.
367
+ /// tries planned before forced failover but might still result in data loss.
318
368
/// </summary>
319
369
/// <param name='operations'>
320
370
/// The operations group for this extension method.
@@ -324,19 +374,19 @@ public static FailoverGroup Failover(this IFailoverGroupsOperations operations,
324
374
/// this value from the Azure Resource Manager API or the portal.
325
375
/// </param>
326
376
/// <param name='serverName'>
327
- /// The name of the server containing the failover group .
377
+ /// The name of the server.
328
378
/// </param>
329
379
/// <param name='failoverGroupName'>
330
380
/// The name of the failover group.
331
381
/// </param>
332
- public static FailoverGroup ForceFailoverAllowDataLoss ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName )
382
+ public static FailoverGroup TryPlannedBeforeForcedFailover ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName )
333
383
{
334
- return operations . ForceFailoverAllowDataLossAsync ( resourceGroupName , serverName , failoverGroupName ) . GetAwaiter ( ) . GetResult ( ) ;
384
+ return operations . TryPlannedBeforeForcedFailoverAsync ( resourceGroupName , serverName , failoverGroupName ) . GetAwaiter ( ) . GetResult ( ) ;
335
385
}
336
386
337
387
/// <summary>
338
388
/// Fails over from the current primary server to this server. This operation
339
- /// might result in data loss.
389
+ /// tries planned before forced failover but might still result in data loss.
340
390
/// </summary>
341
391
/// <param name='operations'>
342
392
/// The operations group for this extension method.
@@ -346,17 +396,17 @@ public static FailoverGroup ForceFailoverAllowDataLoss(this IFailoverGroupsOpera
346
396
/// this value from the Azure Resource Manager API or the portal.
347
397
/// </param>
348
398
/// <param name='serverName'>
349
- /// The name of the server containing the failover group .
399
+ /// The name of the server.
350
400
/// </param>
351
401
/// <param name='failoverGroupName'>
352
402
/// The name of the failover group.
353
403
/// </param>
354
404
/// <param name='cancellationToken'>
355
405
/// The cancellation token.
356
406
/// </param>
357
- public static async Task < FailoverGroup > ForceFailoverAllowDataLossAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName , CancellationToken cancellationToken = default ( CancellationToken ) )
407
+ public static async Task < FailoverGroup > TryPlannedBeforeForcedFailoverAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName , CancellationToken cancellationToken = default ( CancellationToken ) )
358
408
{
359
- using ( var _result = await operations . ForceFailoverAllowDataLossWithHttpMessagesAsync ( resourceGroupName , serverName , failoverGroupName , null , cancellationToken ) . ConfigureAwait ( false ) )
409
+ using ( var _result = await operations . TryPlannedBeforeForcedFailoverWithHttpMessagesAsync ( resourceGroupName , serverName , failoverGroupName , null , cancellationToken ) . ConfigureAwait ( false ) )
360
410
{
361
411
return _result . Body ;
362
412
}
@@ -613,6 +663,56 @@ public static FailoverGroup BeginForceFailoverAllowDataLoss(this IFailoverGroups
613
663
}
614
664
}
615
665
666
+ /// <summary>
667
+ /// Fails over from the current primary server to this server. This operation
668
+ /// tries planned before forced failover but might still result in data loss.
669
+ /// </summary>
670
+ /// <param name='operations'>
671
+ /// The operations group for this extension method.
672
+ /// </param>
673
+ /// <param name='resourceGroupName'>
674
+ /// The name of the resource group that contains the resource. You can obtain
675
+ /// this value from the Azure Resource Manager API or the portal.
676
+ /// </param>
677
+ /// <param name='serverName'>
678
+ /// The name of the server.
679
+ /// </param>
680
+ /// <param name='failoverGroupName'>
681
+ /// The name of the failover group.
682
+ /// </param>
683
+ public static FailoverGroup BeginTryPlannedBeforeForcedFailover ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName )
684
+ {
685
+ return operations . BeginTryPlannedBeforeForcedFailoverAsync ( resourceGroupName , serverName , failoverGroupName ) . GetAwaiter ( ) . GetResult ( ) ;
686
+ }
687
+
688
+ /// <summary>
689
+ /// Fails over from the current primary server to this server. This operation
690
+ /// tries planned before forced failover but might still result in data loss.
691
+ /// </summary>
692
+ /// <param name='operations'>
693
+ /// The operations group for this extension method.
694
+ /// </param>
695
+ /// <param name='resourceGroupName'>
696
+ /// The name of the resource group that contains the resource. You can obtain
697
+ /// this value from the Azure Resource Manager API or the portal.
698
+ /// </param>
699
+ /// <param name='serverName'>
700
+ /// The name of the server.
701
+ /// </param>
702
+ /// <param name='failoverGroupName'>
703
+ /// The name of the failover group.
704
+ /// </param>
705
+ /// <param name='cancellationToken'>
706
+ /// The cancellation token.
707
+ /// </param>
708
+ public static async Task < FailoverGroup > BeginTryPlannedBeforeForcedFailoverAsync ( this IFailoverGroupsOperations operations , string resourceGroupName , string serverName , string failoverGroupName , CancellationToken cancellationToken = default ( CancellationToken ) )
709
+ {
710
+ using ( var _result = await operations . BeginTryPlannedBeforeForcedFailoverWithHttpMessagesAsync ( resourceGroupName , serverName , failoverGroupName , null , cancellationToken ) . ConfigureAwait ( false ) )
711
+ {
712
+ return _result . Body ;
713
+ }
714
+ }
715
+
616
716
/// <summary>
617
717
/// Lists the failover groups in a server.
618
718
/// </summary>
0 commit comments