Microsoft.DBforMySQL servers template reference

Template format

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

{
  "name": "string",
  "type": "Microsoft.DBforMySQL/servers",
  "apiVersion": "2017-12-01",
  "sku": {
    "name": "string",
    "tier": "string",
    "capacity": "integer",
    "size": "string",
    "family": "string"
  },
  "properties": {
    "version": "string",
    "sslEnforcement": "string",
    "storageProfile": {
      "backupRetentionDays": "integer",
      "geoRedundantBackup": "string",
      "storageMB": "integer",
      "storageAutogrow": "string"
    },
    <one of the ServerPropertiesForCreate objects>  
  },
  "location": "string",
  "tags": {},
  "resources": []
}

ServerPropertiesForCreate

The properties used to create a new server.

"createMode": "Default",
"administratorLogin": "string",
"administratorLoginPassword": "string"

The properties used to create a new server by restoring to a different region from a geo replicated backup.

"createMode": "GeoRestore",
"sourceServerId": "string"

The properties to create a new replica.

"createMode": "Replica",
"sourceServerId": "string",

The properties used to create a new server by restoring from a backup.

"createMode": "PointInTimeRestore",
"restorePointInTime": "string",
"sourceServerId": "string",

Property values

The following tables describe the values you need to set in the schema.

Microsoft.DBforMySQL/servers object

Name Type Required Value
name string Yes The name of the server.
type enum Yes Microsoft.DBforMySQL/servers
apiVersion enum Yes 2017-12-01
sku object No The SKU (pricing tier) of the server. - Sku object
properties object Yes Properties of the server. - ServerPropertiesForCreate object
location string Yes The location the resource resides in.
tags object No Application-specific metadata in the form of key-value pairs.
resources array No securityAlertPolicies configurations databases virtualNetworkRules firewallRules

Sku object

Name Type Required Value
name string No The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8.
tier enum No The tier of the particular SKU, e.g. Basic. - Basic, GeneralPurpose, MemoryOptimized
capacity integer No The scale up/out capacity, representing server's compute units.
size string No The size code, to be interpreted by resource as appropriate.
family string No The family of hardware.

ServerPropertiesForCreate object

Name Type Required Value
version enum No Server version. - 5.6, 5.7, 8.0
sslEnforcement enum No Enable ssl enforcement or not when connect to server. - Enabled or Disabled
storageProfile object No Storage profile of a server. - StorageProfile object

Plus one of the following objects: ServerPropertiesForDefaultCreate, ServerPropertiesForGeoRestore, ServerPropertiesForReplica, or ServerPropertiesForRestore.

ServerPropertiesForDefaultCreate object

Name Type Required Value
createMode string Yes Default
administratorLogin string Yes The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).
administratorLoginPassword string Yes The password of the administrator login.

ServerPropertiesForGeoRestore object

Name Type Required Value
createMode string Yes GeoRestore
sourceServerId string Yes The source server id to restore from.

ServerPropertiesForReplica object

Name Type Required Value
createMode string Yes Replica
sourceServerId string Yes The master server id to create replica from.

ServerPropertiesForRestore object

Name Type Required Value
createMode string Yes PointInTimeRestore
restorePointInTime string Yes Restore point creation time (ISO8601 format), specifying the time to restore from.
sourceServerId string Yes The source server id to restore from.

StorageProfile object

Name Type Required Value
backupRetentionDays integer No Backup retention days for the server.
geoRedundantBackup enum No Enable Geo-redundant or not for server backup. - Enabled or Disabled
storageMB integer No Max storage allowed for a server.
storageAutogrow enum No Enable Storage Auto Grow. - Enabled or Disabled

Quickstart templates

The following quickstart templates deploy this resource type.