public InstanceFailoverGroupInner failover(String resourceGroupName, String locationName, String failoverGroupName) {
        return failoverWithServiceResponseAsync(resourceGroupName, locationName, failoverGroupName).toBlocking().last().body();
    }
public InstanceFailoverGroupInner failover ( String resourceGroupName , String locationName , String failoverGroupName ) { return failoverWithServiceResponseAsync ( resourceGroupName , locationName , failoverGroupName ) . toBlocking ( ) . last ( ) . body ( ) ; }
Fails over from the current primary managed instance to this managed instance.

@param 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 locationName The name of the region where the resource is located.
@param failoverGroupName The name of the failover group.
@throws IllegalArgumentException thrown if parameters fail the validation
@throws CloudException thrown if the request is rejected by server
@throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
@return the InstanceFailoverGroupInner object if successful.