Example #1
0
 /// <summary>
 /// Fails over from the current primary managed instance to this managed
 /// instance.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InstanceFailoverGroup> BeginFailoverAsync(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginFailoverWithHttpMessagesAsync(resourceGroupName, locationName, failoverGroupName, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Creates or updates a failover group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 /// <param name='parameters'>
 /// The failover group parameters.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <InstanceFailoverGroupInner> CreateOrUpdateAsync(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName, InstanceFailoverGroupInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, locationName, failoverGroupName, parameters, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Deletes a failover group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task DeleteAsync(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, locationName, failoverGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }
 /// <summary>
 /// Lists the failover groups in a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <IPage <InstanceFailoverGroupInner> > ListByLocationNextAsync(this IInstanceFailoverGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.ListByLocationNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
Example #5
0
 /// <summary>
 /// Creates or updates a failover group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 /// <param name='parameters'>
 /// The failover group parameters.
 /// </param>
 public static InstanceFailoverGroup CreateOrUpdate(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName, InstanceFailoverGroup parameters)
 {
     return(operations.CreateOrUpdateAsync(resourceGroupName, locationName, failoverGroupName, parameters).GetAwaiter().GetResult());
 }
Example #6
0
 /// <summary>
 /// Lists the failover groups in a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='nextPageLink'>
 /// The NextLink from the previous successful call to List operation.
 /// </param>
 public static IPage <InstanceFailoverGroup> ListByLocationNext(this IInstanceFailoverGroupsOperations operations, string nextPageLink)
 {
     return(operations.ListByLocationNextAsync(nextPageLink).GetAwaiter().GetResult());
 }
Example #7
0
 /// <summary>
 /// Fails over from the current primary managed instance to this managed
 /// instance. This operation might result in data loss.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 public static InstanceFailoverGroup BeginForceFailoverAllowDataLoss(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName)
 {
     return(operations.BeginForceFailoverAllowDataLossAsync(resourceGroupName, locationName, failoverGroupName).GetAwaiter().GetResult());
 }
Example #8
0
 /// <summary>
 /// Gets a failover group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 public static InstanceFailoverGroup Get(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName)
 {
     return(operations.GetAsync(resourceGroupName, locationName, failoverGroupName).GetAwaiter().GetResult());
 }
Example #9
0
 /// <summary>
 /// Deletes a failover group.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 /// <param name='failoverGroupName'>
 /// The name of the failover group.
 /// </param>
 public static void BeginDelete(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName, string failoverGroupName)
 {
     operations.BeginDeleteAsync(resourceGroupName, locationName, failoverGroupName).GetAwaiter().GetResult();
 }
Example #10
0
 /// <summary>
 /// Lists the failover groups in a location.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group that contains the resource. You can obtain
 /// this value from the Azure Resource Manager API or the portal.
 /// </param>
 /// <param name='locationName'>
 /// The name of the region where the resource is located.
 /// </param>
 public static IPage <InstanceFailoverGroup> ListByLocation(this IInstanceFailoverGroupsOperations operations, string resourceGroupName, string locationName)
 {
     return(operations.ListByLocationAsync(resourceGroupName, locationName).GetAwaiter().GetResult());
 }