@@ -502,7 +502,7 @@ public VirtualNetworkGatewayContext GetGateway(string vnetName)
502
502
State = ( ProvisioningState ) Enum . Parse ( typeof ( ProvisioningState ) , response . State , true ) ,
503
503
VIPAddress = response . VipAddress ,
504
504
DefaultSite = ( response . DefaultSite != null ? response . DefaultSite . Name : null ) ,
505
- GatewaySKU = response . GatewaySKU ,
505
+ GatewaySKU = response . GatewaySKU ,
506
506
} ;
507
507
PopulateOperationContext ( response . RequestId , gatewayContext ) ;
508
508
@@ -1096,6 +1096,9 @@ public GetVirtualNetworkGatewayContext GetVirtualNetworkGateway(string gatewayId
1096
1096
VnetId = response . VnetId ,
1097
1097
SubnetId = response . SubnetId ,
1098
1098
EnableBgp = response . EnableBgp . ToString ( ) ,
1099
+ Asn = response . BgpSettings . Asn ,
1100
+ BgpPeeringAddress = response . BgpSettings . BgpPeeringAddress ,
1101
+ PeerWeight = response . BgpSettings . PeerWeight ,
1099
1102
} ;
1100
1103
PopulateOperationContext ( response . RequestId , gatewayContext ) ;
1101
1104
@@ -1123,6 +1126,7 @@ public GetVirtualNetworkGatewayConnectionContext GetVirtualNetworkGatewayConnect
1123
1126
GatewayConnectionType = response . GatewayConnectionType ,
1124
1127
RoutingWeight = response . RoutingWeight ,
1125
1128
SharedKey = response . SharedKey ,
1129
+ EnableBgp = response . EnableBgp . ToString ( ) ,
1126
1130
} ;
1127
1131
PopulateOperationContext ( response . RequestId , gatewayContext ) ;
1128
1132
@@ -1144,6 +1148,9 @@ public GetLocalNetworkGatewayContext GetLocalNetworkGateway(string gatewayId)
1144
1148
GatewayName = response . GatewayName ,
1145
1149
IpAddress = response . IpAddress ,
1146
1150
AddressSpace = response . AddressSpace . ToList ( ) ,
1151
+ Asn = response . BgpSettings . Asn ,
1152
+ BgpPeeringAddress = response . BgpSettings . BgpPeeringAddress ,
1153
+ PeerWeight = response . BgpSettings . PeerWeight ,
1147
1154
} ;
1148
1155
PopulateOperationContext ( response . RequestId , gatewayContext ) ;
1149
1156
@@ -1215,6 +1222,9 @@ public IEnumerable<GetLocalNetworkGatewayContext> ListLocalNetworkGateways()
1215
1222
GatewayName = localNetworkGateway . GatewayName ,
1216
1223
IpAddress = localNetworkGateway . IpAddress ,
1217
1224
AddressSpace = localNetworkGateway . AddressSpace . ToList ( ) ,
1225
+ Asn = localNetworkGateway . BgpSettings . Asn ,
1226
+ BgpPeeringAddress = localNetworkGateway . BgpSettings . BgpPeeringAddress ,
1227
+ PeerWeight = localNetworkGateway . BgpSettings . PeerWeight ,
1218
1228
} ;
1219
1229
} ) ;
1220
1230
PopulateOperationContext ( response . RequestId , localNetworkGateways ) ;
@@ -1249,7 +1259,8 @@ public SharedKeyContext GetSharedKeyV2(string gatewayId, string connectedentityI
1249
1259
return sharedKeyContext ;
1250
1260
}
1251
1261
1252
- public GatewayGetOperationStatusResponse CreateVirtualNetworkGateway ( string vnetName , string gatewayName , string gatewayType , string gatewaySKU , string location , string vnetId )
1262
+ public GatewayGetOperationStatusResponse CreateVirtualNetworkGateway ( string vnetName , string gatewayName , string gatewayType , string gatewaySKU , string location , string vnetId ,
1263
+ uint Asn , string BgpPeeringAddress , int PeerWeight )
1253
1264
{
1254
1265
VirtualNetworkGatewayCreateParameters parameters = new VirtualNetworkGatewayCreateParameters ( )
1255
1266
{
@@ -1258,13 +1269,18 @@ public GatewayGetOperationStatusResponse CreateVirtualNetworkGateway(string vnet
1258
1269
GatewayType = gatewayType ,
1259
1270
Location = location ,
1260
1271
VnetId = vnetId ,
1272
+ BgpSettings = Asn > 0 ? new BgpSettings {
1273
+ Asn = Asn ,
1274
+ BgpPeeringAddress = BgpPeeringAddress ,
1275
+ PeerWeight = PeerWeight
1276
+ } : null ,
1261
1277
} ;
1262
1278
1263
1279
return client . Gateways . CreateVirtualNetworkGateway ( vnetName , parameters ) ;
1264
1280
}
1265
1281
1266
1282
public GatewayGetOperationStatusResponse CreateVirtualNetworkGatewayConnection ( string connectedEntityId , string gatewayConnectionName , string gatewayConnectionType ,
1267
- int routingWeight , string sharedKey , Guid virtualNetworkGatewayId )
1283
+ int routingWeight , string sharedKey , Guid virtualNetworkGatewayId , bool EnableBgp )
1268
1284
{
1269
1285
GatewayConnectionCreateParameters parameters = new GatewayConnectionCreateParameters ( )
1270
1286
{
@@ -1273,19 +1289,26 @@ public GatewayGetOperationStatusResponse CreateVirtualNetworkGatewayConnection(s
1273
1289
GatewayConnectionType = gatewayConnectionType ,
1274
1290
VirtualNetworkGatewayId = virtualNetworkGatewayId ,
1275
1291
RoutingWeight = routingWeight ,
1276
- SharedKey = sharedKey ,
1292
+ SharedKey = sharedKey ,
1293
+ EnableBgp = EnableBgp ,
1277
1294
} ;
1278
1295
1279
1296
return client . Gateways . CreateGatewayConnection ( parameters ) ;
1280
1297
}
1281
1298
1282
- public LocalNetworkGatewayCreateResponse CreateLocalNetworkGateway ( string gatewayName , string ipAddress , List < string > addressSpace )
1299
+ public LocalNetworkGatewayCreateResponse CreateLocalNetworkGateway ( string gatewayName , string ipAddress , List < string > addressSpace ,
1300
+ uint Asn , string BgpPeeringAddress , int PeerWeight )
1283
1301
{
1284
1302
LocalNetworkGatewayCreateParameters parameters = new LocalNetworkGatewayCreateParameters ( )
1285
1303
{
1286
1304
AddressSpace = addressSpace ,
1287
1305
GatewayName = gatewayName ,
1288
1306
IpAddress = ipAddress ,
1307
+ BgpSettings = Asn > 0 ? new BgpSettings {
1308
+ Asn = Asn ,
1309
+ BgpPeeringAddress = BgpPeeringAddress ,
1310
+ PeerWeight = PeerWeight ,
1311
+ } : null ,
1289
1312
} ;
1290
1313
1291
1314
return client . Gateways . CreateLocalNetworkGateway ( parameters ) ;
@@ -1340,21 +1363,27 @@ public GatewayGetOperationStatusResponse ResizeVirtualNetworkGateway(string gate
1340
1363
return client . Gateways . ResizeVirtualNetworkGateway ( gatewayId , parameters ) ;
1341
1364
}
1342
1365
1343
- public GatewayGetOperationStatusResponse UpdateVirtualNetworkGatewayConnection ( string gatewayId , string connectedentityId , int routingWeight , string sharedKey )
1366
+ public GatewayGetOperationStatusResponse UpdateVirtualNetworkGatewayConnection ( string gatewayId , string connectedentityId , int routingWeight , string sharedKey , bool EnableBgp )
1344
1367
{
1345
1368
UpdateGatewayConnectionParameters parameters = new UpdateGatewayConnectionParameters ( )
1346
1369
{
1347
1370
RoutingWeight = routingWeight ,
1348
1371
SharedKey = sharedKey ,
1372
+ EnableBgp = EnableBgp ,
1349
1373
} ;
1350
1374
return client . Gateways . UpdateGatewayConnection ( gatewayId , connectedentityId , parameters ) ;
1351
1375
}
1352
1376
1353
- public AzureOperationResponse UpdateLocalNetworkGateway ( string gatewayId , List < string > addressSpace )
1377
+ public AzureOperationResponse UpdateLocalNetworkGateway ( string gatewayId , List < string > addressSpace , uint Asn , string BgpPeeringAddress , int PeerWeight )
1354
1378
{
1355
1379
UpdateLocalNetworkGatewayParameters parameters = new UpdateLocalNetworkGatewayParameters ( )
1356
1380
{
1357
1381
AddressSpace = addressSpace ,
1382
+ BgpSettings = Asn > 0 ? new BgpSettings {
1383
+ Asn = Asn ,
1384
+ BgpPeeringAddress = BgpPeeringAddress ,
1385
+ PeerWeight = PeerWeight ,
1386
+ } : null ,
1358
1387
} ;
1359
1388
1360
1389
return client . Gateways . UpdateLocalNetworkGateway ( gatewayId , parameters ) ;
0 commit comments