Managed Databases - Create Or Update
创建新的数据库或更新现有数据库。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}?api-version=2023-08-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
database
|
path | True |
string |
数据库的名称。 |
managed
|
path | True |
string |
托管实例的名称。 |
resource
|
path | True |
string |
包含资源的资源组的名称。 可以从 Azure 资源管理器 API 或门户获取此值。 |
subscription
|
path | True |
string |
标识 Azure 订阅的订阅 ID。 |
api-version
|
query | True |
string |
要用于请求的 API 版本。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
___location | True |
string |
资源位置。 |
properties.autoCompleteRestore |
boolean |
是否自动完成此托管数据库的还原。 |
|
properties.catalogCollation |
元数据目录的排序规则。 |
||
properties.collation |
string |
托管数据库的排序规则。 |
|
properties.createMode |
托管数据库创建模式。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 必须指定 SourceDatabaseName、SourceManagedInstanceName 和 PointInTime。 RestoreExternalBackup:通过从外部备份文件还原来创建数据库。 必须指定排序规则、StorageContainerUri 和 StorageContainerSasToken。 恢复:通过还原异地复制的备份来创建数据库。 RecoverableDatabaseId 必须指定为可恢复的数据库资源 ID 才能还原。 RestoreLongTermRetentionBackup:通过从长期保留备份(需要 longTermRetentionBackupResourceId)还原来创建数据库。 |
||
properties.crossSubscriptionRestorableDroppedDatabaseId |
string |
可还原的跨订阅删除的数据库资源 ID,用于在创建此数据库时还原。 |
|
properties.crossSubscriptionSourceDatabaseId |
string |
与此数据库的创建作关联的跨订阅源数据库的资源标识符。 |
|
properties.crossSubscriptionTargetManagedInstanceId |
string |
跨订阅还原中使用的目标托管实例 ID。 |
|
properties.isLedgerOn |
boolean |
此数据库是否为账本数据库,这意味着数据库中的所有表都是账本表。 注意:创建数据库后,无法更改此属性的值。 |
|
properties.lastBackupName |
string |
用于还原此托管数据库的上次备份文件名。 |
|
properties.longTermRetentionBackupResourceId |
string |
要用于还原此托管数据库的长期保留备份的名称。 |
|
properties.recoverableDatabaseId |
string |
与此数据库的创建作关联的可恢复数据库的资源标识符。 |
|
properties.restorableDroppedDatabaseId |
string |
创建此数据库时要还原的可还原删除的数据库资源 ID。 |
|
properties.restorePointInTime |
string (date-time) |
有條件的。 如果 createMode 为 PointInTimeRestore,则此值是必需的。 指定将还原以创建新数据库的源数据库的时间点(ISO8601格式)。 |
|
properties.sourceDatabaseId |
string |
与此数据库的创建作关联的源数据库的资源标识符。 |
|
properties.storageContainerIdentity |
string |
有條件的。 如果 createMode 为 RestoreExternalBackup,则使用此值。 指定用于存储容器身份验证的标识。 可以是“SharedAccessSignature”或“ManagedIdentity”;如果未指定“SharedAccessSignature”,则假定为 |
|
properties.storageContainerSasToken |
string |
有條件的。 如果 createMode 为 RestoreExternalBackup 且 storageContainerIdentity 不是 ManagedIdentity,则此值是必需的。 指定存储容器 sas 令牌。 |
|
properties.storageContainerUri |
string |
有條件的。 如果 createMode 为 RestoreExternalBackup,则此值是必需的。 指定存储容器的 URI,用于存储此还原的备份。 |
|
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
已成功更新数据库。 |
|
201 Created |
已成功创建数据库。 |
|
202 Accepted |
接受 标头 Location: string |
|
Other Status Codes |
错误响应: ***
|
示例
Creates a new managed database by restoring from an external backup
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"properties": {
"createMode": "RestoreExternalBackup",
"storageContainerUri": "https://myaccountname.blob.core.windows.net/backups",
"storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"autoCompleteRestore": true,
"lastBackupName": "last_backup_name"
},
"___location": "southeastasia"
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Creates a new managed database by restoring from an external backup using managed identity
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"properties": {
"createMode": "RestoreExternalBackup",
"storageContainerUri": "https://myaccountname.blob.core.windows.net/backups",
"storageContainerIdentity": "ManagedIdentity",
"collation": "SQL_Latin1_General_CP1_CI_AS",
"autoCompleteRestore": true,
"lastBackupName": "last_backup_name"
},
"___location": "southeastasia"
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Creates a new managed database from restoring a geo-replicated backup
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/databases/testdb_recovered?api-version=2023-08-01
{
"___location": "southeastasia",
"properties": {
"createMode": "Recovery",
"recoverableDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-WestEurope/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb"
}
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/server1/recoverableDatabases/testdb_recovered",
"name": "testdb_recovered",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2018-11-07T04:41:33.937Z",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/recoverableDatabases/testdb_recovered",
"name": "testdb_recovered",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2018-11-07T04:41:33.937Z",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Creates a new managed database from restoring a long term retention backup
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"properties": {
"createMode": "RestoreExternalBackup",
"storageContainerUri": "https://myaccountname.blob.core.windows.net/backups",
"storageContainerSasToken": "sv=2015-12-11&sr=c&sp=rl&sig=1234",
"collation": "SQL_Latin1_General_CP1_CI_AS"
},
"___location": "southeastasia"
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Creates a new managed database using cross subscription point in time restore
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"___location": "southeastasia",
"properties": {
"createMode": "PointInTimeRestore",
"crossSubscriptionTargetManagedInstanceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr",
"crossSubscriptionSourceDatabaseId": "/subscriptions/11111111-2222-3333-4444-555555555555/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr2/databases/testdb",
"restorePointInTime": "2017-07-14T05:35:31.503Z"
}
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Creates a new managed database using point in time restore
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"___location": "southeastasia",
"properties": {
"createMode": "PointInTimeRestore",
"sourceDatabaseId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb",
"restorePointInTime": "2017-07-14T05:35:31.503Z"
}
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Creates a new managed database with ledger on.
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"___location": "southeastasia",
"properties": {
"isLedgerOn": true
}
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": true
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testcl/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": true
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2022-08-01
Creates a new managed database with maximal properties
示例请求
PUT https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/managedInstance/databases/managedDatabase?api-version=2023-08-01
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia"
}
示例响应
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"tags": {
"tagKey1": "TagValue1"
},
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01
Creates a new managed database with minimal properties
示例请求
示例响应
{
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb1",
"name": "testdb1",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
{
"___location": "southeastasia",
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/managedInstances/testsvr/databases/testdb2",
"name": "testdb2",
"properties": {
"collation": "SQL_Latin1_General_CP1_CI_AS",
"status": "Online",
"creationDate": "2017-06-07T04:41:33.937Z",
"defaultSecondaryLocation": "North Europe",
"isLedgerOn": false
},
"type": "Microsoft.Sql/managedInstances/databases"
}
Location: https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-SouthEastAsia/providers/Microsoft.Sql/locations/southeastasia/operationStatus/default/operationId/00000000-0000-0000-0000-000000000000?api-version=2017-03-01
定义
名称 | 说明 |
---|---|
Catalog |
元数据目录的排序规则。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Error |
错误响应 |
Managed |
托管数据库资源。 |
Managed |
托管数据库创建模式。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 必须指定 SourceDatabaseName、SourceManagedInstanceName 和 PointInTime。 RestoreExternalBackup:通过从外部备份文件还原来创建数据库。 必须指定排序规则、StorageContainerUri 和 StorageContainerSasToken。 恢复:通过还原异地复制的备份来创建数据库。 RecoverableDatabaseId 必须指定为可恢复的数据库资源 ID 才能还原。 RestoreLongTermRetentionBackup:通过从长期保留备份(需要 longTermRetentionBackupResourceId)还原来创建数据库。 |
Managed |
数据库的状态。 |
CatalogCollationType
元数据目录的排序规则。
值 | 说明 |
---|---|
DATABASE_DEFAULT | |
SQL_Latin1_General_CP1_CI_AS |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
ManagedDatabase
托管数据库资源。
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
___location |
string |
资源位置。 |
name |
string |
资源名称。 |
properties.autoCompleteRestore |
boolean |
是否自动完成此托管数据库的还原。 |
properties.catalogCollation |
元数据目录的排序规则。 |
|
properties.collation |
string |
托管数据库的排序规则。 |
properties.createMode |
托管数据库创建模式。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 必须指定 SourceDatabaseName、SourceManagedInstanceName 和 PointInTime。 RestoreExternalBackup:通过从外部备份文件还原来创建数据库。 必须指定排序规则、StorageContainerUri 和 StorageContainerSasToken。 恢复:通过还原异地复制的备份来创建数据库。 RecoverableDatabaseId 必须指定为可恢复的数据库资源 ID 才能还原。 RestoreLongTermRetentionBackup:通过从长期保留备份(需要 longTermRetentionBackupResourceId)还原来创建数据库。 |
|
properties.creationDate |
string (date-time) |
数据库的创建日期。 |
properties.crossSubscriptionRestorableDroppedDatabaseId |
string |
可还原的跨订阅删除的数据库资源 ID,用于在创建此数据库时还原。 |
properties.crossSubscriptionSourceDatabaseId |
string |
与此数据库的创建作关联的跨订阅源数据库的资源标识符。 |
properties.crossSubscriptionTargetManagedInstanceId |
string |
跨订阅还原中使用的目标托管实例 ID。 |
properties.defaultSecondaryLocation |
string |
地理配对区域。 |
properties.earliestRestorePoint |
string (date-time) |
时间点还原的最早还原点。 |
properties.failoverGroupId |
string |
此托管数据库所属的实例故障转移组资源标识符。 |
properties.isLedgerOn |
boolean |
此数据库是否为账本数据库,这意味着数据库中的所有表都是账本表。 注意:创建数据库后,无法更改此属性的值。 |
properties.lastBackupName |
string |
用于还原此托管数据库的上次备份文件名。 |
properties.longTermRetentionBackupResourceId |
string |
要用于还原此托管数据库的长期保留备份的名称。 |
properties.recoverableDatabaseId |
string |
与此数据库的创建作关联的可恢复数据库的资源标识符。 |
properties.restorableDroppedDatabaseId |
string |
创建此数据库时要还原的可还原删除的数据库资源 ID。 |
properties.restorePointInTime |
string (date-time) |
有條件的。 如果 createMode 为 PointInTimeRestore,则此值是必需的。 指定将还原以创建新数据库的源数据库的时间点(ISO8601格式)。 |
properties.sourceDatabaseId |
string |
与此数据库的创建作关联的源数据库的资源标识符。 |
properties.status |
数据库的状态。 |
|
properties.storageContainerIdentity |
string |
有條件的。 如果 createMode 为 RestoreExternalBackup,则使用此值。 指定用于存储容器身份验证的标识。 可以是“SharedAccessSignature”或“ManagedIdentity”;如果未指定“SharedAccessSignature”,则假定为 |
properties.storageContainerSasToken |
string |
有條件的。 如果 createMode 为 RestoreExternalBackup 且 storageContainerIdentity 不是 ManagedIdentity,则此值是必需的。 指定存储容器 sas 令牌。 |
properties.storageContainerUri |
string |
有條件的。 如果 createMode 为 RestoreExternalBackup,则此值是必需的。 指定存储容器的 URI,用于存储此还原的备份。 |
tags |
object |
资源标记。 |
type |
string |
资源类型。 |
ManagedDatabaseCreateMode
托管数据库创建模式。 PointInTimeRestore:通过还原现有数据库的时间点备份来创建数据库。 必须指定 SourceDatabaseName、SourceManagedInstanceName 和 PointInTime。 RestoreExternalBackup:通过从外部备份文件还原来创建数据库。 必须指定排序规则、StorageContainerUri 和 StorageContainerSasToken。 恢复:通过还原异地复制的备份来创建数据库。 RecoverableDatabaseId 必须指定为可恢复的数据库资源 ID 才能还原。 RestoreLongTermRetentionBackup:通过从长期保留备份(需要 longTermRetentionBackupResourceId)还原来创建数据库。
值 | 说明 |
---|---|
Default | |
PointInTimeRestore | |
Recovery | |
RestoreExternalBackup | |
RestoreLongTermRetentionBackup |
ManagedDatabaseStatus
数据库的状态。
值 | 说明 |
---|---|
Creating | |
DbCopying | |
DbMoving | |
Inaccessible | |
Offline | |
Online | |
Restoring | |
Shutdown | |
Starting | |
Stopped | |
Stopping | |
Updating |