/// <summary> /// Failovers a 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='managedInstanceName'> /// The name of the managed instance to failover. /// </param> /// <param name='replicaType'> /// The type of replica to be failed over. Possible values include: 'Primary', /// 'ReadableSecondary' /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task FailoverAsync(this IManagedInstancesOperations operations, string resourceGroupName, string managedInstanceName, string replicaType = default(string), CancellationToken cancellationToken = default(CancellationToken)) { (await operations.FailoverWithHttpMessagesAsync(resourceGroupName, managedInstanceName, replicaType, null, cancellationToken).ConfigureAwait(false)).Dispose(); }