Share via


Servers - List

List all the servers in a given subscription.

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

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

minLength: 1

The ID of the target subscription.

api-version
query True

string

minLength: 1

The API version to use for this operation.

Responses

Name Type Description
200 OK

ServerListResult

OK

Other Status Codes

CloudError

Error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

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

Scopes

Name Description
user_impersonation impersonate your user account

Examples

ServerList

Sample request

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

Sample response

{
  "nextLink": "https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/flexibleServers?api-version=2021-06-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
        },
        "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
        },
        "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"
    }
  ]
}

Definitions

Name Description
Backup

Backup properties of a server

CloudError

An error response from the Batch service.

createdByType

The type of identity that created the resource.

CreateMode

The mode to create a new PostgreSQL server.

ErrorAdditionalInfo

The resource management error additional info.

ErrorResponse

Error Response

GeoRedundantBackupEnum

A value indicating whether Geo-Redundant backup is enabled on the server.

HighAvailability

High availability properties of a server

HighAvailabilityMode

The HA mode for the server.

MaintenanceWindow

Maintenance window properties of a server.

Network

Network properties of a server

Server

Represents a server.

ServerHAState

A state of a HA server that is visible to user.

ServerListResult

A list of servers.

ServerPublicNetworkAccessState

public network access is enabled or not

ServerState

A state of a server that is visible to user.

ServerVersion

The version of a server.

Sku

Sku information related properties of a server.

SkuTier

The tier of the particular SKU, e.g. Burstable.

Storage

Storage properties of a server

systemData

Metadata pertaining to creation and last modification of the resource.

Backup

Backup properties of a server

Name Type Default value Description
backupRetentionDays

integer (int32)

7

Backup retention days for the server.

earliestRestoreDate

string (date-time)

The earliest restore point time (ISO8601 format) for server.

geoRedundantBackup

GeoRedundantBackupEnum

Disabled

A value indicating whether Geo-Redundant backup is enabled on the server.

CloudError

An error response from the Batch service.

Name Type Description
error

ErrorResponse

Error Response
Common error response for all Azure Resource Manager APIs to return error details for failed operations. (This also follows the OData error response format.)

createdByType

The type of identity that created the resource.

Value Description
User
Application
ManagedIdentity
Key

CreateMode

The mode to create a new PostgreSQL server.

Value Description
Default
Create
Update
PointInTimeRestore

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorResponse

Error Response

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorResponse[]

The error details.

message

string

The error message.

target

string

The error target.

GeoRedundantBackupEnum

A value indicating whether Geo-Redundant backup is enabled on the server.

Value Description
Enabled
Disabled

HighAvailability

High availability properties of a server

Name Type Default value Description
mode

HighAvailabilityMode

Disabled

The HA mode for the server.

standbyAvailabilityZone

string

availability zone information of the standby.

state

ServerHAState

A state of a HA server that is visible to user.

HighAvailabilityMode

The HA mode for the server.

Value Description
Disabled
ZoneRedundant

MaintenanceWindow

Maintenance window properties of a server.

Name Type Default value Description
customWindow

string

Disabled

indicates whether custom window is enabled or disabled

dayOfWeek

integer (int32)

0

day of week for maintenance window

startHour

integer (int32)

0

start hour for maintenance window

startMinute

integer (int32)

0

start minute for maintenance window

Network

Network properties of a server

Name Type Description
delegatedSubnetResourceId

string (arm-id)

delegated subnet arm resource id.

privateDnsZoneArmResourceId

string (arm-id)

private dns zone arm resource id.

publicNetworkAccess

ServerPublicNetworkAccessState

public network access is enabled or not

Server

Represents a server.

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.administratorLogin

string

The administrator's login name of a server. Can only be specified when the server is being created (and is required for creation).

properties.administratorLoginPassword

string (password)

The administrator login password (required for server creation).

properties.availabilityZone

string

availability zone information of the server.

properties.backup

Backup

Backup properties of a server.

properties.createMode

CreateMode

The mode to create a new PostgreSQL server.

properties.fullyQualifiedDomainName

string

The fully qualified domain name of a server.

properties.highAvailability

HighAvailability

High availability properties of a server.

properties.maintenanceWindow

MaintenanceWindow

Maintenance window properties of a server.

properties.minorVersion

string

The minor version of the server.

properties.network

Network

Network properties of a server.

properties.pointInTimeUTC

string (date-time)

Restore point creation time (ISO8601 format), specifying the time to restore from. It's required when 'createMode' is 'PointInTimeRestore'.

properties.sourceServerResourceId

string (arm-id)

The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore'.

properties.state

ServerState

A state of a server that is visible to user.

properties.storage

Storage

Storage properties of a server.

properties.version

ServerVersion

PostgreSQL Server version.

sku

Sku

The SKU (pricing tier) of the server.

systemData

systemData

The system metadata relating to this resource.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

ServerHAState

A state of a HA server that is visible to user.

Value Description
NotEnabled
CreatingStandby
ReplicatingData
FailingOver
Healthy
RemovingStandby

ServerListResult

A list of servers.

Name Type Description
nextLink

string

The link used to get the next page of operations.

value

Server[]

The list of flexible servers

ServerPublicNetworkAccessState

public network access is enabled or not

Value Description
Enabled
Disabled

ServerState

A state of a server that is visible to user.

Value Description
Ready
Dropping
Disabled
Starting
Stopping
Stopped
Updating

ServerVersion

The version of a server.

Value Description
14
13
12
11

Sku

Sku information related properties of a server.

Name Type Description
name

string

The name of the sku, typically, tier + family + cores, e.g. Standard_D4s_v3.

tier

SkuTier

The tier of the particular SKU, e.g. Burstable.

SkuTier

The tier of the particular SKU, e.g. Burstable.

Value Description
Burstable
GeneralPurpose
MemoryOptimized

Storage

Storage properties of a server

Name Type Description
storageSizeGB

integer (int32)

Max storage allowed for a server.

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string (date-time)

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string (date-time)

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.