Skip to content

Commit be6862b

Browse files
alanenriqueoanandanthony
authored andcommitted
Add Replicas_ListByServer to postgres flexible server 2022-03-08-preview (Azure#21424)
* Add Replicas_ListByServer to postgres package-flexibleserver-2022-03-preview * Fix lintDiff * Fix lintDiff * Move Replicas_ListByServer to Replicas.json * Add 202 response to Administrators_Create
1 parent d5ce62d commit be6862b

File tree

6 files changed

+160
-1
lines changed

6 files changed

+160
-1
lines changed

specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/Administrators.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@
8585
"$ref": "#/definitions/ActiveDirectoryAdministrator"
8686
}
8787
},
88+
"202": {
89+
"description": "Accepted"
90+
},
8891
"default": {
8992
"description": "Error response describing why the operation failed.",
9093
"schema": {

specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -630,6 +630,10 @@
630630
"x-ms-mutability": [
631631
"update"
632632
]
633+
},
634+
"replicationRole": {
635+
"$ref": "#/definitions/ReplicationRole",
636+
"description": "Replication role of the server"
633637
}
634638
}
635639
},
@@ -811,6 +815,7 @@
811815
"type": "string",
812816
"description": "Used to indicate role of the server in replication set.",
813817
"enum": [
818+
"None",
814819
"Primary",
815820
"Secondary",
816821
"WalReplica",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "PostgreSQLServerManagementClient",
5+
"description": "The Microsoft Azure management API provides create, read, update, and delete functionality for Azure PostgreSQL resources including servers, databases, firewall rules, VNET rules, security alert policies, log files and configurations with new business model.",
6+
"version": "2022-03-08-preview"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"security": [
19+
{
20+
"azure_auth": [
21+
"user_impersonation"
22+
]
23+
}
24+
],
25+
"securityDefinitions": {
26+
"azure_auth": {
27+
"type": "oauth2",
28+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
29+
"flow": "implicit",
30+
"description": "Azure Active Directory OAuth2 Flow",
31+
"scopes": {
32+
"user_impersonation": "impersonate your user account"
33+
}
34+
}
35+
},
36+
"paths": {
37+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/replicas": {
38+
"get": {
39+
"tags": [
40+
"Replicas"
41+
],
42+
"operationId": "Replicas_ListByServer",
43+
"x-ms-examples": {
44+
"ReplicasListByServer": {
45+
"$ref": "./examples/ReplicasListByServer.json"
46+
}
47+
},
48+
"description": "List all the replicas for a given server.",
49+
"parameters": [
50+
{
51+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter"
52+
},
53+
{
54+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter"
55+
},
56+
{
57+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter"
58+
},
59+
{
60+
"$ref": "./common-types.json#/parameters/ServerNameParameter"
61+
}
62+
],
63+
"responses": {
64+
"200": {
65+
"description": "OK",
66+
"schema": {
67+
"$ref": "./FlexibleServers.json#/definitions/ServerListResult"
68+
}
69+
},
70+
"default": {
71+
"description": "Error response describing why the operation failed.",
72+
"schema": {
73+
"$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse"
74+
}
75+
}
76+
},
77+
"x-ms-pageable": {
78+
"nextLinkName": null
79+
}
80+
}
81+
}
82+
}
83+
}

specification/postgresql/resource-manager/Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/examples/AdministratorAdd.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"name": "[email protected]",
3838
"type": "Microsoft.DBforPostgreSQL/flexibleServers/administrators"
3939
}
40-
}
40+
},
41+
"202": {}
4142
}
4243
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{
2+
"parameters": {
3+
"serverName": "sourcepgservername",
4+
"resourceGroupName": "testrg",
5+
"api-version": "2022-03-08-preview",
6+
"subscriptionId": "ffffffff-ffff-ffff-ffff-ffffffffffff"
7+
},
8+
"responses": {
9+
"200": {
10+
"body": {
11+
"value": [
12+
{
13+
"sku": {
14+
"name": "Standard_D4s_v3",
15+
"tier": "GeneralPurpose"
16+
},
17+
"properties": {
18+
"fullyQualifiedDomainName": "pgtestsvc5rep.postgres.database.azure.com",
19+
"version": "12",
20+
"minorVersion": "6",
21+
"administratorLogin": "cloudsa",
22+
"state": "Ready",
23+
"availabilityZone": "2",
24+
"storage": {
25+
"storageSizeGB": 512
26+
},
27+
"dataEncryption": {
28+
"type": "SystemManaged"
29+
},
30+
"authConfig": {
31+
"activeDirectoryAuthEnabled": false
32+
},
33+
"backup": {
34+
"backupRetentionDays": 7,
35+
"geoRedundantBackup": "Disabled",
36+
"earliestRestoreDate": "2021-05-27T00:28:17.7279547+00:00"
37+
},
38+
"network": {
39+
"publicNetworkAccess": "Enabled"
40+
},
41+
"highAvailability": {
42+
"mode": "Disabled",
43+
"state": "NotEnabled"
44+
},
45+
"maintenanceWindow": {
46+
"customWindow": "Disabled",
47+
"dayOfWeek": 0,
48+
"startHour": 0,
49+
"startMinute": 0
50+
},
51+
"replicationRole": "AsyncReplica",
52+
"replicaCapacity": 0
53+
},
54+
"location": "westus",
55+
"tags": {
56+
"ElasticServer": "1"
57+
},
58+
"id": "/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/resourceGroups/testrg/providers/Microsoft.DBforPostgreSQL/flexibleServers/pgtestsvc5rep",
59+
"name": "pgtestsvc5rep",
60+
"type": "Microsoft.DBforPostgreSQL/flexibleServers"
61+
}
62+
]
63+
}
64+
}
65+
}
66+
}

specification/postgresql/resource-manager/readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ input-file:
5656
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json
5757
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/Operations.json
5858
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/PrivateDnsZone.json
59+
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/Replicas.json
5960
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/VirtualNetwork.json
6061
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/ServerStartStopRestart.json
6162
```

0 commit comments

Comments
 (0)