SqlServerResource.ImportDatabase Method

Definition

Imports a bacpac into a new database.

  • Request Path: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/import
  • Operation Id: Servers_ImportDatabase
  • Default Api Version: 2023-05-01-preview
  • Resource: SqlServerResource
public virtual Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.Models.ImportExportOperationResult> ImportDatabase (Azure.WaitUntil waitUntil, Azure.ResourceManager.Sql.Models.DatabaseImportDefinition databaseImportDefinition, System.Threading.CancellationToken cancellationToken = default);
abstract member ImportDatabase : Azure.WaitUntil * Azure.ResourceManager.Sql.Models.DatabaseImportDefinition * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.Models.ImportExportOperationResult>
override this.ImportDatabase : Azure.WaitUntil * Azure.ResourceManager.Sql.Models.DatabaseImportDefinition * System.Threading.CancellationToken -> Azure.ResourceManager.ArmOperation<Azure.ResourceManager.Sql.Models.ImportExportOperationResult>
Public Overridable Function ImportDatabase (waitUntil As WaitUntil, databaseImportDefinition As DatabaseImportDefinition, Optional cancellationToken As CancellationToken = Nothing) As ArmOperation(Of ImportExportOperationResult)

Parameters

waitUntil
WaitUntil

Completed if the method should wait to return until the long-running operation has completed on the service; Started if it should return after starting the operation. For more information on long-running operations, please see Azure.Core Long-Running Operation samples.

databaseImportDefinition
DatabaseImportDefinition

The database import request parameters.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

databaseImportDefinition is null.

Applies to