Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Bicep resource definition
The servers resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforMariaDB/servers resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.DBforMariaDB/servers@2018-06-01-preview' = {
scope: resourceSymbolicName or scope
location: 'string'
name: 'string'
properties: {
minimalTlsVersion: 'string'
sslEnforcement: 'string'
storageProfile: {
backupRetentionDays: int
geoRedundantBackup: 'string'
storageAutogrow: 'string'
storageMB: int
}
version: 'string'
createMode: 'string'
// For remaining properties, see ServerPropertiesForCreateOrServerProperties objects
}
sku: {
capacity: int
family: 'string'
name: 'string'
size: 'string'
tier: 'string'
}
tags: {
{customized property}: 'string'
}
}
ServerPropertiesForCreateOrServerProperties objects
Set the createMode property to specify the type of object.
For Default, use:
{
administratorLogin: 'string'
administratorLoginPassword: 'string'
createMode: 'Default'
}
For GeoRestore, use:
{
createMode: 'GeoRestore'
sourceServerId: 'string'
}
For PointInTimeRestore, use:
{
createMode: 'PointInTimeRestore'
restorePointInTime: 'string'
sourceServerId: 'string'
}
For Replica, use:
{
createMode: 'Replica'
sourceServerId: 'string'
}
Property Values
Microsoft.DBforMariaDB/servers
| Name | Description | Value |
|---|---|---|
| location | The location the resource resides in. | string (required) |
| name | The resource name | string (required) |
| properties | Properties of the server. | ServerPropertiesForCreateOrServerProperties (required) |
| scope | Use when creating a resource at a scope that is different than the deployment scope. | Set this property to the symbolic name of a resource to apply the extension resource. |
| sku | The SKU (pricing tier) of the server. | Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ServerForCreateTags
| Name | Description | Value |
|---|
ServerPropertiesForCreateOrServerProperties
| Name | Description | Value |
|---|---|---|
| createMode | Set to 'Default' for type ServerPropertiesForDefaultCreate. Set to 'GeoRestore' for type ServerPropertiesForGeoRestore. Set to 'PointInTimeRestore' for type ServerPropertiesForRestore. Set to 'Replica' for type ServerPropertiesForReplica. | 'Default' 'GeoRestore' 'PointInTimeRestore' 'Replica' (required) |
| minimalTlsVersion | Enforce a minimal Tls version for the server. | 'TLS1_0' 'TLS1_1' 'TLS1_2' 'TLSEnforcementDisabled' |
| sslEnforcement | Enable ssl enforcement or not when connect to server. | 'Disabled' 'Enabled' |
| storageProfile | Storage profile of a server. | StorageProfile |
| version | Server version. | '10.2' '10.3' |
ServerPropertiesForDefaultCreate
| Name | Description | Value |
|---|---|---|
| administratorLogin | The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). | string (required) |
| administratorLoginPassword | The password of the administrator login. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
| createMode | The mode to create a new server. | 'Default' (required) |
ServerPropertiesForGeoRestore
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'GeoRestore' (required) |
| sourceServerId | The source server id to restore from. | string (required) |
ServerPropertiesForReplica
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'Replica' (required) |
| sourceServerId | The master server id to create replica from. | string (required) |
ServerPropertiesForRestore
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'PointInTimeRestore' (required) |
| restorePointInTime | Restore point creation time (ISO8601 format), specifying the time to restore from. | string (required) |
| sourceServerId | The source server id to restore from. | string (required) |
Sku
| Name | Description | Value |
|---|---|---|
| capacity | The scale up/out capacity, representing server's compute units. | int Constraints: Min value = 0 |
| family | The family of hardware. | string |
| name | The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. | string (required) |
| size | The size code, to be interpreted by resource as appropriate. | string |
| tier | The tier of the particular SKU, e.g. Basic. | 'Basic' 'GeneralPurpose' 'MemoryOptimized' |
StorageProfile
| Name | Description | Value |
|---|---|---|
| backupRetentionDays | Backup retention days for the server. | int |
| geoRedundantBackup | Enable Geo-redundant or not for server backup. | 'Disabled' 'Enabled' |
| storageAutogrow | Enable Storage Auto Grow. | 'Disabled' 'Enabled' |
| storageMB | Max storage allowed for a server. | int |
ARM template resource definition
The servers resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforMariaDB/servers resource, add the following JSON to your template.
{
"type": "Microsoft.DBforMariaDB/servers",
"apiVersion": "2018-06-01-preview",
"name": "string",
"location": "string",
"properties": {
"minimalTlsVersion": "string",
"sslEnforcement": "string",
"storageProfile": {
"backupRetentionDays": "int",
"geoRedundantBackup": "string",
"storageAutogrow": "string",
"storageMB": "int"
},
"version": "string",
"createMode": "string"
// For remaining properties, see ServerPropertiesForCreateOrServerProperties objects
},
"sku": {
"capacity": "int",
"family": "string",
"name": "string",
"size": "string",
"tier": "string"
},
"tags": {
"{customized property}": "string"
}
}
ServerPropertiesForCreateOrServerProperties objects
Set the createMode property to specify the type of object.
For Default, use:
{
"administratorLogin": "string",
"administratorLoginPassword": "string",
"createMode": "Default"
}
For GeoRestore, use:
{
"createMode": "GeoRestore",
"sourceServerId": "string"
}
For PointInTimeRestore, use:
{
"createMode": "PointInTimeRestore",
"restorePointInTime": "string",
"sourceServerId": "string"
}
For Replica, use:
{
"createMode": "Replica",
"sourceServerId": "string"
}
Property Values
Microsoft.DBforMariaDB/servers
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2018-06-01-preview' |
| location | The location the resource resides in. | string (required) |
| name | The resource name | string (required) |
| properties | Properties of the server. | ServerPropertiesForCreateOrServerProperties (required) |
| sku | The SKU (pricing tier) of the server. | Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.DBforMariaDB/servers' |
ServerForCreateTags
| Name | Description | Value |
|---|
ServerPropertiesForCreateOrServerProperties
| Name | Description | Value |
|---|---|---|
| createMode | Set to 'Default' for type ServerPropertiesForDefaultCreate. Set to 'GeoRestore' for type ServerPropertiesForGeoRestore. Set to 'PointInTimeRestore' for type ServerPropertiesForRestore. Set to 'Replica' for type ServerPropertiesForReplica. | 'Default' 'GeoRestore' 'PointInTimeRestore' 'Replica' (required) |
| minimalTlsVersion | Enforce a minimal Tls version for the server. | 'TLS1_0' 'TLS1_1' 'TLS1_2' 'TLSEnforcementDisabled' |
| sslEnforcement | Enable ssl enforcement or not when connect to server. | 'Disabled' 'Enabled' |
| storageProfile | Storage profile of a server. | StorageProfile |
| version | Server version. | '10.2' '10.3' |
ServerPropertiesForDefaultCreate
| Name | Description | Value |
|---|---|---|
| administratorLogin | The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). | string (required) |
| administratorLoginPassword | The password of the administrator login. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
| createMode | The mode to create a new server. | 'Default' (required) |
ServerPropertiesForGeoRestore
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'GeoRestore' (required) |
| sourceServerId | The source server id to restore from. | string (required) |
ServerPropertiesForReplica
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'Replica' (required) |
| sourceServerId | The master server id to create replica from. | string (required) |
ServerPropertiesForRestore
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'PointInTimeRestore' (required) |
| restorePointInTime | Restore point creation time (ISO8601 format), specifying the time to restore from. | string (required) |
| sourceServerId | The source server id to restore from. | string (required) |
Sku
| Name | Description | Value |
|---|---|---|
| capacity | The scale up/out capacity, representing server's compute units. | int Constraints: Min value = 0 |
| family | The family of hardware. | string |
| name | The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. | string (required) |
| size | The size code, to be interpreted by resource as appropriate. | string |
| tier | The tier of the particular SKU, e.g. Basic. | 'Basic' 'GeneralPurpose' 'MemoryOptimized' |
StorageProfile
| Name | Description | Value |
|---|---|---|
| backupRetentionDays | Backup retention days for the server. | int |
| geoRedundantBackup | Enable Geo-redundant or not for server backup. | 'Disabled' 'Enabled' |
| storageAutogrow | Enable Storage Auto Grow. | 'Disabled' 'Enabled' |
| storageMB | Max storage allowed for a server. | int |
Usage Examples
Terraform (AzAPI provider) resource definition
The servers resource type can be deployed with operations that target:
For a list of changed properties in each API version, see change log.
Resource format
To create a Microsoft.DBforMariaDB/servers resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DBforMariaDB/servers@2018-06-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
minimalTlsVersion = "string"
sslEnforcement = "string"
storageProfile = {
backupRetentionDays = int
geoRedundantBackup = "string"
storageAutogrow = "string"
storageMB = int
}
version = "string"
createMode = "string"
// For remaining properties, see ServerPropertiesForCreateOrServerProperties objects
}
sku = {
capacity = int
family = "string"
name = "string"
size = "string"
tier = "string"
}
}
}
ServerPropertiesForCreateOrServerProperties objects
Set the createMode property to specify the type of object.
For Default, use:
{
administratorLogin = "string"
administratorLoginPassword = "string"
createMode = "Default"
}
For GeoRestore, use:
{
createMode = "GeoRestore"
sourceServerId = "string"
}
For PointInTimeRestore, use:
{
createMode = "PointInTimeRestore"
restorePointInTime = "string"
sourceServerId = "string"
}
For Replica, use:
{
createMode = "Replica"
sourceServerId = "string"
}
Property Values
Microsoft.DBforMariaDB/servers
| Name | Description | Value |
|---|---|---|
| location | The location the resource resides in. | string (required) |
| name | The resource name | string (required) |
| parent_id | The ID of the resource to apply this extension resource to. | string (required) |
| properties | Properties of the server. | ServerPropertiesForCreateOrServerProperties (required) |
| sku | The SKU (pricing tier) of the server. | Sku |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.DBforMariaDB/servers@2018-06-01-preview" |
ServerForCreateTags
| Name | Description | Value |
|---|
ServerPropertiesForCreateOrServerProperties
| Name | Description | Value |
|---|---|---|
| createMode | Set to 'Default' for type ServerPropertiesForDefaultCreate. Set to 'GeoRestore' for type ServerPropertiesForGeoRestore. Set to 'PointInTimeRestore' for type ServerPropertiesForRestore. Set to 'Replica' for type ServerPropertiesForReplica. | 'Default' 'GeoRestore' 'PointInTimeRestore' 'Replica' (required) |
| minimalTlsVersion | Enforce a minimal Tls version for the server. | 'TLS1_0' 'TLS1_1' 'TLS1_2' 'TLSEnforcementDisabled' |
| sslEnforcement | Enable ssl enforcement or not when connect to server. | 'Disabled' 'Enabled' |
| storageProfile | Storage profile of a server. | StorageProfile |
| version | Server version. | '10.2' '10.3' |
ServerPropertiesForDefaultCreate
| Name | Description | Value |
|---|---|---|
| administratorLogin | The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation). | string (required) |
| administratorLoginPassword | The password of the administrator login. | string Constraints: Sensitive value. Pass in as a secure parameter. (required) |
| createMode | The mode to create a new server. | 'Default' (required) |
ServerPropertiesForGeoRestore
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'GeoRestore' (required) |
| sourceServerId | The source server id to restore from. | string (required) |
ServerPropertiesForReplica
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'Replica' (required) |
| sourceServerId | The master server id to create replica from. | string (required) |
ServerPropertiesForRestore
| Name | Description | Value |
|---|---|---|
| createMode | The mode to create a new server. | 'PointInTimeRestore' (required) |
| restorePointInTime | Restore point creation time (ISO8601 format), specifying the time to restore from. | string (required) |
| sourceServerId | The source server id to restore from. | string (required) |
Sku
| Name | Description | Value |
|---|---|---|
| capacity | The scale up/out capacity, representing server's compute units. | int Constraints: Min value = 0 |
| family | The family of hardware. | string |
| name | The name of the sku, typically, tier + family + cores, e.g. B_Gen4_1, GP_Gen5_8. | string (required) |
| size | The size code, to be interpreted by resource as appropriate. | string |
| tier | The tier of the particular SKU, e.g. Basic. | 'Basic' 'GeneralPurpose' 'MemoryOptimized' |
StorageProfile
| Name | Description | Value |
|---|---|---|
| backupRetentionDays | Backup retention days for the server. | int |
| geoRedundantBackup | Enable Geo-redundant or not for server backup. | 'Disabled' 'Enabled' |
| storageAutogrow | Enable Storage Auto Grow. | 'Disabled' 'Enabled' |
| storageMB | Max storage allowed for a server. | int |
Usage Examples
Terraform Samples
A basic example of deploying Database for MariaDB Servers.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
variable "administrator_login" {
type = string
description = "The administrator login name for the MariaDB server"
}
variable "administrator_login_password" {
type = string
description = "The administrator login password for the MariaDB server"
sensitive = true
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "server" {
type = "Microsoft.DBforMariaDB/servers@2018-06-01"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
administratorLogin = var.administrator_login
administratorLoginPassword = var.administrator_login_password
createMode = "Default"
minimalTlsVersion = "TLS1_2"
publicNetworkAccess = "Enabled"
sslEnforcement = "Enabled"
storageProfile = {
backupRetentionDays = 7
storageAutogrow = "Enabled"
storageMB = 51200
}
version = "10.2"
}
sku = {
capacity = 2
family = "Gen5"
name = "GP_Gen5_2"
tier = "GeneralPurpose"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}