Skip to content

Commit 269d6e2

Browse files
authored
Adding iperf APIs (#14714)
* Adding iperf APIs * Addressing review comments * Addressing PR comments * Removing APIs unimplemented in Sterling * Fixing resource schemas * Fixing linting errors
1 parent 0c05756 commit 269d6e2

File tree

11 files changed

+1293
-0
lines changed

11 files changed

+1293
-0
lines changed
Lines changed: 341 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,341 @@
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": "2021-06-01-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}/advisors/{advisorName}": {
38+
"get": {
39+
"tags": [
40+
"Advisors"
41+
],
42+
"operationId": "Advisors_Get",
43+
"x-ms-examples": {
44+
"AdvisorsGet": {
45+
"$ref": "./examples/AdvisorsGet.json"
46+
}
47+
},
48+
"description": "Get a recommendation action advisor.",
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/AdvisorNameParameter"
64+
}
65+
],
66+
"responses": {
67+
"200": {
68+
"description": "OK",
69+
"schema": {
70+
"$ref": "#/definitions/Advisor"
71+
}
72+
},
73+
"default": {
74+
"description": "Error response describing why the operation failed.",
75+
"schema": {
76+
"$ref": "#/definitions/CloudError"
77+
}
78+
}
79+
}
80+
}
81+
},
82+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors": {
83+
"get": {
84+
"tags": [
85+
"Advisors"
86+
],
87+
"operationId": "Advisors_ListByServer",
88+
"x-ms-examples": {
89+
"AdvisorsListByServer": {
90+
"$ref": "./examples/AdvisorsListByServer.json"
91+
}
92+
},
93+
"description": "List recommendation action advisors.",
94+
"parameters": [
95+
{
96+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
97+
},
98+
{
99+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
100+
},
101+
{
102+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
103+
},
104+
{
105+
"$ref": "#/parameters/ServerNameParameter"
106+
}
107+
],
108+
"responses": {
109+
"200": {
110+
"description": "OK",
111+
"schema": {
112+
"$ref": "#/definitions/AdvisorsResultList"
113+
}
114+
},
115+
"default": {
116+
"description": "Error response describing why the operation failed.",
117+
"schema": {
118+
"$ref": "#/definitions/CloudError"
119+
}
120+
}
121+
},
122+
"x-ms-pageable": {
123+
"nextLinkName": "nextLink"
124+
}
125+
}
126+
},
127+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DBforPostgreSQL/flexibleServers/{serverName}/advisors/{advisorName}/recommendedActions": {
128+
"get": {
129+
"tags": [
130+
"RecommendedActions"
131+
],
132+
"operationId": "RecommendedActions_ListByServer",
133+
"x-ms-examples": {
134+
"RecommendedActionsListByServer": {
135+
"$ref": "./examples/RecommendedActionsListByServer.json"
136+
}
137+
},
138+
"description": "Retrieve recommended actions from the advisor.",
139+
"parameters": [
140+
{
141+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ApiVersionParameter"
142+
},
143+
{
144+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/SubscriptionIdParameter"
145+
},
146+
{
147+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/parameters/ResourceGroupNameParameter"
148+
},
149+
{
150+
"$ref": "#/parameters/ServerNameParameter"
151+
},
152+
{
153+
"$ref": "#/parameters/AdvisorNameParameter"
154+
},
155+
{
156+
"name": "sessionId",
157+
"in": "query",
158+
"required": false,
159+
"type": "string",
160+
"description": "The recommendation action session identifier."
161+
}
162+
],
163+
"responses": {
164+
"200": {
165+
"description": "OK",
166+
"schema": {
167+
"$ref": "#/definitions/RecommendationActionsResultList"
168+
}
169+
},
170+
"default": {
171+
"description": "Error response describing why the operation failed.",
172+
"schema": {
173+
"$ref": "#/definitions/CloudError"
174+
}
175+
}
176+
},
177+
"x-ms-pageable": {
178+
"nextLinkName": "nextLink"
179+
}
180+
}
181+
}
182+
},
183+
"definitions": {
184+
"AdvisorProperties": {
185+
"type": "object",
186+
"properties": {},
187+
"description": "The properties of a recommendation action advisor."
188+
},
189+
"Advisor": {
190+
"type": "object",
191+
"properties": {
192+
"properties": {
193+
"$ref": "#/definitions/AdvisorProperties",
194+
"x-ms-client-flatten": true,
195+
"description": "The properties of a recommendation action advisor."
196+
}
197+
},
198+
"allOf": [
199+
{
200+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
201+
}
202+
],
203+
"readOnly": true,
204+
"description": "Represents a recommendation action advisor."
205+
},
206+
"AdvisorsResultList": {
207+
"description": "A list of query statistics.",
208+
"type": "object",
209+
"properties": {
210+
"value": {
211+
"description": "The list of recommendation action advisors.",
212+
"type": "array",
213+
"items": {
214+
"$ref": "#/definitions/Advisor"
215+
},
216+
"readOnly": true
217+
},
218+
"nextLink": {
219+
"description": "Link to retrieve next page of results.",
220+
"type": "string",
221+
"readOnly": true
222+
}
223+
}
224+
},
225+
"RecommendationActionProperties": {
226+
"type": "object",
227+
"properties": {
228+
"advisorName": {
229+
"type": "string",
230+
"description": "Advisor name."
231+
},
232+
"sessionId": {
233+
"type": "string",
234+
"description": "Recommendation action session identifier."
235+
},
236+
"actionId": {
237+
"type": "integer",
238+
"format": "int32",
239+
"description": "Recommendation action identifier."
240+
},
241+
"createdTime": {
242+
"type": "string",
243+
"format": "date-time",
244+
"description": "Recommendation action creation time."
245+
},
246+
"expirationTime": {
247+
"type": "string",
248+
"format": "date-time",
249+
"description": "Recommendation action expiration time."
250+
},
251+
"reason": {
252+
"type": "string",
253+
"description": "Recommendation action reason."
254+
},
255+
"recommendationType": {
256+
"type": "string",
257+
"description": "Recommendation action type."
258+
},
259+
"details": {
260+
"type": "object",
261+
"additionalProperties": {
262+
"type": "string"
263+
},
264+
"description": "Recommendation action details."
265+
}
266+
},
267+
"description": "The properties of a recommendation action."
268+
},
269+
"RecommendationAction": {
270+
"type": "object",
271+
"properties": {
272+
"properties": {
273+
"$ref": "#/definitions/RecommendationActionProperties",
274+
"x-ms-client-flatten": true,
275+
"description": "The properties of a recommendation action."
276+
}
277+
},
278+
"allOf": [
279+
{
280+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ProxyResource"
281+
}
282+
],
283+
"readOnly": true,
284+
"description": "Represents a Recommendation Action."
285+
},
286+
"RecommendationActionsResultList": {
287+
"description": "A list of recommendation actions.",
288+
"type": "object",
289+
"properties": {
290+
"value": {
291+
"description": "The list of recommendation action advisors.",
292+
"type": "array",
293+
"items": {
294+
"$ref": "#/definitions/RecommendationAction"
295+
},
296+
"readOnly": true
297+
},
298+
"nextLink": {
299+
"description": "Link to retrieve next page of results.",
300+
"type": "string",
301+
"readOnly": true
302+
}
303+
}
304+
},
305+
"CloudError": {
306+
"x-ms-external": true,
307+
"properties": {
308+
"error": {
309+
"$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/ErrorResponse"
310+
}
311+
},
312+
"description": "An error response from the Batch service."
313+
}
314+
},
315+
"parameters": {
316+
"ServerNameParameter": {
317+
"name": "serverName",
318+
"in": "path",
319+
"description": "The name of the server.",
320+
"required": true,
321+
"type": "string",
322+
"x-ms-parameter-location": "method"
323+
},
324+
"AdvisorNameParameter": {
325+
"name": "advisorName",
326+
"in": "path",
327+
"required": true,
328+
"type": "string",
329+
"description": "The advisor name for recommendation action.",
330+
"x-ms-parameter-location": "method"
331+
},
332+
"RecommendedActionNameParameter": {
333+
"name": "recommendedActionName",
334+
"in": "path",
335+
"required": true,
336+
"type": "string",
337+
"description": "The recommended action name.",
338+
"x-ms-parameter-location": "method"
339+
}
340+
}
341+
}

0 commit comments

Comments
 (0)