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

Servers - List

列出给定订阅中的所有服务器。

GET https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DBforPostgreSQL/flexibleServers?api-version=2022-12-01

URI 参数

名称 必需 类型 说明
subscriptionId
path True

string

目标订阅的 ID。

api-version
query True

string

要用于此操作的 API 版本。

响应

名称 类型 说明
200 OK

ServerListResult

确定

Other Status Codes

ErrorResponse

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

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

ServerList

Sample Request

GET https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/flexibleServers?api-version=2022-12-01

Sample Response

{
  "nextLink": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/flexibleServers?api-version=2022-12-01&$top=3&$skiptoken=skiptoken",
  "value": [
    {
      "sku": {
        "name": "Standard_D4s_v3",
        "tier": "GeneralPurpose"
      },
      "properties": {
        "fullyQualifiedDomainName": "c7d7483a8ceb.test-private-dns-zone.postgres.database.azure.com",
        "version": "12",
        "minorVersion": "6",
        "administratorLogin": "cloudsa",
        "state": "Ready",
        "availabilityZone": "1",
        "storage": {
          "storageSizeGB": 512
        },
        "authConfig": {
          "activeDirectoryAuth": "Disabled",
          "passwordAuth": "Enabled"
        },
        "backup": {
          "backupRetentionDays": 7,
          "geoRedundantBackup": "Disabled",
          "earliestRestoreDate": "2021-05-26T01:16:58.3723361+00:00"
        },
        "network": {
          "publicNetworkAccess": "Disabled",
          "delegatedSubnetResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/virtualNetworks/test-vnet/subnets/test-vnet-subnet",
          "privateDnsZoneArmResourceId": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.Network/privateDnsZones/test-private-dns-zone.postgres.database.azure.com"
        },
        "highAvailability": {
          "mode": "ZoneRedundant",
          "state": "Healthy",
          "standbyAvailabilityZone": "2"
        }
      },
      "location": "westus",
      "tags": {
        "ElasticServer": "1"
      },
      "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc4",
      "name": "pgtestsvc4",
      "type": "Microsoft.DBforPostgreSQL/flexibleServers"
    },
    {
      "sku": {
        "name": "Standard_D4s_v3",
        "tier": "GeneralPurpose"
      },
      "properties": {
        "fullyQualifiedDomainName": "pgtestsvc1.postgres.database.azure.com",
        "version": "12",
        "minorVersion": "6",
        "administratorLogin": "cloudsa",
        "state": "Ready",
        "availabilityZone": "1",
        "storage": {
          "storageSizeGB": 512
        },
        "authConfig": {
          "activeDirectoryAuth": "Disabled",
          "passwordAuth": "Enabled"
        },
        "backup": {
          "backupRetentionDays": 7,
          "geoRedundantBackup": "Disabled",
          "earliestRestoreDate": "2021-05-26T23:15:38.8131437+00:00"
        },
        "network": {
          "publicNetworkAccess": "Enabled"
        },
        "highAvailability": {
          "mode": "Disabled",
          "state": "NotEnabled"
        }
      },
      "location": "westus",
      "tags": {
        "ElasticServer": "1"
      },
      "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc1",
      "name": "pgtestsvc1",
      "type": "Microsoft.DBforPostgreSQL/flexibleServers"
    }
  ]
}

定义

名称 说明
activeDirectoryAuthEnum

如果已启用,则启用 Azure Active Directory 身份验证。

ArmServerKeyType

用于描述它是系统托管还是 Azure 密钥保管库的数据加密类型。

AuthConfig

服务器的 AuthConfig 属性。

Backup

服务器的备份属性。

createdByType

创建资源的标识类型。

CreateMode

用于创建新的 PostgreSQL 服务器的模式。

DataEncryption

服务器的数据加密属性。

ErrorAdditionalInfo

资源管理错误附加信息。

ErrorDetail

错误详细信息。

ErrorResponse

错误响应

GeoRedundantBackupEnum

指示是否在服务器上启用 Geo-Redundant 备份的值。

HighAvailability

服务器的高可用性属性。

HighAvailabilityMode

服务器的 HA 模式。

IdentityType

与此资源关联的标识类型;当前限制为“None and UserAssigned”

MaintenanceWindow

服务器的维护时段属性。

Network

服务器的网络属性。 仅当希望服务器为专用访问服务器时,才需要传递此 Network 属性。

passwordAuthEnum

如果已启用,则启用密码身份验证。

ReplicationRole

服务器的复制角色

Server

灵活服务器列表

ServerHAState

对用户可见的 HA 服务器的状态。

ServerListResult

服务器列表。

ServerPublicNetworkAccessState

是否启用公用网络访问

ServerState

用户可见的服务器的状态。

ServerVersion

PostgreSQL 服务器版本。

Sku

服务器的 SKU (定价层) 。

SkuTier

特定 SKU 的层,例如可突发。

Storage

服务器的存储属性。

systemData

与此资源相关的系统元数据。

UserAssignedIdentity

描述应用程序的标识。

UserIdentity

描述与应用程序关联的单个用户分配标识。

activeDirectoryAuthEnum

如果已启用,则启用 Azure Active Directory 身份验证。

名称 类型 说明
Disabled

string

Enabled

string

ArmServerKeyType

用于描述它是系统托管还是 Azure 密钥保管库的数据加密类型。

名称 类型 说明
AzureKeyVault

string

SystemManaged

string

AuthConfig

服务器的 AuthConfig 属性。

名称 类型 默认值 说明
activeDirectoryAuth

activeDirectoryAuthEnum

如果已启用,则启用 Azure Active Directory 身份验证。

passwordAuth

passwordAuthEnum

Enabled

如果已启用,则启用密码身份验证。

tenantId

string

服务器的租户 ID。

Backup

服务器的备份属性。

名称 类型 默认值 说明
backupRetentionDays

integer

7

服务器的备份保留天数。

earliestRestoreDate

string

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

geoRedundantBackup

GeoRedundantBackupEnum

Disabled

一个 值,该值指示服务器上是否启用了 Geo-Redundant 备份。

createdByType

创建资源的标识类型。

名称 类型 说明
Application

string

Key

string

ManagedIdentity

string

User

string

CreateMode

用于创建新的 PostgreSQL 服务器的模式。

名称 类型 说明
Create

string

Default

string

GeoRestore

string

PointInTimeRestore

string

Replica

string

Update

string

DataEncryption

服务器的数据加密属性。

名称 类型 说明
primaryKeyURI

string

主服务器数据加密密钥的 URI。

primaryUserAssignedIdentityId

string

要用于主服务器数据加密的用户分配标识的资源 ID。

type

ArmServerKeyType

数据加密类型,用于描述它是系统托管还是 Azure Key Vault。

ErrorAdditionalInfo

资源管理错误附加信息。

名称 类型 说明
info

object

其他信息。

type

string

其他信息类型。

ErrorDetail

错误详细信息。

名称 类型 说明
additionalInfo

ErrorAdditionalInfo[]

错误附加信息。

code

string

错误代码。

details

ErrorDetail[]

错误详细信息。

message

string

错误消息。

target

string

错误目标。

ErrorResponse

错误响应

名称 类型 说明
error

ErrorDetail

错误对象。

GeoRedundantBackupEnum

指示是否在服务器上启用 Geo-Redundant 备份的值。

名称 类型 说明
Disabled

string

Enabled

string

HighAvailability

服务器的高可用性属性。

名称 类型 默认值 说明
mode

HighAvailabilityMode

Disabled

服务器的 HA 模式。

standbyAvailabilityZone

string

备用服务器的可用性区域信息。

state

ServerHAState

对用户可见的 HA 服务器的状态。

HighAvailabilityMode

服务器的 HA 模式。

名称 类型 说明
Disabled

string

SameZone

string

ZoneRedundant

string

IdentityType

与此资源关联的标识类型;当前限制为“None and UserAssigned”

名称 类型 说明
None

string

UserAssigned

string

MaintenanceWindow

服务器的维护时段属性。

名称 类型 默认值 说明
customWindow

string

Disabled

指示是启用或禁用自定义窗口

dayOfWeek

integer

0

维护时段的星期数

startHour

integer

0

维护时段的开始时间

startMinute

integer

0

维护时段的开始分钟数

Network

服务器的网络属性。 仅当希望服务器为专用访问服务器时,才需要传递此 Network 属性。

名称 类型 说明
delegatedSubnetResourceId

string

委托的子网 arm 资源 ID。如果我们希望服务器注入 VNET(即专用访问服务器),则需要在创建过程中传递此项。 在更新期间,仅当我们想要更新专用 DNS区域的值时,才传递此项。

privateDnsZoneArmResourceId

string

专用 DNS 区域 arm 资源 ID。如果我们希望服务器注入 VNET(即专用访问服务器),则需要在创建过程中传递此项。 在更新期间,仅当我们想要更新专用 DNS区域的值时,才传递此项。

publicNetworkAccess

ServerPublicNetworkAccessState

是否启用公用网络访问

passwordAuthEnum

如果已启用,则启用密码身份验证。

名称 类型 说明
Disabled

string

Enabled

string

ReplicationRole

服务器的复制角色

名称 类型 说明
AsyncReplica

string

GeoAsyncReplica

string

None

string

Primary

string

Server

灵活服务器列表

名称 类型 说明
id

string

资源的完全限定的资源 ID。 例如 - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

UserAssignedIdentity

描述应用程序的标识。

location

string

资源所在的地理位置

name

string

资源的名称

properties.administratorLogin

string

服务器的管理员登录名。 只能在 (创建服务器时指定,并且需要创建) 。

properties.administratorLoginPassword

string

创建服务器) (管理员登录密码。

properties.authConfig

AuthConfig

服务器的 AuthConfig 属性。

properties.availabilityZone

string

服务器的可用性区域信息。

properties.backup

Backup

服务器的备份属性。

properties.createMode

CreateMode

用于创建新的 PostgreSQL 服务器的模式。

properties.dataEncryption

DataEncryption

服务器的数据加密属性。

properties.fullyQualifiedDomainName

string

服务器的完全限定域名。

properties.highAvailability

HighAvailability

服务器的高可用性属性。

properties.maintenanceWindow

MaintenanceWindow

服务器的维护时段属性。

properties.minorVersion

string

服务器的次要版本。

properties.network

Network

服务器的网络属性。 仅当希望服务器为专用访问服务器时,才需要传递此 Network 属性。

properties.pointInTimeUTC

string

还原点创建时间 (ISO8601 格式) ,指定要从其还原的时间。 当“createMode”为“PointInTimeRestore”或“GeoRestore”时,这是必需的。

properties.replicaCapacity

integer

服务器允许的副本。

properties.replicationRole

ReplicationRole

服务器的复制角色

properties.sourceServerResourceId

string

要从中还原的源服务器资源 ID。 当“createMode”为“PointInTimeRestore”、“GeoRestore”或“Replica”时,这是必需的。 此属性仅为副本服务器返回

properties.state

ServerState

用户可见的服务器的状态。

properties.storage

Storage

服务器的存储属性。

properties.version

ServerVersion

PostgreSQL 服务器版本。

sku

Sku

服务器的 SKU (定价层) 。

systemData

systemData

与此资源相关的系统元数据。

tags

object

资源标记。

type

string

资源类型。 例如“Microsoft.Compute/virtualMachines”或“Microsoft.Storage/storageAccounts”

ServerHAState

对用户可见的 HA 服务器的状态。

名称 类型 说明
CreatingStandby

string

FailingOver

string

Healthy

string

NotEnabled

string

RemovingStandby

string

ReplicatingData

string

ServerListResult

服务器列表。

名称 类型 说明
nextLink

string

用于获取下一页操作的链接。

value

Server[]

灵活服务器列表

ServerPublicNetworkAccessState

是否启用公用网络访问

名称 类型 说明
Disabled

string

Enabled

string

ServerState

用户可见的服务器的状态。

名称 类型 说明
Disabled

string

Dropping

string

Ready

string

Starting

string

Stopped

string

Stopping

string

Updating

string

ServerVersion

PostgreSQL 服务器版本。

名称 类型 说明
11

string

12

string

13

string

14

string

Sku

服务器的 SKU (定价层) 。

名称 类型 说明
name

string

sku 的名称,通常为层 + 系列 + 核心,例如Standard_D4s_v3。

tier

SkuTier

特定 SKU 的层,例如可突发。

SkuTier

特定 SKU 的层,例如可突发。

名称 类型 说明
Burstable

string

GeneralPurpose

string

MemoryOptimized

string

Storage

服务器的存储属性。

名称 类型 说明
storageSizeGB

integer

服务器允许的最大存储。

systemData

与此资源相关的系统元数据。

名称 类型 说明
createdAt

string

资源创建时间戳 (UTC) 。

createdBy

string

创建资源的标识。

createdByType

createdByType

创建资源的标识类型。

lastModifiedAt

string

资源上次修改的时间戳 (UTC)

lastModifiedBy

string

上次修改资源的标识。

lastModifiedByType

createdByType

上次修改资源的标识类型。

UserAssignedIdentity

描述应用程序的标识。

名称 类型 说明
tenantId

string

服务器的租户 ID。

type

IdentityType

与此资源关联的标识类型;当前限制为“None 和 UserAssigned”

userAssignedIdentities

<string,  UserIdentity>

表示用户分配的标识映射。

UserIdentity

描述与应用程序关联的单个用户分配标识。

名称 类型 说明
clientId

string

此标识所表示的服务主体的客户端标识符。

principalId

string

此标识所表示的服务主体的对象标识符。