Managed Databases - Create Or Update
Creates a new database or updates an existing database.
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/managedInstances/{managedInstanceName}/databases/{databaseName}?api-version=2023-08-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
database
|
path | True |
string |
The name of the database. |
|
managed
|
path | True |
string |
The name of the managed instance. |
|
resource
|
path | True |
string |
The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
|
subscription
|
path | True |
string |
The subscription ID that identifies an Azure subscription. |
|
api-version
|
query | True |
string |
The API version to use for the request. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| location | True |
string |
Resource location. |
| properties.autoCompleteRestore |
boolean |
Whether to auto complete restore of this managed database. |
|
| properties.catalogCollation |
Collation of the metadata catalog. |
||
| properties.collation |
string |
Collation of the managed database. |
|
| properties.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). |
||
| properties.crossSubscriptionRestorableDroppedDatabaseId |
string |
The restorable cross-subscription dropped database resource id to restore when creating this database. |
|
| properties.crossSubscriptionSourceDatabaseId |
string |
The resource identifier of the cross-subscription source database associated with create operation of this database. |
|
| properties.crossSubscriptionTargetManagedInstanceId |
string |
Target managed instance id used in cross-subscription restore. |
|
| properties.isLedgerOn |
boolean |
Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. |
|
| properties.lastBackupName |
string |
Last backup file name for restore of this managed database. |
|
| properties.longTermRetentionBackupResourceId |
string |
The name of the Long Term Retention backup to be used for restore of this managed database. |
|
| properties.recoverableDatabaseId |
string |
The resource identifier of the recoverable database associated with create operation of this database. |
|
| properties.restorableDroppedDatabaseId |
string |
The restorable dropped database resource id to restore when creating this database. |
|
| properties.restorePointInTime |
string (date-time) |
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. |
|
| properties.sourceDatabaseId |
string |
The resource identifier of the source database associated with create operation of this database. |
|
| properties.storageContainerIdentity |
string |
Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. |
|
| properties.storageContainerSasToken |
string |
Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. |
|
| properties.storageContainerUri |
string |
Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. |
|
| tags |
object |
Resource tags. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Successfully updated the database. |
|
| 201 Created |
Successfully created the database. |
|
| 202 Accepted |
Accepted Headers Location: string |
|
| Other Status Codes |
*** Error Responses: ***
|
Examples
Creates a new managed database by restoring from an external backup
Sample request
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"
}
Sample response
{
"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
Sample request
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"
}
Sample response
{
"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
Sample request
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"
}
}
Sample response
{
"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
Sample request
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"
}
Sample response
{
"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
Sample request
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"
}
}
Sample response
{
"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
Sample request
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"
}
}
Sample response
{
"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.
Sample request
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
}
}
Sample response
{
"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
Sample request
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"
}
Sample response
{
"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
Sample request
Sample response
{
"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
Definitions
| Name | Description |
|---|---|
|
Catalog |
Collation of the metadata catalog. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Managed |
A managed database resource. |
|
Managed |
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). |
|
Managed |
Status of the database. |
CatalogCollationType
Collation of the metadata catalog.
| Value | Description |
|---|---|
| DATABASE_DEFAULT | |
| SQL_Latin1_General_CP1_CI_AS |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
ManagedDatabase
A managed database resource.
| Name | Type | Description |
|---|---|---|
| id |
string |
Resource ID. |
| location |
string |
Resource location. |
| name |
string |
Resource name. |
| properties.autoCompleteRestore |
boolean |
Whether to auto complete restore of this managed database. |
| properties.catalogCollation |
Collation of the metadata catalog. |
|
| properties.collation |
string |
Collation of the managed database. |
| properties.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). |
|
| properties.creationDate |
string (date-time) |
Creation date of the database. |
| properties.crossSubscriptionRestorableDroppedDatabaseId |
string |
The restorable cross-subscription dropped database resource id to restore when creating this database. |
| properties.crossSubscriptionSourceDatabaseId |
string |
The resource identifier of the cross-subscription source database associated with create operation of this database. |
| properties.crossSubscriptionTargetManagedInstanceId |
string |
Target managed instance id used in cross-subscription restore. |
| properties.defaultSecondaryLocation |
string |
Geo paired region. |
| properties.earliestRestorePoint |
string (date-time) |
Earliest restore point in time for point in time restore. |
| properties.failoverGroupId |
string |
Instance Failover Group resource identifier that this managed database belongs to. |
| properties.isLedgerOn |
boolean |
Whether or not this database is a ledger database, which means all tables in the database are ledger tables. Note: the value of this property cannot be changed after the database has been created. |
| properties.lastBackupName |
string |
Last backup file name for restore of this managed database. |
| properties.longTermRetentionBackupResourceId |
string |
The name of the Long Term Retention backup to be used for restore of this managed database. |
| properties.recoverableDatabaseId |
string |
The resource identifier of the recoverable database associated with create operation of this database. |
| properties.restorableDroppedDatabaseId |
string |
The restorable dropped database resource id to restore when creating this database. |
| properties.restorePointInTime |
string (date-time) |
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. |
| properties.sourceDatabaseId |
string |
The resource identifier of the source database associated with create operation of this database. |
| properties.status |
Status of the database. |
|
| properties.storageContainerIdentity |
string |
Conditional. If createMode is RestoreExternalBackup, this value is used. Specifies the identity used for storage container authentication. Can be 'SharedAccessSignature' or 'ManagedIdentity'; if not specified 'SharedAccessSignature' is assumed. |
| properties.storageContainerSasToken |
string |
Conditional. If createMode is RestoreExternalBackup and storageContainerIdentity is not ManagedIdentity, this value is required. Specifies the storage container sas token. |
| properties.storageContainerUri |
string |
Conditional. If createMode is RestoreExternalBackup, this value is required. Specifies the uri of the storage container where backups for this restore are stored. |
| tags |
object |
Resource tags. |
| type |
string |
Resource type. |
ManagedDatabaseCreateMode
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).
| Value | Description |
|---|---|
| Default | |
| RestoreExternalBackup | |
| PointInTimeRestore | |
| Recovery | |
| RestoreLongTermRetentionBackup |
ManagedDatabaseStatus
Status of the database.
| Value | Description |
|---|---|
| Online | |
| Offline | |
| Shutdown | |
| Creating | |
| Inaccessible | |
| Restoring | |
| Updating | |
| Stopping | |
| Stopped | |
| Starting | |
| DbMoving | |
| DbCopying |