Microsoft.Sql managedInstances/databases

Bicep 資源定義

managedInstances/databases 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Sql/managedInstances/databases 資源,請將下列 Bicep 新增至您的範本。

resource symbolicname 'Microsoft.Sql/managedInstances/databases@2023-05-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: resourceSymbolicName
  properties: {
    autoCompleteRestore: bool
    catalogCollation: 'string'
    collation: 'string'
    createMode: 'string'
    crossSubscriptionRestorableDroppedDatabaseId: 'string'
    crossSubscriptionSourceDatabaseId: 'string'
    crossSubscriptionTargetManagedInstanceId: 'string'
    isLedgerOn: bool
    lastBackupName: 'string'
    longTermRetentionBackupResourceId: 'string'
    recoverableDatabaseId: 'string'
    restorableDroppedDatabaseId: 'string'
    restorePointInTime: 'string'
    sourceDatabaseId: 'string'
    storageContainerIdentity: 'string'
    storageContainerSasToken: 'string'
    storageContainerUri: 'string'
  }
}

屬性值

managedInstances/databases

名稱 描述
NAME 資源名稱

瞭解如何在 Bicep 中設定子資源的名稱和類型。
字串 (必要)
location 資源位置。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
父系 (parent) 在 Bicep 中,您可以指定子資源的父資源。 只有在父資源之外宣告子資源時,才需要新增這個屬性。

如需詳細資訊,請參閱 父資源外部的子資源
類型資源的符號名稱: managedInstances
properties 資源屬性。 ManagedDatabaseProperties

ManagedDatabaseProperties

名稱 描述
autoCompleteRestore 是否要自動完成此受控資料庫的還原。 bool
catalogCollation 元資料目錄的定序。 'DATABASE_DEFAULT'
'SQL_Latin1_General_CP1_CI_AS'
collation Managed 資料庫的定序。 字串
createMode 受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為可復原的資料庫資源標識符,才能還原。 RestoreLongTermRetentionBackup:從長期保留備份還原 (longTermRetentionBackupResourceId 所需的) 來建立資料庫。 'Default'
'PointInTimeRestore'
'Recovery'
'RestoreExternalBackup'
'RestoreLongTermRetentionBackup'
crossSubscriptionRestorableDroppedDatabaseId 可還原的跨訂用帳戶卸除資料庫資源標識符,可在建立此資料庫時還原。 字串
crossSubscriptionSourceDatabaseId 與此資料庫建立作業相關聯的跨訂用帳戶源資料庫資源標識符。 字串
crossSubscriptionTargetManagedInstanceId 目標受控實例標識碼,用於跨訂用帳戶還原。 字串
isLedgerOn 不論此資料庫是否為總賬資料庫,這表示資料庫中的所有數據表都是總賬數據表。 注意:建立資料庫之後,無法變更此屬性的值。 bool
lastBackupName 還原此受控資料庫的上次備份檔名。 字串
longTermRetentionBackupResourceId 要用於還原此受控資料庫的長期保留備份名稱。 字串
recoverableDatabaseId 與此資料庫建立作業相關聯的可復原資料庫資源標識符。 字串
restorableDroppedDatabaseId 可還原的資料庫資源標識碼,可在建立此資料庫時還原。 字串
restorePointInTime 條件。 如果 createMode 是 PointInTimeRestore,則需要此值。 指定將還原以建立新資料庫之源資料庫) 格式 (ISO8601 時間點。 字串
sourceDatabaseId 與此資料庫建立作業相關聯的源資料庫資源標識符。 字串
storageContainerIdentity 條件。 如果 createMode 為 RestoreExternalBackup,則會使用此值。 指定用於記憶體容器驗證的身分識別。 可以是 'SharedAccessSignature' 或 'ManagedIdentity';如果未指定 'SharedAccessSignature',則會假設為 。 字串
storageContainerSasToken 條件。 如果 createMode 為 RestoreExternalBackup 且 storageContainerIdentity 不是 ManagedIdentity,則需要此值。 指定記憶體容器 sas 令牌。 字串
storageContainerUri 條件。 如果 createMode 為 RestoreExternalBackup,則需要此值。 指定儲存此還原備份之記憶體容器的 URI。 字串

ARM 範本資源定義

managedInstances/databases 資源類型可以使用目標作業來部署:

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄

資源格式

若要建立 Microsoft.Sql/managedInstances/databases 資源,請將下列 JSON 新增至您的範本。

{
  "type": "Microsoft.Sql/managedInstances/databases",
  "apiVersion": "2023-05-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "properties": {
    "autoCompleteRestore": "bool",
    "catalogCollation": "string",
    "collation": "string",
    "createMode": "string",
    "crossSubscriptionRestorableDroppedDatabaseId": "string",
    "crossSubscriptionSourceDatabaseId": "string",
    "crossSubscriptionTargetManagedInstanceId": "string",
    "isLedgerOn": "bool",
    "lastBackupName": "string",
    "longTermRetentionBackupResourceId": "string",
    "recoverableDatabaseId": "string",
    "restorableDroppedDatabaseId": "string",
    "restorePointInTime": "string",
    "sourceDatabaseId": "string",
    "storageContainerIdentity": "string",
    "storageContainerSasToken": "string",
    "storageContainerUri": "string"
  }
}

屬性值

managedInstances/databases

名稱 描述
類型 資源類型 'Microsoft.Sql/managedInstances/databases'
apiVersion 資源 API 版本 '2023-05-01-preview'
NAME 資源名稱

請參閱如何在 JSON ARM 樣本中設定子資源的名稱和類型。
字串 (必要)
location 資源位置。 字串 (必要)
tags 資源標籤。 標記名稱和值的字典。 請參閱 範本中的標記
properties 資源屬性。 ManagedDatabaseProperties

ManagedDatabaseProperties

名稱 描述
autoCompleteRestore 是否要自動完成此受控資料庫的還原。 bool
catalogCollation 元資料目錄的定序。 'DATABASE_DEFAULT'
'SQL_Latin1_General_CP1_CI_AS'
collation Managed 資料庫的定序。 字串
createMode 受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為可復原的資料庫資源標識符,才能還原。 RestoreLongTermRetentionBackup:從長期保留備份還原 (longTermRetentionBackupResourceId 所需的) 來建立資料庫。 'Default'
'PointInTimeRestore'
'Recovery'
'RestoreExternalBackup'
'RestoreLongTermRetentionBackup'
crossSubscriptionRestorableDroppedDatabaseId 可還原的跨訂用帳戶卸除資料庫資源標識符,可在建立此資料庫時還原。 字串
crossSubscriptionSourceDatabaseId 與此資料庫建立作業相關聯的跨訂用帳戶源資料庫資源標識符。 字串
crossSubscriptionTargetManagedInstanceId 目標受控實例標識碼,用於跨訂用帳戶還原。 字串
isLedgerOn 不論此資料庫是否為總賬資料庫,這表示資料庫中的所有數據表都是總賬數據表。 注意:建立資料庫之後,無法變更此屬性的值。 bool
lastBackupName 還原此受控資料庫的最後一個備份檔名。 字串
longTermRetentionBackupResourceId 要用於還原此受控資料庫之長期保留備份的名稱。 字串
recoverableDatabaseId 與這個資料庫建立作業相關聯的可復原資料庫資源標識符。 字串
restorableDroppedDatabaseId 建立此資料庫時要還原的可還原已卸除資料庫資源標識符。 字串
restorePointInTime 條件。 如果 createMode 是 PointInTimeRestore,則需要此值。 指定將還原以建立新資料庫之源資料庫) (ISO8601 時間點。 字串
sourceDatabaseId 與此資料庫建立作業相關聯的源資料庫資源標識符。 字串
storageContainerIdentity 條件。 如果 createMode 為 RestoreExternalBackup,則會使用此值。 指定用於記憶體容器驗證的身分識別。 可以是 'SharedAccessSignature' 或 'ManagedIdentity';如果未指定 'SharedAccessSignature',則會假設為 。 字串
storageContainerSasToken 條件。 如果 createMode 為 RestoreExternalBackup,且 storageContainerIdentity 不是 ManagedIdentity,則需要此值。 指定記憶體容器 sas 令牌。 字串
storageContainerUri 條件。 如果 createMode 為 RestoreExternalBackup,則需要此值。 指定儲存此還原備份之記憶體容器的 URI。 字串

Terraform (AzAPI 提供者) 資源定義

managedInstances/databases 資源類型可以使用目標作業來部署:

  • 資源群組

如需每個 API 版本中已變更屬性的清單,請參閱 變更記錄檔。

資源格式

若要建立 Microsoft.Sql/managedInstances/databases 資源,請將下列 Terraform 新增至您的範本。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Sql/managedInstances/databases@2023-05-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      autoCompleteRestore = bool
      catalogCollation = "string"
      collation = "string"
      createMode = "string"
      crossSubscriptionRestorableDroppedDatabaseId = "string"
      crossSubscriptionSourceDatabaseId = "string"
      crossSubscriptionTargetManagedInstanceId = "string"
      isLedgerOn = bool
      lastBackupName = "string"
      longTermRetentionBackupResourceId = "string"
      recoverableDatabaseId = "string"
      restorableDroppedDatabaseId = "string"
      restorePointInTime = "string"
      sourceDatabaseId = "string"
      storageContainerIdentity = "string"
      storageContainerSasToken = "string"
      storageContainerUri = "string"
    }
  })
}

屬性值

managedInstances/databases

名稱 描述
類型 資源類型 “Microsoft.Sql/managedInstances/databases@2023-05-01-preview”
NAME 資源名稱 需要字串 ()
location 資源位置。 需要字串 ()
parent_id 此資源父系之資源的標識碼。 類型資源的標識碼: managedInstances
tags 資源標籤。 標記名稱和值的字典。
properties 資源屬性。 ManagedDatabaseProperties

ManagedDatabaseProperties

名稱 描述
autoCompleteRestore 是否要自動完成此受控資料庫的還原。 bool
catalogCollation 元資料目錄的定序。 “DATABASE_DEFAULT”
“SQL_Latin1_General_CP1_CI_AS”
collation Managed 資料庫的定序。 字串
createMode 受控資料庫建立模式。 PointInTimeRestore:藉由還原現有資料庫的時間點備份來建立資料庫。 必須指定SourceDatabaseName、SourceManagedInstanceName和PointInTime。 RestoreExternalBackup:從外部備份文件還原來建立資料庫。 必須指定 Collation、StorageContainerUri 和 StorageContainerSasToken。 復原:藉由還原異地復寫備份來建立資料庫。 RecoverableDatabaseId 必須指定為可復原的資料庫資源標識符,才能還原。 RestoreLongTermRetentionBackup:從長期保留備份還原 (longTermRetentionBackupResourceId 所需的) 來建立資料庫。 “預設值”
“PointInTimeRestore”
“復原”
“RestoreExternalBackup”
“RestoreLongTermRetentionBackup”
crossSubscriptionRestorableDroppedDatabaseId 建立此資料庫時,可還原的跨訂閱卸除資料庫資源標識符。 字串
crossSubscriptionSourceDatabaseId 與此資料庫建立作業相關聯的跨訂閱源資料庫資源標識符。 字串
crossSubscriptionTargetManagedInstanceId 跨訂用帳戶還原中使用的目標受控實例標識碼。 字串
isLedgerOn 不論此資料庫是否為總賬資料庫,這表示資料庫中的所有數據表都是總賬數據表。 注意:建立資料庫之後,就無法變更此屬性的值。 bool
lastBackupName 還原此受控資料庫的最後一個備份檔名。 字串
longTermRetentionBackupResourceId 要用於還原此受控資料庫之長期保留備份的名稱。 字串
recoverableDatabaseId 與這個資料庫建立作業相關聯的可復原資料庫資源標識符。 字串
restorableDroppedDatabaseId 建立此資料庫時要還原的可還原已卸除資料庫資源標識符。 字串
restorePointInTime 條件。 如果 createMode 是 PointInTimeRestore,則需要此值。 指定將還原以建立新資料庫之源資料庫) (ISO8601 時間點。 字串
sourceDatabaseId 與此資料庫建立作業相關聯的源資料庫資源標識符。 字串
storageContainerIdentity 條件。 如果 createMode 為 RestoreExternalBackup,則會使用此值。 指定用於記憶體容器驗證的身分識別。 可以是 'SharedAccessSignature' 或 'ManagedIdentity';如果未指定 'SharedAccessSignature',則會假設為 。 字串
storageContainerSasToken 條件。 如果 createMode 為 RestoreExternalBackup,且 storageContainerIdentity 不是 ManagedIdentity,則需要此值。 指定記憶體容器 sas 令牌。 字串
storageContainerUri 條件。 如果 createMode 為 RestoreExternalBackup,則需要此值。 指定儲存此還原備份之記憶體容器的 URI。 字串