Skip to content

Commit e758e0c

Browse files
feat)Gateway): Adding gateway config resource (#28478)
* added gateway config resource * removing Head gateway Config call * updates * resolving errors * trying to resolve more model validations * resolving some model validations * resolving model validations * resoloving delete example errors * Swagger Prettier * prettier * updating so patch has same response as get and put * removing path for gateway config * addressing comment * addressing comments * nit * path updatess * updating as per comments * Adding workspaceLinks * resolving some of the errors * resolved some errors * resolving some of the errors * resolving some more errors * npx prettier * addressing comments * updated based on comments * lint updates * nit updates --------- Co-authored-by: Samir Solanki <samirsolanki@outlook.com>
1 parent 18bed31 commit e758e0c

11 files changed

Lines changed: 775 additions & 1 deletion

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2023-09-01-preview/apimanagement.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,18 @@
364364
"type": "string",
365365
"description": "The name of the API Management gateway.",
366366
"minLength": 1,
367-
"maxLength": 50,
367+
"maxLength": 45,
368+
"pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
369+
"x-ms-parameter-location": "method"
370+
},
371+
"ConfigConnectionNameParameter": {
372+
"name": "configConnectionName",
373+
"in": "path",
374+
"required": true,
375+
"type": "string",
376+
"description": "The name of the API Management gateway config connection.",
377+
"minLength": 1,
378+
"maxLength": 30,
368379
"pattern": "^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$",
369380
"x-ms-parameter-location": "method"
370381
},
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,337 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "ApiManagementClient",
5+
"description": "Use these REST APIs to manage Azure API Management gateway config connections deployments.",
6+
"version": "2023-09-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.ApiManagement/gateways/{gatewayName}/configConnections": {
38+
"get": {
39+
"tags": [
40+
"ApiManagementGatewayConfigConnection"
41+
],
42+
"operationId": "ApiManagementGatewayConfigConnection_ListByGateway",
43+
"description": "List all API Management gateway config connections within a gateway.",
44+
"x-ms-examples": {
45+
"ApiManagementListGatewayConfigConnection": {
46+
"$ref": "./examples/ApiManagementListGatewayConfigConnection.json"
47+
}
48+
},
49+
"parameters": [
50+
{
51+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
52+
},
53+
{
54+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
55+
},
56+
{
57+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
58+
},
59+
{
60+
"$ref": "./apimanagement.json#/parameters/GatewayNameParameter"
61+
}
62+
],
63+
"responses": {
64+
"200": {
65+
"description": "The API Management gateway config connection list.",
66+
"schema": {
67+
"$ref": "#/definitions/ApiManagementGatewayConfigConnectionListResult"
68+
}
69+
},
70+
"default": {
71+
"description": "Error response describing why the operation failed.",
72+
"schema": {
73+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
74+
}
75+
}
76+
},
77+
"x-ms-pageable": {
78+
"nextLinkName": "nextLink"
79+
}
80+
}
81+
},
82+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/gateways/{gatewayName}/configConnections/{configConnectionName}": {
83+
"get": {
84+
"tags": [
85+
"ApiManagementGatewayConfigConnection"
86+
],
87+
"operationId": "ApiManagementGatewayConfigConnection_Get",
88+
"description": "Gets an API Management gateway config connection resource description.",
89+
"x-ms-examples": {
90+
"ApiManagementGetGatewayConfigConnection": {
91+
"$ref": "./examples/ApiManagementGetGatewayConfigConnection.json"
92+
}
93+
},
94+
"parameters": [
95+
{
96+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
97+
},
98+
{
99+
"$ref": "./apimanagement.json#/parameters/GatewayNameParameter"
100+
},
101+
{
102+
"$ref": "./apimanagement.json#/parameters/ConfigConnectionNameParameter"
103+
},
104+
{
105+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
106+
},
107+
{
108+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
109+
}
110+
],
111+
"responses": {
112+
"200": {
113+
"description": "Successfully got the API Management gateway config connection resource.",
114+
"schema": {
115+
"$ref": "#/definitions/ApiManagementGatewayConfigConnectionResource"
116+
}
117+
},
118+
"default": {
119+
"description": "Error response describing why the operation failed.",
120+
"schema": {
121+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
122+
}
123+
}
124+
}
125+
},
126+
"put": {
127+
"tags": [
128+
"ApiManagementGatewayConfigConnection"
129+
],
130+
"operationId": "ApiManagementGatewayConfigConnection_CreateOrUpdate",
131+
"description": "Creates or updates an API Management gateway config connection. This is long running operation and could take several minutes to complete.",
132+
"x-ms-examples": {
133+
"ApiManagementCreateGatewayConfigConnection": {
134+
"$ref": "./examples/ApiManagementCreateGatewayConfigConnection.json"
135+
}
136+
},
137+
"parameters": [
138+
{
139+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
140+
},
141+
{
142+
"$ref": "./apimanagement.json#/parameters/GatewayNameParameter"
143+
},
144+
{
145+
"$ref": "./apimanagement.json#/parameters/ConfigConnectionNameParameter"
146+
},
147+
{
148+
"name": "parameters",
149+
"in": "body",
150+
"required": true,
151+
"schema": {
152+
"$ref": "#/definitions/ApiManagementGatewayConfigConnectionResource"
153+
},
154+
"description": "Parameters supplied to the CreateOrUpdate API Management gateway config connection operation."
155+
},
156+
{
157+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
158+
},
159+
{
160+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
161+
}
162+
],
163+
"responses": {
164+
"200": {
165+
"description": "The gateway config connection was successfully updated.",
166+
"schema": {
167+
"$ref": "#/definitions/ApiManagementGatewayConfigConnectionResource"
168+
}
169+
},
170+
"201": {
171+
"description": "The gateway config connection was successfully created.",
172+
"schema": {
173+
"$ref": "#/definitions/ApiManagementGatewayConfigConnectionResource"
174+
}
175+
},
176+
"default": {
177+
"description": "Error response describing why the operation failed.",
178+
"schema": {
179+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
180+
}
181+
}
182+
},
183+
"x-ms-long-running-operation": true,
184+
"x-ms-long-running-operation-options": {
185+
"final-state-via": "location"
186+
}
187+
},
188+
"delete": {
189+
"tags": [
190+
"ApiManagementGatewayConfigConnection"
191+
],
192+
"operationId": "ApiManagementGatewayConfigConnection_Delete",
193+
"description": "Deletes an existing API Management gateway config connection.",
194+
"x-ms-examples": {
195+
"ApiManagementGatewayDeleteGateway": {
196+
"$ref": "./examples/ApiManagementDeleteGatewayConfigConnection.json"
197+
}
198+
},
199+
"parameters": [
200+
{
201+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ResourceGroupNameParameter"
202+
},
203+
{
204+
"$ref": "./apimanagement.json#/parameters/GatewayNameParameter"
205+
},
206+
{
207+
"$ref": "./apimanagement.json#/parameters/ConfigConnectionNameParameter"
208+
},
209+
{
210+
"$ref": "./apimanagement.json#/parameters/IfMatchRequiredParameter"
211+
},
212+
{
213+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter"
214+
},
215+
{
216+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/SubscriptionIdParameter"
217+
}
218+
],
219+
"responses": {
220+
"202": {
221+
"description": "The gateway config connection delete request was accepted.",
222+
"headers": {
223+
"location": {
224+
"description": "Location header",
225+
"type": "string"
226+
}
227+
}
228+
},
229+
"204": {
230+
"description": "The gateway config connection does not exist."
231+
},
232+
"default": {
233+
"description": "Error response describing why the operation failed.",
234+
"schema": {
235+
"$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse"
236+
}
237+
}
238+
},
239+
"x-ms-long-running-operation": true
240+
}
241+
}
242+
},
243+
"definitions": {
244+
"GatewayConfigConnectionBaseProperties": {
245+
"type": "object",
246+
"properties": {
247+
"provisioningState": {
248+
"readOnly": true,
249+
"type": "string",
250+
"description": "The current provisioning state of the API Management gateway config connection ",
251+
"enum": [
252+
"Activating",
253+
"Canceled",
254+
"Failed",
255+
"Succeeded",
256+
"Terminating",
257+
"Upgrading",
258+
"Updating"
259+
],
260+
"x-ms-enum": {
261+
"name": "ProvisioningState",
262+
"modelAsString": true
263+
}
264+
},
265+
"sourceId": {
266+
"type": "string",
267+
"format": "arm-id",
268+
"x-ms-arm-id-details": {
269+
"allowedResources": [
270+
{
271+
"type": "Microsoft.ApiManagement/service/workspaces"
272+
}
273+
]
274+
},
275+
"description": "The link to the API Management service workspace."
276+
},
277+
"defaultHostname": {
278+
"readOnly": true,
279+
"type": "string",
280+
"description": "The default hostname of the data-plane gateway."
281+
},
282+
"hostnames": {
283+
"type": "array",
284+
"items": {
285+
"type": "string"
286+
},
287+
"description": "The hostnames of the data-plane gateway to which requests can be sent."
288+
}
289+
}
290+
},
291+
"ApiManagementGatewayConfigConnectionResource": {
292+
"type": "object",
293+
"properties": {
294+
"properties": {
295+
"x-ms-client-flatten": true,
296+
"$ref": "#/definitions/GatewayConfigConnectionBaseProperties",
297+
"description": "Properties of the API Management gateway config connection."
298+
},
299+
"etag": {
300+
"type": "string",
301+
"description": "ETag of the resource.",
302+
"readOnly": true
303+
}
304+
},
305+
"allOf": [
306+
{
307+
"$ref": "./../../../../../common-types/resource-management/v5/types.json#/definitions/ProxyResource"
308+
}
309+
],
310+
"required": [
311+
"properties"
312+
],
313+
"description": "A single API Management gateway resource in List or Get response."
314+
},
315+
"ApiManagementGatewayConfigConnectionListResult": {
316+
"type": "object",
317+
"properties": {
318+
"value": {
319+
"type": "array",
320+
"items": {
321+
"$ref": "#/definitions/ApiManagementGatewayConfigConnectionResource"
322+
},
323+
"description": "Result of the List API Management gateway config connection operation."
324+
},
325+
"nextLink": {
326+
"type": "string",
327+
"description": "Link to the next set of results. Not empty if Value contains incomplete list of API Management services."
328+
}
329+
},
330+
"required": [
331+
"value"
332+
],
333+
"description": "The response of the List API Management gateway operation."
334+
}
335+
},
336+
"parameters": {}
337+
}

0 commit comments

Comments
 (0)