Microsoft.DBforPostgreSQL flexibleServers/migrations 2023-03-01-preview

Bicep resource definition

The flexibleServers/migrations 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.DBforPostgreSQL/flexibleServers/migrations resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DBforPostgreSQL/flexibleServers/migrations@2023-03-01-preview' = {
  location: 'string'
  name: 'string'
  properties: {
    cancel: 'string'
    dbsToCancelMigrationOn: [
      'string'
    ]
    dbsToMigrate: [
      'string'
    ]
    dbsToTriggerCutoverOn: [
      'string'
    ]
    migrationMode: 'string'
    migrationWindowEndTimeInUtc: 'string'
    migrationWindowStartTimeInUtc: 'string'
    overwriteDbsInTarget: 'string'
    secretParameters: {
      adminCredentials: {
        sourceServerPassword: 'string'
        targetServerPassword: 'string'
      }
      sourceServerUsername: 'string'
      targetServerUsername: 'string'
    }
    setupLogicalReplicationOnSourceDbIfNeeded: 'string'
    sourceDbServerFullyQualifiedDomainName: 'string'
    sourceDbServerResourceId: 'string'
    startDataMigration: 'string'
    targetDbServerFullyQualifiedDomainName: 'string'
    triggerCutover: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

Property values

AdminCredentials

Name Description Value
sourceServerPassword Password for source server. string

Constraints:
Sensitive value. Pass in as a secure parameter. (required)
targetServerPassword Password for target server. string

Constraints:
Sensitive value. Pass in as a secure parameter. (required)

Microsoft.DBforPostgreSQL/flexibleServers/migrations

Name Description Value
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[a-z][a-z0-9]*$ (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: flexibleServers
properties Migration resource properties. MigrationResourceProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

MigrationResourceProperties

Name Description Value
cancel To trigger cancel for entire migration we need to send this flag as True 'False'
'True'
dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as True and database names in this array string[]
dbsToMigrate Number of databases to migrate string[]
dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array string[]
migrationMode There are two types of migration modes Online and Offline 'Offline'
'Online'
migrationWindowEndTimeInUtc End time in UTC for migration window string
migrationWindowStartTimeInUtc Start time in UTC for migration window string
overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. 'False'
'True'
secretParameters Migration secret parameters MigrationSecretParameters
setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, if needed 'False'
'True'
sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection string
sourceDbServerResourceId ResourceId of the source database server string
startDataMigration Indicates whether the data migration should start right away 'False'
'True'
targetDbServerFullyQualifiedDomainName Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection string
triggerCutover To trigger cutover for entire migration we need to send this flag as True 'False'
'True'

MigrationSecretParameters

Name Description Value
adminCredentials Admin credentials for source and target servers AdminCredentials (required)
sourceServerUsername Gets or sets the username for the source server. This user need not be an admin. string
targetServerUsername Gets or sets the username for the target server. This user need not be an admin. string

TrackedResourceTags

Name Description Value

ARM template resource definition

The flexibleServers/migrations 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.DBforPostgreSQL/flexibleServers/migrations resource, add the following JSON to your template.

{
  "type": "Microsoft.DBforPostgreSQL/flexibleServers/migrations",
  "apiVersion": "2023-03-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "cancel": "string",
    "dbsToCancelMigrationOn": [ "string" ],
    "dbsToMigrate": [ "string" ],
    "dbsToTriggerCutoverOn": [ "string" ],
    "migrationMode": "string",
    "migrationWindowEndTimeInUtc": "string",
    "migrationWindowStartTimeInUtc": "string",
    "overwriteDbsInTarget": "string",
    "secretParameters": {
      "adminCredentials": {
        "sourceServerPassword": "string",
        "targetServerPassword": "string"
      },
      "sourceServerUsername": "string",
      "targetServerUsername": "string"
    },
    "setupLogicalReplicationOnSourceDbIfNeeded": "string",
    "sourceDbServerFullyQualifiedDomainName": "string",
    "sourceDbServerResourceId": "string",
    "startDataMigration": "string",
    "targetDbServerFullyQualifiedDomainName": "string",
    "triggerCutover": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property values

AdminCredentials

Name Description Value
sourceServerPassword Password for source server. string

Constraints:
Sensitive value. Pass in as a secure parameter. (required)
targetServerPassword Password for target server. string

Constraints:
Sensitive value. Pass in as a secure parameter. (required)

Microsoft.DBforPostgreSQL/flexibleServers/migrations

Name Description Value
apiVersion The api version '2023-03-01-preview'
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[a-z][a-z0-9]*$ (required)
properties Migration resource properties. MigrationResourceProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.DBforPostgreSQL/flexibleServers/migrations'

MigrationResourceProperties

Name Description Value
cancel To trigger cancel for entire migration we need to send this flag as True 'False'
'True'
dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as True and database names in this array string[]
dbsToMigrate Number of databases to migrate string[]
dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array string[]
migrationMode There are two types of migration modes Online and Offline 'Offline'
'Online'
migrationWindowEndTimeInUtc End time in UTC for migration window string
migrationWindowStartTimeInUtc Start time in UTC for migration window string
overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. 'False'
'True'
secretParameters Migration secret parameters MigrationSecretParameters
setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, if needed 'False'
'True'
sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection string
sourceDbServerResourceId ResourceId of the source database server string
startDataMigration Indicates whether the data migration should start right away 'False'
'True'
targetDbServerFullyQualifiedDomainName Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection string
triggerCutover To trigger cutover for entire migration we need to send this flag as True 'False'
'True'

MigrationSecretParameters

Name Description Value
adminCredentials Admin credentials for source and target servers AdminCredentials (required)
sourceServerUsername Gets or sets the username for the source server. This user need not be an admin. string
targetServerUsername Gets or sets the username for the target server. This user need not be an admin. string

TrackedResourceTags

Name Description Value

Terraform (AzAPI provider) resource definition

The flexibleServers/migrations resource type can be deployed with operations that target:

  • Resource groups

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

Resource format

To create a Microsoft.DBforPostgreSQL/flexibleServers/migrations resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DBforPostgreSQL/flexibleServers/migrations@2023-03-01-preview"
  name = "string"
  location = "string"
  body = jsonencode({
    properties = {
      cancel = "string"
      dbsToCancelMigrationOn = [
        "string"
      ]
      dbsToMigrate = [
        "string"
      ]
      dbsToTriggerCutoverOn = [
        "string"
      ]
      migrationMode = "string"
      migrationWindowEndTimeInUtc = "string"
      migrationWindowStartTimeInUtc = "string"
      overwriteDbsInTarget = "string"
      secretParameters = {
        adminCredentials = {
          sourceServerPassword = "string"
          targetServerPassword = "string"
        }
        sourceServerUsername = "string"
        targetServerUsername = "string"
      }
      setupLogicalReplicationOnSourceDbIfNeeded = "string"
      sourceDbServerFullyQualifiedDomainName = "string"
      sourceDbServerResourceId = "string"
      startDataMigration = "string"
      targetDbServerFullyQualifiedDomainName = "string"
      triggerCutover = "string"
    }
  })
  tags = {
    {customized property} = "string"
  }
}

Property values

AdminCredentials

Name Description Value
sourceServerPassword Password for source server. string

Constraints:
Sensitive value. Pass in as a secure parameter. (required)
targetServerPassword Password for target server. string

Constraints:
Sensitive value. Pass in as a secure parameter. (required)

Microsoft.DBforPostgreSQL/flexibleServers/migrations

Name Description Value
location The geo-location where the resource lives string (required)
name The resource name string

Constraints:
Pattern = ^[a-z][a-z0-9]*$ (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: flexibleServers
properties Migration resource properties. MigrationResourceProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.DBforPostgreSQL/flexibleServers/migrations@2023-03-01-preview"

MigrationResourceProperties

Name Description Value
cancel To trigger cancel for entire migration we need to send this flag as True 'False'
'True'
dbsToCancelMigrationOn When you want to trigger cancel for specific databases send cancel flag as True and database names in this array string[]
dbsToMigrate Number of databases to migrate string[]
dbsToTriggerCutoverOn When you want to trigger cutover for specific databases send triggerCutover flag as True and database names in this array string[]
migrationMode There are two types of migration modes Online and Offline 'Offline'
'Online'
migrationWindowEndTimeInUtc End time in UTC for migration window string
migrationWindowStartTimeInUtc Start time in UTC for migration window string
overwriteDbsInTarget Indicates whether the databases on the target server can be overwritten, if already present. If set to False, the migration workflow will wait for a confirmation, if it detects that the database already exists. 'False'
'True'
secretParameters Migration secret parameters MigrationSecretParameters
setupLogicalReplicationOnSourceDbIfNeeded Indicates whether to setup LogicalReplicationOnSourceDb, if needed 'False'
'True'
sourceDbServerFullyQualifiedDomainName Source server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection string
sourceDbServerResourceId ResourceId of the source database server string
startDataMigration Indicates whether the data migration should start right away 'False'
'True'
targetDbServerFullyQualifiedDomainName Target server fully qualified domain name or ip. It is a optional value, if customer provide it, dms will always use it for connection string
triggerCutover To trigger cutover for entire migration we need to send this flag as True 'False'
'True'

MigrationSecretParameters

Name Description Value
adminCredentials Admin credentials for source and target servers AdminCredentials (required)
sourceServerUsername Gets or sets the username for the source server. This user need not be an admin. string
targetServerUsername Gets or sets the username for the target server. This user need not be an admin. string

TrackedResourceTags

Name Description Value