Skip to content

Commit 57d7671

Browse files
iancaragolLeiWang3
authored andcommitted
Add AzureStack Hub Admin VPN API (Azure#17245)
* Add AzSAdmin VPN API * Addressed lint diff R4041 * Address prettier check * Addressed comments, changed ProvisioningState to enum
1 parent 93451a1 commit 57d7671

File tree

3 files changed

+370
-0
lines changed

3 files changed

+370
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,288 @@
1+
{
2+
"swagger": "2.0",
3+
"info": {
4+
"version": "2022-02-01",
5+
"title": "NetworkAdminManagementClient",
6+
"description": "The Admin Network Management Client"
7+
},
8+
"host": "management.azure.com",
9+
"schemes": [
10+
"https"
11+
],
12+
"consumes": [
13+
"application/json"
14+
],
15+
"produces": [
16+
"application/json"
17+
],
18+
"paths": {
19+
"/subscriptions/{subscriptionId}/providers/Microsoft.Network.Admin/adminVirtualNetworkGatewayConnections": {
20+
"get": {
21+
"x-ms-examples": {
22+
"Returns a list of all virtual network gateway connections.": {
23+
"$ref": "./examples/VirtualNetworkGatewayConnections/List.json"
24+
}
25+
},
26+
"tags": [
27+
"VirtualNetworkGatewayConnections"
28+
],
29+
"operationId": "VirtualNetworkGatewayConnections_List",
30+
"description": "Returns a list of all Virtual Network Gateway Connections.",
31+
"parameters": [
32+
{
33+
"$ref": "../../preview/2015-06-15/Network.json#/parameters/SubscriptionIdParameter"
34+
}
35+
],
36+
"responses": {
37+
"200": {
38+
"description": "OK -- The list of virtual network gateway connections has been returned.",
39+
"schema": {
40+
"$ref": "#/definitions/VirtualNetworkGatewayConnectionsList"
41+
}
42+
},
43+
"default": {
44+
"description": "Error Response.",
45+
"schema": {
46+
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
47+
}
48+
}
49+
},
50+
"x-ms-pageable": {
51+
"nextLinkName": "nextLink"
52+
}
53+
}
54+
}
55+
},
56+
"definitions": {
57+
"VirtualNetworkGatewayConnectionsList": {
58+
"description": "List of Virtual Network Gateway Connections.",
59+
"type": "object",
60+
"properties": {
61+
"value": {
62+
"description": "List of Virtual Network Gateway Connections.",
63+
"type": "array",
64+
"items": {
65+
"$ref": "#/definitions/VirtualNetworkGatewayConnection"
66+
},
67+
"x-ms-identifiers": [],
68+
"readOnly": true
69+
},
70+
"nextLink": {
71+
"description": "URI to the next page.",
72+
"type": "string",
73+
"readOnly": true
74+
}
75+
}
76+
},
77+
"VirtualNetworkGatewayConnection": {
78+
"description": "The Virtual Network Gateway Connection.",
79+
"type": "object",
80+
"properties": {
81+
"properties": {
82+
"description": "Virtual Network Gateway Connection properties.",
83+
"x-ms-client-flatten": true,
84+
"$ref": "#/definitions/VirtualNetworkGatewayConnectionProperties"
85+
},
86+
"location": {
87+
"description": "Name of Azure Stack",
88+
"type": "string",
89+
"readOnly": true
90+
}
91+
},
92+
"allOf": [
93+
{
94+
"$ref": "../../preview/2015-06-15/Network.json#/definitions/Resource"
95+
}
96+
]
97+
},
98+
"VirtualNetworkGatewayConnectionProperties": {
99+
"description": "Virtual Network Gateway Connection properties.",
100+
"type": "object",
101+
"properties": {
102+
"connectionState": {
103+
"description": "Virtual Network Gateway Connection State.",
104+
"$ref": "#/definitions/VirtualNetworkGatewayConnectionState"
105+
},
106+
"provisioningState": {
107+
"description": "Provisioning State of the Virtual Network Gateway Connection.",
108+
"type": "string",
109+
"enum": [
110+
"Succeeded",
111+
"Updating",
112+
"Deleting",
113+
"Failed"
114+
],
115+
"x-ms-enum": {
116+
"modelAsString": true,
117+
"name": "VirtualNetworkGatewayConnectionProvisioningState"
118+
},
119+
"readOnly": true
120+
},
121+
"subscriptionId": {
122+
"description": "Subscription Id of the Virtual Network Gateway Connection.",
123+
"type": "string",
124+
"readOnly": true
125+
},
126+
"resourceGroup": {
127+
"description": "Resource Group of the Virtual Network Gateway Connection.",
128+
"type": "string",
129+
"readOnly": true
130+
},
131+
"localNetworkGatewayName": {
132+
"description": "Name of the associated Local Network Gateway.",
133+
"type": "string",
134+
"readOnly": true
135+
},
136+
"localNetworkGatewayIPAddress": {
137+
"description": "IP address of the associated Local Network Gateway.",
138+
"type": "string",
139+
"readOnly": true
140+
},
141+
"virtualNetworkGatewayName": {
142+
"description": "Name of the associated Virtual Network Gateway.",
143+
"type": "string",
144+
"readOnly": true
145+
},
146+
"virtualNetworkGatewayIPAddress": {
147+
"description": "IP address of the associated Virtual Network Gateway.",
148+
"type": "string",
149+
"readOnly": true
150+
},
151+
"sku": {
152+
"description": "SKU of the associated Virtual Network Gateway.",
153+
"type": "string",
154+
"enum": [
155+
"Basic",
156+
"Standard",
157+
"HighPerformance",
158+
"VpnGw1",
159+
"VpnGw2",
160+
"VpnGw3"
161+
],
162+
"x-ms-enum": {
163+
"modelAsString": true,
164+
"name": "VirtualNetworkGatewayConnectionSku"
165+
},
166+
"readOnly": true
167+
},
168+
"capacityReserved": {
169+
"description": "Gateway capacity reserved by this connection.",
170+
"type": "number",
171+
"readOnly": true
172+
},
173+
"totalStampCapacity": {
174+
"description": "Total amount of Gateway capacity that is available on this stamp.",
175+
"type": "number",
176+
"readOnly": true
177+
}
178+
}
179+
},
180+
"VirtualNetworkGatewayConnectionState": {
181+
"description": "Virtual Network Gateway Connection state.",
182+
"type": "object",
183+
"properties": {
184+
"status": {
185+
"description": "Virtual Network Gateway Connection status.",
186+
"enum": [
187+
"Connected",
188+
"Disconnected",
189+
"Uninitialized",
190+
"Unknown"
191+
],
192+
"type": "string",
193+
"readOnly": true,
194+
"x-ms-enum": {
195+
"modelAsString": true,
196+
"name": "VirtualNetworkGatewayConnectionConnectionStateType"
197+
}
198+
},
199+
"activeGateway": {
200+
"description": "Active Gateway VM that the connection is configured on.",
201+
"type": "string",
202+
"readOnly": true
203+
},
204+
"connectionError": {
205+
"description": "List of connection errors associated with the resource.",
206+
"$ref": "#/definitions/VirtualNetworkGatewayConnectionConfigurationStatus",
207+
"readOnly": true
208+
}
209+
}
210+
},
211+
"VirtualNetworkGatewayConnectionConfigurationStatus": {
212+
"description": "Virtual Network Gateway Connection configuration status.",
213+
"type": "object",
214+
"properties": {
215+
"status": {
216+
"description": "Virtual Network Gateway Connection configuration status.",
217+
"enum": [
218+
"Failure",
219+
"Warning",
220+
"Success",
221+
"Uninitialized",
222+
"InProgress",
223+
"Unknown"
224+
],
225+
"type": "string",
226+
"x-ms-enum": {
227+
"modelAsString": true,
228+
"name": "VirtualNetworkGatewayConnectionConfigurationType"
229+
},
230+
"readOnly": true
231+
},
232+
"lastUpdatedTime": {
233+
"description": "Last updated time for the configuration status.",
234+
"type": "string",
235+
"format": "date-time",
236+
"readOnly": true
237+
},
238+
"detailedInfo": {
239+
"description": "List of connection errors associated with the resource.",
240+
"type": "array",
241+
"items": {
242+
"$ref": "#/definitions/VirtualNetworkGatewayConnectionConfigurationStateInfo"
243+
},
244+
"x-ms-identifiers": []
245+
}
246+
}
247+
},
248+
"VirtualNetworkGatewayConnectionConfigurationStateInfo": {
249+
"description": "Virtual network gateway connection state and error code.",
250+
"type": "object",
251+
"properties": {
252+
"source": {
253+
"description": "Source of the error message.",
254+
"type": "string",
255+
"readOnly": true
256+
},
257+
"code": {
258+
"description": "Error code if the connection is disconnected and self-diagnosable.",
259+
"type": "string",
260+
"readOnly": true
261+
},
262+
"message": {
263+
"description": "Message associated with the error code.",
264+
"type": "string",
265+
"readOnly": true
266+
}
267+
}
268+
}
269+
},
270+
"securityDefinitions": {
271+
"azure_auth": {
272+
"type": "oauth2",
273+
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
274+
"flow": "implicit",
275+
"description": "Azure Active Directory OAuth2 flow.",
276+
"scopes": {
277+
"user_impersonation": "impersonate your user account"
278+
}
279+
}
280+
},
281+
"security": [
282+
{
283+
"azure_auth": [
284+
"user_impersonation"
285+
]
286+
}
287+
]
288+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-02-01",
4+
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
5+
},
6+
"responses": {
7+
"200": {
8+
"body": {
9+
"value": [
10+
{
11+
"name": "conn",
12+
"type": "Microsoft.Network.Admin/adminVirtualNetworkGatewayConnections",
13+
"location": "",
14+
"id": "/subscriptions/215fcc5e-dfd4-4232-a116-cbace6ab525e/resourceGroups/exampleRG/providers/Microsoft.Network/connections/conn",
15+
"properties": {
16+
"provisioningState": "Succeeded",
17+
"connectionState": {
18+
"status": "Connected",
19+
"activeGateway": "AZSH-Gwy02"
20+
},
21+
"subscriptionId": "215fcc5e-dfd4-4232-a116-cbace6ab525e",
22+
"resourceGroup": "exampleRG",
23+
"localNetworkGatewayIPAddress": "10.10.10.10",
24+
"localNetworkGatewayName": "lng",
25+
"virtualNetworkGatewayIPAddress": "11.11.11.11",
26+
"virtualNetworkGatewayName": "vng",
27+
"sku": "HighPerformance",
28+
"capacityReserved": 400,
29+
"totalStampCapacity": 4200
30+
}
31+
},
32+
{
33+
"name": "conn2",
34+
"type": "Microsoft.Network.Admin/adminVirtualNetworkGatewayConnections",
35+
"location": "",
36+
"id": "/subscriptions/215fcc5e-dfd4-4232-a116-cbace6ab525e/resourceGroups/exampleRG2/providers/Microsoft.Network/connections/conn2",
37+
"properties": {
38+
"provisioningState": "Succeeded",
39+
"connectionState": {
40+
"status": "Disconnected",
41+
"activeGateway": "AZSH-Gwy02",
42+
"connectionError": {
43+
"status": "Failure",
44+
"lastUpdatedTime": "2021-12-10T17:18:19.0355713+00:00",
45+
"detailedInfo": [
46+
{
47+
"source": "Network Controller",
48+
"code": "13868",
49+
"message": "IPSEC Policy mismatch."
50+
}
51+
]
52+
}
53+
},
54+
"subscriptionId": "215fcc5e-dfd4-4232-a116-cbace6ab525e",
55+
"resourceGroup": "exampleRG2",
56+
"localNetworkGatewayIPAddress": "10.10.10.11",
57+
"localNetworkGatewayName": "lng2",
58+
"virtualNetworkGatewayIPAddress": "11.11.11.11",
59+
"virtualNetworkGatewayName": "vng2",
60+
"sku": "Basic",
61+
"capacityReserved": 200,
62+
"totalStampCapacity": 4200
63+
}
64+
}
65+
]
66+
}
67+
}
68+
}
69+
}

specification/azsadmin/resource-manager/network/readme.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,21 @@ input-file:
3535
- Microsoft.Network.Admin/preview/2015-06-15/Quotas.json
3636
- Microsoft.Network.Admin/preview/2015-06-15/VirtualNetworks.json
3737
```
38+
### Tag: package-2022-02-01
3839
40+
These settings apply only when `--tag=package-2022-02-01` is specified on the command line.
41+
42+
``` yaml $(tag) == 'package-2022-02-01'
43+
input-file:
44+
- Microsoft.Network.Admin/preview/2015-06-15/Network.json
45+
- Microsoft.Network.Admin/preview/2015-06-15/LoadBalancers.json
46+
- Microsoft.Network.Admin/preview/2015-06-15/PublicIpAddresses.json
47+
- Microsoft.Network.Admin/preview/2015-06-15/Quotas.json
48+
- Microsoft.Network.Admin/preview/2015-06-15/VirtualNetworks.json
49+
- Microsoft.Network.Admin/stable/2022-02-01/VirtualNetworkGatewayConnections.json
50+
```
3951
---
52+
4053
# Code Generation
4154

4255
## C#

0 commit comments

Comments
 (0)