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

Microsoft.DBforPostgreSQL flexibleServers 2021-06-01-preview

Bicep 资源定义

可以使用目标操作部署 flexibleServers 资源类型:

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

资源格式

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

resource symbolicname 'Microsoft.DBforPostgreSQL/flexibleServers@2021-06-01-preview' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    name: 'string'
    tier: 'string'
  }
  properties: {
    administratorLogin: 'string'
    administratorLoginPassword: 'string'
    availabilityZone: 'string'
    backup: {
      backupRetentionDays: int
      geoRedundantBackup: 'string'
    }
    createMode: 'string'
    highAvailability: {
      mode: 'string'
      standbyAvailabilityZone: 'string'
    }
    maintenanceWindow: {
      customWindow: 'string'
      dayOfWeek: int
      startHour: int
      startMinute: int
    }
    network: {
      delegatedSubnetResourceId: 'string'
      privateDnsZoneArmResourceId: 'string'
    }
    pointInTimeUTC: 'string'
    sourceServerResourceId: 'string'
    storage: {
      storageSizeGB: int
    }
    version: 'string'
  }
}

属性值

flexibleServers

名字 描述 价值
名字 资源名称 string (必需)
位置 资源所在的地理位置 string (必需)
标签 资源标记。 标记名称和值的字典。 请参阅模板 中的 标记
sku 服务器的 SKU(定价层)。 Sku
性能 服务器的属性。 ServerProperties

ServerProperties

名字 描述 价值
administratorLogin 管理员的服务器登录名。 只能在创建服务器时指定(并且是创建所必需的)。 字符串
administratorLoginPassword 管理员登录密码(创建服务器时需要)。 字符串

约束:
敏感值。 以安全参数的形式传入。
availabilityZone 服务器的可用性区域信息。 字符串
备份 服务器的备份属性。 备份
createMode 创建新的 PostgreSQL 服务器的模式。 “Create”
“Default”
“PointInTimeRestore”
“Update”
highAvailability 服务器的高可用性属性。 HighAvailability
maintenanceWindow 服务器的维护时段属性。 MaintenanceWindow
网络 服务器的网络属性。 网络
pointInTimeUTC 还原点创建时间(ISO8601格式),指定要从中还原的时间。 当“createMode”为“PointInTimeRestore”时,它是必需的。 字符串
sourceServerResourceId 要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”时,它是必需的。 字符串
存储 服务器的存储属性。 存储
版本 PostgreSQL 服务器版本。 '11'
'12'
'13'

备份

名字 描述 价值
backupRetentionDays 服务器的备份保留日。 int
geoRedundantBackup 一个值,该值指示是否在服务器上启用 Geo-Redundant 备份。 “Disabled”
“Enabled”

HighAvailability

名字 描述 价值
模式 服务器的 HA 模式。 “Disabled”
“ZoneRedundant”
standbyAvailabilityZone 备用服务器的可用性区域信息。 字符串

MaintenanceWindow

名字 描述 价值
customWindow 指示是启用还是禁用自定义窗口 字符串
dayOfWeek 维护时段的星期几 int
startHour 维护时段的开始时间 int
startMinute 维护时段的开始时间 int

网络

名字 描述 价值
delegatedSubnetResourceId 委托的子网 arm 资源 ID。 字符串
privateDnsZoneArmResourceId 专用 dns 区域 arm 资源 ID。 字符串

存储

名字 描述 价值
storageSizeGB 服务器允许的最大存储。 int

Sku

名字 描述 价值
名字 SKU 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。 string (必需)
特定 SKU 的层,例如可突发。 “可突发”
“GeneralPurpose”
“MemoryOptimized”(必需)

快速入门模板

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

模板 描述
使用 AAD 部署 Azure Database for PostgreSQL(灵活)

部署到 Azure
此模板提供了部署灵活服务器 Azure Database for PostgreSQL 和 AAD 集成的方法。
使用 VNet 部署 Azure Database for PostgreSQL (灵活)

部署到 Azure
此模板提供了部署灵活服务器 Azure Database for PostgreSQL 和 VNet 集成的方法。
使用 PostgreSQL 和 VNet 集成的 Web 应用 SonarQube

部署到 Azure
此模板提供使用 PostgreSQL 灵活服务器、VNet 集成和专用 DNS 轻松将 SonarQube 部署到 Linux 上的 Web 应用。

ARM 模板资源定义

可以使用目标操作部署 flexibleServers 资源类型:

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

资源格式

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

{
  "type": "Microsoft.DBforPostgreSQL/flexibleServers",
  "apiVersion": "2021-06-01-preview",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "name": "string",
    "tier": "string"
  },
  "properties": {
    "administratorLogin": "string",
    "administratorLoginPassword": "string",
    "availabilityZone": "string",
    "backup": {
      "backupRetentionDays": "int",
      "geoRedundantBackup": "string"
    },
    "createMode": "string",
    "highAvailability": {
      "mode": "string",
      "standbyAvailabilityZone": "string"
    },
    "maintenanceWindow": {
      "customWindow": "string",
      "dayOfWeek": "int",
      "startHour": "int",
      "startMinute": "int"
    },
    "network": {
      "delegatedSubnetResourceId": "string",
      "privateDnsZoneArmResourceId": "string"
    },
    "pointInTimeUTC": "string",
    "sourceServerResourceId": "string",
    "storage": {
      "storageSizeGB": "int"
    },
    "version": "string"
  }
}

属性值

flexibleServers

名字 描述 价值
类型 资源类型 “Microsoft.DBforPostgreSQL/flexibleServers”
apiVersion 资源 API 版本 '2021-06-01-preview'
名字 资源名称 string (必需)
位置 资源所在的地理位置 string (必需)
标签 资源标记。 标记名称和值的字典。 请参阅模板 中的 标记
sku 服务器的 SKU(定价层)。 Sku
性能 服务器的属性。 ServerProperties

ServerProperties

名字 描述 价值
administratorLogin 管理员的服务器登录名。 只能在创建服务器时指定(并且是创建所必需的)。 字符串
administratorLoginPassword 管理员登录密码(创建服务器时需要)。 字符串

约束:
敏感值。 以安全参数的形式传入。
availabilityZone 服务器的可用性区域信息。 字符串
备份 服务器的备份属性。 备份
createMode 创建新的 PostgreSQL 服务器的模式。 “Create”
“Default”
“PointInTimeRestore”
“Update”
highAvailability 服务器的高可用性属性。 HighAvailability
maintenanceWindow 服务器的维护时段属性。 MaintenanceWindow
网络 服务器的网络属性。 网络
pointInTimeUTC 还原点创建时间(ISO8601格式),指定要从中还原的时间。 当“createMode”为“PointInTimeRestore”时,它是必需的。 字符串
sourceServerResourceId 要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”时,它是必需的。 字符串
存储 服务器的存储属性。 存储
版本 PostgreSQL 服务器版本。 '11'
'12'
'13'

备份

名字 描述 价值
backupRetentionDays 服务器的备份保留日。 int
geoRedundantBackup 一个值,该值指示是否在服务器上启用 Geo-Redundant 备份。 “Disabled”
“Enabled”

HighAvailability

名字 描述 价值
模式 服务器的 HA 模式。 “Disabled”
“ZoneRedundant”
standbyAvailabilityZone 备用服务器的可用性区域信息。 字符串

MaintenanceWindow

名字 描述 价值
customWindow 指示是启用还是禁用自定义窗口 字符串
dayOfWeek 维护时段的星期几 int
startHour 维护时段的开始时间 int
startMinute 维护时段的开始时间 int

网络

名字 描述 价值
delegatedSubnetResourceId 委托的子网 arm 资源 ID。 字符串
privateDnsZoneArmResourceId 专用 dns 区域 arm 资源 ID。 字符串

存储

名字 描述 价值
storageSizeGB 服务器允许的最大存储。 int

Sku

名字 描述 价值
名字 SKU 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。 string (必需)
特定 SKU 的层,例如可突发。 “可突发”
“GeneralPurpose”
“MemoryOptimized”(必需)

快速入门模板

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

模板 描述
使用 AAD 部署 Azure Database for PostgreSQL(灵活)

部署到 Azure
此模板提供了部署灵活服务器 Azure Database for PostgreSQL 和 AAD 集成的方法。
使用 VNet 部署 Azure Database for PostgreSQL (灵活)

部署到 Azure
此模板提供了部署灵活服务器 Azure Database for PostgreSQL 和 VNet 集成的方法。
使用 PostgreSQL 和 VNet 集成的 Web 应用 SonarQube

部署到 Azure
此模板提供使用 PostgreSQL 灵活服务器、VNet 集成和专用 DNS 轻松将 SonarQube 部署到 Linux 上的 Web 应用。

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

可以使用目标操作部署 flexibleServers 资源类型:

  • 资源组

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

资源格式

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

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DBforPostgreSQL/flexibleServers@2021-06-01-preview"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      administratorLogin = "string"
      administratorLoginPassword = "string"
      availabilityZone = "string"
      backup = {
        backupRetentionDays = int
        geoRedundantBackup = "string"
      }
      createMode = "string"
      highAvailability = {
        mode = "string"
        standbyAvailabilityZone = "string"
      }
      maintenanceWindow = {
        customWindow = "string"
        dayOfWeek = int
        startHour = int
        startMinute = int
      }
      network = {
        delegatedSubnetResourceId = "string"
        privateDnsZoneArmResourceId = "string"
      }
      pointInTimeUTC = "string"
      sourceServerResourceId = "string"
      storage = {
        storageSizeGB = int
      }
      version = "string"
    }
    sku = {
      name = "string"
      tier = "string"
    }
  })
}

属性值

flexibleServers

名字 描述 价值
类型 资源类型 “Microsoft.DBforPostgreSQL/flexibleServers@2021-06-01-preview”
名字 资源名称 string (必需)
位置 资源所在的地理位置 string (必需)
parent_id 若要部署到资源组,请使用该资源组的 ID。 string (必需)
标签 资源标记。 标记名称和值的字典。
sku 服务器的 SKU(定价层)。 Sku
性能 服务器的属性。 ServerProperties

ServerProperties

名字 描述 价值
administratorLogin 管理员的服务器登录名。 只能在创建服务器时指定(并且是创建所必需的)。 字符串
administratorLoginPassword 管理员登录密码(创建服务器时需要)。 字符串

约束:
敏感值。 以安全参数的形式传入。
availabilityZone 服务器的可用性区域信息。 字符串
备份 服务器的备份属性。 备份
createMode 创建新的 PostgreSQL 服务器的模式。 “创建”
“Default”
“PointInTimeRestore”
“更新”
highAvailability 服务器的高可用性属性。 HighAvailability
maintenanceWindow 服务器的维护时段属性。 MaintenanceWindow
网络 服务器的网络属性。 网络
pointInTimeUTC 还原点创建时间(ISO8601格式),指定要从中还原的时间。 当“createMode”为“PointInTimeRestore”时,它是必需的。 字符串
sourceServerResourceId 要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”时,它是必需的。 字符串
存储 服务器的存储属性。 存储
版本 PostgreSQL 服务器版本。 "11"
"12"
"13"

备份

名字 描述 价值
backupRetentionDays 服务器的备份保留日。 int
geoRedundantBackup 一个值,该值指示是否在服务器上启用 Geo-Redundant 备份。 “Disabled”
“已启用”

HighAvailability

名字 描述 价值
模式 服务器的 HA 模式。 “Disabled”
“ZoneRedundant”
standbyAvailabilityZone 备用服务器的可用性区域信息。 字符串

MaintenanceWindow

名字 描述 价值
customWindow 指示是启用还是禁用自定义窗口 字符串
dayOfWeek 维护时段的星期几 int
startHour 维护时段的开始时间 int
startMinute 维护时段的开始时间 int

网络

名字 描述 价值
delegatedSubnetResourceId 委托的子网 arm 资源 ID。 字符串
privateDnsZoneArmResourceId 专用 dns 区域 arm 资源 ID。 字符串

存储

名字 描述 价值
storageSizeGB 服务器允许的最大存储。 int

Sku

名字 描述 价值
名字 SKU 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。 string (必需)
特定 SKU 的层,例如可突发。 “可突发”
“GeneralPurpose”
“MemoryOptimized”(必需)