Servers - Get

Gets information about a server.

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

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

serverName
path True

string

The name of the server.

Regex pattern: ^[a-zA-Z0-9]+(-[a-zA-Z0-9]+)*

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

Server

OK

Other Status Codes

ErrorResponse

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

ServerGet
ServerGetWithVnet

ServerGet

Sample request

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

Sample response

{
  "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:07:25.8166567+00:00"
    },
    "network": {
      "publicNetworkAccess": "Enabled"
    },
    "highAvailability": {
      "mode": "Disabled",
      "state": "NotEnabled"
    },
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    }
  },
  "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"
}

ServerGetWithVnet

Sample request

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

Sample response

{
  "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"
    },
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    }
  },
  "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"
}

Definitions

Name Description
activeDirectoryAuthEnum

If Enabled, Azure Active Directory authentication is enabled.

ArmServerKeyType

Data encryption type to depict if it is System Managed vs Azure Key vault.

AuthConfig

AuthConfig properties of a server.

Backup

Backup properties of a server.

createdByType

The type of identity that created the resource.

CreateMode

The mode to create a new PostgreSQL server.

DataEncryption

Data encryption properties of a server.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

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.

IdentityType

the types of identities associated with this resource; currently restricted to 'None and UserAssigned'

MaintenanceWindow

Maintenance window properties of a server.

Network

Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server.

passwordAuthEnum

If Enabled, Password authentication is enabled.

ReplicationRole

Replication role of the server

Server

Represents a server.

ServerHAState

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

ServerPublicNetworkAccessState

public network access is enabled or not

ServerState

A state of a server that is visible to user.

ServerVersion

PostgreSQL Server version.

Sku

The SKU (pricing tier) of the server.

SkuTier

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

Storage

Storage properties of a server.

systemData

The system metadata relating to this resource.

UserAssignedIdentity

Describes the identity of the application.

UserIdentity

Describes a single user-assigned identity associated with the application.

activeDirectoryAuthEnum

If Enabled, Azure Active Directory authentication is enabled.

Name Type Description
Disabled

string

Enabled

string

ArmServerKeyType

Data encryption type to depict if it is System Managed vs Azure Key vault.

Name Type Description
AzureKeyVault

string

SystemManaged

string

AuthConfig

AuthConfig properties of a server.

Name Type Default value Description
activeDirectoryAuth

activeDirectoryAuthEnum

If Enabled, Azure Active Directory authentication is enabled.

passwordAuth

passwordAuthEnum

Enabled

If Enabled, Password authentication is enabled.

tenantId

string

Tenant id of the server.

Backup

Backup properties of a server.

Name Type Default value Description
backupRetentionDays

integer

7

Backup retention days for the server.

earliestRestoreDate

string

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

geoRedundantBackup

GeoRedundantBackupEnum

Disabled

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

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

CreateMode

The mode to create a new PostgreSQL server.

Name Type Description
Create

string

Default

string

GeoRestore

string

PointInTimeRestore

string

Replica

string

Update

string

DataEncryption

Data encryption properties of a server.

Name Type Description
primaryKeyURI

string

URI for the key for data encryption for primary server.

primaryUserAssignedIdentityId

string

Resource Id for the User assigned identity to be used for data encryption for primary server.

type

ArmServerKeyType

Data encryption type to depict if it is System Managed vs Azure Key vault.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

GeoRedundantBackupEnum

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

Name Type Description
Disabled

string

Enabled

string

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.

Name Type Description
Disabled

string

SameZone

string

ZoneRedundant

string

IdentityType

the types of identities associated with this resource; currently restricted to 'None and UserAssigned'

Name Type Description
None

string

UserAssigned

string

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

0

day of week for maintenance window

startHour

integer

0

start hour for maintenance window

startMinute

integer

0

start minute for maintenance window

Network

Network properties of a server. This Network property is required to be passed only in case you want the server to be Private access server.

Name Type Description
delegatedSubnetResourceId

string

Delegated subnet arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone.

privateDnsZoneArmResourceId

string

Private dns zone arm resource id. This is required to be passed during create, in case we want the server to be VNET injected, i.e. Private access server. During update, pass this only if we want to update the value for Private DNS zone.

publicNetworkAccess

ServerPublicNetworkAccessState

public network access is enabled or not

passwordAuthEnum

If Enabled, Password authentication is enabled.

Name Type Description
Disabled

string

Enabled

string

ReplicationRole

Replication role of the server

Name Type Description
AsyncReplica

string

GeoAsyncReplica

string

None

string

Primary

string

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}

identity

UserAssignedIdentity

Describes the identity of the application.

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

The administrator login password (required for server creation).

properties.authConfig

AuthConfig

AuthConfig properties of a server.

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.dataEncryption

DataEncryption

Data encryption properties of a 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. This Network property is required to be passed only in case you want the server to be Private access server.

properties.pointInTimeUTC

string

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

properties.replicaCapacity

integer

Replicas allowed for a server.

properties.replicationRole

ReplicationRole

Replication role of the server

properties.sourceServerResourceId

string

The source server resource ID to restore from. It's required when 'createMode' is 'PointInTimeRestore' or 'GeoRestore' or 'Replica'. This property is returned only for Replica server

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.

Name Type Description
CreatingStandby

string

FailingOver

string

Healthy

string

NotEnabled

string

RemovingStandby

string

ReplicatingData

string

ServerPublicNetworkAccessState

public network access is enabled or not

Name Type Description
Disabled

string

Enabled

string

ServerState

A state of a server that is visible to user.

Name Type Description
Disabled

string

Dropping

string

Ready

string

Starting

string

Stopped

string

Stopping

string

Updating

string

ServerVersion

PostgreSQL Server version.

Name Type Description
11

string

12

string

13

string

14

string

Sku

The SKU (pricing tier) of the 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.

Name Type Description
Burstable

string

GeneralPurpose

string

MemoryOptimized

string

Storage

Storage properties of a server.

Name Type Description
storageSizeGB

integer

Max storage allowed for a server.

systemData

The system metadata relating to this resource.

Name Type Description
createdAt

string

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

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.

UserAssignedIdentity

Describes the identity of the application.

Name Type Description
tenantId

string

Tenant id of the server.

type

IdentityType

the types of identities associated with this resource; currently restricted to 'None and UserAssigned'

userAssignedIdentities

<string,  UserIdentity>

represents user assigned identities map.

UserIdentity

Describes a single user-assigned identity associated with the application.

Name Type Description
clientId

string

the client identifier of the Service Principal which this identity represents.

principalId

string

the object identifier of the Service Principal which this identity represents.