你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Microsoft.DBforPostgreSQL flexibleServers 2022-03-08-preview
Bicep 资源定义
flexibleServers 资源类型可以使用面向以下对象的操作进行部署:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.DBforPostgreSQL/flexibleServers 资源,请将以下 Bicep 添加到模板。
resource symbolicname 'Microsoft.DBforPostgreSQL/flexibleServers@2022-03-08-preview' = {
name: 'string'
location: 'string'
tags: {
tagName1: 'tagValue1'
tagName2: 'tagValue2'
}
sku: {
name: 'string'
tier: 'string'
}
identity: {
type: 'string'
userAssignedIdentities: {}
}
properties: {
administratorLogin: 'string'
administratorLoginPassword: 'string'
authConfig: {
activeDirectoryAuthEnabled: bool
passwordAuthEnabled: bool
tenantId: 'string'
}
availabilityZone: 'string'
backup: {
backupRetentionDays: int
geoRedundantBackup: 'string'
}
createMode: 'string'
dataEncryption: {
primaryKeyURI: 'string'
primaryUserAssignedIdentityId: 'string'
type: 'string'
}
highAvailability: {
mode: 'string'
standbyAvailabilityZone: 'string'
}
maintenanceWindow: {
customWindow: 'string'
dayOfWeek: int
startHour: int
startMinute: int
}
network: {
delegatedSubnetResourceId: 'string'
privateDnsZoneArmResourceId: 'string'
}
pointInTimeUTC: 'string'
replicaCapacity: int
replicationRole: 'string'
sourceServerResourceId: 'string'
storage: {
storageSizeGB: int
}
version: 'string'
}
}
属性值
flexibleServers
名称 | 说明 | 值 |
---|---|---|
name | 资源名称 | 字符串 (必需) |
location | 资源所在的地理位置 | 字符串 (必需) |
标记 | 资源标记。 | 标记名称和值的字典。 请参阅 模板中的标记 |
sku | SKU (服务器的定价层) 。 | Sku |
标识 | 描述应用程序的标识。 | UserAssignedIdentity |
properties | 服务器的属性。 | ServerProperties |
UserAssignedIdentity
名称 | 说明 | Value |
---|---|---|
type | 与此资源关联的标识类型;当前限制为“SystemAssigned 和 UserAssigned” | “None” “SystemAssigned” “UserAssigned” (必需) |
userAssignedIdentities | 表示用户分配的标识映射。 | 对象 (object) |
ServerProperties
名称 | 说明 | 值 |
---|---|---|
administratorLogin | 服务器的管理员登录名。 只能在 (创建服务器且需要创建) 时指定。 | 字符串 |
administratorLoginPassword | (创建服务器) 所需的管理员登录密码。 | 字符串 |
authConfig | 服务器的 AuthConfig 属性。 | AuthConfig |
availabilityZone | 服务器的可用性区域信息。 | string |
备份 (backup) | 服务器的备份属性。 | 备份 |
createMode | 创建新 PostgreSQL 服务器的模式。 | “创建” 'Default' “GeoRestore” “PointInTimeRestore” “副本” “Update” |
dataEncryption | 服务器的数据加密属性。 | DataEncryption |
highAvailability | 服务器的高可用性属性。 | HighAvailability |
maintenanceWindow | 服务器的维护时段属性。 | MaintenanceWindow |
network | 服务器的网络属性。 | Network |
pointInTimeUTC | 还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 当“createMode”为“PointInTimeRestore”或“GeoRestore”时,这是必需的。 | 字符串 |
replicaCapacity | 服务器允许的副本。 | int |
replicationRole | 服务器的复制角色 | “AsyncReplica” “GeoAsyncReplica” “None” “Primary” |
sourceServerResourceId | 要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”、“GeoRestore”或“Replica”时,这是必需的。 | 字符串 |
存储 | 服务器的存储属性。 | 存储 |
版本 | PostgreSQL 服务器版本。 | '11' '12' '13' '14' |
AuthConfig
名称 | 说明 | 值 |
---|---|---|
activeDirectoryAuthEnabled | 如果为 true,则启用 Azure Active Directory 身份验证。 | bool |
passwordAuthEnabled | 如果为 true,则启用密码身份验证。 | bool |
tenantId | 服务器的租户 ID。 | 字符串 |
备份
名称 | 说明 | 值 |
---|---|---|
backupRetentionDays | 服务器的备份保留天数。 | int |
geoRedundantBackup | 一个 值,该值指示服务器上是否启用了 Geo-Redundant 备份。 | 'Disabled' 'Enabled' |
DataEncryption
名称 | 说明 | 值 |
---|---|---|
primaryKeyURI | 主服务器数据加密密钥的 URI。 | string |
primaryUserAssignedIdentityId | 要用于主服务器数据加密的用户分配标识的资源 ID。 | string |
type | 数据加密类型,用于描述它是系统分配的还是 Azure Key Vault。 | “AzureKeyVault” “SystemAssigned” |
HighAvailability
名称 | 说明 | 值 |
---|---|---|
mode | 服务器的 HA 模式。 | 'Disabled' “SameZone” “ZoneRedundant” |
standbyAvailabilityZone | 备用服务器的可用性区域信息。 | 字符串 |
MaintenanceWindow
名称 | 说明 | 值 |
---|---|---|
customWindow | 指示是启用或禁用自定义窗口 | 字符串 |
dayOfWeek | 维护时段的星期数 | int |
startHour | 维护时段的开始时间 | int |
startMinute | 维护时段的开始分钟数 | int |
网络
名称 | 说明 | 值 |
---|---|---|
delegatedSubnetResourceId | 委托的子网 arm 资源 ID。 | 字符串 |
privateDnsZoneArmResourceId | 专用 dns 区域 arm 资源 ID。 | 字符串 |
存储
名称 | 说明 | 值 |
---|---|---|
storageSizeGB | 服务器允许的最大存储。 | int |
SKU
名称 | 说明 | 值 |
---|---|---|
name | sku 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。 | 字符串 (必需) |
层 | 特定 SKU 的层,例如可突发。 | 'Burstable' “GeneralPurpose” 需要“MemoryOptimized” () |
快速入门模板
以下快速入门模板部署此资源类型。
模板 | 说明 |
---|---|
使用 AAD 部署Azure Database for PostgreSQL (灵活) |
此模板提供了一种通过 AAD 集成部署灵活服务器 Azure Database for PostgreSQL 的方法。 |
使用 VNet 部署Azure Database for PostgreSQL (灵活) |
此模板提供了一种通过 VNet 集成部署灵活服务器 Azure Database for PostgreSQL 的方法。 |
具有 PostgreSQL 和 VNet 集成的 Web 应用上的 SonarQube |
此模板提供通过 PostgreSQL 灵活服务器、VNet 集成和专用 DNS 轻松地将 SonarQube 部署到 Linux 上的 Web 应用。 |
ARM 模板资源定义
可以使用面向以下操作部署 flexibleServers 资源类型:
- 资源组 - 请参阅 资源组部署命令
有关每个 API 版本中已更改属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.DBforPostgreSQL/flexibleServers 资源,请将以下 JSON 添加到模板。
{
"type": "Microsoft.DBforPostgreSQL/flexibleServers",
"apiVersion": "2022-03-08-preview",
"name": "string",
"location": "string",
"tags": {
"tagName1": "tagValue1",
"tagName2": "tagValue2"
},
"sku": {
"name": "string",
"tier": "string"
},
"identity": {
"type": "string",
"userAssignedIdentities": {}
},
"properties": {
"administratorLogin": "string",
"administratorLoginPassword": "string",
"authConfig": {
"activeDirectoryAuthEnabled": "bool",
"passwordAuthEnabled": "bool",
"tenantId": "string"
},
"availabilityZone": "string",
"backup": {
"backupRetentionDays": "int",
"geoRedundantBackup": "string"
},
"createMode": "string",
"dataEncryption": {
"primaryKeyURI": "string",
"primaryUserAssignedIdentityId": "string",
"type": "string"
},
"highAvailability": {
"mode": "string",
"standbyAvailabilityZone": "string"
},
"maintenanceWindow": {
"customWindow": "string",
"dayOfWeek": "int",
"startHour": "int",
"startMinute": "int"
},
"network": {
"delegatedSubnetResourceId": "string",
"privateDnsZoneArmResourceId": "string"
},
"pointInTimeUTC": "string",
"replicaCapacity": "int",
"replicationRole": "string",
"sourceServerResourceId": "string",
"storage": {
"storageSizeGB": "int"
},
"version": "string"
}
}
属性值
flexibleServers
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | 'Microsoft.DBforPostgreSQL/flexibleServers' |
apiVersion | 资源 API 版本 | '2022-03-08-preview' |
name | 资源名称 | 字符串 (必需) |
location | 资源所在的地理位置 | 字符串 (必需) |
标记 | 资源标记。 | 标记名称和值的字典。 请参阅 模板中的标记 |
sku | 服务器的 SKU (定价层) 。 | Sku |
标识 | 描述应用程序的标识。 | UserAssignedIdentity |
properties | 服务器的属性。 | ServerProperties |
UserAssignedIdentity
名称 | 说明 | Value |
---|---|---|
type | 与此资源关联的标识类型;当前限制为“SystemAssigned 和 UserAssigned” | “None” “SystemAssigned” “UserAssigned” (必需) |
userAssignedIdentities | 表示用户分配的标识映射。 | 对象 (object) |
ServerProperties
名称 | 说明 | 值 |
---|---|---|
administratorLogin | 服务器的管理员登录名。 只能在 (创建服务器时指定,并且需要创建) 。 | string |
administratorLoginPassword | 创建服务器) (管理员登录密码。 | string |
authConfig | 服务器的 AuthConfig 属性。 | AuthConfig |
availabilityZone | 服务器的可用性区域信息。 | string |
备份 (backup) | 服务器的备份属性。 | 备份 |
createMode | 用于创建新的 PostgreSQL 服务器的模式。 | 'Create' 'Default' “GeoRestore” “PointInTimeRestore” “副本” “Update” |
dataEncryption | 服务器的数据加密属性。 | DataEncryption |
highAvailability | 服务器的高可用性属性。 | HighAvailability |
maintenanceWindow | 服务器的维护时段属性。 | MaintenanceWindow |
network | 服务器的网络属性。 | Network |
pointInTimeUTC | 还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 当“createMode”为“PointInTimeRestore”或“GeoRestore”时,这是必需的。 | 字符串 |
replicaCapacity | 服务器允许的副本。 | int |
replicationRole | 服务器的复制角色 | “AsyncReplica” “GeoAsyncReplica” “None” “Primary” |
sourceServerResourceId | 要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”或“GeoRestore”或“Replica”时,这是必需的。 | 字符串 |
存储 | 服务器的存储属性。 | 存储 |
版本 | PostgreSQL 服务器版本。 | '11' '12' '13' '14' |
AuthConfig
名称 | 说明 | 值 |
---|---|---|
activeDirectoryAuthEnabled | 如果为 true,则启用 Azure Active Directory 身份验证。 | bool |
passwordAuthEnabled | 如果为 true,则启用密码身份验证。 | bool |
tenantId | 服务器的租户 ID。 | 字符串 |
备份
名称 | 说明 | 值 |
---|---|---|
backupRetentionDays | 服务器的备份保留天数。 | int |
geoRedundantBackup | 指示是否在服务器上启用 Geo-Redundant 备份的值。 | “Disabled” “已启用” |
DataEncryption
名称 | 说明 | 值 |
---|---|---|
primaryKeyURI | 主服务器数据加密密钥的 URI。 | 字符串 |
primaryUserAssignedIdentityId | 要用于主服务器数据加密的用户分配标识的资源 ID。 | 字符串 |
type | 数据加密类型,用于描述它是系统分配还是 Azure Key Vault。 | “AzureKeyVault” “SystemAssigned” |
HighAvailability
名称 | 说明 | 值 |
---|---|---|
mode | 服务器的 HA 模式。 | “Disabled” “SameZone” “ZoneRedundant” |
standbyAvailabilityZone | 备用数据库的可用性区域信息。 | string |
MaintenanceWindow
名称 | 说明 | 值 |
---|---|---|
customWindow | 指示是启用或禁用自定义窗口 | 字符串 |
dayOfWeek | 维护时段的星期数 | int |
startHour | 维护时段的开始时间 | int |
startMinute | 维护时段的开始分钟数 | int |
网络
名称 | 说明 | 值 |
---|---|---|
delegatedSubnetResourceId | 委托的子网 arm 资源 ID。 | string |
privateDnsZoneArmResourceId | 专用 dns 区域 arm 资源 ID。 | 字符串 |
存储
名称 | 说明 | 值 |
---|---|---|
storageSizeGB | 服务器允许的最大存储。 | int |
SKU
名称 | 说明 | 值 |
---|---|---|
name | SKU 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。 | 字符串 (必需) |
层 | 特定 SKU 的层,例如可突发的。 | “突发” “GeneralPurpose” 需要“MemoryOptimized” () |
快速入门模板
以下快速入门模板部署此资源类型。
模板 | 说明 |
---|---|
使用 AAD 部署Azure Database for PostgreSQL (灵活) |
此模板提供了一种使用 AAD 集成部署灵活服务器 Azure Database for PostgreSQL 的方法。 |
使用 VNet 部署Azure Database for PostgreSQL (灵活) |
此模板提供了一种通过 VNet 集成部署灵活服务器 Azure Database for PostgreSQL 的方法。 |
使用 PostgreSQL 和 VNet 集成的 Web 应用上的 SonarQube |
此模板提供通过 PostgreSQL 灵活服务器、VNet 集成和专用 DNS 轻松将 SonarQube 部署到 Linux 上的 Web 应用。 |
Terraform (AzAPI 提供程序) 资源定义
flexibleServers 资源类型可以使用面向以下对象的操作进行部署:
- 资源组
有关每个 API 版本中更改的属性的列表,请参阅 更改日志。
资源格式
若要创建 Microsoft.DBforPostgreSQL/flexibleServers 资源,请将以下 Terraform 添加到模板。
resource "azapi_resource" "symbolicname" {
type = "Microsoft.DBforPostgreSQL/flexibleServers@2022-03-08-preview"
name = "string"
location = "string"
parent_id = "string"
tags = {
tagName1 = "tagValue1"
tagName2 = "tagValue2"
}
identity {
type = "string"
identity_ids = []
}
body = jsonencode({
properties = {
administratorLogin = "string"
administratorLoginPassword = "string"
authConfig = {
activeDirectoryAuthEnabled = bool
passwordAuthEnabled = bool
tenantId = "string"
}
availabilityZone = "string"
backup = {
backupRetentionDays = int
geoRedundantBackup = "string"
}
createMode = "string"
dataEncryption = {
primaryKeyURI = "string"
primaryUserAssignedIdentityId = "string"
type = "string"
}
highAvailability = {
mode = "string"
standbyAvailabilityZone = "string"
}
maintenanceWindow = {
customWindow = "string"
dayOfWeek = int
startHour = int
startMinute = int
}
network = {
delegatedSubnetResourceId = "string"
privateDnsZoneArmResourceId = "string"
}
pointInTimeUTC = "string"
replicaCapacity = int
replicationRole = "string"
sourceServerResourceId = "string"
storage = {
storageSizeGB = int
}
version = "string"
}
sku = {
name = "string"
tier = "string"
}
})
}
属性值
flexibleServers
名称 | 说明 | Value |
---|---|---|
type | 资源类型 | “Microsoft.DBforPostgreSQL/flexibleServers@2022-03-08-preview” |
name | 资源名称 | 字符串 (必需) |
location | 资源所在的地理位置 | 字符串 (必需) |
parent_id | 若要部署到资源组,请使用该资源组的 ID。 | 字符串 (必需) |
标记 | 资源标记。 | 标记名称和值的字典。 |
sku | SKU (服务器的定价层) 。 | Sku |
标识 | 描述应用程序的标识。 | UserAssignedIdentity |
properties | 服务器的属性。 | ServerProperties |
UserAssignedIdentity
名称 | 说明 | Value |
---|---|---|
type | 与此资源关联的标识类型;当前限制为“SystemAssigned 和 UserAssigned” | “SystemAssigned” “UserAssigned” (必需) |
identity_ids | 表示用户分配的标识映射。 | 用户标识 ID 数组。 |
ServerProperties
名称 | 说明 | 值 |
---|---|---|
administratorLogin | 服务器的管理员登录名。 只能在 (创建服务器且需要创建) 时指定。 | 字符串 |
administratorLoginPassword | (创建服务器) 所需的管理员登录密码。 | 字符串 |
authConfig | 服务器的 AuthConfig 属性。 | AuthConfig |
availabilityZone | 服务器的可用性区域信息。 | string |
备份 (backup) | 服务器的备份属性。 | 备份 |
createMode | 创建新 PostgreSQL 服务器的模式。 | “创建” “Default” “GeoRestore” “PointInTimeRestore” “副本” “更新” |
dataEncryption | 服务器的数据加密属性。 | DataEncryption |
highAvailability | 服务器的高可用性属性。 | HighAvailability |
maintenanceWindow | 服务器的维护时段属性。 | MaintenanceWindow |
network | 服务器的网络属性。 | Network |
pointInTimeUTC | 还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 当“createMode”为“PointInTimeRestore”或“GeoRestore”时,这是必需的。 | 字符串 |
replicaCapacity | 服务器允许的副本。 | int |
replicationRole | 服务器的复制角色 | “AsyncReplica” “GeoAsyncReplica” "None" “Primary” |
sourceServerResourceId | 要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”或“GeoRestore”或“Replica”时,这是必需的。 | 字符串 |
存储 | 服务器的存储属性。 | 存储 |
版本 | PostgreSQL 服务器版本。 | "11" "12" "13" "14" |
AuthConfig
名称 | 说明 | 值 |
---|---|---|
activeDirectoryAuthEnabled | 如果为 true,则启用 Azure Active Directory 身份验证。 | bool |
passwordAuthEnabled | 如果为 true,则启用密码身份验证。 | bool |
tenantId | 服务器的租户 ID。 | 字符串 |
备份
名称 | 说明 | 值 |
---|---|---|
backupRetentionDays | 服务器的备份保留天数。 | int |
geoRedundantBackup | 指示是否在服务器上启用 Geo-Redundant 备份的值。 | “Disabled” “已启用” |
DataEncryption
名称 | 说明 | 值 |
---|---|---|
primaryKeyURI | 主服务器数据加密密钥的 URI。 | 字符串 |
primaryUserAssignedIdentityId | 要用于主服务器数据加密的用户分配标识的资源 ID。 | string |
type | 数据加密类型,用于描述它是系统分配还是 Azure Key Vault。 | “AzureKeyVault” “SystemAssigned” |
HighAvailability
名称 | 说明 | 值 |
---|---|---|
mode | 服务器的 HA 模式。 | “Disabled” “SameZone” “ZoneRedundant” |
standbyAvailabilityZone | 备用数据库的可用性区域信息。 | string |
MaintenanceWindow
名称 | 说明 | 值 |
---|---|---|
customWindow | 指示是启用或禁用自定义窗口 | string |
dayOfWeek | 维护时段的星期数 | int |
startHour | 维护时段的开始时间 | int |
startMinute | 维护时段的开始分钟数 | int |
网络
名称 | 说明 | 值 |
---|---|---|
delegatedSubnetResourceId | 委托的子网 arm 资源 ID。 | string |
privateDnsZoneArmResourceId | 专用 dns 区域 arm 资源 ID。 | 字符串 |
存储
名称 | 说明 | 值 |
---|---|---|
storageSizeGB | 服务器允许的最大存储。 | int |
SKU
名称 | 说明 | 值 |
---|---|---|
name | SKU 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。 | 字符串 (必需) |
层 | 特定 SKU 的层,例如可突发的。 | “突发” “GeneralPurpose” 需要“MemoryOptimized” () |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈