/// <summary> /// Exports a database to a bacpac. /// </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='databaseName'> /// The name of the database to be exported. /// </param> /// <param name='parameters'> /// The required parameters for exporting a database. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <ImportExportResponseInner> BeginExportAsync(this IDatabasesOperations operations, string resourceGroupName, string serverName, string databaseName, ExportRequestInner parameters, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, serverName, databaseName, parameters, SqlManagementClient.SetJsonAcceptHeader(), cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <summary> /// Exports a database file from 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='sasUri'> /// SAS URI for the target directory to export to /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task BeginExportAsync(this IDatabasesOperations operations, string resourceGroupName, string clusterName, string databaseName, string sasUri, CancellationToken cancellationToken = default(CancellationToken)) { (await operations.BeginExportWithHttpMessagesAsync(resourceGroupName, clusterName, databaseName, sasUri, null, cancellationToken).ConfigureAwait(false)).Dispose(); }