Microsoft.Sql servers/databases 2014-04-01
- più recenti
- 2024-05-01-preview
- 2023-08-01-preview
- 2023-05-01-preview
- 2023-02-01-preview
11-11-2022 - 2022-08-01-preview
-
05-05-2022 - 2022-02-01-preview
- 2021-11-01
- 2021-11-01-preview
- 2021-08-01-preview
- 2021-05-01-preview
- 2021-02-01-preview
- 11-01-preview 2020
- 2020-08-01-preview
- 2020-02-02-preview
- 2019-06-01-preview
- 10-10-01-preview 2017
- 2017-03-01-preview
- 2014-04-01
Definizione di risorsa Bicep
Il tipo di risorsa server/database può essere distribuito con operazioni destinate a:
Per un elenco delle proprietà modificate in ogni versione dell'API, vedere log delle modifiche.
Formato risorsa
Per creare una risorsa Microsoft.Sql/servers/databases, aggiungere il bicep seguente al modello.
resource symbolicname 'Microsoft.Sql/servers/databases@2014-04-01' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
collation: 'string'
createMode: 'string'
edition: 'string'
elasticPoolName: 'string'
maxSizeBytes: 'string'
readScale: 'string'
recoveryServicesRecoveryPointResourceId: 'string'
requestedServiceObjectiveId: 'string'
requestedServiceObjectiveName: 'string'
restorePointInTime: 'string'
sampleName: 'string'
sourceDatabaseDeletionDate: 'string'
sourceDatabaseId: 'string'
zoneRedundant: bool
}
tags: {
{customized property}: 'string'
}
}
Valori delle proprietà
DatabaseProperties
| Nome | Descrizione | Valore | | ---- | ----------- | ------------ | | regole di confronto | Regole di confronto del database. Se createMode non è Default, questo valore viene ignorato. | string | | createMode | Specifica la modalità di creazione del database.
Impostazione predefinita: creazione regolare del database.
Copia: crea un database come copia di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database di origine.
OnlineSecondary/NonReadableSecondary: crea un database come replica secondaria (leggibile o non leggibile) di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database primario esistente.
PointInTimeRestore: crea un database ripristinando un backup temporizzato di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database esistente e deve essere specificato restorePointInTime.
Ripristino: crea un database ripristinando un backup con replica geografica. sourceDatabaseId deve essere specificato come ID risorsa di database recuperabile da ripristinare.
Ripristino: crea un database ripristinando un backup di un database eliminato. sourceDatabaseId deve essere specificato. Se sourceDatabaseId è l'ID risorsa originale del database, è necessario specificare sourceDatabaseDeletionDate. In caso contrario, sourceDatabaseId deve essere l'ID risorsa del database eliminato ripristinabile e sourceDatabaseDeletionDate viene ignorato. è anche possibile specificare restorePointInTime per eseguire il ripristino da un punto precedente nel tempo.
RestoreLongTermRetentionBackup: crea un database ripristinando da un insieme di credenziali di conservazione a lungo termine. recoveryServicesRecoveryPointResourceId deve essere specificato come ID risorsa del punto di ripristino.
Copy, NonReadableSecondary, OnlineSecondary e RestoreLongTermRetentionBackup non sono supportati per l'edizione DataWarehouse. | 'Copia'
'Default'
'NonReadableSecondary'
'OnlineSecondary'
'PointInTimeRestore'
'Ripristino'
'Restore'
'RestoreLongTermRetentionBackup' | | edizione | Edizione del database. L'enumerazione DatabaseEditions contiene tutte le edizioni valide. Se createMode è NonReadableSecondary o OnlineSecondary, questo valore viene ignorato.
L'elenco degli SKU può variare in base all'area geografica e all'offerta di supporto. Per determinare gli SKU (inclusi il nome dello SKU, il livello/edizione, la famiglia e la capacità) disponibili per la sottoscrizione in un'area di Azure, usare l'API REST Capabilities_ListByLocation
o uno dei comandi seguenti:
azurecli<br />az sql db list-editions -l <location> -o table<br />````<br /><br />
PowerShell
Get-AzSqlServerServiceObjective -Location <percorso> | 'Basic'<br />'Business'<br />'BusinessCritical'<br />'DataWarehouse'<br />'Free'<br />'GeneralPurpose'<br />'Hyperscale'<br />'Premium'<br />'PremiumRS'<br />'Standard'<br />'Stretch'<br />'System'<br />'System2'<br />'Web' | | elasticPoolName | The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition. | string | | maxSizeBytes | The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." | string | | readScale | Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. | 'Disabled'<br />'Enabled' | | recoveryServicesRecoveryPointResourceId | Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from. | string | | requestedServiceObjectiveId | The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName.<br /><br />The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. | string <br /><br />Constraints:<br />Min length = 36<br />Max length = 36<br />Pattern = `^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$` | | requestedServiceObjectiveName | The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. <br /><br />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:<br /><br />```azurecli<br />az sql db list-editions -l <location> -o table<br />
'''powershell
Get-AzSqlServerServiceObjective -Location <percorso>
```` | 'Basic'
'DS100'
'DS1000'
'DS1200'
'DS1500'
'DS200'
'DS2000'
'DS300'
'DS400'
'DS500'
'DS600'
'DW100'
'DW1000'
'DW10000c'
'DW1000c'
'DW1200'
'DW1500'
'DW15000c'
'DW1500c'
'DW200'
'DW2000'
'DW2000c'
'DW2500c'
'DW300'
'DW3000'
'DW30000c'
'DW3000c'
'DW400'
'DW500'
'DW5000c'
'DW600'
'DW6000'
'DW6000c'
'DW7500c'
'ElasticPool'
'Free'
'P1'
'P11'
'P15'
'P2'
'P3'
'P4'
'P6'
'PRS1'
'PRS2'
'PRS4'
'PRS6'
'S0'
'S1'
'S12'
'S2'
'S3'
'S4'
'S6'
'S7'
'S9'
'System'
'System0'
'System1'
'System2'
'System2L'
'System3'
'System3L'
'System4'
'System4L' | | restorePointInTime | Condizionale. Se createMode è PointInTimeRestore, questo valore è obbligatorio. Se createMode è Restore, questo valore è facoltativo. Specifica il punto nel tempo (formato ISO8601) del database di origine che verrà ripristinato per creare il nuovo database. Deve essere maggiore o uguale al valore meno recenteRestoreDate del database di origine. | string | | sampleName | Indica il nome dello schema di esempio da applicare durante la creazione del database. Se createMode non è Default, questo valore viene ignorato. Non supportato per l'edizione DataWarehouse. | 'AdventureWorksLT' | | sourceDatabaseDeletionDate | Condizionale. Se createMode è Restore e sourceDatabaseId è l'ID risorsa originale del database eliminato quando esiste (anziché il relativo ID database eliminato ripristinabile corrente), questo valore è obbligatorio. Specifica l'ora di eliminazione del database. | string | | sourceDatabaseId | Condizionale. Se createMode è Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery o Restore, questo valore è obbligatorio. Specifica l'ID risorsa del database di origine. Se createMode è NonReadableSecondary o OnlineSecondary, il nome del database di origine deve essere uguale al nuovo database in fase di creazione. | string | | zoneRedundant | Indipendentemente dal fatto che il database sia con ridondanza della zona, ovvero le repliche di questo database verranno distribuite in più zone di disponibilità. | bool |
Microsoft.Sql/servers/databases
Nome | Descrizione | Valore |
---|---|---|
ubicazione | Percorso della risorsa. | stringa (obbligatorio) |
nome | Nome della risorsa | stringa (obbligatorio) |
genitore | In Bicep è possibile specificare la risorsa padre per una risorsa figlio. È necessario aggiungere questa proprietà solo quando la risorsa figlio viene dichiarata all'esterno della risorsa padre. Per altre informazioni, vedere risorsa figlio all'esterno della risorsa padre. |
Nome simbolico per la risorsa di tipo: server |
proprietà | Proprietà che rappresentano la risorsa. | |
Tag | Tag delle risorse | Dizionario di nomi e valori di tag. Vedere tag nei modelli |
TrackedResourceTags
Nome | Descrizione | Valore |
---|
Esempi di avvio rapido
Gli esempi di avvio rapido seguenti distribuiscono questo tipo di risorsa.
Bicep File | Descrizione |
---|---|
Sql Server di Azure con il controllo scritto in Log Analytics | Questo modello consente di distribuire un server SQL di Azure con il controllo abilitato per scrivere log di controllo in Log Analytics (area di lavoro OMS) |
Creare un di DATABASE e SQL Server | Questo modello consente di creare un database SQL e un server. |
pool SQL dedicato con Transparent Encryption | Crea un'istanza di SQL Server e un pool SQL dedicato (in precedenza SQL Data Encryption) con Transparent Data Encryption. |
Distribuire Sports Analytics nell'architettura di Azure | Crea un account di archiviazione di Azure con ADLS Gen 2 abilitato, un'istanza di Azure Data Factory con servizi collegati per l'account di archiviazione (un database SQL di Azure se distribuito) e un'istanza di Azure Databricks. All'identità di AAD per l'utente che distribuisce il modello e all'identità gestita per l'istanza di Azure Data Factory verrà concesso il ruolo Collaboratore ai dati del BLOB di archiviazione nell'account di archiviazione. Sono disponibili anche opzioni per distribuire un'istanza di Azure Key Vault, un database SQL di Azure e un hub eventi di Azure (per i casi d'uso di streaming). Quando viene distribuito un insieme di credenziali delle chiavi di Azure, all'identità gestita della data factory e all'identità di AAD per l'utente che distribuisce il modello verrà concesso il ruolo utente Segreti dell'insieme di credenziali delle chiavi. |
esempio di endpoint privato | Questo modello illustra come creare un endpoint privato che punta ad Azure SQL Server |
Effettuare il provisioning di un'app Web con un database SQL | Questo modello effettua il provisioning di un'app Web, un database SQL, impostazioni di scalabilità automatica, regole di avviso e Informazioni dettagliate app. Configura una stringa di connessione nell'app Web per il database. |
'app Web Docker Sonarqube in Linux con Azure SQL | Questo modello distribuisce Sonarqube in un contenitore Linux dell'app Web del servizio app di Azure usando l'immagine Sonarqube ufficiale e supportata da un'istanza di Azure SQL Server. |
'app Web con identità gestita, SQL Server e ΑΙ | Esempio semplice per distribuire l'infrastruttura di Azure per app + dati + identità gestita e monitoraggio |
Definizione di risorsa del modello di Resource Manager
Il tipo di risorsa server/database può essere distribuito con operazioni destinate a:
Per un elenco delle proprietà modificate in ogni versione dell'API, vedere log delle modifiche.
Formato risorsa
Per creare una risorsa Microsoft.Sql/servers/databases, aggiungere il codice JSON seguente al modello.
{
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2014-04-01",
"name": "string",
"location": "string",
"properties": {
"collation": "string",
"createMode": "string",
"edition": "string",
"elasticPoolName": "string",
"maxSizeBytes": "string",
"readScale": "string",
"recoveryServicesRecoveryPointResourceId": "string",
"requestedServiceObjectiveId": "string",
"requestedServiceObjectiveName": "string",
"restorePointInTime": "string",
"sampleName": "string",
"sourceDatabaseDeletionDate": "string",
"sourceDatabaseId": "string",
"zoneRedundant": "bool"
},
"tags": {
"{customized property}": "string"
}
}
Valori delle proprietà
DatabaseProperties
| Nome | Descrizione | Valore | | ---- | ----------- | ------------ | | regole di confronto | Regole di confronto del database. Se createMode non è Default, questo valore viene ignorato. | string | | createMode | Specifica la modalità di creazione del database.
Impostazione predefinita: creazione regolare del database.
Copia: crea un database come copia di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database di origine.
OnlineSecondary/NonReadableSecondary: crea un database come replica secondaria (leggibile o non leggibile) di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database primario esistente.
PointInTimeRestore: crea un database ripristinando un backup temporizzato di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database esistente e deve essere specificato restorePointInTime.
Ripristino: crea un database ripristinando un backup con replica geografica. sourceDatabaseId deve essere specificato come ID risorsa di database recuperabile da ripristinare.
Ripristino: crea un database ripristinando un backup di un database eliminato. sourceDatabaseId deve essere specificato. Se sourceDatabaseId è l'ID risorsa originale del database, è necessario specificare sourceDatabaseDeletionDate. In caso contrario, sourceDatabaseId deve essere l'ID risorsa del database eliminato ripristinabile e sourceDatabaseDeletionDate viene ignorato. è anche possibile specificare restorePointInTime per eseguire il ripristino da un punto precedente nel tempo.
RestoreLongTermRetentionBackup: crea un database ripristinando da un insieme di credenziali di conservazione a lungo termine. recoveryServicesRecoveryPointResourceId deve essere specificato come ID risorsa del punto di ripristino.
Copy, NonReadableSecondary, OnlineSecondary e RestoreLongTermRetentionBackup non sono supportati per l'edizione DataWarehouse. | 'Copia'
'Default'
'NonReadableSecondary'
'OnlineSecondary'
'PointInTimeRestore'
'Ripristino'
'Restore'
'RestoreLongTermRetentionBackup' | | edizione | Edizione del database. L'enumerazione DatabaseEditions contiene tutte le edizioni valide. Se createMode è NonReadableSecondary o OnlineSecondary, questo valore viene ignorato.
L'elenco degli SKU può variare in base all'area geografica e all'offerta di supporto. Per determinare gli SKU (inclusi il nome dello SKU, il livello/edizione, la famiglia e la capacità) disponibili per la sottoscrizione in un'area di Azure, usare l'API REST Capabilities_ListByLocation
o uno dei comandi seguenti:
azurecli<br />az sql db list-editions -l <location> -o table<br />````<br /><br />
PowerShell
Get-AzSqlServerServiceObjective -Location <percorso> | 'Basic'<br />'Business'<br />'BusinessCritical'<br />'DataWarehouse'<br />'Free'<br />'GeneralPurpose'<br />'Hyperscale'<br />'Premium'<br />'PremiumRS'<br />'Standard'<br />'Stretch'<br />'System'<br />'System2'<br />'Web' | | elasticPoolName | The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition. | string | | maxSizeBytes | The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." | string | | readScale | Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. | 'Disabled'<br />'Enabled' | | recoveryServicesRecoveryPointResourceId | Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from. | string | | requestedServiceObjectiveId | The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName.<br /><br />The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. | string <br /><br />Constraints:<br />Min length = 36<br />Max length = 36<br />Pattern = `^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$` | | requestedServiceObjectiveName | The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. <br /><br />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:<br /><br />```azurecli<br />az sql db list-editions -l <location> -o table<br />
'''powershell
Get-AzSqlServerServiceObjective -Location <percorso>
```` | 'Basic'
'DS100'
'DS1000'
'DS1200'
'DS1500'
'DS200'
'DS2000'
'DS300'
'DS400'
'DS500'
'DS600'
'DW100'
'DW1000'
'DW10000c'
'DW1000c'
'DW1200'
'DW1500'
'DW15000c'
'DW1500c'
'DW200'
'DW2000'
'DW2000c'
'DW2500c'
'DW300'
'DW3000'
'DW30000c'
'DW3000c'
'DW400'
'DW500'
'DW5000c'
'DW600'
'DW6000'
'DW6000c'
'DW7500c'
'ElasticPool'
'Free'
'P1'
'P11'
'P15'
'P2'
'P3'
'P4'
'P6'
'PRS1'
'PRS2'
'PRS4'
'PRS6'
'S0'
'S1'
'S12'
'S2'
'S3'
'S4'
'S6'
'S7'
'S9'
'System'
'System0'
'System1'
'System2'
'System2L'
'System3'
'System3L'
'System4'
'System4L' | | restorePointInTime | Condizionale. Se createMode è PointInTimeRestore, questo valore è obbligatorio. Se createMode è Restore, questo valore è facoltativo. Specifica il punto nel tempo (formato ISO8601) del database di origine che verrà ripristinato per creare il nuovo database. Deve essere maggiore o uguale al valore meno recenteRestoreDate del database di origine. | string | | sampleName | Indica il nome dello schema di esempio da applicare durante la creazione del database. Se createMode non è Default, questo valore viene ignorato. Non supportato per l'edizione DataWarehouse. | 'AdventureWorksLT' | | sourceDatabaseDeletionDate | Condizionale. Se createMode è Restore e sourceDatabaseId è l'ID risorsa originale del database eliminato quando esiste (anziché il relativo ID database eliminato ripristinabile corrente), questo valore è obbligatorio. Specifica l'ora di eliminazione del database. | string | | sourceDatabaseId | Condizionale. Se createMode è Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery o Restore, questo valore è obbligatorio. Specifica l'ID risorsa del database di origine. Se createMode è NonReadableSecondary o OnlineSecondary, il nome del database di origine deve essere uguale al nuovo database in fase di creazione. | string | | zoneRedundant | Indipendentemente dal fatto che il database sia con ridondanza della zona, ovvero le repliche di questo database verranno distribuite in più zone di disponibilità. | bool |
Microsoft.Sql/servers/databases
Nome | Descrizione | Valore |
---|---|---|
apiVersion | Versione dell'API | '2014-04-01' |
ubicazione | Percorso della risorsa. | stringa (obbligatorio) |
nome | Nome della risorsa | stringa (obbligatorio) |
proprietà | Proprietà che rappresentano la risorsa. | |
Tag | Tag delle risorse | Dizionario di nomi e valori di tag. Vedere tag nei modelli |
digitare | Tipo di risorsa | 'Microsoft.Sql/servers/databases' |
TrackedResourceTags
Nome | Descrizione | Valore |
---|
Modelli di avvio rapido
I modelli di avvio rapido seguenti distribuiscono questo tipo di risorsa.
Sagoma | Descrizione |
---|---|
Sql Server di Azure con il controllo scritto in Log Analytics |
Questo modello consente di distribuire un server SQL di Azure con il controllo abilitato per scrivere log di controllo in Log Analytics (area di lavoro OMS) |
Creare un di DATABASE e SQL Server |
Questo modello consente di creare un database SQL e un server. |
pool SQL dedicato con Transparent Encryption |
Crea un'istanza di SQL Server e un pool SQL dedicato (in precedenza SQL Data Encryption) con Transparent Data Encryption. |
Distribuire un nuovo pool elastico SQL |
Questo modello consente di distribuire un nuovo pool elastico SQL con il nuovo SQL Server associato e i nuovi database SQL da assegnare. |
Distribuire Sports Analytics nell'architettura di Azure |
Crea un account di archiviazione di Azure con ADLS Gen 2 abilitato, un'istanza di Azure Data Factory con servizi collegati per l'account di archiviazione (un database SQL di Azure se distribuito) e un'istanza di Azure Databricks. All'identità di AAD per l'utente che distribuisce il modello e all'identità gestita per l'istanza di Azure Data Factory verrà concesso il ruolo Collaboratore ai dati del BLOB di archiviazione nell'account di archiviazione. Sono disponibili anche opzioni per distribuire un'istanza di Azure Key Vault, un database SQL di Azure e un hub eventi di Azure (per i casi d'uso di streaming). Quando viene distribuito un insieme di credenziali delle chiavi di Azure, all'identità gestita della data factory e all'identità di AAD per l'utente che distribuisce il modello verrà concesso il ruolo utente Segreti dell'insieme di credenziali delle chiavi. |
HDInsight con database metastore Ambari + Hive personalizzato nella rete virtuale |
Questo modello consente di creare un cluster HDInsight in una rete virtuale esistente con un nuovo database SQL che funge sia da database Ambari personalizzato che da metastore Hive. È necessario disporre di un server SQL esistente, un account di archiviazione e una rete virtuale. |
esempio di endpoint privato |
Questo modello illustra come creare un endpoint privato che punta ad Azure SQL Server |
Effettuare il provisioning di un'app Web con un database SQL |
Questo modello effettua il provisioning di un'app Web, un database SQL, impostazioni di scalabilità automatica, regole di avviso e Informazioni dettagliate app. Configura una stringa di connessione nell'app Web per il database. |
Servizi Desktop remoto con a disponibilità elevata |
Questo codice di esempio di modello di Resource Manager distribuirà un lab di raccolta di sessioni di Servizi Desktop remoto 2019 con disponibilità elevata. L'obiettivo è distribuire una soluzione completamente ridondante e a disponibilità elevata per Servizi Desktop remoto usando Windows Server 2019. |
'app Web Docker Sonarqube in Linux con Azure SQL |
Questo modello distribuisce Sonarqube in un contenitore Linux dell'app Web del servizio app di Azure usando l'immagine Sonarqube ufficiale e supportata da un'istanza di Azure SQL Server. |
'app Web con identità gestita, SQL Server e ΑΙ |
Esempio semplice per distribuire l'infrastruttura di Azure per app + dati + identità gestita e monitoraggio |
'app Web che usa un endpoint privato SQL di Azure |
Questo modello illustra come creare un'app Web che usa un endpoint privato che punta ad Azure SQL Server |
Definizione di risorsa Terraform (provider AzAPI)
Il tipo di risorsa server/database può essere distribuito con operazioni destinate a:
- gruppi di risorse
Per un elenco delle proprietà modificate in ogni versione dell'API, vedere log delle modifiche.
Formato risorsa
Per creare una risorsa Microsoft.Sql/servers/databases, aggiungere il codice Terraform seguente al modello.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/servers/databases@2014-04-01"
name = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = jsonencode({
properties = {
collation = "string"
createMode = "string"
edition = "string"
elasticPoolName = "string"
maxSizeBytes = "string"
readScale = "string"
recoveryServicesRecoveryPointResourceId = "string"
requestedServiceObjectiveId = "string"
requestedServiceObjectiveName = "string"
restorePointInTime = "string"
sampleName = "string"
sourceDatabaseDeletionDate = "string"
sourceDatabaseId = "string"
zoneRedundant = bool
}
})
}
Valori delle proprietà
DatabaseProperties
| Nome | Descrizione | Valore | | ---- | ----------- | ------------ | | regole di confronto | Regole di confronto del database. Se createMode non è Default, questo valore viene ignorato. | string | | createMode | Specifica la modalità di creazione del database.
Impostazione predefinita: creazione regolare del database.
Copia: crea un database come copia di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database di origine.
OnlineSecondary/NonReadableSecondary: crea un database come replica secondaria (leggibile o non leggibile) di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database primario esistente.
PointInTimeRestore: crea un database ripristinando un backup temporizzato di un database esistente. sourceDatabaseId deve essere specificato come ID risorsa del database esistente e deve essere specificato restorePointInTime.
Ripristino: crea un database ripristinando un backup con replica geografica. sourceDatabaseId deve essere specificato come ID risorsa di database recuperabile da ripristinare.
Ripristino: crea un database ripristinando un backup di un database eliminato. sourceDatabaseId deve essere specificato. Se sourceDatabaseId è l'ID risorsa originale del database, è necessario specificare sourceDatabaseDeletionDate. In caso contrario, sourceDatabaseId deve essere l'ID risorsa del database eliminato ripristinabile e sourceDatabaseDeletionDate viene ignorato. è anche possibile specificare restorePointInTime per eseguire il ripristino da un punto precedente nel tempo.
RestoreLongTermRetentionBackup: crea un database ripristinando da un insieme di credenziali di conservazione a lungo termine. recoveryServicesRecoveryPointResourceId deve essere specificato come ID risorsa del punto di ripristino.
Copy, NonReadableSecondary, OnlineSecondary e RestoreLongTermRetentionBackup non sono supportati per l'edizione DataWarehouse. | 'Copia'
'Default'
'NonReadableSecondary'
'OnlineSecondary'
'PointInTimeRestore'
'Ripristino'
'Restore'
'RestoreLongTermRetentionBackup' | | edizione | Edizione del database. L'enumerazione DatabaseEditions contiene tutte le edizioni valide. Se createMode è NonReadableSecondary o OnlineSecondary, questo valore viene ignorato.
L'elenco degli SKU può variare in base all'area geografica e all'offerta di supporto. Per determinare gli SKU (inclusi il nome dello SKU, il livello/edizione, la famiglia e la capacità) disponibili per la sottoscrizione in un'area di Azure, usare l'API REST Capabilities_ListByLocation
o uno dei comandi seguenti:
azurecli<br />az sql db list-editions -l <location> -o table<br />````<br /><br />
PowerShell
Get-AzSqlServerServiceObjective -Location <percorso> | 'Basic'<br />'Business'<br />'BusinessCritical'<br />'DataWarehouse'<br />'Free'<br />'GeneralPurpose'<br />'Hyperscale'<br />'Premium'<br />'PremiumRS'<br />'Standard'<br />'Stretch'<br />'System'<br />'System2'<br />'Web' | | elasticPoolName | The name of the elastic pool the database is in. If elasticPoolName and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveName is ignored. Not supported for DataWarehouse edition. | string | | maxSizeBytes | The max size of the database expressed in bytes. If createMode is not Default, this value is ignored. To see possible values, query the capabilities API (/subscriptions/{subscriptionId}/providers/Microsoft.Sql/locations/{locationID}/capabilities) referred to by operationId: "Capabilities_ListByLocation." | string | | readScale | Conditional. If the database is a geo-secondary, readScale indicates whether read-only connections are allowed to this database or not. Not supported for DataWarehouse edition. | 'Disabled'<br />'Enabled' | | recoveryServicesRecoveryPointResourceId | Conditional. If createMode is RestoreLongTermRetentionBackup, then this value is required. Specifies the resource ID of the recovery point to restore from. | string | | requestedServiceObjectiveId | The configured service level objective ID of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of currentServiceObjectiveId property. If requestedServiceObjectiveId and requestedServiceObjectiveName are both updated, the value of requestedServiceObjectiveId overrides the value of requestedServiceObjectiveName.<br /><br />The list of SKUs may vary by region and support offer. To determine the service objective ids that are available to your subscription in an Azure region, use the `Capabilities_ListByLocation` REST API. | string <br /><br />Constraints:<br />Min length = 36<br />Max length = 36<br />Pattern = `^[0-9a-fA-F]{8}-([0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$` | | requestedServiceObjectiveName | The name of the configured service level objective of the database. This is the service level objective that is in the process of being applied to the database. Once successfully updated, it will match the value of serviceLevelObjective property. <br /><br />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:<br /><br />```azurecli<br />az sql db list-editions -l <location> -o table<br />
'''powershell
Get-AzSqlServerServiceObjective -Location <percorso>
```` | 'Basic'
'DS100'
'DS1000'
'DS1200'
'DS1500'
'DS200'
'DS2000'
'DS300'
'DS400'
'DS500'
'DS600'
'DW100'
'DW1000'
'DW10000c'
'DW1000c'
'DW1200'
'DW1500'
'DW15000c'
'DW1500c'
'DW200'
'DW2000'
'DW2000c'
'DW2500c'
'DW300'
'DW3000'
'DW30000c'
'DW3000c'
'DW400'
'DW500'
'DW5000c'
'DW600'
'DW6000'
'DW6000c'
'DW7500c'
'ElasticPool'
'Free'
'P1'
'P11'
'P15'
'P2'
'P3'
'P4'
'P6'
'PRS1'
'PRS2'
'PRS4'
'PRS6'
'S0'
'S1'
'S12'
'S2'
'S3'
'S4'
'S6'
'S7'
'S9'
'System'
'System0'
'System1'
'System2'
'System2L'
'System3'
'System3L'
'System4'
'System4L' | | restorePointInTime | Condizionale. Se createMode è PointInTimeRestore, questo valore è obbligatorio. Se createMode è Restore, questo valore è facoltativo. Specifica il punto nel tempo (formato ISO8601) del database di origine che verrà ripristinato per creare il nuovo database. Deve essere maggiore o uguale al valore meno recenteRestoreDate del database di origine. | string | | sampleName | Indica il nome dello schema di esempio da applicare durante la creazione del database. Se createMode non è Default, questo valore viene ignorato. Non supportato per l'edizione DataWarehouse. | 'AdventureWorksLT' | | sourceDatabaseDeletionDate | Condizionale. Se createMode è Restore e sourceDatabaseId è l'ID risorsa originale del database eliminato quando esiste (anziché il relativo ID database eliminato ripristinabile corrente), questo valore è obbligatorio. Specifica l'ora di eliminazione del database. | string | | sourceDatabaseId | Condizionale. Se createMode è Copy, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery o Restore, questo valore è obbligatorio. Specifica l'ID risorsa del database di origine. Se createMode è NonReadableSecondary o OnlineSecondary, il nome del database di origine deve essere uguale al nuovo database in fase di creazione. | string | | zoneRedundant | Indipendentemente dal fatto che il database sia con ridondanza della zona, ovvero le repliche di questo database verranno distribuite in più zone di disponibilità. | bool |
Microsoft.Sql/servers/databases
Nome | Descrizione | Valore |
---|---|---|
ubicazione | Percorso della risorsa. | stringa (obbligatorio) |
nome | Nome della risorsa | stringa (obbligatorio) |
parent_id | ID della risorsa padre per questa risorsa. | ID per la risorsa di tipo: server |
proprietà | Proprietà che rappresentano la risorsa. | |
Tag | Tag delle risorse | Dizionario di nomi e valori di tag. |
digitare | Tipo di risorsa | "Microsoft.Sql/servers/databases@2014-04-01" |
TrackedResourceTags
Nome | Descrizione | Valore |
---|