Clusters - Update

Updates an existing cluster. The request body can contain one or several properties from the cluster definition.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/{clusterName}?api-version=2023-03-02-preview

URI Parameters

Name In Required Type Description
clusterName
path True

string

The name of the cluster.

Regex pattern: ^(?![0-9]+$)(?!-)[a-z0-9-]{3,40}(?<!-)$

resourceGroupName
path True

string

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

subscriptionId
path True

string

uuid

The ID of the target subscription. The value must be an UUID.

api-version
query True

string

The API version to use for this operation.

Request Body

Name Type Description
identity

IdentityProperties

Describes the identity of the cluster.

properties.administratorLoginPassword

string

The password of the administrator login. Each cluster is created with pre-defined administrative role called ‘citus’. 

properties.citusVersion

string

The Citus extension version on all cluster servers.

properties.coordinatorEnablePublicIpAccess

boolean

If public access is enabled on coordinator.

properties.coordinatorServerEdition

string

The edition of the coordinator (default: GeneralPurpose).

properties.coordinatorStorageQuotaInMb

integer

The storage of the coordinator in MB.

properties.coordinatorVCores

integer

The vCores count of the coordinator (max: 96).

properties.enableHa

boolean

If high availability (HA) is enabled or not for the cluster.

properties.enableShardsOnCoordinator

boolean

If distributed tables are placed on coordinator or not. Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed.

properties.maintenanceWindow

MaintenanceWindow

Maintenance window of a cluster.

properties.nodeCount

integer

Worker node count of the cluster. When node count is 0, it represents a single node configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration. Node count value cannot be 1.

properties.nodeServerEdition

string

The edition of a node (default: MemoryOptimized).

properties.nodeStorageQuotaInMb

integer

The storage in MB on each worker node.

properties.nodeVCores

integer

The compute in vCores on each worker node (max: 104).

properties.postgresqlVersion

string

The major PostgreSQL version on all cluster servers.

properties.preferredPrimaryZone

string

Preferred primary availability zone (AZ) for all cluster servers.

tags

object

Application-specific metadata in the form of key-value pairs.

Responses

Name Type Description
200 OK

Cluster

OK

202 Accepted

Cluster

Accepted

Headers

  • location: string
  • azure-async-operation: string
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

Scale compute up or down
Scale out: Add new worker nodes
Scale up storage
Update multiple configuration settings of the cluster
Update or define maintenance window

Scale compute up or down

Sample Request

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "nodeVCores": 16
  }
}

Sample Response

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0,
      "customWindow": "Disabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 3,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  },
  "location": "westus"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0,
      "customWindow": "Disabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 3,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  },
  "location": "westus"
}

Scale out: Add new worker nodes

Sample Request

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "nodeCount": 2
  }
}

Sample Response

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Provisioning",
    "state": "Provisioning",
    "aadAuthEnabled": "disabled",
    "postgresqlVersion": "15",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "preferredPrimaryZone": "1",
    "nodeCount": 2,
    "enableShardsOnCoordinator": false,
    "enableGeoBackup": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 524288,
    "coordinatorVCores": 4,
    "coordinatorEnablePublicIpAccess": true,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 524288,
    "nodeVCores": 8,
    "nodeEnablePublicIpAccess": false,
    "passwordEnabled": "enabled",
    "serverNames": [
      {
        "name": "testcluster-c",
        "fullyQualifiedDomainName": "c.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w0",
        "fullyQualifiedDomainName": "w0.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w1",
        "fullyQualifiedDomainName": "w1.testcluster.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "enableHa": true,
    "readReplicas": [],
    "earliestRestoreTime": null,
    "privateEndpointConnections": []
  },
  "location": "westus"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Provisioning",
    "state": "Provisioning",
    "postgresqlVersion": "15",
    "aadAuthEnabled": "disabled",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "customWindow": "Disabled",
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0
    },
    "preferredPrimaryZone": "1",
    "nodeCount": 2,
    "enableShardsOnCoordinator": false,
    "enableGeoBackup": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 524288,
    "coordinatorVCores": 4,
    "coordinatorEnablePublicIpAccess": true,
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeStorageQuotaInMb": 524288,
    "nodeVCores": 8,
    "nodeEnablePublicIpAccess": false,
    "passwordEnabled": "enabled",
    "serverNames": [
      {
        "name": "testcluster-c",
        "fullyQualifiedDomainName": "c.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w0",
        "fullyQualifiedDomainName": "w0.testcluster.postgres.database.azure.com"
      },
      {
        "name": "testcluster-w1",
        "fullyQualifiedDomainName": "w1.testcluster.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "enableHa": true,
    "readReplicas": [],
    "earliestRestoreTime": null,
    "privateEndpointConnections": []
  },
  "location": "westus"
}

Scale up storage

Sample Request

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "nodeStorageQuotaInMb": 2097152
  }
}

Sample Response

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0,
      "customWindow": "Disabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 3,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  },
  "location": "westus"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0,
      "customWindow": "Disabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 3,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  },
  "location": "westus"
}

Update multiple configuration settings of the cluster

Sample Request

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

{
  "properties": {
    "administratorLoginPassword": "newpassword",
    "coordinatorVCores": 16,
    "nodeCount": 4,
    "nodeVCores": 16
  }
}

Sample Response

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster1",
  "name": "testcluster1",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "location": "westus",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0,
      "customWindow": "Disabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 4,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w3",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-01",
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-02"
    ],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  }
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster1",
  "name": "testcluster1",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "tags": {
    "additionalProp1": "string",
    "additionalProp2": "string",
    "additionalProp3": "string"
  },
  "location": "westus",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 0,
      "startMinute": 0,
      "customWindow": "Disabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 4,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w2",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w3",
        "fullyQualifiedDomainName": "testcluster1-w2.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-01",
      "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBForPostgreSQL/serverGroupsv2/testreadreplica-02"
    ],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  }
}

Update or define maintenance window

Sample Request

PATCH https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster?api-version=2023-03-02-preview

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

Sample Response

{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 8,
      "startMinute": 0,
      "customWindow": "Enabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 2,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  },
  "location": "westus"
}
Azure-AsyncOperation: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/azureAsyncOperation/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
Location: https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.DBforPostgreSQL/locations/westus/operationResults/e276a03a-1770-4549-86f5-0edffae8997c?api-version=2023-03-02-preview
{
  "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/TestResourceGroup/providers/Microsoft.DBforPostgreSQL/serverGroupsv2/testcluster",
  "name": "testcluster",
  "type": "Microsoft.DBforPostgreSQL/serverGroupsv2",
  "systemData": {
    "createdBy": "user1",
    "createdByType": "User",
    "createdAt": "2020-01-01T17:18:19.1234567Z",
    "lastModifiedBy": "user2",
    "lastModifiedByType": "User",
    "lastModifiedAt": "2020-01-02T17:18:19.1234567Z"
  },
  "properties": {
    "provisioningState": "Succeeded",
    "state": "Ready",
    "postgresqlVersion": "14",
    "citusVersion": "11.1",
    "maintenanceWindow": {
      "dayOfWeek": 0,
      "startHour": 8,
      "startMinute": 0,
      "customWindow": "Enabled"
    },
    "aadAuthEnabled": "disabled",
    "administratorLogin": "citus",
    "dataEncryption": {
      "type": "SystemManaged"
    },
    "passwordEnabled": "enabled",
    "preferredPrimaryZone": "1",
    "enableHa": false,
    "enableShardsOnCoordinator": false,
    "coordinatorServerEdition": "GeneralPurpose",
    "coordinatorStorageQuotaInMb": 2097152,
    "coordinatorVCores": 16,
    "coordinatorEnablePublicIpAccess": true,
    "databaseName": "citus",
    "nodeServerEdition": "MemoryOptimized",
    "nodeCount": 2,
    "nodeStorageQuotaInMb": 2097152,
    "nodeVCores": 16,
    "nodeEnablePublicIpAccess": false,
    "serverNames": [
      {
        "name": "testcluster1-c",
        "fullyQualifiedDomainName": "testcluster1-c.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w0",
        "fullyQualifiedDomainName": "testcluster1-w0.postgres.database.azure.com"
      },
      {
        "name": "testcluster1-w1",
        "fullyQualifiedDomainName": "testcluster1-w1.postgres.database.azure.com"
      }
    ],
    "sourceResourceId": null,
    "readReplicas": [],
    "earliestRestoreTime": "2020-09-14T00:00:37.467Z",
    "privateEndpointConnections": []
  },
  "location": "westus"
}

Definitions

Name Description
AadEnabledEnum

Indicates whether the cluster was created using AAD authentication.

ActiveDirectoryAuth
AuthConfig

Authentication configuration of a cluster.

Cluster

Represents a cluster.

ClusterForUpdate

Represents a cluster for update.

createdByType

The type of identity that created the resource.

DataEncryption

The data encryption properties of a cluster.

DataEncryptionType
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

IdentityProperties

Describes the identity of the cluster.

IdentityType
MaintenanceWindow

Schedule settings for regular cluster updates.

PasswordAuth
PasswordEnabledEnum

Indicates whether the cluster was created with a password or using AAD authentication.

PrivateEndpointProperty

Property to represent resource id of the private endpoint.

PrivateEndpointServiceConnectionStatus

The private endpoint connection status.

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

ServerNameItem

The name object for a server.

SimplePrivateEndpointConnection

A private endpoint connection.

systemData

Metadata pertaining to creation and last modification of the resource.

UserAssignedIdentity

User assigned identity properties

AadEnabledEnum

Indicates whether the cluster was created using AAD authentication.

Name Type Description
disabled

string

enabled

string

ActiveDirectoryAuth

Name Type Description
disabled

string

enabled

string

AuthConfig

Authentication configuration of a cluster.

Name Type Description
activeDirectoryAuth

ActiveDirectoryAuth

passwordAuth

PasswordAuth

Cluster

Represents a cluster.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

identity

IdentityProperties

Describes the identity of the cluster.

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.aadAuthEnabled

AadEnabledEnum

Indicates whether the cluster was created using AAD authentication.

properties.administratorLogin

string

The administrator's login name of the servers in the cluster.

properties.administratorLoginPassword

string

The password of the administrator login. Required for creation.

properties.authConfig

AuthConfig

Authentication configuration of a cluster.

properties.citusVersion

string

The Citus extension version on all cluster servers.

properties.coordinatorEnablePublicIpAccess

boolean

If public access is enabled on coordinator.

properties.coordinatorServerEdition

string

The edition of a coordinator server (default: GeneralPurpose). Required for creation.

properties.coordinatorStorageQuotaInMb

integer

The storage of a server in MB. Required for creation. See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.

properties.coordinatorVCores

integer

The vCores count of a server (max: 96). Required for creation. See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.

properties.dataEncryption

DataEncryption

The data encryption properties of a cluster.

properties.databaseName

string

The database name of the cluster. Only one database per cluster is supported.

properties.earliestRestoreTime

string

The earliest restore point time (ISO8601 format) for the cluster.

properties.enableGeoBackup

boolean

If cluster backup is stored in another Azure region in addition to the copy of the backup stored in the cluster's region. Enabled only at the time of cluster creation.

properties.enableHa

boolean

If high availability (HA) is enabled or not for the cluster.

properties.enableShardsOnCoordinator

boolean

If distributed tables are placed on coordinator or not. Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed.

properties.maintenanceWindow

MaintenanceWindow

Maintenance window of a cluster.

properties.nodeCount

integer

Worker node count of the cluster. When node count is 0, it represents a single node configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration. Node count value cannot be 1. Required for creation.

properties.nodeEnablePublicIpAccess

boolean

If public access is enabled on worker nodes.

properties.nodeServerEdition

string

The edition of a node server (default: MemoryOptimized).

properties.nodeStorageQuotaInMb

integer

The storage in MB on each worker node. See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.

properties.nodeVCores

integer

The compute in vCores on each worker node (max: 104). See https://learn.microsoft.com/azure/cosmos-db/postgresql/resources-compute for more information.

properties.passwordEnabled

PasswordEnabledEnum

Indicates whether the cluster was created with a password or using AAD authentication.

properties.pointInTimeUTC

string

Date and time in UTC (ISO8601 format) for cluster restore.

properties.postgresqlVersion

string

The major PostgreSQL version on all cluster servers.

properties.preferredPrimaryZone

string

Preferred primary availability zone (AZ) for all cluster servers.

properties.privateEndpointConnections

SimplePrivateEndpointConnection[]

The private endpoint connections for a cluster.

properties.provisioningState

string

Provisioning state of the cluster

properties.readReplicas

string[]

The array of read replica clusters.

properties.serverNames

ServerNameItem[]

The list of server names in the cluster

properties.sourceLocation

string

The Azure region of source cluster for read replica clusters.

properties.sourceResourceId

string

The resource id of source cluster for read replica clusters.

properties.state

string

A state of a cluster/server that is visible to user.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

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

ClusterForUpdate

Represents a cluster for update.

Name Type Description
identity

IdentityProperties

Describes the identity of the cluster.

properties.administratorLoginPassword

string

The password of the administrator login. Each cluster is created with pre-defined administrative role called ‘citus’. 

properties.citusVersion

string

The Citus extension version on all cluster servers.

properties.coordinatorEnablePublicIpAccess

boolean

If public access is enabled on coordinator.

properties.coordinatorServerEdition

string

The edition of the coordinator (default: GeneralPurpose).

properties.coordinatorStorageQuotaInMb

integer

The storage of the coordinator in MB.

properties.coordinatorVCores

integer

The vCores count of the coordinator (max: 96).

properties.enableHa

boolean

If high availability (HA) is enabled or not for the cluster.

properties.enableShardsOnCoordinator

boolean

If distributed tables are placed on coordinator or not. Should be set to 'true' on single node clusters. Requires shard rebalancing after value is changed.

properties.maintenanceWindow

MaintenanceWindow

Maintenance window of a cluster.

properties.nodeCount

integer

Worker node count of the cluster. When node count is 0, it represents a single node configuration with the ability to create distributed tables on that node. 2 or more worker nodes represent multi-node configuration. Node count value cannot be 1.

properties.nodeEnablePublicIpAccess

boolean

If public access is enabled on worker nodes.

properties.nodeServerEdition

string

The edition of a node (default: MemoryOptimized).

properties.nodeStorageQuotaInMb

integer

The storage in MB on each worker node.

properties.nodeVCores

integer

The compute in vCores on each worker node (max: 104).

properties.postgresqlVersion

string

The major PostgreSQL version on all cluster servers.

properties.preferredPrimaryZone

string

Preferred primary availability zone (AZ) for all cluster servers.

tags

object

Application-specific metadata in the form of key-value pairs.

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DataEncryption

The data encryption properties of a cluster.

Name Type Description
primaryKeyUri

string

URI for the key in keyvault for data encryption of the primary server.

primaryUserAssignedIdentityId

string

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

type

DataEncryptionType

DataEncryptionType

Name Type Description
AzureKeyVault

string

SystemAssigned

string

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.

IdentityProperties

Describes the identity of the cluster.

Name Type Description
type

IdentityType

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

IdentityType

Name Type Description
SystemAssigned

string

UserAssigned

string

MaintenanceWindow

Schedule settings for regular cluster updates.

Name Type Description
customWindow

string

Indicates whether custom maintenance window is enabled or not.

dayOfWeek

integer

Preferred day of the week for maintenance window.

startHour

integer

Start hour within preferred day of the week for maintenance window.

startMinute

integer

Start minute within the start hour for maintenance window.

PasswordAuth

Name Type Description
disabled

string

enabled

string

PasswordEnabledEnum

Indicates whether the cluster was created with a password or using AAD authentication.

Name Type Description
disabled

string

enabled

string

PrivateEndpointProperty

Property to represent resource id of the private endpoint.

Name Type Description
id

string

Resource id of the private endpoint.

PrivateEndpointServiceConnectionStatus

The private endpoint connection status.

Name Type Description
Approved

string

Pending

string

Rejected

string

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

Name Type Description
actionsRequired

string

A message indicating if changes on the service provider require any updates on the consumer.

description

string

The reason for approval/rejection of the connection.

status

PrivateEndpointServiceConnectionStatus

Indicates whether the connection has been Approved/Rejected/Removed by the owner of the service.

ServerNameItem

The name object for a server.

Name Type Description
fullyQualifiedDomainName

string

The fully qualified domain name of a server.

name

string

The name of a server.

SimplePrivateEndpointConnection

A private endpoint connection.

Name Type Description
id

string

Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}"

name

string

The name of the resource

properties.groupIds

string[]

Group ids of the private endpoint connection.

properties.privateEndpoint

PrivateEndpointProperty

Private endpoint which the connection belongs to.

properties.privateLinkServiceConnectionState

PrivateLinkServiceConnectionState

A collection of information about the state of the connection between service consumer and provider.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

type

string

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

systemData

Metadata pertaining to creation and last modification of the 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

User assigned identity properties

Name Type Description
clientId

string

The client ID of the assigned identity.

principalId

string

The principal ID of the assigned identity.