你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Microsoft.DBforMariaDB 服务器 2018-06-01-preview

Bicep 资源定义

服务器资源类型可以部署到:

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.DBforMariaDB/servers 资源,请将以下 Bicep 添加到模板。

resource symbolicname 'Microsoft.DBforMariaDB/servers@2018-06-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    family: 'string'
    name: 'string'
    size: 'string'
    tier: '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
  }
}

ServerPropertiesForCreateOrServerProperties 对象

设置 createMode 属性以指定对象的类型。

对于 “默认值”,请使用:

  createMode: 'Default'
  administratorLogin: 'string'
  administratorLoginPassword: 'string'

对于 GeoRestore,请使用:

  createMode: 'GeoRestore'
  sourceServerId: 'string'

对于 PointInTimeRestore,请使用:

  createMode: 'PointInTimeRestore'
  restorePointInTime: 'string'
  sourceServerId: 'string'

对于 副本,请使用:

  createMode: 'Replica'
  sourceServerId: 'string'

属性值

servers

名称 说明
name 资源名称 字符串 (必需)

字符限制:3-63

有效字符:
小写字母、连字符和数字。

不能以连字符开头或结尾。

资源名称在 Azure 中必须是唯一的。
location 资源所在的位置。 字符串 (必需)
标记 键值对形式的应用程序特定元数据。 标记名称和值的字典。 请参阅 模板中的标记
sku 服务器的 SKU (定价层) 。 Sku
properties 服务器的属性。 ServerPropertiesForCreateOrServerProperties (必需的)

ServerPropertiesForCreateOrServerProperties

名称 说明
minimalTlsVersion 为服务器强制实施最低 Tls 版本。 “TLS1_0”
“TLS1_1”
“TLS1_2”
“TLSEnforcementDisabled”
sslEnforcement 连接到服务器时是否启用 ssl 强制实施。 'Disabled'
'Enabled'
storageProfile 服务器的存储配置文件。 StorageProfile
版本 服务器版本。 '10.2'
'10.3'
createMode 设置对象类型 Default
GeoRestore
PointInTimeRestore
需要副本 ()

StorageProfile

名称 说明
backupRetentionDays 服务器的备份保留天数。 int
geoRedundantBackup 为服务器备份启用异地冗余或不启用异地冗余。 'Disabled'
'Enabled'
storageAutogrow 启用存储自动增长。 'Disabled'
'Enabled'
storageMB 服务器允许的最大存储。 int

ServerPropertiesForDefaultCreate

名称 说明
createMode 用于创建新服务器的模式。 “Default” (必需)
administratorLogin 服务器的管理员登录名。 只能在 (创建服务器时指定,并且需要创建服务器) 。 字符串 (必需)
administratorLoginPassword 管理员登录名的密码。 字符串 (必需)

ServerPropertiesForGeoRestore

名称 说明
createMode 创建新服务器的模式。 “GeoRestore” (必需)
sourceServerId 要从中还原的源服务器 ID。 字符串 (必需)

ServerPropertiesForRestore

名称 说明
createMode 创建新服务器的模式。 “PointInTimeRestore” (必需)
restorePointInTime 还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 字符串 (必需)
sourceServerId 要从中还原的源服务器 ID。 字符串 (必需)

ServerPropertiesForReplica

名称 说明
createMode 创建新服务器的模式。 “副本” (必需)
sourceServerId 要从中创建副本的主服务器 ID。 字符串 (必需)

SKU

名称 说明
容量 扩展/横向扩展容量,表示服务器的计算单位。 int
family 硬件系列。 字符串
name sku 的名称,通常为层 + 系列 + 核心,例如B_Gen4_1、GP_Gen5_8。 字符串 (必需)
大小 大小代码,由资源根据需要解释。 字符串
特定 SKU 的层,例如基本。 “Basic”
“GeneralPurpose”
“MemoryOptimized”

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
使用 VNet 部署Azure Database for MariaDB

部署到 Azure
此模板提供了一种使用 VNet 集成部署 Azure 数据库 for MariaDB 的方法。

ARM 模板资源定义

服务器资源类型可以部署到:

有关每个 API 版本中更改的属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.DBforMariaDB/servers 资源,请将以下 JSON 添加到模板。

{
  "type": "Microsoft.DBforMariaDB/servers",
  "apiVersion": "2018-06-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "capacity": "int",
    "family": "string",
    "name": "string",
    "size": "string",
    "tier": "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
  }
}

ServerPropertiesForCreateOrServerProperties 对象

设置 createMode 属性以指定对象的类型。

对于 “默认值”,请使用:

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

对于 GeoRestore,请使用:

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

对于 PointInTimeRestore,请使用:

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

对于 副本,请使用:

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

属性值

servers

名称 说明 Value
type 资源类型 “Microsoft.DBforMariaDB/servers”
apiVersion 资源 API 版本 “2018-06-01-preview”
name 资源名称 字符串 (必需)

字符限制:3-63

有效字符:
小写字母、连字符和数字。

不能以连字符开头或结尾。

资源名称在 Azure 中必须是唯一的。
location 资源所在的位置。 字符串 (必需)
标记 键值对形式的应用程序特定元数据。 标记名称和值的字典。 请参阅 模板中的标记
sku SKU (服务器的定价层) 。 Sku
properties 服务器的属性。 ServerPropertiesForCreateOrServerProperties (必需)

ServerPropertiesForCreateOrServerProperties

名称 说明
minimalTlsVersion 为服务器强制实施最低 Tls 版本。 “TLS1_0”
“TLS1_1”
“TLS1_2”
“TLSEnforcementDisabled”
sslEnforcement 在连接到服务器时是否启用 ssl 强制实施。 “Disabled”
“已启用”
storageProfile 服务器的存储配置文件。 StorageProfile
版本 服务器版本。 '10.2'
'10.3'
createMode 设置对象类型 Default
GeoRestore
PointInTimeRestore
需要副本 ()

StorageProfile

名称 说明
backupRetentionDays 服务器的备份保留天数。 int
geoRedundantBackup 为服务器备份启用异地冗余或不启用。 “Disabled”
“已启用”
storageAutogrow 启用存储自动增长。 “Disabled”
“已启用”
storageMB 服务器允许的最大存储。 int

ServerPropertiesForDefaultCreate

名称 说明
createMode 创建新服务器的模式。 “Default” (必需)
administratorLogin 服务器的管理员登录名。 只能在 (创建服务器时指定,并且需要创建) 。 字符串 (必需)
administratorLoginPassword 管理员登录名的密码。 字符串 (必需)

ServerPropertiesForGeoRestore

名称 说明
createMode 创建新服务器的模式。 “GeoRestore” (必需)
sourceServerId 要从中还原的源服务器 ID。 字符串 (必需)

ServerPropertiesForRestore

名称 说明
createMode 创建新服务器的模式。 “PointInTimeRestore” (必需)
restorePointInTime 还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 字符串 (必需)
sourceServerId 要从中还原的源服务器 ID。 字符串 (必需)

ServerPropertiesForReplica

名称 说明
createMode 创建新服务器的模式。 “副本” (必需)
sourceServerId 要从中创建副本的主服务器 ID。 字符串 (必需)

SKU

名称 说明
容量 纵向扩展/横向扩展容量,表示服务器的计算单位。 int
family 硬件系列。 字符串
name sku 的名称,通常为层 + 系列 + 核心,例如B_Gen4_1、GP_Gen5_8。 字符串 (必需)
大小 要由资源根据需要解释的大小代码。 string
特定 SKU 的层,例如基本。 'Basic'
“GeneralPurpose”
“MemoryOptimized”

快速入门模板

以下快速入门模板部署此资源类型。

模板 说明
使用 VNet 部署Azure Database for MariaDB

部署到 Azure
此模板提供了一种通过 VNet 集成部署 Azure Database for MariaDB 的方法。

Terraform (AzAPI 提供程序) 资源定义

服务器资源类型可以部署到:

  • 资源组

有关每个 API 版本中已更改属性的列表,请参阅 更改日志

资源格式

若要创建 Microsoft.DBforMariaDB/servers 资源,请将以下 Terraform 添加到模板。

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DBforMariaDB/servers@2018-06-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    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 对象

设置 createMode 属性以指定对象的类型。

对于 “默认值”,请使用:

  createMode = "Default"
  administratorLogin = "string"
  administratorLoginPassword = "string"

对于 GeoRestore,请使用:

  createMode = "GeoRestore"
  sourceServerId = "string"

对于 PointInTimeRestore,请使用:

  createMode = "PointInTimeRestore"
  restorePointInTime = "string"
  sourceServerId = "string"

对于 副本,请使用:

  createMode = "Replica"
  sourceServerId = "string"

属性值

servers

名称 说明 Value
type 资源类型 “Microsoft.DBforMariaDB/servers@2018-06-01-preview”
name 资源名称 字符串 (必需)

字符限制:3-63

有效字符:
小写字母、连字符和数字。

不能以连字符开头或结尾。

资源名称在 Azure 中必须是唯一的。
location 资源所在的位置。 字符串 (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 字符串 (必需)
标记 键值对形式的应用程序特定元数据。 标记名称和值的字典。
sku 服务器的 SKU (定价层) 。 Sku
properties 服务器的属性。 ServerPropertiesForCreateOrServerProperties (必需的)

ServerPropertiesForCreateOrServerProperties

名称 说明
minimalTlsVersion 为服务器强制实施最低 Tls 版本。 “TLS1_0”
“TLS1_1”
“TLS1_2”
“TLSEnforcementDisabled”
sslEnforcement 连接到服务器时是否启用 ssl 强制实施。 “Disabled”
“Enabled”
storageProfile 服务器的存储配置文件。 StorageProfile
版本 服务器版本。 "10.2"
"10.3"
createMode 设置对象类型 Default
GeoRestore
PointInTimeRestore
需要副本 ()

StorageProfile

名称 说明
backupRetentionDays 服务器的备份保留天数。 int
geoRedundantBackup 为服务器备份启用异地冗余或不启用异地冗余。 “Disabled”
“Enabled”
storageAutogrow 启用存储自动增长。 “Disabled”
“Enabled”
storageMB 服务器允许的最大存储。 int

ServerPropertiesForDefaultCreate

名称 说明
createMode 用于创建新服务器的模式。 “默认” ()
administratorLogin 服务器的管理员登录名。 只能在 (创建服务器时指定,并且需要创建服务器) 。 字符串 (必需)
administratorLoginPassword 管理员登录名的密码。 字符串 (必需)

ServerPropertiesForGeoRestore

名称 说明
createMode 用于创建新服务器的模式。 需要“GeoRestore” ()
sourceServerId 要从中还原的源服务器 ID。 字符串 (必需)

ServerPropertiesForRestore

名称 说明
createMode 用于创建新服务器的模式。 需要“PointInTimeRestore” ()
restorePointInTime 还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 字符串 (必需)
sourceServerId 要从中还原的源服务器 ID。 字符串 (必需)

ServerPropertiesForReplica

名称 说明
createMode 用于创建新服务器的模式。 需要“副本” ()
sourceServerId 要从中创建副本的主服务器 ID。 字符串 (必需)

SKU

名称 说明
容量 纵向扩展/横向扩展容量,表示服务器的计算单位。 int
family 硬件系列。 string
name sku 的名称,通常为层 + 系列 + 核心,例如B_Gen4_1、GP_Gen5_8。 字符串 (必需)
大小 要由资源根据需要解释的大小代码。 string
特定 SKU 的层,例如基本。 "Basic"
“GeneralPurpose”
“MemoryOptimized”