Database interface
A database resource.
- Extends
Properties
auto |
Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled |
availability |
Specifies the availability zone the database is pinned to. |
catalog |
Collation of the metadata catalog. |
collation | The collation of the database. |
create |
Specifies the mode of database creation. Default: regular database creation. Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database. Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database. PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified. Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore. Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time. RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID. Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition. |
creation |
The creation date of the database (ISO8601 format). NOTE: This property will not be serialized. It can only be populated by the server. |
current |
The storage account type used to store backups for this database. NOTE: This property will not be serialized. It can only be populated by the server. |
current |
The current service level objective name of the database. NOTE: This property will not be serialized. It can only be populated by the server. |
current |
The name and tier of the SKU. NOTE: This property will not be serialized. It can only be populated by the server. |
database |
The ID of the database. NOTE: This property will not be serialized. It can only be populated by the server. |
default |
The default secondary region for this database. NOTE: This property will not be serialized. It can only be populated by the server. |
earliest |
This records the earliest start date and time that restore is available for this database (ISO8601 format). NOTE: This property will not be serialized. It can only be populated by the server. |
elastic |
The resource identifier of the elastic pool containing this database. |
encryption |
The azure key vault URI of the database if it's configured with per Database Customer Managed Keys. |
failover |
Failover Group resource identifier that this database belongs to. NOTE: This property will not be serialized. It can only be populated by the server. |
federated |
The Client id used for cross tenant per database CMK scenario |
high |
The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool. |
identity | The Azure Active Directory identity of the database. |
is |
Infra encryption is enabled for this database. NOTE: This property will not be serialized. It can only be populated by the server. |
is |
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. |
keys | The resource ids of the user assigned identities to use |
kind | Kind of database. This is metadata used for the Azure portal experience. NOTE: This property will not be serialized. It can only be populated by the server. |
license |
The license type to apply for this database. |
long |
The resource identifier of the long term retention backup associated with create operation of this database. |
maintenance |
Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur. |
managed |
Resource that manages the database. NOTE: This property will not be serialized. It can only be populated by the server. |
manual |
Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier. This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier. When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database. To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state. |
max |
The max log size for this database. NOTE: This property will not be serialized. It can only be populated by the server. |
max |
The max size of the database expressed in bytes. |
min |
Minimal capacity that database will always have allocated, if not paused |
paused |
The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. NOTE: This property will not be serialized. It can only be populated by the server. |
perform |
To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress. This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter. This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress. When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database. |
preferred |
Type of enclave requested on the database i.e. Default or VBS enclaves. |
read |
The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool. |
recoverable |
The resource identifier of the recoverable database associated with create operation of this database. |
recovery |
The resource identifier of the recovery point associated with create operation of this database. |
requested |
The storage account type to be used to store backups for this database. |
requested |
The requested service level objective name of the database. NOTE: This property will not be serialized. It can only be populated by the server. |
restorable |
The resource identifier of the restorable dropped database associated with create operation of this database. |
restore |
Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. |
resumed |
The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. NOTE: This property will not be serialized. It can only be populated by the server. |
sample |
The name of the sample schema to apply when creating this database. |
secondary |
The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby. |
sku | The database SKU. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the
|
source |
Specifies the time that the database was deleted. |
source |
The resource identifier of the source database associated with create operation of this database. |
source |
The resource identifier of the source associated with the create operation of this database. This property is only supported for DataWarehouse edition and allows to restore across subscriptions. When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover. When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified. When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool. When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool. When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant |
status | The status of the database. NOTE: This property will not be serialized. It can only be populated by the server. |
zone |
Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. |
Inherited Properties
id | Resource ID. NOTE: This property will not be serialized. It can only be populated by the server. |
location | Resource location. |
name | Resource name. NOTE: This property will not be serialized. It can only be populated by the server. |
tags | Resource tags. |
type | Resource type. NOTE: This property will not be serialized. It can only be populated by the server. |
Property Details
autoPauseDelay
Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled
autoPauseDelay?: number
Property Value
number
availabilityZone
Specifies the availability zone the database is pinned to.
availabilityZone?: string
Property Value
string
catalogCollation
Collation of the metadata catalog.
catalogCollation?: string
Property Value
string
collation
The collation of the database.
collation?: string
Property Value
string
createMode
Specifies the mode of database creation.
Default: regular database creation.
Copy: creates a database as a copy of an existing database. sourceDatabaseId must be specified as the resource ID of the source database.
Secondary: creates a database as a secondary replica of an existing database. sourceDatabaseId must be specified as the resource ID of the existing primary database.
PointInTimeRestore: Creates a database by restoring a point in time backup of an existing database. sourceDatabaseId must be specified as the resource ID of the existing database, and restorePointInTime must be specified.
Recovery: Creates a database by restoring a geo-replicated backup. sourceDatabaseId must be specified as the recoverable database resource ID to restore.
Restore: Creates a database by restoring a backup of a deleted database. sourceDatabaseId must be specified. If sourceDatabaseId is the database's original resource ID, then sourceDatabaseDeletionDate must be specified. Otherwise sourceDatabaseId must be the restorable dropped database resource ID and sourceDatabaseDeletionDate is ignored. restorePointInTime may also be specified to restore from an earlier point in time.
RestoreLongTermRetentionBackup: Creates a database by restoring from a long term retention vault. recoveryServicesRecoveryPointResourceId must be specified as the recovery point resource ID.
Copy, Secondary, and RestoreLongTermRetentionBackup are not supported for DataWarehouse edition.
createMode?: string
Property Value
string
creationDate
The creation date of the database (ISO8601 format). NOTE: This property will not be serialized. It can only be populated by the server.
creationDate?: Date
Property Value
Date
currentBackupStorageRedundancy
The storage account type used to store backups for this database. NOTE: This property will not be serialized. It can only be populated by the server.
currentBackupStorageRedundancy?: string
Property Value
string
currentServiceObjectiveName
The current service level objective name of the database. NOTE: This property will not be serialized. It can only be populated by the server.
currentServiceObjectiveName?: string
Property Value
string
currentSku
The name and tier of the SKU. NOTE: This property will not be serialized. It can only be populated by the server.
currentSku?: Sku
Property Value
databaseId
The ID of the database. NOTE: This property will not be serialized. It can only be populated by the server.
databaseId?: string
Property Value
string
defaultSecondaryLocation
The default secondary region for this database. NOTE: This property will not be serialized. It can only be populated by the server.
defaultSecondaryLocation?: string
Property Value
string
earliestRestoreDate
This records the earliest start date and time that restore is available for this database (ISO8601 format). NOTE: This property will not be serialized. It can only be populated by the server.
earliestRestoreDate?: Date
Property Value
Date
elasticPoolId
The resource identifier of the elastic pool containing this database.
elasticPoolId?: string
Property Value
string
encryptionProtector
The azure key vault URI of the database if it's configured with per Database Customer Managed Keys.
encryptionProtector?: string
Property Value
string
failoverGroupId
Failover Group resource identifier that this database belongs to. NOTE: This property will not be serialized. It can only be populated by the server.
failoverGroupId?: string
Property Value
string
federatedClientId
The Client id used for cross tenant per database CMK scenario
federatedClientId?: string
Property Value
string
highAvailabilityReplicaCount
The number of secondary replicas associated with the database that are used to provide high availability. Not applicable to a Hyperscale database within an elastic pool.
highAvailabilityReplicaCount?: number
Property Value
number
identity
The Azure Active Directory identity of the database.
identity?: DatabaseIdentity
Property Value
isInfraEncryptionEnabled
Infra encryption is enabled for this database. NOTE: This property will not be serialized. It can only be populated by the server.
isInfraEncryptionEnabled?: boolean
Property Value
boolean
isLedgerOn
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.
isLedgerOn?: boolean
Property Value
boolean
keys
The resource ids of the user assigned identities to use
keys?: {[propertyName: string]: DatabaseKey}
Property Value
{[propertyName: string]: DatabaseKey}
kind
Kind of database. This is metadata used for the Azure portal experience. NOTE: This property will not be serialized. It can only be populated by the server.
kind?: string
Property Value
string
licenseType
The license type to apply for this database. LicenseIncluded
if you need a license, or BasePrice
if you have a license and are eligible for the Azure Hybrid Benefit.
licenseType?: string
Property Value
string
longTermRetentionBackupResourceId
The resource identifier of the long term retention backup associated with create operation of this database.
longTermRetentionBackupResourceId?: string
Property Value
string
maintenanceConfigurationId
Maintenance configuration id assigned to the database. This configuration defines the period when the maintenance updates will occur.
maintenanceConfigurationId?: string
Property Value
string
managedBy
Resource that manages the database. NOTE: This property will not be serialized. It can only be populated by the server.
managedBy?: string
Property Value
string
manualCutover
Whether or not customer controlled manual cutover needs to be done during Update Database operation to Hyperscale tier.
This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier.
When manualCutover is specified, the scaling operation will wait for user input to trigger cutover to Hyperscale database.
To trigger cutover, please provide 'performCutover' parameter when the Scaling operation is in Waiting state.
manualCutover?: boolean
Property Value
boolean
maxLogSizeBytes
The max log size for this database. NOTE: This property will not be serialized. It can only be populated by the server.
maxLogSizeBytes?: number
Property Value
number
maxSizeBytes
The max size of the database expressed in bytes.
maxSizeBytes?: number
Property Value
number
minCapacity
Minimal capacity that database will always have allocated, if not paused
minCapacity?: number
Property Value
number
pausedDate
The date when database was paused by user configuration or action(ISO8601 format). Null if the database is ready. NOTE: This property will not be serialized. It can only be populated by the server.
pausedDate?: Date
Property Value
Date
performCutover
To trigger customer controlled manual cutover during the wait state while Scaling operation is in progress.
This property parameter is only applicable for scaling operations that are initiated along with 'manualCutover' parameter.
This property is only applicable when scaling database from Business Critical/General Purpose/Premium/Standard tier to Hyperscale tier is already in progress.
When performCutover is specified, the scaling operation will trigger cutover and perform role-change to Hyperscale database.
performCutover?: boolean
Property Value
boolean
preferredEnclaveType
Type of enclave requested on the database i.e. Default or VBS enclaves.
preferredEnclaveType?: string
Property Value
string
readScale
The state of read-only routing. If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica in the same region. Not applicable to a Hyperscale database within an elastic pool.
readScale?: string
Property Value
string
recoverableDatabaseId
The resource identifier of the recoverable database associated with create operation of this database.
recoverableDatabaseId?: string
Property Value
string
recoveryServicesRecoveryPointId
The resource identifier of the recovery point associated with create operation of this database.
recoveryServicesRecoveryPointId?: string
Property Value
string
requestedBackupStorageRedundancy
The storage account type to be used to store backups for this database.
requestedBackupStorageRedundancy?: string
Property Value
string
requestedServiceObjectiveName
The requested service level objective name of the database. NOTE: This property will not be serialized. It can only be populated by the server.
requestedServiceObjectiveName?: string
Property Value
string
restorableDroppedDatabaseId
The resource identifier of the restorable dropped database associated with create operation of this database.
restorableDroppedDatabaseId?: string
Property Value
string
restorePointInTime
Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database.
restorePointInTime?: Date
Property Value
Date
resumedDate
The date when database was resumed by user action or database login (ISO8601 format). Null if the database is paused. NOTE: This property will not be serialized. It can only be populated by the server.
resumedDate?: Date
Property Value
Date
sampleName
The name of the sample schema to apply when creating this database.
sampleName?: string
Property Value
string
secondaryType
The secondary type of the database if it is a secondary. Valid values are Geo, Named and Standby.
secondaryType?: string
Property Value
string
sku
The database SKU.
The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation
REST API or one of the following commands:
az sql db list-editions -l <location> -o table
Get-AzSqlServerServiceObjective -Location <location>
sku?: Sku
Property Value
sourceDatabaseDeletionDate
Specifies the time that the database was deleted.
sourceDatabaseDeletionDate?: Date
Property Value
Date
sourceDatabaseId
The resource identifier of the source database associated with create operation of this database.
sourceDatabaseId?: string
Property Value
string
sourceResourceId
The resource identifier of the source associated with the create operation of this database.
This property is only supported for DataWarehouse edition and allows to restore across subscriptions.
When sourceResourceId is specified, sourceDatabaseId, recoverableDatabaseId, restorableDroppedDatabaseId and sourceDatabaseDeletionDate must not be specified and CreateMode must be PointInTimeRestore, Restore or Recover.
When createMode is PointInTimeRestore, sourceResourceId must be the resource ID of the existing database or existing sql pool, and restorePointInTime must be specified.
When createMode is Restore, sourceResourceId must be the resource ID of restorable dropped database or restorable dropped sql pool.
When createMode is Recover, sourceResourceId must be the resource ID of recoverable database or recoverable sql pool.
When source subscription belongs to a different tenant than target subscription, “x-ms-authorization-auxiliary” header must contain authentication token for the source tenant. For more details about “x-ms-authorization-auxiliary” header see https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/authenticate-multi-tenant
sourceResourceId?: string
Property Value
string
status
The status of the database. NOTE: This property will not be serialized. It can only be populated by the server.
status?: string
Property Value
string
zoneRedundant
Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones.
zoneRedundant?: boolean
Property Value
boolean
Inherited Property Details
id
Resource ID. NOTE: This property will not be serialized. It can only be populated by the server.
id?: string
Property Value
string
Inherited From TrackedResource.id
location
name
Resource name. NOTE: This property will not be serialized. It can only be populated by the server.
name?: string
Property Value
string
Inherited From TrackedResource.name
tags
Resource tags.
tags?: {[propertyName: string]: string}
Property Value
{[propertyName: string]: string}
Inherited From TrackedResource.tags
type
Resource type. NOTE: This property will not be serialized. It can only be populated by the server.
type?: string
Property Value
string
Inherited From TrackedResource.type