Share via


Microsoft.AzureArcData sqlServerInstances/databases

Bicep resource definition

The sqlServerInstances/databases 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.AzureArcData/sqlServerInstances/databases resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.AzureArcData/sqlServerInstances/databases@2025-03-01-preview' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    backupInformation: {
      lastFullBackup: 'string'
      lastLogBackup: 'string'
    }
    backupPolicy: {
      differentialBackupHours: int
      fullBackupDays: int
      retentionPeriodDays: int
      transactionLogBackupMinutes: int
    }
    collationName: 'string'
    compatibilityLevel: int
    createMode: 'string'
    databaseCreationDate: 'string'
    databaseOptions: {
      isAutoCloseOn: bool
      isAutoCreateStatsOn: bool
      isAutoShrinkOn: bool
      isAutoUpdateStatsOn: bool
      isEncrypted: bool
      isMemoryOptimizationEnabled: bool
      isRemoteDataArchiveEnabled: bool
      isTrustworthyOn: bool
    }
    dataFileSizeMB: int
    isReadOnly: bool
    logFileSizeMB: int
    migration: {
      assessment: {}
    }
    recoveryMode: 'string'
    restorePointInTime: 'string'
    sizeMB: int
    sourceDatabaseId: 'string'
    spaceAvailableMB: int
    state: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

Property Values

Microsoft.AzureArcData/sqlServerInstances/databases

Name Description Value
location The geo-location where the resource lives string (required)
name The resource name string (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: sqlServerInstances
properties Properties of Arc Sql Server database SqlServerDatabaseResourceProperties (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates

BackupPolicy

Name Description Value
differentialBackupHours The differential backup interval in hours. int
fullBackupDays The value indicating days between full backups. int

Constraints:
Min value = 0
Max value = 7
retentionPeriodDays The retention period for all the databases in this managed instance. int

Constraints:
Min value = 0
Max value = 35
transactionLogBackupMinutes The value indicating minutes between transaction log backups. int

Constraints:
Min value = 0
Max value = 60

DataBaseMigration

Name Description Value
assessment Migration assessments related configuration. DataBaseMigrationAssessment

DataBaseMigrationAssessment

Name Description Value

SqlServerDatabaseResourceProperties

Name Description Value
backupInformation SqlServerDatabaseResourcePropertiesBackupInformation
backupPolicy The backup profile for the SQL server. BackupPolicy
collationName Collation of the database. string
compatibilityLevel Compatibility level of the database int

Constraints:
Min value = 80
Max value = 200
createMode Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified. 'Default'
'PointInTimeRestore'
databaseCreationDate Creation date of the database. string
databaseOptions List of features that are enabled for the database SqlServerDatabaseResourcePropertiesDatabaseOptions
dataFileSizeMB Total size in MB for the data (mdf and ndf) files for this database. int
isReadOnly Whether the database is read only or not. bool
logFileSizeMB Total size in MB for the log (ldf) files for this database. int
migration Migration related configuration. DataBaseMigration
recoveryMode Status of the database. 'Bulk-logged'
'Full'
'Simple'
restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. string
sizeMB Size of the database. int
sourceDatabaseId The name of the source database associated with create operation of this database. string
spaceAvailableMB Space left of the database. int
state State of the database. 'Copying'
'Emergency'
'Offline'
'OfflineSecondary'
'Online'
'Recovering'
'RecoveryPending'
'Restoring'
'Suspect'

SqlServerDatabaseResourcePropertiesBackupInformation

Name Description Value
lastFullBackup Date time of last full backup. string
lastLogBackup Date time of last log backup. string

SqlServerDatabaseResourcePropertiesDatabaseOptions

Name Description Value
isAutoCloseOn bool
isAutoCreateStatsOn bool
isAutoShrinkOn bool
isAutoUpdateStatsOn bool
isEncrypted bool
isMemoryOptimizationEnabled bool
isRemoteDataArchiveEnabled bool
isTrustworthyOn bool

TrackedResourceTags

Name Description Value

ARM template resource definition

The sqlServerInstances/databases 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.AzureArcData/sqlServerInstances/databases resource, add the following JSON to your template.

{
  "type": "Microsoft.AzureArcData/sqlServerInstances/databases",
  "apiVersion": "2025-03-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "backupInformation": {
      "lastFullBackup": "string",
      "lastLogBackup": "string"
    },
    "backupPolicy": {
      "differentialBackupHours": "int",
      "fullBackupDays": "int",
      "retentionPeriodDays": "int",
      "transactionLogBackupMinutes": "int"
    },
    "collationName": "string",
    "compatibilityLevel": "int",
    "createMode": "string",
    "databaseCreationDate": "string",
    "databaseOptions": {
      "isAutoCloseOn": "bool",
      "isAutoCreateStatsOn": "bool",
      "isAutoShrinkOn": "bool",
      "isAutoUpdateStatsOn": "bool",
      "isEncrypted": "bool",
      "isMemoryOptimizationEnabled": "bool",
      "isRemoteDataArchiveEnabled": "bool",
      "isTrustworthyOn": "bool"
    },
    "dataFileSizeMB": "int",
    "isReadOnly": "bool",
    "logFileSizeMB": "int",
    "migration": {
      "assessment": {
      }
    },
    "recoveryMode": "string",
    "restorePointInTime": "string",
    "sizeMB": "int",
    "sourceDatabaseId": "string",
    "spaceAvailableMB": "int",
    "state": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property Values

Microsoft.AzureArcData/sqlServerInstances/databases

Name Description Value
apiVersion The api version '2025-03-01-preview'
location The geo-location where the resource lives string (required)
name The resource name string (required)
properties Properties of Arc Sql Server database SqlServerDatabaseResourceProperties (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.AzureArcData/sqlServerInstances/databases'

BackupPolicy

Name Description Value
differentialBackupHours The differential backup interval in hours. int
fullBackupDays The value indicating days between full backups. int

Constraints:
Min value = 0
Max value = 7
retentionPeriodDays The retention period for all the databases in this managed instance. int

Constraints:
Min value = 0
Max value = 35
transactionLogBackupMinutes The value indicating minutes between transaction log backups. int

Constraints:
Min value = 0
Max value = 60

DataBaseMigration

Name Description Value
assessment Migration assessments related configuration. DataBaseMigrationAssessment

DataBaseMigrationAssessment

Name Description Value

SqlServerDatabaseResourceProperties

Name Description Value
backupInformation SqlServerDatabaseResourcePropertiesBackupInformation
backupPolicy The backup profile for the SQL server. BackupPolicy
collationName Collation of the database. string
compatibilityLevel Compatibility level of the database int

Constraints:
Min value = 80
Max value = 200
createMode Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified. 'Default'
'PointInTimeRestore'
databaseCreationDate Creation date of the database. string
databaseOptions List of features that are enabled for the database SqlServerDatabaseResourcePropertiesDatabaseOptions
dataFileSizeMB Total size in MB for the data (mdf and ndf) files for this database. int
isReadOnly Whether the database is read only or not. bool
logFileSizeMB Total size in MB for the log (ldf) files for this database. int
migration Migration related configuration. DataBaseMigration
recoveryMode Status of the database. 'Bulk-logged'
'Full'
'Simple'
restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. string
sizeMB Size of the database. int
sourceDatabaseId The name of the source database associated with create operation of this database. string
spaceAvailableMB Space left of the database. int
state State of the database. 'Copying'
'Emergency'
'Offline'
'OfflineSecondary'
'Online'
'Recovering'
'RecoveryPending'
'Restoring'
'Suspect'

SqlServerDatabaseResourcePropertiesBackupInformation

Name Description Value
lastFullBackup Date time of last full backup. string
lastLogBackup Date time of last log backup. string

SqlServerDatabaseResourcePropertiesDatabaseOptions

Name Description Value
isAutoCloseOn bool
isAutoCreateStatsOn bool
isAutoShrinkOn bool
isAutoUpdateStatsOn bool
isEncrypted bool
isMemoryOptimizationEnabled bool
isRemoteDataArchiveEnabled bool
isTrustworthyOn bool

TrackedResourceTags

Name Description Value

Usage Examples

Terraform (AzAPI provider) resource definition

The sqlServerInstances/databases 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.AzureArcData/sqlServerInstances/databases resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.AzureArcData/sqlServerInstances/databases@2025-03-01-preview"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      backupInformation = {
        lastFullBackup = "string"
        lastLogBackup = "string"
      }
      backupPolicy = {
        differentialBackupHours = int
        fullBackupDays = int
        retentionPeriodDays = int
        transactionLogBackupMinutes = int
      }
      collationName = "string"
      compatibilityLevel = int
      createMode = "string"
      databaseCreationDate = "string"
      databaseOptions = {
        isAutoCloseOn = bool
        isAutoCreateStatsOn = bool
        isAutoShrinkOn = bool
        isAutoUpdateStatsOn = bool
        isEncrypted = bool
        isMemoryOptimizationEnabled = bool
        isRemoteDataArchiveEnabled = bool
        isTrustworthyOn = bool
      }
      dataFileSizeMB = int
      isReadOnly = bool
      logFileSizeMB = int
      migration = {
        assessment = {
        }
      }
      recoveryMode = "string"
      restorePointInTime = "string"
      sizeMB = int
      sourceDatabaseId = "string"
      spaceAvailableMB = int
      state = "string"
    }
  }
}

Property Values

Microsoft.AzureArcData/sqlServerInstances/databases

Name Description Value
location The geo-location where the resource lives string (required)
name The resource name string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: sqlServerInstances
properties Properties of Arc Sql Server database SqlServerDatabaseResourceProperties (required)
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.AzureArcData/sqlServerInstances/databases@2025-03-01-preview"

BackupPolicy

Name Description Value
differentialBackupHours The differential backup interval in hours. int
fullBackupDays The value indicating days between full backups. int

Constraints:
Min value = 0
Max value = 7
retentionPeriodDays The retention period for all the databases in this managed instance. int

Constraints:
Min value = 0
Max value = 35
transactionLogBackupMinutes The value indicating minutes between transaction log backups. int

Constraints:
Min value = 0
Max value = 60

DataBaseMigration

Name Description Value
assessment Migration assessments related configuration. DataBaseMigrationAssessment

DataBaseMigrationAssessment

Name Description Value

SqlServerDatabaseResourceProperties

Name Description Value
backupInformation SqlServerDatabaseResourcePropertiesBackupInformation
backupPolicy The backup profile for the SQL server. BackupPolicy
collationName Collation of the database. string
compatibilityLevel Compatibility level of the database int

Constraints:
Min value = 80
Max value = 200
createMode Database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. sourceDatabaseId and restorePointInTime must be specified. 'Default'
'PointInTimeRestore'
databaseCreationDate Creation date of the database. string
databaseOptions List of features that are enabled for the database SqlServerDatabaseResourcePropertiesDatabaseOptions
dataFileSizeMB Total size in MB for the data (mdf and ndf) files for this database. int
isReadOnly Whether the database is read only or not. bool
logFileSizeMB Total size in MB for the log (ldf) files for this database. int
migration Migration related configuration. DataBaseMigration
recoveryMode Status of the database. 'Bulk-logged'
'Full'
'Simple'
restorePointInTime Conditional. If createMode is PointInTimeRestore, this value is required. Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. string
sizeMB Size of the database. int
sourceDatabaseId The name of the source database associated with create operation of this database. string
spaceAvailableMB Space left of the database. int
state State of the database. 'Copying'
'Emergency'
'Offline'
'OfflineSecondary'
'Online'
'Recovering'
'RecoveryPending'
'Restoring'
'Suspect'

SqlServerDatabaseResourcePropertiesBackupInformation

Name Description Value
lastFullBackup Date time of last full backup. string
lastLogBackup Date time of last log backup. string

SqlServerDatabaseResourcePropertiesDatabaseOptions

Name Description Value
isAutoCloseOn bool
isAutoCreateStatsOn bool
isAutoShrinkOn bool
isAutoUpdateStatsOn bool
isEncrypted bool
isMemoryOptimizationEnabled bool
isRemoteDataArchiveEnabled bool
isTrustworthyOn bool

TrackedResourceTags

Name Description Value