Microsoft.Sql/servers/databases template reference

API Version: 2014-04-01

Template format

To create a Microsoft.Sql/servers/databases resource, add the following JSON to the resources section of your template.

{
  "name": "string",
  "type": "Microsoft.Sql/servers/databases",
  "apiVersion": "2014-04-01",
  "location": "string",
  "tags": {},
  "properties": {
    "collation": "string",
    "createMode": "string",
    "sourceDatabaseId": "string",
    "edition": "string",
    "maxSizeBytes": "string",
    "requestedServiceObjectiveId": "string",
    "requestedServiceObjectiveName": "string",
    "elasticPoolName": "string"
  }
}

Property values

The following tables describe the values you need to set in the schema. For information about the resource type and name, see Set name and type for child resource in Resource Manager template.

Microsoft.Sql/servers/databases object

Name Type Required Value
name string Yes The name of the Azure SQL database to be operated on (updated or created).
type enum Yes Microsoft.Sql/servers/databases
apiVersion enum Yes 2014-04-01
location string Yes Resource location
tags object No Resource tags
properties object Yes The properties representing the resource. - DatabaseProperties object

DatabaseProperties object

Name Type Required Value
collation string No The collation of the Azure SQL database.
createMode enum No Specifies the type of database to create. - Copy, Default, NonReadableSecondary, OnlineSecondary, PointInTimeRestore, Recovery, Restore
sourceDatabaseId string No Conditional. Specifies the resource ID of the source database. If createMode is not set to Default, then this value must be specified. The name of the source database must be the same. NOTE: Collation, Edition, and MaxSizeBytes must remain the same while the link is active. Values specified for these parameters will be ignored.
edition enum No The edition of the Azure SQL database. The DatabaseEditions enumeration contains all the valid editions. - Web, Business, Basic, Standard, Premium, Free, Stretch, DataWarehouse
maxSizeBytes string No The max size of the Azure SQL database expressed in bytes. Note: Only the following sizes are supported (in addition to limitations being placed on each edition): { 100 MB, 500 MB, 1 GB, 2 GB, 5 GB, 10 GB, 20 GB, 10 GB increments to 50 GB, 100 GB, 50 GB increments to 500 GB }
requestedServiceObjectiveId string No The configured Service Level Objective ID of the Azure SQL database. This is the Service Level Objective that is in the process of being applied to the Azure SQL database. Once successfully updated, it will match the value of currentServiceObjectiveId property. - globally unique identifier
requestedServiceObjectiveName enum No The name of the configured Service Level Objective of the Azure SQL database. This is the Service Level Objective that is in the process of being applied to the Azure SQL database. Once successfully updated, it will match the value of serviceLevelObjective property. - Basic, S0, S1, S2, S3, P1, P2, P3
elasticPoolName string No The name of the Azure SQL Elastic Pool the database is in.

Quickstart templates

For example templates, see SQL templates.