From b85eb678b701dbb49e3c564066d28506ee4d671d Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Wed, 17 Mar 2021 09:24:02 -0700 Subject: [PATCH 1/4] commit1 --- ...VirtualNetworkGatewayConnectionCreate.json | 30 +++++ .../VirtualNetworkGatewayConnectionGet.json | 10 ++ ...ualNetworkGatewayConnectionUpdateTags.json | 10 ++ .../VirtualNetworkGatewayConnectionsList.json | 20 +++ .../examples/VirtualNetworkGatewayGet.json | 43 ++++++ .../examples/VirtualNetworkGatewayList.json | 86 ++++++++++++ .../VirtualNetworkGatewayNatRuleDelete.json | 14 ++ .../VirtualNetworkGatewayNatRuleGet.json | 34 +++++ .../VirtualNetworkGatewayNatRuleList.json | 56 ++++++++ .../VirtualNetworkGatewayNatRulePut.json | 74 +++++++++++ .../examples/VirtualNetworkGatewayReset.json | 2 + .../examples/VirtualNetworkGatewayUpdate.json | 123 ++++++++++++++++++ .../VirtualNetworkGatewayUpdateTags.json | 2 + 13 files changed, 504 insertions(+) create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleDelete.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleGet.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleList.json create mode 100644 specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRulePut.json diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionCreate.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionCreate.json index 2dd7ef53d3ea..55e07fcd51ee 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionCreate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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, @@ -120,6 +140,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/2021-02-01/examples/VirtualNetworkGatewayConnectionGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionGet.json index 856afd8ef28b..5a4b5b9c0b62 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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/2021-02-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json index 12583f3df84e..60db3ec17f06 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionUpdateTags.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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/2021-02-01/examples/VirtualNetworkGatewayConnectionsList.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionsList.json index 0788dd994705..b243bcbec2b8 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayConnectionsList.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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/2021-02-01/examples/VirtualNetworkGatewayGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayGet.json index 2db2d8f90e23..f0e62bf7b282 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayGet.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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/2021-02-01/examples/VirtualNetworkGatewayList.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayList.json index 2a79b60062ce..b89b59743655 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayList.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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/2021-02-01/examples/VirtualNetworkGatewayNatRuleDelete.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleDelete.json new file mode 100644 index 000000000000..2f7bdc509eed --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleDelete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "natRuleName": "natRule1", + "virtualNetworkGatewayName": "gateway1", + "resourceGroupName": "rg1", + "api-version": "2021-02-01", + "subscriptionId": "subid" + }, + "responses": { + "200": {}, + "202": {}, + "204": {} + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleGet.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleGet.json new file mode 100644 index 000000000000..79d11a7bbfb7 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleGet.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "virtualNetworkGatewayName": "gateway1", + "natRuleName": "natRule1", + "resourceGroupName": "rg1", + "api-version": "2021-02-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", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/ipConfigurations/default", + "internalMappings": [ + { + "addressSpace": "10.4.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "50.4.0.0/24" + } + ] + } + } + } + } +} diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleList.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleList.json new file mode 100644 index 000000000000..9f92e7d38570 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRuleList.json @@ -0,0 +1,56 @@ +{ + "parameters": { + "virtualNetworkGatewayName": "gateway1", + "api-version": "2021-02-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/gateway1/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/gateway1/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/2021-02-01/examples/VirtualNetworkGatewayNatRulePut.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRulePut.json new file mode 100644 index 000000000000..4e2e32140c95 --- /dev/null +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayNatRulePut.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "natRuleName": "natRule1", + "virtualNetworkGatewayName": "gateway1", + "resourceGroupName": "rg1", + "api-version": "2021-02-01", + "subscriptionId": "subid", + "NatRuleParameters": { + "properties": { + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/gateway1/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/gateway1/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/gateway1/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/2021-02-01/examples/VirtualNetworkGatewayReset.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayReset.json index 18efa04858b1..1780ead5f920 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayReset.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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/2021-02-01/examples/VirtualNetworkGatewayUpdate.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayUpdate.json index bf814e27c4f1..5f2a920296f7 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayUpdate.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayUpdate.json @@ -25,6 +25,47 @@ "enableBgp": false, "activeActive": false, "enableDnsForwarding": true, + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "properties": { + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "", + "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", + "ipConfigurationId": "", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1" @@ -85,6 +126,47 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "properties": { + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "", + "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", + "ipConfigurationId": "", + "internalMappings": [ + { + "addressSpace": "20.10.0.0/24" + } + ], + "externalMappings": [ + { + "addressSpace": "30.0.0.0/24" + } + ] + } + } + ], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", @@ -164,6 +246,47 @@ } } ], + "natRules": [ + { + "name": "natRule1", + "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/virtualNetworkGateways/vpngw/natRules/natRule1", + "properties": { + "type": "Static", + "mode": "EgressSnat", + "ipConfigurationId": "", + "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", + "ipConfigurationId": "", + "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/2021-02-01/examples/VirtualNetworkGatewayUpdateTags.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayUpdateTags.json index 87f60a52d004..13e451833b1d 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayUpdateTags.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/examples/VirtualNetworkGatewayUpdateTags.json @@ -42,6 +42,8 @@ } } ], + "natRules": [], + "enableBgpRouteTranslationForNat": false, "sku": { "name": "VpnGw1", "tier": "VpnGw1", From d497683d9ae670b9b3f7b48ba173940efa41ecac Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Wed, 17 Mar 2021 09:37:53 -0700 Subject: [PATCH 2/4] commit2 --- .../2021-02-01/virtualNetworkGateway.json | 356 ++++++++++++++++++ 1 file changed, 356 insertions(+) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json index a7a8a098dbb8..240627b14143 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-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": { + "VirtualNetworkGatewayNatRuleGet": { + "$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": { + "VirtualNetworkGatewayNatRulePut": { + "$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": { + "VirtualNetworkGatewayNatRuleDelete": { + "$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": { + "VirtualNetworkGatewayNatRuleList": { + "$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": "virtualNetworkGatewayName", + "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,87 @@ ], "description": "IP configuration for virtual network gateway." }, + "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": "./virtualWan.json#/definitions/VpnNatRuleMapping" + }, + "description": "The private IP address internal mapping for NAT." + }, + "externalMappings": { + "type": "array", + "items": { + "$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." + } + }, + "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 +2805,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 +3282,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 +3372,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." From 9b9eb9f10291c46c937c6b140889ab5bf93072b2 Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Thu, 18 Mar 2021 01:39:26 -0700 Subject: [PATCH 3/4] resolving comments --- .../stable/2021-02-01/virtualNetworkGateway.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json index 240627b14143..70481c8e38ac 100644 --- a/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json +++ b/specification/network/resource-manager/Microsoft.Network/stable/2021-02-01/virtualNetworkGateway.json @@ -2340,7 +2340,7 @@ "$ref": "./examples/VirtualNetworkGatewayNatRuleGet.json" } }, - "description": "Retrieves the details of a nat ruleGet.", + "description": "Retrieves the details of a nat rule.", "parameters": [ { "$ref": "./network.json#/parameters/SubscriptionIdParameter" From 17a06363cac8a223b20bce3b9b6f4af325dd9689 Mon Sep 17 00:00:00 2001 From: Khushboo Baheti Date: Fri, 19 Mar 2021 11:33:47 -0700 Subject: [PATCH 4/4] pythonMd --- .../network/resource-manager/readme.python.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/specification/network/resource-manager/readme.python.md b/specification/network/resource-manager/readme.python.md index 9e92925928f6..27f6761268d7 100644 --- a/specification/network/resource-manager/readme.python.md +++ b/specification/network/resource-manager/readme.python.md @@ -16,6 +16,7 @@ Generate all API versions currently shipped for this package ```yaml $(multiapi) clear-output-folder: true batch: + - tag: package-2021-02 - tag: package-2020-11 - tag: package-2020-08 - tag: package-2020-07 @@ -57,6 +58,15 @@ output-folder: $(python-sdks-folder)/network/azure-mgmt-network/azure/mgmt/netwo clear-output-folder: false perform-load: false ``` +### Tag: package-2021-02 and python + +These settings apply only when `--tag=package-2021-02 --python` is specified on the command line. +Please also specify `--python-sdks-folder=`. + +``` yaml $(tag) == 'package-2021-02' +namespace: azure.mgmt.network.v2021_02_01 +output-folder: $(python-sdks-folder)/network/azure-mgmt-network/azure/mgmt/network/v2021_02_01 +``` ### Tag: package-2020-11 and python