Skip to content

Commit 4a9bebc

Browse files
Microsoft.DBForPostgreSQL/Flexible servers 2022-01-20-preview (#18882)
* Adds base for updating Microsoft.DBforPostgreSQL from version stable/2021-06-01 to version 2022-01-20-preview * Updates readme * Updates API version in new specs and examples * 2022-01-20-preview onboarding. * Updated as per comments. * Fix the supported HA mode cross version breaking change * Add "x-ms-identifiers" * Fix XmsIdentifierValidation * Added subscription and location properties for Delegated subnet usage. * add missing type object . * Fix prettier check and model validation errors. * Fix for MissingTypeObject
1 parent d3ae1c0 commit 4a9bebc

36 files changed

+12202
-23
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,319 @@
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-01-20-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}/databases/{databaseName}": {
38+
"put": {
39+
"tags": [
40+
"Databases"
41+
],
42+
"operationId": "Databases_Create",
43+
"x-ms-examples": {
44+
"Create a database": {
45+
"$ref": "./examples/DatabaseCreate.json"
46+
}
47+
},
48+
"description": "Creates a new database or updates an existing database.",
49+
"parameters": [
50+
{
51+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
52+
},
53+
{
54+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
55+
},
56+
{
57+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
58+
},
59+
{
60+
"$ref": "#/parameters/ServerNameParameter"
61+
},
62+
{
63+
"$ref": "#/parameters/DatabaseNameParameter"
64+
},
65+
{
66+
"name": "parameters",
67+
"in": "body",
68+
"required": true,
69+
"schema": {
70+
"$ref": "#/definitions/Database"
71+
},
72+
"description": "The required parameters for creating or updating a database."
73+
}
74+
],
75+
"responses": {
76+
"200": {
77+
"description": "OK",
78+
"schema": {
79+
"$ref": "#/definitions/Database"
80+
}
81+
},
82+
"201": {
83+
"description": "Created",
84+
"schema": {
85+
"$ref": "#/definitions/Database"
86+
}
87+
},
88+
"202": {
89+
"description": "Accepted"
90+
},
91+
"default": {
92+
"description": "Error response describing why the operation failed.",
93+
"schema": {
94+
"$ref": "#/definitions/CloudError"
95+
}
96+
}
97+
},
98+
"x-ms-long-running-operation": true
99+
},
100+
"delete": {
101+
"tags": [
102+
"Databases"
103+
],
104+
"operationId": "Databases_Delete",
105+
"x-ms-examples": {
106+
"Delete a database": {
107+
"$ref": "./examples/DatabaseDelete.json"
108+
}
109+
},
110+
"description": "Deletes a database.",
111+
"parameters": [
112+
{
113+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
114+
},
115+
{
116+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
117+
},
118+
{
119+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
120+
},
121+
{
122+
"$ref": "#/parameters/ServerNameParameter"
123+
},
124+
{
125+
"$ref": "#/parameters/DatabaseNameParameter"
126+
}
127+
],
128+
"responses": {
129+
"200": {
130+
"description": "OK"
131+
},
132+
"202": {
133+
"description": "Accepted"
134+
},
135+
"204": {
136+
"description": "NoContent"
137+
},
138+
"default": {
139+
"description": "Error response describing why the operation failed.",
140+
"schema": {
141+
"$ref": "#/definitions/CloudError"
142+
}
143+
}
144+
},
145+
"x-ms-long-running-operation": true
146+
},
147+
"get": {
148+
"tags": [
149+
"Databases"
150+
],
151+
"operationId": "Databases_Get",
152+
"x-ms-examples": {
153+
"Get a database": {
154+
"$ref": "./examples/DatabaseGet.json"
155+
}
156+
},
157+
"description": "Gets information about a database.",
158+
"parameters": [
159+
{
160+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
161+
},
162+
{
163+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
164+
},
165+
{
166+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
167+
},
168+
{
169+
"$ref": "#/parameters/ServerNameParameter"
170+
},
171+
{
172+
"$ref": "#/parameters/DatabaseNameParameter"
173+
}
174+
],
175+
"responses": {
176+
"200": {
177+
"description": "OK",
178+
"schema": {
179+
"$ref": "#/definitions/Database"
180+
}
181+
},
182+
"default": {
183+
"description": "Error response describing why the operation failed.",
184+
"schema": {
185+
"$ref": "#/definitions/CloudError"
186+
}
187+
}
188+
}
189+
}
190+
},
191+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/databases": {
192+
"get": {
193+
"tags": [
194+
"Databases"
195+
],
196+
"operationId": "Databases_ListByServer",
197+
"x-ms-examples": {
198+
"List databases in a server": {
199+
"$ref": "./examples/DatabasesListByServer.json"
200+
}
201+
},
202+
"description": "List all the databases in a given server.",
203+
"parameters": [
204+
{
205+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
206+
},
207+
{
208+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
209+
},
210+
{
211+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
212+
},
213+
{
214+
"$ref": "#/parameters/ServerNameParameter"
215+
}
216+
],
217+
"responses": {
218+
"200": {
219+
"description": "OK",
220+
"schema": {
221+
"$ref": "#/definitions/DatabaseListResult"
222+
}
223+
},
224+
"default": {
225+
"description": "Error response describing why the operation failed.",
226+
"schema": {
227+
"$ref": "#/definitions/CloudError"
228+
}
229+
}
230+
},
231+
"x-ms-pageable": {
232+
"nextLinkName": "nextLink"
233+
}
234+
}
235+
}
236+
},
237+
"definitions": {
238+
"DatabaseProperties": {
239+
"type": "object",
240+
"properties": {
241+
"charset": {
242+
"type": "string",
243+
"description": "The charset of the database."
244+
},
245+
"collation": {
246+
"type": "string",
247+
"description": "The collation of the database."
248+
}
249+
},
250+
"description": "The properties of a database."
251+
},
252+
"Database": {
253+
"type": "object",
254+
"properties": {
255+
"properties": {
256+
"$ref": "#/definitions/DatabaseProperties",
257+
"x-ms-client-flatten": true,
258+
"description": "The properties of a database."
259+
},
260+
"systemData": {
261+
"$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData",
262+
"readOnly": true,
263+
"description": "The system metadata relating to this resource."
264+
}
265+
},
266+
"allOf": [
267+
{
268+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
269+
}
270+
],
271+
"description": "Represents a Database."
272+
},
273+
"DatabaseListResult": {
274+
"type": "object",
275+
"properties": {
276+
"value": {
277+
"type": "array",
278+
"items": {
279+
"$ref": "#/definitions/Database"
280+
},
281+
"description": "The list of databases housed in a server"
282+
},
283+
"nextLink": {
284+
"description": "The link used to get the next page of databases.",
285+
"type": "string"
286+
}
287+
},
288+
"description": "A List of databases."
289+
},
290+
"CloudError": {
291+
"type": "object",
292+
"x-ms-external": true,
293+
"properties": {
294+
"error": {
295+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
296+
}
297+
},
298+
"description": "An error response from the Batch service."
299+
}
300+
},
301+
"parameters": {
302+
"ServerNameParameter": {
303+
"name": "serverName",
304+
"in": "path",
305+
"description": "The name of the server.",
306+
"required": true,
307+
"type": "string",
308+
"x-ms-parameter-location": "method"
309+
},
310+
"DatabaseNameParameter": {
311+
"name": "databaseName",
312+
"in": "path",
313+
"required": true,
314+
"type": "string",
315+
"description": "The name of the database.",
316+
"x-ms-parameter-location": "method"
317+
}
318+
}
319+
}

0 commit comments

Comments
 (0)