Microsoft.Sql managedInstances/databases 2021-02-01-preview

Bicep resource definition

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

resource symbolicname 'Microsoft.Sql/managedInstances/databases@2021-02-01-preview' = {
  parent: resourceSymbolicName
  location: 'string'
  name: 'string'
  properties: {
    autoCompleteRestore: bool
    catalogCollation: 'string'
    collation: 'string'
    createMode: 'string'
    lastBackupName: 'string'
    longTermRetentionBackupResourceId: 'string'
    recoverableDatabaseId: 'string'
    restorableDroppedDatabaseId: 'string'
    restorePointInTime: 'string'
    sourceDatabaseId: 'string'
    storageContainerSasToken: 'string'
    storageContainerUri: 'string'
  }
  tags: {
    {customized property}: 'string'
  }
}

Property values

ManagedDatabaseProperties

Name Description Value
autoCompleteRestore Whether to auto complete restore of this managed database. bool
catalogCollation Collation of the metadata catalog. 'DATABASE_DEFAULT'
'SQL_Latin1_General_CP1_CI_AS'
collation Collation of the managed database. string
createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). 'Default'
'PointInTimeRestore'
'Recovery'
'RestoreExternalBackup'
'RestoreLongTermRetentionBackup'
lastBackupName Last backup file name for restore of this managed database. string
longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database. string
recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database. string
restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database. string
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
sourceDatabaseId The resource identifier of the source database associated with create operation of this database. string
storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. string
storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. string

Microsoft.Sql/managedInstances/databases

Name Description Value
location Resource location. 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: managedInstances
properties Resource properties. ManagedDatabaseProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates

TrackedResourceTags

Name Description Value

ARM template resource definition

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

{
  "type": "Microsoft.Sql/managedInstances/databases",
  "apiVersion": "2021-02-01-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "autoCompleteRestore": "bool",
    "catalogCollation": "string",
    "collation": "string",
    "createMode": "string",
    "lastBackupName": "string",
    "longTermRetentionBackupResourceId": "string",
    "recoverableDatabaseId": "string",
    "restorableDroppedDatabaseId": "string",
    "restorePointInTime": "string",
    "sourceDatabaseId": "string",
    "storageContainerSasToken": "string",
    "storageContainerUri": "string"
  },
  "tags": {
    "{customized property}": "string"
  }
}

Property values

ManagedDatabaseProperties

Name Description Value
autoCompleteRestore Whether to auto complete restore of this managed database. bool
catalogCollation Collation of the metadata catalog. 'DATABASE_DEFAULT'
'SQL_Latin1_General_CP1_CI_AS'
collation Collation of the managed database. string
createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). 'Default'
'PointInTimeRestore'
'Recovery'
'RestoreExternalBackup'
'RestoreLongTermRetentionBackup'
lastBackupName Last backup file name for restore of this managed database. string
longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database. string
recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database. string
restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database. string
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
sourceDatabaseId The resource identifier of the source database associated with create operation of this database. string
storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. string
storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. string

Microsoft.Sql/managedInstances/databases

Name Description Value
apiVersion The api version '2021-02-01-preview'
location Resource location. string (required)
name The resource name string (required)
properties Resource properties. ManagedDatabaseProperties
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.Sql/managedInstances/databases'

TrackedResourceTags

Name Description Value

Terraform (AzAPI provider) resource definition

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/managedInstances/databases@2021-02-01-preview"
  name = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = jsonencode({
    properties = {
      autoCompleteRestore = bool
      catalogCollation = "string"
      collation = "string"
      createMode = "string"
      lastBackupName = "string"
      longTermRetentionBackupResourceId = "string"
      recoverableDatabaseId = "string"
      restorableDroppedDatabaseId = "string"
      restorePointInTime = "string"
      sourceDatabaseId = "string"
      storageContainerSasToken = "string"
      storageContainerUri = "string"
    }
  })
}

Property values

ManagedDatabaseProperties

Name Description Value
autoCompleteRestore Whether to auto complete restore of this managed database. bool
catalogCollation Collation of the metadata catalog. 'DATABASE_DEFAULT'
'SQL_Latin1_General_CP1_CI_AS'
collation Collation of the managed database. string
createMode Managed database create mode. PointInTimeRestore: Create a database by restoring a point in time backup of an existing database. SourceDatabaseName, SourceManagedInstanceName and PointInTime must be specified. RestoreExternalBackup: Create a database by restoring from external backup files. Collation, StorageContainerUri and StorageContainerSasToken must be specified. Recovery: Creates a database by restoring a geo-replicated backup. RecoverableDatabaseId must be specified as the recoverable database resource ID to restore. RestoreLongTermRetentionBackup: Create a database by restoring from a long term retention backup (longTermRetentionBackupResourceId required). 'Default'
'PointInTimeRestore'
'Recovery'
'RestoreExternalBackup'
'RestoreLongTermRetentionBackup'
lastBackupName Last backup file name for restore of this managed database. string
longTermRetentionBackupResourceId The name of the Long Term Retention backup to be used for restore of this managed database. string
recoverableDatabaseId The resource identifier of the recoverable database associated with create operation of this database. string
restorableDroppedDatabaseId The restorable dropped database resource id to restore when creating this database. string
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
sourceDatabaseId The resource identifier of the source database associated with create operation of this database. string
storageContainerSasToken Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the storage container sas token. string
storageContainerUri Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. string

Microsoft.Sql/managedInstances/databases

Name Description Value
location Resource location. 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: managedInstances
properties Resource properties. ManagedDatabaseProperties
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.Sql/managedInstances/databases@2021-02-01-preview"

TrackedResourceTags

Name Description Value