Ejemplo n.º 1
0
 /// <summary>
 /// Imports a bacpac into a new database.
 /// </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.
 /// </param>
 /// <param name='parameters'>
 /// The required parameters for importing a Bacpac into a database.
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task <ImportExportResponseInner> BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, ImportRequestInner parameters, CancellationToken cancellationToken = default(CancellationToken))
 {
     using (var _result = await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, serverName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false))
     {
         return(_result.Body);
     }
 }
 /// <summary>
 /// Imports database files to target database.
 /// </summary>
 /// <param name='operations'>
 /// The operations group for this extension method.
 /// </param>
 /// <param name='resourceGroupName'>
 /// The name of the resource group. The name is case insensitive.
 /// </param>
 /// <param name='clusterName'>
 /// The name of the RedisEnterprise cluster.
 /// </param>
 /// <param name='databaseName'>
 /// The name of the database.
 /// </param>
 /// <param name='sasUris'>
 /// SAS URIs for the target blobs to import from
 /// </param>
 /// <param name='cancellationToken'>
 /// The cancellation token.
 /// </param>
 public static async Task BeginImportAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, IList <string> sasUris, CancellationToken cancellationToken = default(CancellationToken))
 {
     (await operations.BeginImportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUris, null, cancellationToken).ConfigureAwait(false)).Dispose();
 }