/// <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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <FailoverGroupInner> GetAsync(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, serverName, failoverGroupName, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Lists the failover groups in a server. /// </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 <FailoverGroupInner> > ListByServerNextAsync(this IFailoverGroupsOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.ListByServerNextWithHttpMessagesAsync(nextPageLink, 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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task DeleteAsync(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.DeleteWithHttpMessagesAsync(resourceGroupName, serverName, failoverGroupName, null, cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <summary> /// Fails over from the current primary server to this server. 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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <FailoverGroupInner> BeginForceFailoverAllowDataLossAsync(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginForceFailoverAllowDataLossWithHttpMessagesAsync(resourceGroupName, serverName, failoverGroupName, SqlManagementClient.SetJsonAcceptHeader(), 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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginDeleteAsync(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, serverName, failoverGroupName, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)).Dispose(); }
/// <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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> /// <param name='parameters'> /// The failover group parameters. /// </param> public static FailoverGroup CreateOrUpdate(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName, FailoverGroup parameters) { return(operations.CreateOrUpdateAsync(resourceGroupName, serverName, failoverGroupName, parameters).GetAwaiter().GetResult()); }
/// <summary> /// Lists the failover groups in a server. /// </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 <FailoverGroup> ListByServerNext(this IFailoverGroupsOperations operations, string nextPageLink) { return(operations.ListByServerNextAsync(nextPageLink).GetAwaiter().GetResult()); }
/// <summary> /// Fails over from the current primary server to this server. 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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> public static FailoverGroup BeginForceFailoverAllowDataLoss(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName) { return(operations.BeginForceFailoverAllowDataLossAsync(resourceGroupName, serverName, failoverGroupName).GetAwaiter().GetResult()); }
/// <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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> public static void BeginDelete(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName) { operations.BeginDeleteAsync(resourceGroupName, serverName, failoverGroupName).GetAwaiter().GetResult(); }
/// <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='serverName'> /// The name of the server containing the failover group. /// </param> /// <param name='failoverGroupName'> /// The name of the failover group. /// </param> public static FailoverGroup Get(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName, string failoverGroupName) { return(operations.GetAsync(resourceGroupName, serverName, failoverGroupName).GetAwaiter().GetResult()); }
/// <summary> /// Lists the failover groups in a server. /// </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='serverName'> /// The name of the server containing the failover group. /// </param> public static IPage <FailoverGroup> ListByServer(this IFailoverGroupsOperations operations, string resourceGroupName, string serverName) { return(operations.ListByServerAsync(resourceGroupName, serverName).GetAwaiter().GetResult()); }