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

Servers - Update

更新现有服务器。 请求正文可以包含常规服务器定义中存在的一个或多个属性。

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}?api-version=2025-08-01

URI 参数

名称 必需 类型 说明
resourceGroupName
path True

string

minLength: 1
maxLength: 90

资源组的名称。 此名称不区分大小写。

serverName
path True

string

minLength: 3
maxLength: 63
pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*

服务器的名称。

subscriptionId
path True

string (uuid)

目标订阅的 ID。 该值必须是 UUID。

api-version
query True

string

minLength: 1

要用于此操作的 API 版本。

请求正文

名称 类型 说明
identity

UserAssignedIdentity

描述应用程序的标识。

properties.administratorLogin

string

指定为分配给 PostgreSQL 实例的第一个基于密码的管理员的登录名。 首次在服务器上启用基于密码的身份验证时,必须指定此参数。 一旦设置为给定值,则在服务器的其余生命周期内无法更改。 如果在启用了基于密码的身份验证的服务器上禁用基于密码的身份验证,则不会删除此基于密码的角色。

properties.administratorLoginPassword

string (password)

分配给管理员登录名的密码。 只要启用了密码身份验证,就可以随时更改此密码。

properties.authConfig

AuthConfigForPatch

服务器的身份验证配置属性。

properties.availabilityZone

string

服务器的可用性区域。

properties.backup

BackupForPatch

服务器的备份属性。

properties.cluster

Cluster

服务器的群集属性。

properties.createMode

CreateModeForPatch

现有服务器的更新模式。

properties.dataEncryption

DataEncryption

服务器的数据加密属性。

properties.highAvailability

HighAvailabilityForPatch

服务器的高可用性属性。

properties.maintenanceWindow

MaintenanceWindowForPatch

服务器的维护时段属性。

properties.network

Network

服务器的网络属性。 仅当您希望将服务器集成到客户提供的虚拟网络中时,才需要。

properties.replica

Replica

服务器的只读副本属性。 仅在您想要升级服务器时才需要。

properties.replicationRole

ReplicationRole

服务器在复制集中的角色。

properties.storage

Storage

服务器的存储属性。

properties.version

PostgresMajorVersion

PostgreSQL 数据库引擎的主要版本。

sku

SkuForPatch

服务器的计算层和大小。

tags

object

键值对形式的应用程序特定元数据。

响应

名称 类型 说明
202 Accepted

Accepted.

标头

  • Location: string
  • Azure-AsyncOperation: string
Other Status Codes

ErrorResponse

描述操作失败的原因的错误响应。

安全性

azure_auth

Microsoft Entra OAuth2 流

类型: oauth2
流向: implicit
授权 URL: https://login.microsoftonline.com/common/oauth2/authorize

作用域

名称 说明
user_impersonation 冒充您的用户帐户

示例

Promote a read replica to a standalone server with forced data synchronization. Meaning that it doesn't wait for data in the read replica to be synchronized with its source server before it initiates the promotion to a standalone server.
Promote a read replica to a standalone server with planned data synchronization. Meaning that it waits for data in the read replica to be fully synchronized with its source server before it initiates the promotion to a standalone server.
Switch over a read replica to primary server with forced data synchronization. Meaning that it doesn't wait for data in the read replica to be synchronized with its source server before it initiates the switching of roles between the read replica and the primary server.
Switch over a read replica to primary server with planned data synchronization. Meaning that it waits for data in the read replica to be fully synchronized with its source server before it initiates the switching of roles between the read replica and the primary server.
Update an existing server to upgrade the major version of PostgreSQL database engine.
Update an existing server with custom maintenance window.
Update an existing server with data encryption based on customer managed key with automatic key version update.
Update an existing server with data encryption based on customer managed key.
Update an existing server with Microsoft Entra authentication enabled.
Update an existing server.

Promote a read replica to a standalone server with forced data synchronization. Meaning that it doesn't wait for data in the read replica to be synchronized with its source server before it initiates the promotion to a standalone server.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "properties": {
    "replica": {
      "promoteMode": "Standalone",
      "promoteOption": "Forced"
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Promote a read replica to a standalone server with planned data synchronization. Meaning that it waits for data in the read replica to be fully synchronized with its source server before it initiates the promotion to a standalone server.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "properties": {
    "replica": {
      "promoteMode": "Standalone",
      "promoteOption": "Planned"
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Switch over a read replica to primary server with forced data synchronization. Meaning that it doesn't wait for data in the read replica to be synchronized with its source server before it initiates the switching of roles between the read replica and the primary server.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "properties": {
    "replica": {
      "promoteMode": "Switchover",
      "promoteOption": "Forced"
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Switch over a read replica to primary server with planned data synchronization. Meaning that it waits for data in the read replica to be fully synchronized with its source server before it initiates the switching of roles between the read replica and the primary server.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "properties": {
    "replica": {
      "promoteMode": "Switchover",
      "promoteOption": "Planned"
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Update an existing server to upgrade the major version of PostgreSQL database engine.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "properties": {
    "createMode": "Update",
    "version": "17"
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Update an existing server with custom maintenance window.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "properties": {
    "createMode": "Update",
    "maintenanceWindow": {
      "customWindow": "Enabled",
      "dayOfWeek": 0,
      "startHour": 8,
      "startMinute": 0
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Update an existing server with data encryption based on customer managed key with automatic key version update.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "sku": {
    "tier": "GeneralPurpose",
    "name": "Standard_D8s_v3"
  },
  "identity": {
    "userAssignedIdentities": {
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity": {},
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity": {}
    },
    "type": "UserAssigned"
  },
  "properties": {
    "administratorLoginPassword": "examplenewpassword",
    "createMode": "Update",
    "dataEncryption": {
      "type": "AzureKeyVault",
      "primaryKeyURI": "https://exampleprimarykeyvault.vault.azure.net/keys/examplekey",
      "primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity",
      "geoBackupKeyURI": "https://examplegeoredundantkeyvault.vault.azure.net/keys/examplekey",
      "geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity"
    },
    "backup": {
      "backupRetentionDays": 20
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Update an existing server with data encryption based on customer managed key.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "sku": {
    "tier": "GeneralPurpose",
    "name": "Standard_D8s_v3"
  },
  "identity": {
    "userAssignedIdentities": {
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity": {},
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity": {}
    },
    "type": "UserAssigned"
  },
  "properties": {
    "administratorLoginPassword": "examplenewpassword",
    "createMode": "Update",
    "dataEncryption": {
      "type": "AzureKeyVault",
      "primaryKeyURI": "https://exampleprimarykeyvault.vault.azure.net/keys/examplekey/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "primaryUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/exampleprimaryidentity",
      "geoBackupKeyURI": "https://examplegeoredundantkeyvault.vault.azure.net/keys/examplekey/yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
      "geoBackupUserAssignedIdentityId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.ManagedIdentity/userAssignedIdentities/examplegeoredundantidentity"
    },
    "backup": {
      "backupRetentionDays": 20
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Update an existing server with Microsoft Entra authentication enabled.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "sku": {
    "tier": "GeneralPurpose",
    "name": "Standard_D8s_v3"
  },
  "properties": {
    "administratorLoginPassword": "examplenewpassword",
    "createMode": "Update",
    "authConfig": {
      "activeDirectoryAuth": "Enabled",
      "passwordAuth": "Enabled",
      "tenantId": "tttttt-tttt-tttt-tttt-tttttttttttt"
    },
    "storage": {
      "storageSizeGB": 1024,
      "autoGrow": "Disabled",
      "tier": "P30"
    },
    "backup": {
      "backupRetentionDays": 20
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

Update an existing server.

示例请求

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/exampleresourcegroup/providers/Microsoft.DBforPostgreSQL/flexibleServers/exampleserver?api-version=2025-08-01

{
  "sku": {
    "tier": "GeneralPurpose",
    "name": "Standard_D8s_v3"
  },
  "properties": {
    "administratorLoginPassword": "examplenewpassword",
    "createMode": "Update",
    "storage": {
      "storageSizeGB": 1024,
      "autoGrow": "Enabled",
      "tier": "P30"
    },
    "backup": {
      "backupRetentionDays": 20
    }
  }
}

示例响应

Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/azureAsyncOperation/aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa?api-version=2025-06-01-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/eastus/operationResults/bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb?api-version=2025-06-01-preview

定义

名称 说明
AuthConfigForPatch

服务器的身份验证配置属性。

AzureManagedDiskPerformanceTier

服务器的存储层。

BackupForPatch

服务器的备份属性。

Cluster

服务器的群集属性。

CreateModeForPatch

现有服务器的更新模式。

DataEncryption

服务器的数据加密属性。

DataEncryptionType

服务器使用的数据加密类型。

EncryptionKeyStatus

配置了基于客户管理密钥的数据加密的服务器使用的密钥状态,用于加密与服务器关联的主存储。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

GeographicallyRedundantBackup

指示是否将 服务器配置为创建地理位置冗余的备份。

HighAvailabilityForPatch

服务器的高可用性属性。

HighAvailabilityMode

服务器的高可用性模式。

HighAvailabilityState

当高可用性设置为 SameZone 或 ZoneRedundant 时创建的备用服务器的可能状态。

IdentityType

与服务器关联的标识类型。

MaintenanceWindowForPatch

服务器的维护时段属性。

MicrosoftEntraAuth

指示服务器是否支持 Microsoft Entra 身份验证。

Network

服务器的网络属性。

PasswordBasedAuth

指示服务器是否支持基于密码的身份验证。

PostgresMajorVersion

PostgreSQL 数据库引擎的主要版本。

ReadReplicaPromoteMode

要应用于只读副本的作类型。 此属性是 write only。 Standalone 意味着只读副本将被提升为独立服务器,并将成为完全独立于复制集的实体。 切换意味着只读副本将与主服务器一起扮演角色。

ReadReplicaPromoteOption

处理 promoteMode 属性中指定的作时使用的数据同步选项。 此属性是 write only。

Replica

服务器的副本属性。

ReplicationRole

服务器在复制集中的角色。

ReplicationState

指示只读副本的复制状态。 仅当目标服务器是只读副本时,才会返回此属性。 可能的值包括 Active、Broken、Catchup、Provisioning、Reconfiguring 和 Updating

ServerForPatch

表示要更新的服务器。

ServerPublicNetworkAccessState

指示是否启用公共网络访问。 仅适用于未集成到部署服务器时由客户拥有和提供的虚拟网络的服务器。

SkuForPatch

计算服务器的信息。

SkuTier

分配给服务器的计算层。

Storage

服务器的存储属性。

StorageAutoGrow

当可用空间接近零且条件允许自动增加存储大小时,标志以启用或禁用服务器存储大小的自动增长。

StorageType

分配给服务器的存储类型。 允许的值为 Premium_LRS、PremiumV2_LRS 或 UltraSSD_LRS。 如果未指定,则默认为 Premium_LRS。

UserAssignedIdentity

与服务器关联的标识。

UserIdentity

与服务器关联的用户分配的托管标识。

AuthConfigForPatch

服务器的身份验证配置属性。

名称 类型 说明
activeDirectoryAuth

MicrosoftEntraAuth

指示服务器是否支持 Microsoft Entra 身份验证。

passwordAuth

PasswordBasedAuth

指示服务器是否支持基于密码的身份验证。

tenantId

string

委托资源的租户的标识符。

AzureManagedDiskPerformanceTier

服务器的存储层。

说明
P1

入门级 SSD,IOPS 最低,非常适合轻度开发或测试工作负载。

P2

对于需要持续低延迟的小型应用程序,IOPS 略高。

P3

具有中等吞吐量的基本生产工作负载的平衡性能。

P4

增强的 IOPS,适用于具有可预测性能需求的不断增长的应用程序。

P6

中端 SSD,适用于需要可靠吞吐量和延迟的稳定工作负载。

P10

具有可扩展性能的通用生产工作负载的热门选择。

P15

高 IOPS 层,适用于具有频繁读/写作的苛刻应用。

P20

高性能固态硬盘 (SSD) 的入口点,适用于小规模 I/O 密集型工作负载。

P30

平衡层,适用于中等吞吐量和延迟敏感型应用程序。

P40

增强性能,满足不断增长的生产工作负载和一致的 IOPS 需求。

P50

针对需要持续高吞吐量的企业级应用程序进行了优化。

P60

适用于具有更高 IOPS 的大型数据库和分析工作负载的高容量层。

P70

专为需要超低延迟和高并发性的关键任务系统而设计。

P80

顶级 SSD 可实现最大 IOPS 和吞吐量,非常适合要求最苛刻的工作负载。

BackupForPatch

服务器的备份属性。

名称 类型 说明
backupRetentionDays

integer (int32)

服务器的备份保留日。

earliestRestoreDate

string (date-time)

服务器的最早还原点时间(ISO8601格式)。

geoRedundantBackup

GeographicallyRedundantBackup

指示是否将 服务器配置为创建地理位置冗余的备份。

Cluster

服务器的群集属性。

名称 类型 默认值 说明
clusterSize

integer (int32)

0

分配给 Elastic Cluster 的节点数。

defaultDatabaseName

string

弹性群集的默认数据库名称。

CreateModeForPatch

现有服务器的更新模式。

说明
Default

它相当于“更新”。

Update

作更新现有服务器。

DataEncryption

服务器的数据加密属性。

名称 类型 说明
geoBackupEncryptionKeyStatus

EncryptionKeyStatus

配置了基于客户管理的密钥的数据加密的服务器使用的密钥的状态,用于在服务器配置为支持地理冗余备份时加密与服务器关联的地理冗余存储。

geoBackupKeyURI

string

用户分配的托管标识的标识符,用于访问 Azure Key Vault 中的密钥,以便对与配置为支持地理冗余备份的服务器关联的地理冗余存储进行数据加密。

geoBackupUserAssignedIdentityId

string

用户分配的托管标识的标识符,用于访问 Azure Key Vault 中的密钥,以便对与配置为支持地理冗余备份的服务器关联的地理冗余存储进行数据加密。

primaryEncryptionKeyStatus

EncryptionKeyStatus

配置了基于客户管理密钥的数据加密的服务器使用的密钥状态,用于加密与服务器关联的主存储。

primaryKeyURI

string

Azure Key Vault 中用于对与服务器关联的主存储进行数据加密的密钥的 URI。

primaryUserAssignedIdentityId

string

用户分配的托管标识的标识符,用于访问 Azure Key Vault 中的密钥,以便对与服务器关联的主存储进行数据加密。

type

DataEncryptionType

服务器使用的数据加密类型。

DataEncryptionType

服务器使用的数据加密类型。

说明
SystemManaged

由 Azure 使用平台托管密钥管理的加密,以实现简单性和合规性。

AzureKeyVault

使用存储在 Azure Key Vault 中的客户管理的密钥进行加密,以增强控制和安全性。

EncryptionKeyStatus

配置了基于客户管理密钥的数据加密的服务器使用的密钥状态,用于加密与服务器关联的主存储。

说明
Valid

密钥有效,可用于加密。

Invalid

密钥无效,不能用于加密。 可能的原因包括密钥删除、权限更改、密钥被禁用、密钥类型不受支持或当前日期超出与密钥关联的有效期。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

附加信息。

type

string

附加信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

GeographicallyRedundantBackup

指示是否将 服务器配置为创建地理位置冗余的备份。

说明
Enabled

服务器配置为创建地理冗余备份。

Disabled

服务器未配置为创建地理冗余备份。

HighAvailabilityForPatch

服务器的高可用性属性。

名称 类型 说明
mode

HighAvailabilityMode

服务器的高可用性模式。

standbyAvailabilityZone

string

与高可用性设置为 SameZone 或 ZoneRedundant 时创建的备用服务器关联的可用区。

state

HighAvailabilityState

当高可用性设置为 SameZone 或 ZoneRedundant 时创建的备用服务器的可能状态。

HighAvailabilityMode

服务器的高可用性模式。

说明
Disabled

服务器的高可用性已禁用。

ZoneRedundant

为服务器启用高可用性,备用服务器位于与主服务器不同的可用性区域中。

SameZone

为服务器启用高可用性,备用服务器与主服务器位于同一可用性区域中。

HighAvailabilityState

当高可用性设置为 SameZone 或 ZoneRedundant 时创建的备用服务器的可能状态。

说明
NotEnabled

未为服务器启用高可用性。

CreatingStandby

正在创建备用服务器。

ReplicatingData

数据正在复制到备用服务器。

FailingOver

正在进行到备用服务器的故障转移作。

Healthy

备用服务器运行状况良好,并准备好在故障转移时接管。

RemovingStandby

正在删除备用服务器。

IdentityType

与服务器关联的标识类型。

说明
None

未向服务器分配托管标识。

UserAssigned

将用户提供的一个或多个托管标识分配给服务器。

SystemAssigned

Azure 会自动创建和管理与服务器生命周期关联的标识。

SystemAssigned,UserAssigned

系统分配的标识和用户分配的标识都分配给服务器。

MaintenanceWindowForPatch

服务器的维护时段属性。

名称 类型 说明
customWindow

string

指示自定义窗口是启用还是禁用。

dayOfWeek

integer (int32)

用于维护时段的星期几。

startHour

integer (int32)

用于维护时段的开始时间。

startMinute

integer (int32)

用于维护时段的开始分钟。

MicrosoftEntraAuth

指示服务器是否支持 Microsoft Entra 身份验证。

说明
Enabled

服务器支持 Microsoft Entra 身份验证。

Disabled

服务器不支持 Microsoft Entra 身份验证。

Network

服务器的网络属性。

名称 类型 说明
delegatedSubnetResourceId

string

委托子网的资源标识符。 在创建新服务器期间是必需的,以防您希望将服务器集成到您自己的虚拟网络中。 对于更新作,如果要更改为私有 DNS 区域分配的值,则只需提供此属性。

privateDnsZoneArmResourceId

string

私有 DNS 区域的标识符。 在创建新服务器期间是必需的,以防您希望将服务器集成到您自己的虚拟网络中。 对于更新作,如果要更改为私有 DNS 区域分配的值,则只需提供此属性。

publicNetworkAccess

ServerPublicNetworkAccessState

指示是否启用公共网络访问。 仅适用于未集成到部署服务器时由客户拥有和提供的虚拟网络的服务器。

PasswordBasedAuth

指示服务器是否支持基于密码的身份验证。

说明
Enabled

服务器支持基于密码的身份验证。

Disabled

服务器不支持基于密码的身份验证。

PostgresMajorVersion

PostgreSQL 数据库引擎的主要版本。

说明
18

PostgreSQL 18.

17

PostgreSQL 17.

16

PostgreSQL 16.

15

PostgreSQL 15.

14

PostgreSQL 14.

13

PostgreSQL 13.

12

PostgreSQL 12.

11

PostgreSQL 11.

ReadReplicaPromoteMode

要应用于只读副本的作类型。 此属性是 write only。 Standalone 意味着只读副本将被提升为独立服务器,并将成为完全独立于复制集的实体。 切换意味着只读副本将与主服务器一起扮演角色。

说明
Standalone

只读副本将成为独立服务器。

Switchover

只读副本将与主服务器交换角色。

ReadReplicaPromoteOption

处理 promoteMode 属性中指定的作时使用的数据同步选项。 此属性是 write only。

说明
Planned

该作将等待只读副本中的数据与其源服务器完全同步,然后再启动作。

Forced

该作不会等待只读副本中的数据与其源服务器同步,然后再启动作。

Replica

服务器的副本属性。

名称 类型 说明
capacity

integer (int32)

服务器允许的最大只读副本数。

promoteMode

ReadReplicaPromoteMode

要应用于只读副本的作类型。 此属性是 write only。 Standalone 意味着只读副本将被提升为独立服务器,并将成为完全独立于复制集的实体。 切换意味着只读副本将与主服务器一起扮演角色。

promoteOption

ReadReplicaPromoteOption

处理 promoteMode 属性中指定的作时使用的数据同步选项。 此属性是 write only。

replicationState

ReplicationState

指示只读副本的复制状态。 仅当目标服务器是只读副本时,才会返回此属性。 可能的值包括 Active、Broken、Catchup、Provisioning、Reconfiguring 和 Updating

role

ReplicationRole

服务器在复制集中的角色。

ReplicationRole

服务器在复制集中的角色。

说明
None

未分配复制角色;服务器独立运行。

Primary

充当复制到一个或多个副本的源服务器。

AsyncReplica

从同一区域内的主服务器异步接收数据。

GeoAsyncReplica

从不同区域的主服务器异步接收数据,以实现地理冗余。

ReplicationState

指示只读副本的复制状态。 仅当目标服务器是只读副本时,才会返回此属性。 可能的值包括 Active、Broken、Catchup、Provisioning、Reconfiguring 和 Updating

说明
Active

只读副本完全同步并主动从主服务器复制数据。

Catchup

只读副本位于主服务器后面,当前正在赶上待处理的更改。

Provisioning

正在创建只读副本,并且正在初始化。

Updating

只读副本正在进行一些更改,它可能会更改将其提升到主服务器的计算大小。

Broken

复制失败或中断。

Reconfiguring

正在重新配置只读副本,可能是由于源或设置的更改。

ServerForPatch

表示要更新的服务器。

名称 类型 说明
identity

UserAssignedIdentity

描述应用程序的标识。

properties.administratorLogin

string

指定为分配给 PostgreSQL 实例的第一个基于密码的管理员的登录名。 首次在服务器上启用基于密码的身份验证时,必须指定此参数。 一旦设置为给定值,则在服务器的其余生命周期内无法更改。 如果在启用了基于密码的身份验证的服务器上禁用基于密码的身份验证,则不会删除此基于密码的角色。

properties.administratorLoginPassword

string (password)

分配给管理员登录名的密码。 只要启用了密码身份验证,就可以随时更改此密码。

properties.authConfig

AuthConfigForPatch

服务器的身份验证配置属性。

properties.availabilityZone

string

服务器的可用性区域。

properties.backup

BackupForPatch

服务器的备份属性。

properties.cluster

Cluster

服务器的群集属性。

properties.createMode

CreateModeForPatch

现有服务器的更新模式。

properties.dataEncryption

DataEncryption

服务器的数据加密属性。

properties.highAvailability

HighAvailabilityForPatch

服务器的高可用性属性。

properties.maintenanceWindow

MaintenanceWindowForPatch

服务器的维护时段属性。

properties.network

Network

服务器的网络属性。 仅当您希望将服务器集成到客户提供的虚拟网络中时,才需要。

properties.replica

Replica

服务器的只读副本属性。 仅在您想要升级服务器时才需要。

properties.replicationRole

ReplicationRole

服务器在复制集中的角色。

properties.storage

Storage

服务器的存储属性。

properties.version

PostgresMajorVersion

PostgreSQL 数据库引擎的主要版本。

sku

SkuForPatch

服务器的计算层和大小。

tags

object

键值对形式的应用程序特定元数据。

ServerPublicNetworkAccessState

指示是否启用公共网络访问。 仅适用于未集成到部署服务器时由客户拥有和提供的虚拟网络的服务器。

说明
Enabled

已启用公共网络访问。 这允许从公共互联网访问服务器,前提是允许来自连接客户端的传入流量的必要防火墙规则到位。 这与使用专用终结点连接到此服务器兼容。

Disabled

已禁用公用网络访问。 这意味着无法从公共互联网访问服务器,而只能通过专用端点访问服务器。

SkuForPatch

计算服务器的信息。

名称 类型 说明
name

string

名称是分配给服务器的给定计算大小。

tier

SkuTier

分配给服务器的计算层。

SkuTier

分配给服务器的计算层。

说明
Burstable

经济高效的层,适用于不频繁的 CPU 使用率,非常适合性能要求较低的开发和测试工作负载。

GeneralPurpose

为大多数工作负载平衡计算和内存,提供可缩放的性能和 I/O 吞吐量。

MemoryOptimized

高内存与核心比,适用于需要快速内存处理和高并发性的苛刻工作负载。

Storage

服务器的存储属性。

名称 类型 说明
autoGrow

StorageAutoGrow

当可用空间接近零且条件允许自动增加存储大小时,标志以启用或禁用服务器存储大小的自动增长。

iops

integer (int32)

存储支持的最大 IOPS。 当存储类型为 PremiumV2_LRS 或 UltraSSD_LRS 时是必需的。

storageSizeGB

integer (int32)

分配给服务器的存储大小。

throughput

integer (int32)

存储支持的最大吞吐量。 当存储类型为 PremiumV2_LRS 或 UltraSSD_LRS 时是必需的。

tier

AzureManagedDiskPerformanceTier

服务器的存储层。

type

StorageType

分配给服务器的存储类型。 允许的值为 Premium_LRS、PremiumV2_LRS 或 UltraSSD_LRS。 如果未指定,则默认为 Premium_LRS。

StorageAutoGrow

当可用空间接近零且条件允许自动增加存储大小时,标志以启用或禁用服务器存储大小的自动增长。

说明
Enabled

当可用空间接近零且条件允许自动增加存储大小时,服务器应自动增加存储大小。

Disabled

当可用空间接近零时,服务器不应自动增加存储大小。

StorageType

分配给服务器的存储类型。 允许的值为 Premium_LRS、PremiumV2_LRS 或 UltraSSD_LRS。 如果未指定,则默认为 Premium_LRS。

说明
Premium_LRS

标准固态磁盘 (SSD) 支持的存储为通用工作负载提供一致的性能。

PremiumV2_LRS

下一代固态硬盘 (SSD) 存储具有更高的可扩展性和性能,适用于要求苛刻的企业工作负载。

UltraSSD_LRS

高端固态硬盘 (SSD) 存储,专为极端 IOPS 和延迟敏感型应用程序而设计。

UserAssignedIdentity

与服务器关联的标识。

名称 类型 说明
principalId

string

与用户分配的托管标识关联的服务主体的对象的标识符。

tenantId

string

服务器租户的标识符。

type

IdentityType

与服务器关联的标识类型。

userAssignedIdentities

<string,  UserIdentity>

用户分配的托管标识的映射。

UserIdentity

与服务器关联的用户分配的托管标识。

名称 类型 说明
clientId

string

与用户分配的托管标识关联的服务主体的客户端的标识符。

principalId

string

与用户分配的托管标识关联的服务主体的对象的标识符。