Skip to content

Commit

Permalink
Add AzureStack Hub Admin VPN API (Azure#17245)
Browse files Browse the repository at this point in the history
* Add AzSAdmin VPN API

* Addressed lint diff R4041

* Address prettier check

* Addressed comments, changed ProvisioningState to enum
  • Loading branch information
iancaragol authored Jan 25, 2022
1 parent c1940e0 commit ad5ea4e
Show file tree
Hide file tree
Showing 3 changed files with 370 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,288 @@
{
"swagger": "2.0",
"info": {
"version": "2022-02-01",
"title": "NetworkAdminManagementClient",
"description": "The Admin Network Management Client"
},
"host": "management.azure.com",
"schemes": [
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
"/subscriptions/{subscriptionId}/providers/Microsoft.Network.Admin/adminVirtualNetworkGatewayConnections": {
"get": {
"x-ms-examples": {
"Returns a list of all virtual network gateway connections.": {
"$ref": "./examples/VirtualNetworkGatewayConnections/List.json"
}
},
"tags": [
"VirtualNetworkGatewayConnections"
],
"operationId": "VirtualNetworkGatewayConnections_List",
"description": "Returns a list of all Virtual Network Gateway Connections.",
"parameters": [
{
"$ref": "../../preview/2015-06-15/Network.json#/parameters/SubscriptionIdParameter"
}
],
"responses": {
"200": {
"description": "OK -- The list of virtual network gateway connections has been returned.",
"schema": {
"$ref": "#/definitions/VirtualNetworkGatewayConnectionsList"
}
},
"default": {
"description": "Error Response.",
"schema": {
"$ref": "../../../../../../common-types/resource-management/v2/types.json#/definitions/ErrorResponse"
}
}
},
"x-ms-pageable": {
"nextLinkName": "nextLink"
}
}
}
},
"definitions": {
"VirtualNetworkGatewayConnectionsList": {
"description": "List of Virtual Network Gateway Connections.",
"type": "object",
"properties": {
"value": {
"description": "List of Virtual Network Gateway Connections.",
"type": "array",
"items": {
"$ref": "#/definitions/VirtualNetworkGatewayConnection"
},
"x-ms-identifiers": [],
"readOnly": true
},
"nextLink": {
"description": "URI to the next page.",
"type": "string",
"readOnly": true
}
}
},
"VirtualNetworkGatewayConnection": {
"description": "The Virtual Network Gateway Connection.",
"type": "object",
"properties": {
"properties": {
"description": "Virtual Network Gateway Connection properties.",
"x-ms-client-flatten": true,
"$ref": "#/definitions/VirtualNetworkGatewayConnectionProperties"
},
"location": {
"description": "Name of Azure Stack",
"type": "string",
"readOnly": true
}
},
"allOf": [
{
"$ref": "../../preview/2015-06-15/Network.json#/definitions/Resource"
}
]
},
"VirtualNetworkGatewayConnectionProperties": {
"description": "Virtual Network Gateway Connection properties.",
"type": "object",
"properties": {
"connectionState": {
"description": "Virtual Network Gateway Connection State.",
"$ref": "#/definitions/VirtualNetworkGatewayConnectionState"
},
"provisioningState": {
"description": "Provisioning State of the Virtual Network Gateway Connection.",
"type": "string",
"enum": [
"Succeeded",
"Updating",
"Deleting",
"Failed"
],
"x-ms-enum": {
"modelAsString": true,
"name": "VirtualNetworkGatewayConnectionProvisioningState"
},
"readOnly": true
},
"subscriptionId": {
"description": "Subscription Id of the Virtual Network Gateway Connection.",
"type": "string",
"readOnly": true
},
"resourceGroup": {
"description": "Resource Group of the Virtual Network Gateway Connection.",
"type": "string",
"readOnly": true
},
"localNetworkGatewayName": {
"description": "Name of the associated Local Network Gateway.",
"type": "string",
"readOnly": true
},
"localNetworkGatewayIPAddress": {
"description": "IP address of the associated Local Network Gateway.",
"type": "string",
"readOnly": true
},
"virtualNetworkGatewayName": {
"description": "Name of the associated Virtual Network Gateway.",
"type": "string",
"readOnly": true
},
"virtualNetworkGatewayIPAddress": {
"description": "IP address of the associated Virtual Network Gateway.",
"type": "string",
"readOnly": true
},
"sku": {
"description": "SKU of the associated Virtual Network Gateway.",
"type": "string",
"enum": [
"Basic",
"Standard",
"HighPerformance",
"VpnGw1",
"VpnGw2",
"VpnGw3"
],
"x-ms-enum": {
"modelAsString": true,
"name": "VirtualNetworkGatewayConnectionSku"
},
"readOnly": true
},
"capacityReserved": {
"description": "Gateway capacity reserved by this connection.",
"type": "number",
"readOnly": true
},
"totalStampCapacity": {
"description": "Total amount of Gateway capacity that is available on this stamp.",
"type": "number",
"readOnly": true
}
}
},
"VirtualNetworkGatewayConnectionState": {
"description": "Virtual Network Gateway Connection state.",
"type": "object",
"properties": {
"status": {
"description": "Virtual Network Gateway Connection status.",
"enum": [
"Connected",
"Disconnected",
"Uninitialized",
"Unknown"
],
"type": "string",
"readOnly": true,
"x-ms-enum": {
"modelAsString": true,
"name": "VirtualNetworkGatewayConnectionConnectionStateType"
}
},
"activeGateway": {
"description": "Active Gateway VM that the connection is configured on.",
"type": "string",
"readOnly": true
},
"connectionError": {
"description": "List of connection errors associated with the resource.",
"$ref": "#/definitions/VirtualNetworkGatewayConnectionConfigurationStatus",
"readOnly": true
}
}
},
"VirtualNetworkGatewayConnectionConfigurationStatus": {
"description": "Virtual Network Gateway Connection configuration status.",
"type": "object",
"properties": {
"status": {
"description": "Virtual Network Gateway Connection configuration status.",
"enum": [
"Failure",
"Warning",
"Success",
"Uninitialized",
"InProgress",
"Unknown"
],
"type": "string",
"x-ms-enum": {
"modelAsString": true,
"name": "VirtualNetworkGatewayConnectionConfigurationType"
},
"readOnly": true
},
"lastUpdatedTime": {
"description": "Last updated time for the configuration status.",
"type": "string",
"format": "date-time",
"readOnly": true
},
"detailedInfo": {
"description": "List of connection errors associated with the resource.",
"type": "array",
"items": {
"$ref": "#/definitions/VirtualNetworkGatewayConnectionConfigurationStateInfo"
},
"x-ms-identifiers": []
}
}
},
"VirtualNetworkGatewayConnectionConfigurationStateInfo": {
"description": "Virtual network gateway connection state and error code.",
"type": "object",
"properties": {
"source": {
"description": "Source of the error message.",
"type": "string",
"readOnly": true
},
"code": {
"description": "Error code if the connection is disconnected and self-diagnosable.",
"type": "string",
"readOnly": true
},
"message": {
"description": "Message associated with the error code.",
"type": "string",
"readOnly": true
}
}
}
},
"securityDefinitions": {
"azure_auth": {
"type": "oauth2",
"authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize",
"flow": "implicit",
"description": "Azure Active Directory OAuth2 flow.",
"scopes": {
"user_impersonation": "impersonate your user account"
}
}
},
"security": [
{
"azure_auth": [
"user_impersonation"
]
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"parameters": {
"api-version": "2022-02-01",
"subscriptionId": "20ff7fc3-e762-44dd-bd96-b71116dcdc23"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "conn",
"type": "Microsoft.Network.Admin/adminVirtualNetworkGatewayConnections",
"location": "",
"id": "/subscriptions/215fcc5e-dfd4-4232-a116-cbace6ab525e/resourceGroups/exampleRG/providers/Microsoft.Network/connections/conn",
"properties": {
"provisioningState": "Succeeded",
"connectionState": {
"status": "Connected",
"activeGateway": "AZSH-Gwy02"
},
"subscriptionId": "215fcc5e-dfd4-4232-a116-cbace6ab525e",
"resourceGroup": "exampleRG",
"localNetworkGatewayIPAddress": "10.10.10.10",
"localNetworkGatewayName": "lng",
"virtualNetworkGatewayIPAddress": "11.11.11.11",
"virtualNetworkGatewayName": "vng",
"sku": "HighPerformance",
"capacityReserved": 400,
"totalStampCapacity": 4200
}
},
{
"name": "conn2",
"type": "Microsoft.Network.Admin/adminVirtualNetworkGatewayConnections",
"location": "",
"id": "/subscriptions/215fcc5e-dfd4-4232-a116-cbace6ab525e/resourceGroups/exampleRG2/providers/Microsoft.Network/connections/conn2",
"properties": {
"provisioningState": "Succeeded",
"connectionState": {
"status": "Disconnected",
"activeGateway": "AZSH-Gwy02",
"connectionError": {
"status": "Failure",
"lastUpdatedTime": "2021-12-10T17:18:19.0355713+00:00",
"detailedInfo": [
{
"source": "Network Controller",
"code": "13868",
"message": "IPSEC Policy mismatch."
}
]
}
},
"subscriptionId": "215fcc5e-dfd4-4232-a116-cbace6ab525e",
"resourceGroup": "exampleRG2",
"localNetworkGatewayIPAddress": "10.10.10.11",
"localNetworkGatewayName": "lng2",
"virtualNetworkGatewayIPAddress": "11.11.11.11",
"virtualNetworkGatewayName": "vng2",
"sku": "Basic",
"capacityReserved": 200,
"totalStampCapacity": 4200
}
}
]
}
}
}
}
13 changes: 13 additions & 0 deletions specification/azsadmin/resource-manager/network/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,21 @@ input-file:
- Microsoft.Network.Admin/preview/2015-06-15/Quotas.json
- Microsoft.Network.Admin/preview/2015-06-15/VirtualNetworks.json
```
### Tag: package-2022-02-01
These settings apply only when `--tag=package-2022-02-01` is specified on the command line.

``` yaml $(tag) == 'package-2022-02-01'
input-file:
- Microsoft.Network.Admin/preview/2015-06-15/Network.json
- Microsoft.Network.Admin/preview/2015-06-15/LoadBalancers.json
- Microsoft.Network.Admin/preview/2015-06-15/PublicIpAddresses.json
- Microsoft.Network.Admin/preview/2015-06-15/Quotas.json
- Microsoft.Network.Admin/preview/2015-06-15/VirtualNetworks.json
- Microsoft.Network.Admin/stable/2022-02-01/VirtualNetworkGatewayConnections.json
```
---

# Code Generation

## C#
Expand Down

0 comments on commit ad5ea4e

Please sign in to comment.