Skip to content

Commit df36b4f

Browse files
RupengLiumsyyc
andauthored
[APIM]Add private endpoint connection APIs (Azure#15115)
* Add private endpoint connection apis * add readme * quick fixes * fix to PE contract * Small fixes * small fixes * small fixes * Small fixes * small fixes * small fix * small fixes * small fixes * small fixes * Update readme.md * fix error * small fix * fix format * address comments * small fixes * Change to lower case * small fixes Co-authored-by: msyyc <70930885+msyyc@users.noreply.github.com>
1 parent 6e13784 commit df36b4f

11 files changed

+648
-0
lines changed

specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2021-04-01-preview/apimdeployment.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1390,6 +1390,13 @@
13901390
"description": "Undelete Api Management Service if it was previously soft-deleted. If this flag is specified and set to True all other properties will be ignored.",
13911391
"default": false
13921392
},
1393+
"privateEndpointConnections": {
1394+
"type": "array",
1395+
"items": {
1396+
"$ref": "./definitions.json#/definitions/RemotePrivateEndpointConnectionWrapper"
1397+
},
1398+
"description": "List of Private Endpoint Connections of this service."
1399+
},
13931400
"platformVersion": {
13941401
"type": "string",
13951402
"description": "Compute Platform Version running the service in this location.",
Lines changed: 335 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,335 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"title": "ApiManagementClient",
5+
"description": "Use these REST APIs for performing operations on Private Endpoint Connection in Azure API Management deployment.",
6+
"version": "2021-04-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/service/{serviceName}/privateEndpointConnections": {
38+
"get": {
39+
"tags": [
40+
"PrivateEndpointConnections"
41+
],
42+
"operationId": "PrivateEndpointConnection_ListByService",
43+
"description": "Lists all private endpoint connections of the API Management service instance.",
44+
"x-ms-examples": {
45+
"ApiManagementListPrivateEndpointConnections": {
46+
"$ref": "./examples/ApiManagementListPrivateEndpointConnections.json"
47+
}
48+
},
49+
"parameters": [
50+
{
51+
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
52+
},
53+
{
54+
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
55+
},
56+
{
57+
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
58+
},
59+
{
60+
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
61+
}
62+
],
63+
"responses": {
64+
"200": {
65+
"description": "OK",
66+
"schema": {
67+
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateEndpointConnectionListResult"
68+
}
69+
},
70+
"default": {
71+
"description": "Error response describing why the operation failed.",
72+
"schema": {
73+
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
74+
}
75+
}
76+
},
77+
"x-ms-pageable": {
78+
"nextLinkName": null
79+
}
80+
}
81+
},
82+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateEndpointConnections/{privateEndpointConnectionName}": {
83+
"get": {
84+
"tags": [
85+
"PrivateEndpointConnections"
86+
],
87+
"operationId": "PrivateEndpointConnection_GetByName",
88+
"description": "Gets the details of the Private Endpoint Connection specified by its identifier.",
89+
"x-ms-examples": {
90+
"ApiManagementGetPrivateEndpointConnection": {
91+
"$ref": "./examples/ApiManagementGetPrivateEndpointConnection.json"
92+
}
93+
},
94+
"parameters": [
95+
{
96+
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
97+
},
98+
{
99+
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
100+
},
101+
{
102+
"name": "privateEndpointConnectionName",
103+
"in": "path",
104+
"description": "Name of the private endpoint connection.",
105+
"required": true,
106+
"type": "string"
107+
},
108+
{
109+
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
110+
},
111+
{
112+
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
113+
}
114+
],
115+
"responses": {
116+
"200": {
117+
"description": "OK",
118+
"schema": {
119+
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateEndpointConnection"
120+
}
121+
},
122+
"default": {
123+
"description": "Error response describing why the operation failed.",
124+
"schema": {
125+
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
126+
}
127+
}
128+
}
129+
},
130+
"put": {
131+
"tags": [
132+
"PrivateEndpointConnections"
133+
],
134+
"operationId": "PrivateEndpointConnection_CreateOrUpdate",
135+
"description": "Creates a new Private Endpoint Connection or updates an existing one.",
136+
"x-ms-examples": {
137+
"ApiManagementApproveOrRejectPrivateEndpointConnection": {
138+
"$ref": "./examples/ApiManagementApproveOrRejectPrivateEndpointConnection.json"
139+
}
140+
},
141+
"parameters": [
142+
{
143+
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
144+
},
145+
{
146+
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
147+
},
148+
{
149+
"name": "privateEndpointConnectionName",
150+
"in": "path",
151+
"description": "Name of the private endpoint connection.",
152+
"required": true,
153+
"type": "string"
154+
},
155+
{
156+
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
157+
},
158+
{
159+
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
160+
},
161+
{
162+
"name": "privateEndpointConnectionRequest",
163+
"in": "body",
164+
"required": true,
165+
"schema": {
166+
"$ref": "./definitions.json#/definitions/PrivateEndpointConnectionRequest"
167+
}
168+
}
169+
],
170+
"responses": {
171+
"201": {
172+
"description": "Request to approve or reject private endpoint connection. Location header contains the URL where the status of the long running operation can be checked."
173+
},
174+
"200": {
175+
"description": "Private Endpoint Connection Request was completed.",
176+
"schema": {
177+
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateEndpointConnection"
178+
}
179+
},
180+
"default": {
181+
"description": "Error response describing why the operation failed.",
182+
"schema": {
183+
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
184+
}
185+
}
186+
},
187+
"x-ms-long-running-operation": true
188+
},
189+
"delete": {
190+
"tags": [
191+
"PrivateEndpointConnections"
192+
],
193+
"operationId": "PrivateEndpointConnection_Delete",
194+
"description": "Deletes the specified Private Endpoint Connection.",
195+
"x-ms-examples": {
196+
"ApiManagementDeletePrivateEndpointConnection": {
197+
"$ref": "./examples/ApiManagementDeletePrivateEndpointConnection.json"
198+
}
199+
},
200+
"parameters": [
201+
{
202+
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
203+
},
204+
{
205+
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
206+
},
207+
{
208+
"name": "privateEndpointConnectionName",
209+
"in": "path",
210+
"description": "Name of the private endpoint connection.",
211+
"required": true,
212+
"type": "string"
213+
},
214+
{
215+
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
216+
},
217+
{
218+
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
219+
}
220+
],
221+
"responses": {
222+
"200": {
223+
"description": "The Private Endpoint Connection was successfully deleted."
224+
},
225+
"202": {
226+
"description": "Request to delete API was accepted. Location header contains the URL where the status of the long running operation can be checked."
227+
},
228+
"204": {
229+
"description": "Private endpoint connection does not exist."
230+
},
231+
"default": {
232+
"description": "Error response describing why the operation failed.",
233+
"schema": {
234+
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
235+
}
236+
}
237+
},
238+
"x-ms-long-running-operation": true
239+
}
240+
},
241+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources": {
242+
"get": {
243+
"tags": [
244+
"PrivateEndpointConnections"
245+
],
246+
"description": "Description for Gets the private link resources",
247+
"operationId": "PrivateEndpointConnection_ListPrivateLinkResources",
248+
"x-ms-examples": {
249+
"ApiManagementListPrivateLinkGroupResources": {
250+
"$ref": "./examples/ApiManagementListPrivateLinkGroupResources.json"
251+
}
252+
},
253+
"parameters": [
254+
{
255+
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
256+
},
257+
{
258+
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
259+
},
260+
{
261+
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
262+
},
263+
{
264+
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
265+
}
266+
],
267+
"responses": {
268+
"200": {
269+
"description": "OK",
270+
"schema": {
271+
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateLinkResourceListResult"
272+
}
273+
},
274+
"default": {
275+
"description": "Error response describing why the operation failed.",
276+
"schema": {
277+
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
278+
}
279+
}
280+
}
281+
}
282+
},
283+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/privateLinkResources/{privateLinkSubResourceName}": {
284+
"get": {
285+
"tags": [
286+
"PrivateEndpointConnections"
287+
],
288+
"description": "Description for Gets the private link resources",
289+
"operationId": "PrivateEndpointConnection_GetPrivateLinkResource",
290+
"x-ms-examples": {
291+
"ApiManagementGetPrivateLinkGroupResource": {
292+
"$ref": "./examples/ApiManagementGetPrivateLinkGroupResource.json"
293+
}
294+
},
295+
"parameters": [
296+
{
297+
"$ref": "./apimanagement.json#/parameters/ResourceGroupNameParameter"
298+
},
299+
{
300+
"$ref": "./apimanagement.json#/parameters/SubscriptionIdParameter"
301+
},
302+
{
303+
"$ref": "./apimanagement.json#/parameters/ApiVersionParameter"
304+
},
305+
{
306+
"$ref": "./apimanagement.json#/parameters/ServiceNameParameter"
307+
},
308+
{
309+
"name": "privateLinkSubResourceName",
310+
"in": "path",
311+
"description": "Name of the private link resource.",
312+
"required": true,
313+
"type": "string"
314+
}
315+
],
316+
"responses": {
317+
"200": {
318+
"description": "OK",
319+
"schema": {
320+
"$ref": "../../../../../common-types/resource-management/v2/privatelinks.json#/definitions/PrivateLinkResource"
321+
}
322+
},
323+
"default": {
324+
"description": "Error response describing why the operation failed.",
325+
"schema": {
326+
"$ref": "./apimanagement.json#/definitions/ErrorResponse"
327+
}
328+
}
329+
}
330+
}
331+
}
332+
},
333+
"definitions": {},
334+
"parameters": {}
335+
}

0 commit comments

Comments
 (0)