Dela via


Microsoft.DataMigration databaseMigrations 2023-07-15-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@2023-07-15-preview' = {
  scope: resourceSymbolicName or scope
  name: 'string'
  properties: {
    collectionList: [
      {
        sourceCollection: 'string'
        sourceDatabase: 'string'
        targetCollection: 'string'
        targetDatabase: 'string'
      }
    ]
    kind: 'string'
    migrationOperationId: 'string'
    migrationService: 'string'
    provisioningError: 'string'
    scope: 'string'
    sourceMongoConnection: {
      connectionString: 'string'
      host: 'string'
      password: 'string'
      port: int
      userName: 'string'
      useSsl: bool
    }
    targetMongoConnection: {
      connectionString: 'string'
      host: 'string'
      password: 'string'
      port: int
      userName: 'string'
      useSsl: bool
    }
  }
}

Property Values

DatabaseMigrationPropertiesCosmosDbMongo

Name Description Value
collectionList List of Mongo Collections to be migrated. MongoMigrationCollection[]
kind 'MongoToCosmosDbMongo'
'SqlDb'
'SqlMi'
'SqlVm' (required)
migrationOperationId ID for current migration operation. string
migrationService Resource Id of the Migration Service. string
provisioningError Error message for migration provisioning failure, if any. string
scope Resource Id of the target resource. string
sourceMongoConnection Source Mongo connection details. MongoConnectionInformation
targetMongoConnection Target Cosmos DB Mongo connection details. MongoConnectionInformation

Microsoft.DataMigration/databaseMigrations

Name Description Value
name The resource name string

Constraints:
Pattern = ^[A-Za-z][A-Za-z0-9_-]*$ (required)
properties Database Migration Resource properties for CosmosDb for Mongo. DatabaseMigrationPropertiesCosmosDbMongo
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.

MongoConnectionInformation

Name Description Value
connectionString ConnectionString to connect to Mongo. string

Constraints:
Sensitive value. Pass in as a secure parameter.
host Host of mongo connection. string
password Password to connect to Mongo. string

Constraints:
Sensitive value. Pass in as a secure parameter.
port Port of mongo connection. int
userName User name to connect to Mongo. string
useSsl Whether to UseSsl or UseTls to connect to Mongo. Default is true. bool

MongoMigrationCollection

Name Description Value
sourceCollection Source collection name. string
sourceDatabase Source database name. string
targetCollection Target collection name. string
targetDatabase Target database name. 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.

Resource format

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

{
  "type": "Microsoft.DataMigration/databaseMigrations",
  "apiVersion": "2023-07-15-preview",
  "name": "string",
  "properties": {
    "collectionList": [
      {
        "sourceCollection": "string",
        "sourceDatabase": "string",
        "targetCollection": "string",
        "targetDatabase": "string"
      }
    ],
    "kind": "string",
    "migrationOperationId": "string",
    "migrationService": "string",
    "provisioningError": "string",
    "scope": "string",
    "sourceMongoConnection": {
      "connectionString": "string",
      "host": "string",
      "password": "string",
      "port": "int",
      "userName": "string",
      "useSsl": "bool"
    },
    "targetMongoConnection": {
      "connectionString": "string",
      "host": "string",
      "password": "string",
      "port": "int",
      "userName": "string",
      "useSsl": "bool"
    }
  }
}

Property Values

DatabaseMigrationPropertiesCosmosDbMongo

Name Description Value
collectionList List of Mongo Collections to be migrated. MongoMigrationCollection[]
kind 'MongoToCosmosDbMongo'
'SqlDb'
'SqlMi'
'SqlVm' (required)
migrationOperationId ID for current migration operation. string
migrationService Resource Id of the Migration Service. string
provisioningError Error message for migration provisioning failure, if any. string
scope Resource Id of the target resource. string
sourceMongoConnection Source Mongo connection details. MongoConnectionInformation
targetMongoConnection Target Cosmos DB Mongo connection details. MongoConnectionInformation

Microsoft.DataMigration/databaseMigrations

Name Description Value
apiVersion The api version '2023-07-15-preview'
name The resource name string

Constraints:
Pattern = ^[A-Za-z][A-Za-z0-9_-]*$ (required)
properties Database Migration Resource properties for CosmosDb for Mongo. DatabaseMigrationPropertiesCosmosDbMongo
type The resource type 'Microsoft.DataMigration/databaseMigrations'

MongoConnectionInformation

Name Description Value
connectionString ConnectionString to connect to Mongo. string

Constraints:
Sensitive value. Pass in as a secure parameter.
host Host of mongo connection. string
password Password to connect to Mongo. string

Constraints:
Sensitive value. Pass in as a secure parameter.
port Port of mongo connection. int
userName User name to connect to Mongo. string
useSsl Whether to UseSsl or UseTls to connect to Mongo. Default is true. bool

MongoMigrationCollection

Name Description Value
sourceCollection Source collection name. string
sourceDatabase Source database name. string
targetCollection Target collection name. string
targetDatabase Target database name. string

Användningsexempel

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@2023-07-15-preview"
  name = "string"
  parent_id = "string"
  body = {
    properties = {
      collectionList = [
        {
          sourceCollection = "string"
          sourceDatabase = "string"
          targetCollection = "string"
          targetDatabase = "string"
        }
      ]
      kind = "string"
      migrationOperationId = "string"
      migrationService = "string"
      provisioningError = "string"
      scope = "string"
      sourceMongoConnection = {
        connectionString = "string"
        host = "string"
        password = "string"
        port = int
        userName = "string"
        useSsl = bool
      }
      targetMongoConnection = {
        connectionString = "string"
        host = "string"
        password = "string"
        port = int
        userName = "string"
        useSsl = bool
      }
    }
  }
}

Property Values

DatabaseMigrationPropertiesCosmosDbMongo

Name Description Value
collectionList List of Mongo Collections to be migrated. MongoMigrationCollection[]
kind 'MongoToCosmosDbMongo'
'SqlDb'
'SqlMi'
'SqlVm' (required)
migrationOperationId ID for current migration operation. string
migrationService Resource Id of the Migration Service. string
provisioningError Error message for migration provisioning failure, if any. string
scope Resource Id of the target resource. string
sourceMongoConnection Source Mongo connection details. MongoConnectionInformation
targetMongoConnection Target Cosmos DB Mongo connection details. MongoConnectionInformation

Microsoft.DataMigration/databaseMigrations

Name Description Value
name The resource name string

Constraints:
Pattern = ^[A-Za-z][A-Za-z0-9_-]*$ (required)
parent_id The ID of the resource to apply this extension resource to. string (required)
properties Database Migration Resource properties for CosmosDb for Mongo. DatabaseMigrationPropertiesCosmosDbMongo
type The resource type "Microsoft.DataMigration/databaseMigrations@2023-07-15-preview"

MongoConnectionInformation

Name Description Value
connectionString ConnectionString to connect to Mongo. string

Constraints:
Sensitive value. Pass in as a secure parameter.
host Host of mongo connection. string
password Password to connect to Mongo. string

Constraints:
Sensitive value. Pass in as a secure parameter.
port Port of mongo connection. int
userName User name to connect to Mongo. string
useSsl Whether to UseSsl or UseTls to connect to Mongo. Default is true. bool

MongoMigrationCollection

Name Description Value
sourceCollection Source collection name. string
sourceDatabase Source database name. string
targetCollection Target collection name. string
targetDatabase Target database name. string