diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json index f020335a6460..c5dbe29fbba8 100644 --- a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json @@ -361,6 +361,51 @@ "nextLinkName": "nextLink" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas": { + "get": { + "tags": [ + "Replicas" + ], + "operationId": "Replicas_ListByServer", + "x-ms-examples": { + "ReplicasListByServer": { + "$ref": "./examples/ReplicasListByServer.json" + } + }, + "description": "List all the replicas for a given server.", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "./common-types.json#/parameters/ServerNameParameter" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/ServerListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + } + } } }, "definitions": { @@ -630,6 +675,10 @@ "x-ms-mutability": [ "update" ] + }, + "replicationRole": { + "$ref": "#/definitions/ReplicationRole", + "description": "Replication role of the server" } } }, @@ -811,6 +860,7 @@ "type": "string", "description": "Used to indicate role of the server in replication set.", "enum": [ + "None", "Primary", "Secondary", "WalReplica", diff --git a/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/examples/ReplicasListByServer.json b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/examples/ReplicasListByServer.json new file mode 100644 index 000000000000..9fa28b649ed9 --- /dev/null +++ b/specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/examples/ReplicasListByServer.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "serverName": "testserver-master", + "resourceGroupName": "TestGroup_WestCentralUS", + "api-version": "2017-12-01", + "subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Standard_D4s_v3", + "tier": "GeneralPurpose" + }, + "properties": { + "fullyQualifiedDomainName": "pgtestsvc5rep.postgres.database.azure.com", + "version": "12", + "minorVersion": "6", + "administratorLogin": "cloudsa", + "state": "Ready", + "availabilityZone": "2", + "storage": { + "storageSizeGB": 512 + }, + "dataEncryption": { + "type": "SystemManaged" + }, + "authConfig": { + "activeDirectoryAuthEnabled": false + }, + "backup": { + "backupRetentionDays": 7, + "geoRedundantBackup": "Disabled", + "earliestRestoreDate": "2021-05-27T00:28:17.7279547+00:00" + }, + "network": { + "publicNetworkAccess": "Enabled" + }, + "highAvailability": { + "mode": "Disabled", + "state": "NotEnabled" + }, + "maintenanceWindow": { + "customWindow": "Disabled", + "dayOfWeek": 0, + "startHour": 0, + "startMinute": 0 + }, + "replicationRole": "AsyncReplica", + "replicaCapacity": 0 + }, + "location": "westus", + "tags": { + "ElasticServer": "1" + }, + "id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5rep", + "name": "pgtestsvc5rep", + "type": "Microsoft.DBforPostgreSQL/flexibleServers" + } + ] + } + } + } +}