From ae1dbfbc9876be87bca920f879415b16500a9985 Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Mon, 8 Mar 2021 06:19:51 -0800 Subject: [PATCH 1/4] commit1 --- ...VirtualNetworkGatewayConnectionCreate.json | 20 + .../VirtualNetworkGatewayConnectionGet.json | 10 + ...ualNetworkGatewayConnectionUpdateTags.json | 10 + .../VirtualNetworkGatewayConnectionsList.json | 20 + .../examples/VirtualNetworkGatewayGet.json | 43 ++ .../examples/VirtualNetworkGatewayList.json | 86 ++++ .../VirtualNetworkGatewayNatRuleDelete.json | 14 + .../VirtualNetworkGatewayNatRuleGet.json | 33 ++ .../VirtualNetworkGatewayNatRuleList.json | 56 +++ .../VirtualNetworkGatewayNatRulePut.json | 74 ++++ .../examples/VirtualNetworkGatewayReset.json | 2 + .../examples/VirtualNetworkGatewayUpdate.json | 125 ++++++ .../VirtualNetworkGatewayUpdateTags.json | 2 + .../2020-11-01/virtualNetworkGateway.json | 375 +++++++++++++++++- 14 files changed, 869 insertions(+), 1 deletion(-) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleDelete.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleGet.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleList.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRulePut.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionCreate.json index 19796cb1a6df..cea5b991f2fb 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionCreate.json @@ -54,6 +54,16 @@ "location": "centralus", "tags": {} }, + "ingressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1" + } + ], + "egressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2" + } + ], "connectionType": "IPsec", "connectionProtocol": "IKEv2", "routingWeight": 0, @@ -87,6 +97,16 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", "properties": {} }, + "ingressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1" + } + ], + "egressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2" + } + ], "connectionType": "IPsec", "connectionProtocol": "IKEv2", "routingWeight": 0, diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionGet.json index 414de43a5b75..3a088707e76e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionGet.json @@ -24,6 +24,16 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw", "properties": {} }, + "ingressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1" + } + ], + "egressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2" + } + ], "connectionType": "IPsec", "connectionProtocol": "IKEv2", "routingWeight": 0, diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json index 74634743a923..92a57143ccc7 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json @@ -34,6 +34,16 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/lgw", "properties": {} }, + "ingressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1" + } + ], + "egressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2" + } + ], "connectionType": "IPsec", "routingWeight": 0, "sharedKey": "temp1234", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionsList.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionsList.json index 7b575331c7e1..760612b5cda2 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionsList.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayConnectionsList.json @@ -25,6 +25,16 @@ "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw1", "properties": {} }, + "ingressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule1" + } + ], + "egressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule2" + } + ], "connectionType": "IPsec", "connectionProtocol": "IKEv1", "routingWeight": 0, @@ -56,6 +66,16 @@ "properties": {}, "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/localNetworkGateways/localgw2" }, + "ingressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule1" + } + ], + "egressNatRules": [ + { + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule2" + } + ], "connectionType": "IPsec", "connectionProtocol": "IKEv2", "routingWeight": 0, diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayGet.json index 9b98a4b6fd3f..be7ee727f776 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayGet.json @@ -33,6 +33,49 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.0.0.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "IngressSnat", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayList.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayList.json index 27f0441fc1b4..6bca66f828fa 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayList.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayList.json @@ -34,6 +34,49 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule1", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.0.0.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw1/natRules/natRule2", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "IngressSnat", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", @@ -89,6 +132,49 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule1", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.0.0.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw2/natRules/natRule2", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "IngressSnat", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleDelete.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleDelete.json new file mode 100644 index 000000000000..1a55613e2e77 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "natRuleName": "natRule1", + "virtualNetworkGatewayName": "gateway1", + "resourceGroupName": "rg1", + "api-version": "2020-11-01", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleGet.json new file mode 100644 index 000000000000..855d474694cf --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleGet.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "virtualNetworkGatewayName": "gateway1", + "natRuleName": "natRule1", + "resourceGroupName": "rg1", + "api-version": "2020-11-01", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/natRules/natRule1", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.4.0.0/24" + } + ] + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleList.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleList.json new file mode 100644 index 000000000000..d90daf134de1 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRuleList.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "virtualNetworkGatewayName": "gateway1", + "api-version": "2020-11-01", + "resourceGroupName": "rg1", + "subscriptionId": "subid" + }, + "responses": { + "200": { + "body": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/natRules/natRule1", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "192.168.21.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/natRules/natRule2", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG1/ipConfigurations/default", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "192.168.21.0/24" + } + ] + } + } + ] + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRulePut.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRulePut.json new file mode 100644 index 000000000000..894bb180be6f --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayNatRulePut.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "natRuleName": "natRule1", + "virtualNetworkGatewayName": "gateway1", + "resourceGroupName": "rg1", + "api-version": "2020-11-01", + "subscriptionId": "subid", + "NatRuleParameters": { + "properties": { + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "192.168.21.0/24" + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/natRules/natRule1", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "192.168.21.0/24" + } + ] + } + } + }, + "201": { + "body": { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/natRules/natRule1", + "etag": "w/\\00000000-0000-0000-0000-000000000000\\", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/cloudnet1-VNG/ipConfigurations/default", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "192.168.21.0/24" + } + ] + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayReset.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayReset.json index a795e0b9add8..242f4c67881e 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayReset.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayReset.json @@ -34,6 +34,8 @@ } } ], + "natRules": [], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdate.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdate.json index 533bb38d97ac..bdb94d85a482 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdate.json @@ -20,6 +20,45 @@ "name": "gwipconfig1" } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "properties": { + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.0.0.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", + "properties": { + "type": "Static", + "mode": "IngressSnat", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "gatewayType": "Vpn", "vpnType": "RouteBased", "enableBgp": false, @@ -85,6 +124,49 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.0.0.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "IngressSnat", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", @@ -164,6 +246,49 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "EgressSnat", + "internalMappings": [ + { + "addressSpace": "10.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.0.0.0/24" + } + ] + } + }, + { + "name": "natRule2", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule2", + "etag": "W/\"00ae2b69-88e7-4b3a-b66a-cfa2244e0801\"", + "properties": { + "provisioningState": "Succeeded", + "type": "Static", + "mode": "IngressSnat", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdateTags.json index 8e7a8147d4ad..32a2508ef795 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdateTags.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/examples/VirtualNetworkGatewayUpdateTags.json @@ -42,6 +42,8 @@ } } ], + "natRules": [], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json index e0c8a657414e..d7e50fe999d0 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json @@ -2331,6 +2331,240 @@ "final-state-via": "location" } } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules/{natRuleName}": { + "get": { + "operationId": "VirtualNetworkGatewayNatRules_Get", + "x-ms-examples": { + "NatRuleGet": { + "$ref": "./examples/VirtualNetworkGatewayNatRuleGet.json" + } + }, + "description": "Retrieves the details of a nat ruleGet.", + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the Virtual Network Gateway." + }, + { + "name": "virtualNetworkGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the gateway." + }, + { + "name": "natRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat rule." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. Returns the details of the nat rule.", + "schema": { + "$ref": "#/definitions/VirtualNetworkGatewayNatRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + } + }, + "put": { + "operationId": "VirtualNetworkGatewayNatRules_CreateOrUpdate", + "x-ms-examples": { + "NatRulePut": { + "$ref": "./examples/VirtualNetworkGatewayNatRulePut.json" + } + }, + "description": "Creates a nat rule to a scalable virtual network gateway if it doesn't exist else updates the existing nat rules.", + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the Virtual Network Gateway." + }, + { + "name": "virtualNetworkGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the gateway." + }, + { + "name": "natRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat rule." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + }, + { + "name": "NatRuleParameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/VirtualNetworkGatewayNatRule" + }, + "description": "Parameters supplied to create or Update a Nat Rule." + } + ], + "responses": { + "200": { + "description": "Request successful. Returns the details of the nat rule created or updated.", + "schema": { + "$ref": "#/definitions/VirtualNetworkGatewayNatRule" + } + }, + "201": { + "description": "Request successful. Returns the details of the nat rule created or updated.", + "schema": { + "$ref": "#/definitions/VirtualNetworkGatewayNatRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + } + }, + "delete": { + "operationId": "VirtualNetworkGatewayNatRules_Delete", + "x-ms-examples": { + "NatRuleDelete": { + "$ref": "./examples/VirtualNetworkGatewayNatRuleDelete.json" + } + }, + "description": "Deletes a nat rule.", + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the Virtual Network Gateway." + }, + { + "name": "virtualNetworkGatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the gateway." + }, + { + "name": "natRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the nat rule." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. Nat Rule deleted." + }, + "202": { + "description": "Request received successfully. Nat Rule deletion is in progress; follow the Location header to poll for final outcome." + }, + "204": { + "description": "No nat rules exist by the name provided." + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules": { + "get": { + "operationId": "NatRules_ListByVirtualNetworkGateway", + "x-ms-examples": { + "NatRuleList": { + "$ref": "./examples/VirtualNetworkGatewayNatRuleList.json" + } + }, + "description": "Retrieves all nat rules for a particular virtual network gateway.", + "parameters": [ + { + "$ref": "./network.json#/parameters/SubscriptionIdParameter" + }, + { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The resource group name of the virtual network gateway." + }, + { + "name": "gatewayName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the gateway." + }, + { + "$ref": "./network.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Request successful. Returns all Nat rules for a virtual network gateway.", + "schema": { + "$ref": "#/definitions/ListVirtualNetworkGatewayNatRulesResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "./network.json#/definitions/CloudError" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } } }, "definitions": { @@ -2385,6 +2619,104 @@ ], "description": "IP configuration for virtual network gateway." }, + "VpnNatRuleMapping": { + "properties": { + "addressSpace": { + "type": "string", + "description": "Address space for Vpn NatRule mapping." + } + }, + "description": "Vpn NatRule mapping." + }, +"VirtualNetworkGatewayNatRuleProperties": { + "properties": { + "provisioningState": { + "readOnly": true, + "$ref": "./network.json#/definitions/ProvisioningState", + "description": "The provisioning state of the NAT Rule resource." + }, + "type": { + "type": "string", + "description": "The type of NAT rule for VPN NAT.", + "enum": [ + "Static", + "Dynamic" + ], + "x-ms-enum": { + "name": "VpnNatRuleType", + "modelAsString": true + } + }, + "mode": { + "type": "string", + "description": "The Source NAT direction of a VPN NAT.", + "enum": [ + "EgressSnat", + "IngressSnat" + ], + "x-ms-enum": { + "name": "VpnNatRuleMode", + "modelAsString": true + } + }, + "internalMappings": { + "type": "array", + "items": { + "$ref": "#/definitions/VpnNatRuleMapping" + }, + "description": "The private IP address internal mapping for NAT." + }, + "externalMappings": { + "type": "array", + "items": { + "$ref": "#/definitions/VpnNatRuleMapping" + }, + "description": "The private IP address external mapping for NAT." + }, + "ipConfigurationId": { + "type": "string", + "description": "The IP Configuration ID this NAT rule applies to." + }, + "VirtualNetworkGatewayConnections": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "List of VirtualNetworkGatewayConnections" + } + }, + "description": "Parameters for VirtualNetworkGatewayNatRule." + }, + "VirtualNetworkGatewayNatRule": { + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/VirtualNetworkGatewayNatRuleProperties", + "description": "Properties of the Virtual Network Gateway NAT rule." + }, + "name": { + "type": "string", + "description": "The name of the resource that is unique within a resource group. This name can be used to access the resource." + }, + "etag": { + "type": "string", + "readOnly": true, + "description": "A unique read-only string that changes whenever the resource is updated." + }, + "type": { + "readOnly": true, + "type": "string", + "description": "Resource type." + } + }, + "allOf": [ + { + "$ref": "./network.json#/definitions/SubResource" + } + ], + "description": "VirtualNetworkGatewayNatRule Resource." + }, "VirtualNetworkGatewayPropertiesFormat": { "properties": { "ipConfigurations": { @@ -2490,6 +2822,17 @@ "virtualNetworkExtendedLocation": { "description": "The extended location of type local virtual network gateway.", "$ref": "./network.json#/definitions/ExtendedLocation" + }, + "natRules": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualNetworkGatewayNatRule" + }, + "description": "NatRules for virtual network gateway." + }, + "enableBgpRouteTranslationForNat": { + "type": "boolean", + "description": "enableBgpRouteTranslationForNat flag." } }, "description": "VirtualNetworkGateway properties." @@ -2956,6 +3299,22 @@ }, "description": "Response for the ListVirtualNetworkGateways API service call." }, + "ListVirtualNetworkGatewayNatRulesResult": { + "description": "Result of the request to list all nat rules to a virtual network gateway. It contains a list of Nat rules and a URL nextLink to get the next set of results.", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/VirtualNetworkGatewayNatRule" + }, + "description": "List of Nat Rules." + }, + "nextLink": { + "type": "string", + "description": "URL to get the next set of operation list results if there are any." + } + } + }, "BgpPeerStatusListResult": { "properties": { "value": { @@ -3030,6 +3389,20 @@ "$ref": "#/definitions/LocalNetworkGateway", "description": "The reference to local network gateway resource." }, + "ingressNatRules": { + "type": "array", + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "List of ingress NatRules" + }, + "egressNatRules": { + "type": "array", + "items": { + "$ref": "./network.json#/definitions/SubResource" + }, + "description": "List of egress NatRules." + }, "connectionType": { "$ref": "#/definitions/VirtualNetworkGatewayConnectionType", "description": "Gateway connection type." @@ -3869,4 +4242,4 @@ "description": "Properties of IPConfigurationBgpPeeringAddress." } } -} +} \ No newline at end of file From 5d32037bc3925f4cbbb8fd9c787b45012be15059 Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Mon, 8 Mar 2021 06:55:55 -0800 Subject: [PATCH 2/4] fixes --- .../stable/2020-11-01/virtualNetworkGateway.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json index d7e50fe999d0..f0fca3ef67bc 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json @@ -2336,7 +2336,7 @@ "get": { "operationId": "VirtualNetworkGatewayNatRules_Get", "x-ms-examples": { - "NatRuleGet": { + "VirtualNetworkGatewayNatRuleGet": { "$ref": "./examples/VirtualNetworkGatewayNatRuleGet.json" } }, @@ -2388,7 +2388,7 @@ "put": { "operationId": "VirtualNetworkGatewayNatRules_CreateOrUpdate", "x-ms-examples": { - "NatRulePut": { + "VirtualNetworkGatewayNatRulePut": { "$ref": "./examples/VirtualNetworkGatewayNatRulePut.json" } }, @@ -2459,7 +2459,7 @@ "delete": { "operationId": "VirtualNetworkGatewayNatRules_Delete", "x-ms-examples": { - "NatRuleDelete": { + "VirtualNetworkGatewayNatRuleDelete": { "$ref": "./examples/VirtualNetworkGatewayNatRuleDelete.json" } }, @@ -2520,7 +2520,7 @@ "get": { "operationId": "NatRules_ListByVirtualNetworkGateway", "x-ms-examples": { - "NatRuleList": { + "VirtualNetworkGatewayNatRuleList": { "$ref": "./examples/VirtualNetworkGatewayNatRuleList.json" } }, @@ -2537,7 +2537,7 @@ "description": "The resource group name of the virtual network gateway." }, { - "name": "gatewayName", + "name": "virtualNetworkGatewayName", "in": "path", "required": true, "type": "string", @@ -2677,7 +2677,7 @@ "type": "string", "description": "The IP Configuration ID this NAT rule applies to." }, - "VirtualNetworkGatewayConnections": { + "virtualNetworkGatewayConnections": { "type": "array", "readOnly": true, "items": { @@ -4242,4 +4242,4 @@ "description": "Properties of IPConfigurationBgpPeeringAddress." } } -} \ No newline at end of file +} From fdfbff46f60b8ac1ccc19d0b19481c9e51feef34 Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Mon, 8 Mar 2021 07:10:33 -0800 Subject: [PATCH 3/4] pretrier --- .../stable/2020-11-01/virtualNetworkGateway.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json index f0fca3ef67bc..a1df4306dfc4 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json @@ -2516,7 +2516,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/natRules": { "get": { "operationId": "NatRules_ListByVirtualNetworkGateway", "x-ms-examples": { @@ -2628,7 +2628,7 @@ }, "description": "Vpn NatRule mapping." }, -"VirtualNetworkGatewayNatRuleProperties": { + "VirtualNetworkGatewayNatRuleProperties": { "properties": { "provisioningState": { "readOnly": true, From f981f008dde8caf01250c8ba86e61b8fae8e8f35 Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Tue, 16 Mar 2021 12:14:05 -0700 Subject: [PATCH 4/4] fixes --- .../2020-11-01/virtualNetworkGateway.json | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json index a1df4306dfc4..6d2f1763f31c 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2020-11-01/virtualNetworkGateway.json @@ -2619,15 +2619,6 @@ ], "description": "IP configuration for virtual network gateway." }, - "VpnNatRuleMapping": { - "properties": { - "addressSpace": { - "type": "string", - "description": "Address space for Vpn NatRule mapping." - } - }, - "description": "Vpn NatRule mapping." - }, "VirtualNetworkGatewayNatRuleProperties": { "properties": { "provisioningState": { @@ -2662,28 +2653,20 @@ "internalMappings": { "type": "array", "items": { - "$ref": "#/definitions/VpnNatRuleMapping" + "$ref": "./virtualWan.json#/definitions/VpnNatRuleMapping" }, "description": "The private IP address internal mapping for NAT." }, "externalMappings": { "type": "array", "items": { - "$ref": "#/definitions/VpnNatRuleMapping" + "$ref": "./virtualWan.json#/definitions/VpnNatRuleMapping" }, "description": "The private IP address external mapping for NAT." }, "ipConfigurationId": { "type": "string", "description": "The IP Configuration ID this NAT rule applies to." - }, - "virtualNetworkGatewayConnections": { - "type": "array", - "readOnly": true, - "items": { - "$ref": "./network.json#/definitions/SubResource" - }, - "description": "List of VirtualNetworkGatewayConnections" } }, "description": "Parameters for VirtualNetworkGatewayNatRule." @@ -2832,7 +2815,7 @@ }, "enableBgpRouteTranslationForNat": { "type": "boolean", - "description": "enableBgpRouteTranslationForNat flag." + "description": "EnableBgpRouteTranslationForNat flag." } }, "description": "VirtualNetworkGateway properties." @@ -3394,7 +3377,7 @@ "items": { "$ref": "./network.json#/definitions/SubResource" }, - "description": "List of ingress NatRules" + "description": "List of ingress NatRules." }, "egressNatRules": { "type": "array",