Microsoft.DataMigration databaseMigrations 2022-01-30-preview

Bicep resource definition

The databaseMigrations resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DataMigration/databaseMigrations resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DataMigration/databaseMigrations@2022-01-30-preview' = {
  scope: resourceSymbolicName or scope
  name: 'string'
  properties: {
    backupConfiguration: {
      sourceLocation: {
        azureBlob: {
          accountKey: 'string'
          blobContainerName: 'string'
          storageAccountResourceId: 'string'
        }
        fileShare: {
          password: 'string'
          path: 'string'
          username: 'string'
        }
      }
      targetLocation: {
        accountKey: 'string'
        storageAccountResourceId: 'string'
      }
    }
    kind: 'string'
    migrationOperationId: 'string'
    migrationService: 'string'
    offlineConfiguration: {
      lastBackupName: 'string'
      offline: bool
    }
    provisioningError: 'string'
    scope: 'string'
    sourceDatabaseName: 'string'
    sourceSqlConnection: {
      authentication: 'string'
      dataSource: 'string'
      encryptConnection: bool
      password: 'string'
      trustServerCertificate: bool
      userName: 'string'
    }
    targetDatabaseCollation: 'string'
  }
}

Property Values

Microsoft.DataMigration/databaseMigrations

Name Description Value
name The resource name string (required)
properties Database Migration Resource properties for SQL Managed Instance. DatabaseMigrationPropertiesSqlMi
scope Use when creating a resource at a scope that is different than the deployment scope. Set this property to the symbolic name of a resource to apply the extension resource.

AzureBlob

Name Description Value
accountKey Storage Account Key. string

Constraints:
Sensitive value. Pass in as a secure parameter.
blobContainerName Blob container name where backups are stored. string
storageAccountResourceId Resource Id of the storage account where backups are stored. string

BackupConfiguration

Name Description Value
sourceLocation Source location of backups. SourceLocation
targetLocation Target location for copying backups. TargetLocation

DatabaseMigrationPropertiesSqlMi

Name Description Value
backupConfiguration Backup configuration info. BackupConfiguration
kind 'SqlMi'
'SqlVm' (required)
migrationOperationId ID tracking current migration operation. string
migrationService Resource Id of the Migration Service. string
offlineConfiguration Offline configuration. OfflineConfiguration
provisioningError Error message for migration provisioning failure, if any. string
scope Resource Id of the target resource (SQL VM or SQL Managed Instance). string
sourceDatabaseName Name of the source database. string
sourceSqlConnection Source SQL Server connection details. SqlConnectionInformation
targetDatabaseCollation Database collation to be used for the target database. string

OfflineConfiguration

Name Description Value
lastBackupName Last backup name for offline migration. This is optional for migrations from file share. If it is not provided, then the service will determine the last backup file name based on latest backup files present in file share. string
offline Offline migration bool

SourceLocation

Name Description Value
azureBlob Source Azure Blob. AzureBlob
fileShare Source File share. SqlFileShare

SqlConnectionInformation

Name Description Value
authentication Authentication type. string
dataSource Data source. string
encryptConnection Whether to encrypt connection or not. bool
password Password to connect to source SQL. string

Constraints:
Sensitive value. Pass in as a secure parameter.
trustServerCertificate Whether to trust server certificate or not. bool
userName User name to connect to source SQL. string

SqlFileShare

Name Description Value
password Password for username to access file share location. string

Constraints:
Sensitive value. Pass in as a secure parameter.
path Location as SMB share or local drive where backups are placed. string
username Username to access the file share location for backups. string

TargetLocation

Name Description Value
accountKey Storage Account Key. string
storageAccountResourceId Resource Id of the storage account copying backups. string

ARM template resource definition

The databaseMigrations resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Usage Examples

Resource format

To create a Microsoft.DataMigration/databaseMigrations resource, add the following JSON to your template.

{
  "type": "Microsoft.DataMigration/databaseMigrations",
  "apiVersion": "2022-01-30-preview",
  "name": "string",
  "properties": {
    "backupConfiguration": {
      "sourceLocation": {
        "azureBlob": {
          "accountKey": "string",
          "blobContainerName": "string",
          "storageAccountResourceId": "string"
        },
        "fileShare": {
          "password": "string",
          "path": "string",
          "username": "string"
        }
      },
      "targetLocation": {
        "accountKey": "string",
        "storageAccountResourceId": "string"
      }
    },
    "kind": "string",
    "migrationOperationId": "string",
    "migrationService": "string",
    "offlineConfiguration": {
      "lastBackupName": "string",
      "offline": "bool"
    },
    "provisioningError": "string",
    "scope": "string",
    "sourceDatabaseName": "string",
    "sourceSqlConnection": {
      "authentication": "string",
      "dataSource": "string",
      "encryptConnection": "bool",
      "password": "string",
      "trustServerCertificate": "bool",
      "userName": "string"
    },
    "targetDatabaseCollation": "string"
  }
}

Property Values

Microsoft.DataMigration/databaseMigrations

Name Description Value
apiVersion The api version '2022-01-30-preview'
name The resource name string (required)
properties Database Migration Resource properties for SQL Managed Instance. DatabaseMigrationPropertiesSqlMi
type The resource type 'Microsoft.DataMigration/databaseMigrations'

AzureBlob

Name Description Value
accountKey Storage Account Key. string

Constraints:
Sensitive value. Pass in as a secure parameter.
blobContainerName Blob container name where backups are stored. string
storageAccountResourceId Resource Id of the storage account where backups are stored. string

BackupConfiguration

Name Description Value
sourceLocation Source location of backups. SourceLocation
targetLocation Target location for copying backups. TargetLocation

DatabaseMigrationPropertiesSqlMi

Name Description Value
backupConfiguration Backup configuration info. BackupConfiguration
kind 'SqlMi'
'SqlVm' (required)
migrationOperationId ID tracking current migration operation. string
migrationService Resource Id of the Migration Service. string
offlineConfiguration Offline configuration. OfflineConfiguration
provisioningError Error message for migration provisioning failure, if any. string
scope Resource Id of the target resource (SQL VM or SQL Managed Instance). string
sourceDatabaseName Name of the source database. string
sourceSqlConnection Source SQL Server connection details. SqlConnectionInformation
targetDatabaseCollation Database collation to be used for the target database. string

OfflineConfiguration

Name Description Value
lastBackupName Last backup name for offline migration. This is optional for migrations from file share. If it is not provided, then the service will determine the last backup file name based on latest backup files present in file share. string
offline Offline migration bool

SourceLocation

Name Description Value
azureBlob Source Azure Blob. AzureBlob
fileShare Source File share. SqlFileShare

SqlConnectionInformation

Name Description Value
authentication Authentication type. string
dataSource Data source. string
encryptConnection Whether to encrypt connection or not. bool
password Password to connect to source SQL. string

Constraints:
Sensitive value. Pass in as a secure parameter.
trustServerCertificate Whether to trust server certificate or not. bool
userName User name to connect to source SQL. string

SqlFileShare

Name Description Value
password Password for username to access file share location. string

Constraints:
Sensitive value. Pass in as a secure parameter.
path Location as SMB share or local drive where backups are placed. string
username Username to access the file share location for backups. string

TargetLocation

Name Description Value
accountKey Storage Account Key. string
storageAccountResourceId Resource Id of the storage account copying backups. string

Terraform (AzAPI provider) resource definition

The databaseMigrations resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DataMigration/databaseMigrations resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DataMigration/databaseMigrations@2022-01-30-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      backupConfiguration = {
        sourceLocation = {
          azureBlob = {
            accountKey = "string"
            blobContainerName = "string"
            storageAccountResourceId = "string"
          }
          fileShare = {
            password = "string"
            path = "string"
            username = "string"
          }
        }
        targetLocation = {
          accountKey = "string"
          storageAccountResourceId = "string"
        }
      }
      kind = "string"
      migrationOperationId = "string"
      migrationService = "string"
      offlineConfiguration = {
        lastBackupName = "string"
        offline = bool
      }
      provisioningError = "string"
      scope = "string"
      sourceDatabaseName = "string"
      sourceSqlConnection = {
        authentication = "string"
        dataSource = "string"
        encryptConnection = bool
        password = "string"
        trustServerCertificate = bool
        userName = "string"
      }
      targetDatabaseCollation = "string"
    }
  }
}

Property Values

Microsoft.DataMigration/databaseMigrations

Name Description Value
name The resource name string (required)
parent_id The ID of the resource to apply this extension resource to. string (required)
properties Database Migration Resource properties for SQL Managed Instance. DatabaseMigrationPropertiesSqlMi
type The resource type "Microsoft.DataMigration/databaseMigrations@2022-01-30-preview"

AzureBlob

Name Description Value
accountKey Storage Account Key. string

Constraints:
Sensitive value. Pass in as a secure parameter.
blobContainerName Blob container name where backups are stored. string
storageAccountResourceId Resource Id of the storage account where backups are stored. string

BackupConfiguration

Name Description Value
sourceLocation Source location of backups. SourceLocation
targetLocation Target location for copying backups. TargetLocation

DatabaseMigrationPropertiesSqlMi

Name Description Value
backupConfiguration Backup configuration info. BackupConfiguration
kind 'SqlMi'
'SqlVm' (required)
migrationOperationId ID tracking current migration operation. string
migrationService Resource Id of the Migration Service. string
offlineConfiguration Offline configuration. OfflineConfiguration
provisioningError Error message for migration provisioning failure, if any. string
scope Resource Id of the target resource (SQL VM or SQL Managed Instance). string
sourceDatabaseName Name of the source database. string
sourceSqlConnection Source SQL Server connection details. SqlConnectionInformation
targetDatabaseCollation Database collation to be used for the target database. string

OfflineConfiguration

Name Description Value
lastBackupName Last backup name for offline migration. This is optional for migrations from file share. If it is not provided, then the service will determine the last backup file name based on latest backup files present in file share. string
offline Offline migration bool

SourceLocation

Name Description Value
azureBlob Source Azure Blob. AzureBlob
fileShare Source File share. SqlFileShare

SqlConnectionInformation

Name Description Value
authentication Authentication type. string
dataSource Data source. string
encryptConnection Whether to encrypt connection or not. bool
password Password to connect to source SQL. string

Constraints:
Sensitive value. Pass in as a secure parameter.
trustServerCertificate Whether to trust server certificate or not. bool
userName User name to connect to source SQL. string

SqlFileShare

Name Description Value
password Password for username to access file share location. string

Constraints:
Sensitive value. Pass in as a secure parameter.
path Location as SMB share or local drive where backups are placed. string
username Username to access the file share location for backups. string

TargetLocation

Name Description Value
accountKey Storage Account Key. string
storageAccountResourceId Resource Id of the storage account copying backups. string