Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@
"$ref": "#/definitions/ActiveDirectoryAdministrator"
}
},
"202": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

202

PUT MUST not return a 202

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In our RP we have a lot of PUT operations that return 202. We'll fix it later, but for now we need to keep 202 in this API, and we've had this issue before: #21234 (review)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rkmanda looped you in the chat history we had earlier with Tim during earlier review regarding PUT calls returning 202.

"description": "Accepted"
},
"default": {
"description": "Error response describing why the operation failed.",
"schema": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,10 @@
"x-ms-mutability": [
"update"
]
},
"replicationRole": {
"$ref": "#/definitions/ReplicationRole",
"description": "Replication role of the server"
}
}
},
Expand Down Expand Up @@ -811,6 +815,7 @@
"type": "string",
"description": "Used to indicate role of the server in replication set.",
"enum": [
"None",
"Primary",
"Secondary",
"WalReplica",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
{
"swagger": "2.0",
"info": {
"title": "PostgreSQLServerManagementClient",
"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.",
"version": "2022-03-08-preview"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
],
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 Flow",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"paths": {
"/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": "./FlexibleServers.json#/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
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"name": "[email protected]",
"type": "Microsoft.DBforPostgreSQL/flexibleServers/administrators"
}
}
},
"202": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"parameters": {
"serverName": "sourcepgservername",
"resourceGroupName": "testrg",
"api-version": "2022-03-08-preview",
"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"
}
]
}
}
}
}
1 change: 1 addition & 0 deletions specification/postgresql/resource-manager/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ input-file:
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/FlexibleServers.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/Operations.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/PrivateDnsZone.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/Replicas.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/VirtualNetwork.json
- Microsoft.DBforPostgreSQL/preview/2022-03-08-preview/ServerStartStopRestart.json
```
Expand Down