You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/postgresql/flexible-server/how-to-read-replicas-portal.md
+104-5Lines changed: 104 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Learn how to manage read replicas for Azure Database for PostgreSQL
4
4
author: AlicjaKucharczyk
5
5
ms.author: alkuchar
6
6
ms.reviewer: maghan
7
-
ms.date: 01/17/2024
7
+
ms.date: 04/02/2024
8
8
ms.service: postgresql
9
9
ms.subservice: flexible-server
10
10
ms.custom: ignite-2023, devx-track-azurecli
@@ -337,10 +337,21 @@ az postgres flexible-server replica create \
337
337
338
338
Replace `<replica-name>`, `<resource-group>`, `<source-server-name>` and `<location>` with your specific values.
339
339
340
+
After the read replica is created, the properties of all servers which are replicas of a primary replica can be obtained by using the [`az postgres flexible-server replica create`](/cli/azure/postgres/flexible-server/replica#az-postgres-flexible-server-replica-list) command.
341
+
342
+
```azurecli-interactive
343
+
az postgres flexible-server replica list \
344
+
--name <source-server-name> \
345
+
--resource-group <resource-group>
346
+
```
347
+
348
+
Replace `<source-server-name>`, and `<resource-group>` with your specific values.
349
+
350
+
340
351
341
352
#### [REST API](#tab/restapi)
342
353
343
-
Initiate an `HTTP PUT` request by using the [create API](/rest/api/postgresql/flexibleserver/servers/create):
354
+
Initiate an `HTTP PUT` request by using the [servers create API](/rest/api/postgresql/flexibleserver/servers/create):
344
355
345
356
```http
346
357
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{replicaserverName}?api-version=2022-12-01
@@ -358,6 +369,94 @@ Here, you need to replace `{subscriptionId}`, `{resourceGroupName}`, and `{repli
358
369
}
359
370
```
360
371
372
+
After the read replica is created, the properties of all servers which are replicas of a primary replica can be obtained by initiating an `HTTP GET` request by using [replicas list by server API](/rest/api/postgresql/flexibleserver/replicas/list-by-server):
373
+
374
+
```http
375
+
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{sourceserverName}/replicas?api-version=2022-12-01
376
+
```
377
+
378
+
Here, you need to replace `{subscriptionId}`, `{resourceGroupName}`, and `{sourceserverName}` with your specific Azure subscription ID, the name of your resource group, and the name you assigned to your primary replica, respectively.
@@ -675,7 +774,7 @@ Replace `<resource-group>`, `<source-server-name>` and `<location>` with your sp
675
774
676
775
#### [REST API](#tab/restapi)
677
776
678
-
You can create a secondary read replica by using the [create API](/rest/api/postgresql/flexibleserver/servers/create):
777
+
You can create a secondary read replica by using the [servers create API](/rest/api/postgresql/flexibleserver/servers/create):
679
778
680
779
```http
681
780
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBForPostgreSql/flexibleServers/{replicaserverName}?api-version=2022-12-01
@@ -891,7 +990,7 @@ az postgres flexible-server delete \
891
990
Replace `<resource-group>` and `<server-name>` with the name of your resource group name and the replica server name you wish to delete.
892
991
893
992
#### [REST API](#tab/restapi)
894
-
To delete a primary or replica server, use the [delete API](/rest/api/postgresql/flexibleserver/servers/delete). If server has read replicas then read replicas should be deleted first before deleting the primary server.
993
+
To delete a primary or replica server, use the [servers delete API](/rest/api/postgresql/flexibleserver/servers/delete). If server has read replicas then read replicas should be deleted first before deleting the primary server.
@@ -929,7 +1028,7 @@ az postgres flexible-server delete \
929
1028
Replace `<resource-group>` and `<server-name>` with the name of your resource group name and the primary server name you wish to delete.
930
1029
931
1030
#### [REST API](#tab/restapi)
932
-
To delete a primary or replica server, use the [delete API](/rest/api/postgresql/flexibleserver/servers/delete). If server has read replicas then read replicas should be deleted first before deleting the primary server.
1031
+
To delete a primary or replica server, use the [servers delete API](/rest/api/postgresql/flexibleserver/servers/delete). If server has read replicas then read replicas should be deleted first before deleting the primary server.
0 commit comments