From 3b4535b1c1a031b18b5f4d22bd8b74be4d02cea7 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 2 Apr 2018 20:49:43 +0000 Subject: [PATCH 1/2] Generated from 7ad48d8f71799eed22d68bc6052c27714794a3d8 fix the veresion for vmss public ip and nic --- lib/services/networkManagement2/LICENSE.txt | 42 +- .../lib/models/applicationGateway.js | 4 + .../applicationGatewayBackendHealthServer.js | 2 + ...ewayWebApplicationFirewallConfiguration.js | 21 + .../lib/models/connectionMonitor.js | 116 + .../models/connectionMonitorDestination.js | 70 + .../lib/models/connectionMonitorListResult.js | 59 + .../lib/models/connectionMonitorParameters.js | 93 + .../models/connectionMonitorQueryResult.js | 71 + .../lib/models/connectionMonitorResult.js | 183 + .../lib/models/connectionMonitorSource.js | 61 + .../lib/models/connectionStateSnapshot.js | 98 + .../lib/models/connectivityParameters.js | 25 + .../lib/models/ddosProtectionPlan.js | 143 + .../models/ddosProtectionPlanListResult.js | 68 + .../models/expressRouteCircuitConnection.js | 135 + .../lib/models/expressRouteCircuitPeering.js | 31 +- .../models/expressRouteCircuitReference.js | 51 + .../lib/models/expressRouteCrossConnection.js | 207 + .../expressRouteCrossConnectionListResult.js | 68 + .../expressRouteCrossConnectionPeering.js | 266 + .../expressRouteCrossConnectionPeeringList.js | 69 + ...sRouteCrossConnectionRoutesTableSummary.js | 80 + ...ConnectionsRoutesTableSummaryListResult.js | 72 + .../lib/models/frontendIPConfiguration.js | 2 + .../lib/models/hTTPConfiguration.js | 85 + .../lib/models/hTTPHeader.js | 60 + .../lib/models/iPConfiguration.js | 2 + .../lib/models/inboundNatPool.js | 23 + .../lib/models/inboundNatRule.js | 2 + .../networkManagement2/lib/models/index.d.ts | 755 +- .../networkManagement2/lib/models/index.js | 25 +- .../networkManagement2/lib/models/ipTag.js | 62 + .../lib/models/ipsecPolicy.js | 10 +- .../models/networkInterfaceIPConfiguration.js | 2 + .../lib/models/patchRouteFilterRule.js | 15 - .../lib/models/protocolConfiguration.js | 59 + .../lib/models/publicIPAddress.js | 17 + .../lib/models/routeFilterRule.js | 15 - .../lib/models/virtualNetwork.js | 21 +- .../lib/models/virtualNetworkGateway.js | 2 + .../models/virtualNetworkGatewayConnection.js | 6 + .../lib/models/vpnClientConfiguration.js | 17 + .../lib/models/vpnClientIPsecParameters.js | 122 + .../lib/networkManagementClient.d.ts | 9 +- .../lib/networkManagementClient.js | 10 +- .../lib/operations/applicationGateways.js | 82 +- .../operations/applicationSecurityGroups.js | 18 +- .../operations/availableEndpointServices.js | 2 +- .../lib/operations/bgpServiceCommunities.js | 2 +- .../lib/operations/connectionMonitors.js | 2746 ++++ .../lib/operations/ddosProtectionPlans.js | 1964 +++ .../lib/operations/defaultSecurityRules.js | 4 +- .../expressRouteCircuitAuthorizations.js | 16 +- .../expressRouteCircuitConnections.js | 1342 ++ .../operations/expressRouteCircuitPeerings.js | 98 +- .../lib/operations/expressRouteCircuits.js | 30 +- .../expressRouteCrossConnectionPeerings.js | 2142 +++ .../expressRouteCrossConnections.js | 3450 ++++ .../expressRouteServiceProviders.js | 2 +- .../lib/operations/inboundNatRules.js | 16 +- .../lib/operations/index.d.ts | 13144 +++++++++++----- .../lib/operations/index.js | 5 + .../loadBalancerBackendAddressPools.js | 4 +- .../loadBalancerFrontendIPConfigurations.js | 4 +- .../loadBalancerLoadBalancingRules.js | 4 +- .../loadBalancerNetworkInterfaces.js | 2 +- .../lib/operations/loadBalancerProbes.js | 4 +- .../lib/operations/loadBalancers.js | 20 +- .../lib/operations/localNetworkGateways.js | 18 +- .../networkInterfaceIPConfigurations.js | 4 +- .../networkInterfaceLoadBalancers.js | 2 +- .../lib/operations/networkInterfaces.js | 34 +- .../lib/operations/networkSecurityGroups.js | 20 +- .../lib/operations/networkWatchers.js | 136 +- .../lib/operations/operations.js | 2 +- .../lib/operations/packetCaptures.js | 14 +- .../lib/operations/publicIPAddresses.js | 44 +- .../lib/operations/routeFilterRules.js | 36 +- .../lib/operations/routeFilters.js | 14 +- .../lib/operations/routeTables.js | 14 +- .../lib/operations/routes.js | 10 +- .../lib/operations/securityRules.js | 10 +- .../lib/operations/subnets.js | 10 +- .../lib/operations/usages.js | 2 +- .../virtualNetworkGatewayConnections.js | 46 +- .../lib/operations/virtualNetworkGateways.js | 1263 +- .../lib/operations/virtualNetworkPeerings.js | 10 +- .../lib/operations/virtualNetworks.js | 90 +- lib/services/networkManagement2/package.json | 35 +- 90 files changed, 25371 insertions(+), 4900 deletions(-) create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitor.js create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitorDestination.js create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitorListResult.js create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitorParameters.js create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitorResult.js create mode 100644 lib/services/networkManagement2/lib/models/connectionMonitorSource.js create mode 100644 lib/services/networkManagement2/lib/models/connectionStateSnapshot.js create mode 100644 lib/services/networkManagement2/lib/models/ddosProtectionPlan.js create mode 100644 lib/services/networkManagement2/lib/models/ddosProtectionPlanListResult.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCircuitReference.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCrossConnection.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCrossConnectionListResult.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeeringList.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCrossConnectionRoutesTableSummary.js create mode 100644 lib/services/networkManagement2/lib/models/expressRouteCrossConnectionsRoutesTableSummaryListResult.js create mode 100644 lib/services/networkManagement2/lib/models/hTTPConfiguration.js create mode 100644 lib/services/networkManagement2/lib/models/hTTPHeader.js create mode 100644 lib/services/networkManagement2/lib/models/ipTag.js create mode 100644 lib/services/networkManagement2/lib/models/protocolConfiguration.js create mode 100644 lib/services/networkManagement2/lib/models/vpnClientIPsecParameters.js create mode 100644 lib/services/networkManagement2/lib/operations/connectionMonitors.js create mode 100644 lib/services/networkManagement2/lib/operations/ddosProtectionPlans.js create mode 100644 lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js create mode 100644 lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js create mode 100644 lib/services/networkManagement2/lib/operations/expressRouteCrossConnections.js diff --git a/lib/services/networkManagement2/LICENSE.txt b/lib/services/networkManagement2/LICENSE.txt index 0313a903d7..5431ba98b9 100644 --- a/lib/services/networkManagement2/LICENSE.txt +++ b/lib/services/networkManagement2/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2017 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file +The MIT License (MIT) + +Copyright (c) 2018 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/lib/services/networkManagement2/lib/models/applicationGateway.js b/lib/services/networkManagement2/lib/models/applicationGateway.js index 2b1ee1b006..47ddea3f90 100644 --- a/lib/services/networkManagement2/lib/models/applicationGateway.js +++ b/lib/services/networkManagement2/lib/models/applicationGateway.js @@ -82,6 +82,10 @@ class ApplicationGateway extends models['Resource'] { * version of the rule set type. * @member {array} [webApplicationFirewallConfiguration.disabledRuleGroups] * The disabled rule groups. + * @member {boolean} [webApplicationFirewallConfiguration.requestBodyCheck] + * Whether allow WAF to check request Body. + * @member {number} [webApplicationFirewallConfiguration.maxRequestBodySize] + * Maxium request body size for WAF. * @member {boolean} [enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @member {string} [resourceGuid] Resource GUID property of the application diff --git a/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js b/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js index bea1e6adb1..1c0b56e51c 100644 --- a/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js +++ b/lib/services/networkManagement2/lib/models/applicationGatewayBackendHealthServer.js @@ -215,6 +215,8 @@ class ApplicationGatewayBackendHealthServer { * that resolves to this public IP address. If the reverseFqdn is specified, * then a PTR DNS record is created pointing from the IP address in the * in-addr.arpa domain to the reverse FQDN. + * @member {array} [ipConfiguration.publicIPAddress.ipTags] The list of tags + * associated with the public IP address. * @member {string} [ipConfiguration.publicIPAddress.ipAddress] The IP * address associated with the public IP address resource. * @member {number} [ipConfiguration.publicIPAddress.idleTimeoutInMinutes] diff --git a/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js b/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js index e5975e174d..188a421193 100644 --- a/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js +++ b/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js @@ -27,6 +27,9 @@ class ApplicationGatewayWebApplicationFirewallConfiguration { * set. Possible values are: 'OWASP'. * @member {string} ruleSetVersion The version of the rule set type. * @member {array} [disabledRuleGroups] The disabled rule groups. + * @member {boolean} [requestBodyCheck] Whether allow WAF to check request + * Body. + * @member {number} [maxRequestBodySize] Maxium request body size for WAF. */ constructor() { } @@ -87,6 +90,24 @@ class ApplicationGatewayWebApplicationFirewallConfiguration { } } } + }, + requestBodyCheck: { + required: false, + serializedName: 'requestBodyCheck', + type: { + name: 'Boolean' + } + }, + maxRequestBodySize: { + required: false, + serializedName: 'maxRequestBodySize', + constraints: { + InclusiveMaximum: 128, + InclusiveMinimum: 8 + }, + type: { + name: 'Number' + } } } } diff --git a/lib/services/networkManagement2/lib/models/connectionMonitor.js b/lib/services/networkManagement2/lib/models/connectionMonitor.js new file mode 100644 index 0000000000..d690fcf86d --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitor.js @@ -0,0 +1,116 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Parameters that define the operation to create a connection monitor. + * + */ +class ConnectionMonitor { + /** + * Create a ConnectionMonitor. + * @member {string} [location] Connection monitor location. + * @member {object} [tags] Connection monitor tags. + * @member {object} source + * @member {string} [source.resourceId] The ID of the resource used as the + * source by connection monitor. + * @member {number} [source.port] The source port used by connection monitor. + * @member {object} destination + * @member {string} [destination.resourceId] The ID of the resource used as + * the destination by connection monitor. + * @member {string} [destination.address] Address of the connection monitor + * destination (IP or domain name). + * @member {number} [destination.port] The destination port used by + * connection monitor. + * @member {boolean} [autoStart] Determines if the connection monitor will + * start automatically once created. Default value: true . + * @member {number} [monitoringIntervalInSeconds] Monitoring interval in + * seconds. Default value: 60 . + */ + constructor() { + } + + /** + * Defines the metadata of ConnectionMonitor + * + * @returns {object} metadata of ConnectionMonitor + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitor', + type: { + name: 'Composite', + className: 'ConnectionMonitor', + modelProperties: { + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + source: { + required: true, + serializedName: 'properties.source', + type: { + name: 'Composite', + className: 'ConnectionMonitorSource' + } + }, + destination: { + required: true, + serializedName: 'properties.destination', + type: { + name: 'Composite', + className: 'ConnectionMonitorDestination' + } + }, + autoStart: { + required: false, + serializedName: 'properties.autoStart', + defaultValue: true, + type: { + name: 'Boolean' + } + }, + monitoringIntervalInSeconds: { + required: false, + serializedName: 'properties.monitoringIntervalInSeconds', + defaultValue: 60, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitor; diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorDestination.js b/lib/services/networkManagement2/lib/models/connectionMonitorDestination.js new file mode 100644 index 0000000000..063b721c85 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitorDestination.js @@ -0,0 +1,70 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the destination of connection monitor. + * + */ +class ConnectionMonitorDestination { + /** + * Create a ConnectionMonitorDestination. + * @member {string} [resourceId] The ID of the resource used as the + * destination by connection monitor. + * @member {string} [address] Address of the connection monitor destination + * (IP or domain name). + * @member {number} [port] The destination port used by connection monitor. + */ + constructor() { + } + + /** + * Defines the metadata of ConnectionMonitorDestination + * + * @returns {object} metadata of ConnectionMonitorDestination + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitorDestination', + type: { + name: 'Composite', + className: 'ConnectionMonitorDestination', + modelProperties: { + resourceId: { + required: false, + serializedName: 'resourceId', + type: { + name: 'String' + } + }, + address: { + required: false, + serializedName: 'address', + type: { + name: 'String' + } + }, + port: { + required: false, + serializedName: 'port', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitorDestination; diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorListResult.js b/lib/services/networkManagement2/lib/models/connectionMonitorListResult.js new file mode 100644 index 0000000000..d9a476a324 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitorListResult.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * List of connection monitors. + */ +class ConnectionMonitorListResult extends Array { + /** + * Create a ConnectionMonitorListResult. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ConnectionMonitorListResult + * + * @returns {object} metadata of ConnectionMonitorListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitorListResult', + type: { + name: 'Composite', + className: 'ConnectionMonitorListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ConnectionMonitorResultElementType', + type: { + name: 'Composite', + className: 'ConnectionMonitorResult' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitorListResult; diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorParameters.js b/lib/services/networkManagement2/lib/models/connectionMonitorParameters.js new file mode 100644 index 0000000000..513f5d6b79 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitorParameters.js @@ -0,0 +1,93 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Parameters that define the operation to create a connection monitor. + * + */ +class ConnectionMonitorParameters { + /** + * Create a ConnectionMonitorParameters. + * @member {object} source + * @member {string} [source.resourceId] The ID of the resource used as the + * source by connection monitor. + * @member {number} [source.port] The source port used by connection monitor. + * @member {object} destination + * @member {string} [destination.resourceId] The ID of the resource used as + * the destination by connection monitor. + * @member {string} [destination.address] Address of the connection monitor + * destination (IP or domain name). + * @member {number} [destination.port] The destination port used by + * connection monitor. + * @member {boolean} [autoStart] Determines if the connection monitor will + * start automatically once created. Default value: true . + * @member {number} [monitoringIntervalInSeconds] Monitoring interval in + * seconds. Default value: 60 . + */ + constructor() { + } + + /** + * Defines the metadata of ConnectionMonitorParameters + * + * @returns {object} metadata of ConnectionMonitorParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitorParameters', + type: { + name: 'Composite', + className: 'ConnectionMonitorParameters', + modelProperties: { + source: { + required: true, + serializedName: 'source', + type: { + name: 'Composite', + className: 'ConnectionMonitorSource' + } + }, + destination: { + required: true, + serializedName: 'destination', + type: { + name: 'Composite', + className: 'ConnectionMonitorDestination' + } + }, + autoStart: { + required: false, + serializedName: 'autoStart', + defaultValue: true, + type: { + name: 'Boolean' + } + }, + monitoringIntervalInSeconds: { + required: false, + serializedName: 'monitoringIntervalInSeconds', + defaultValue: 60, + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitorParameters; diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js b/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js new file mode 100644 index 0000000000..e5040f8fa3 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js @@ -0,0 +1,71 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * List of connection states snaphots. + * + */ +class ConnectionMonitorQueryResult { + /** + * Create a ConnectionMonitorQueryResult. + * @member {string} [sourceStatus] Status of connection monitor source. + * Possible values include: 'Uknown', 'Active', 'Inactive' + * @member {array} [states] Information about connection states. + */ + constructor() { + } + + /** + * Defines the metadata of ConnectionMonitorQueryResult + * + * @returns {object} metadata of ConnectionMonitorQueryResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitorQueryResult', + type: { + name: 'Composite', + className: 'ConnectionMonitorQueryResult', + modelProperties: { + sourceStatus: { + required: false, + serializedName: 'sourceStatus', + type: { + name: 'String' + } + }, + states: { + required: false, + serializedName: 'states', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ConnectionStateSnapshotElementType', + type: { + name: 'Composite', + className: 'ConnectionStateSnapshot' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitorQueryResult; diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorResult.js b/lib/services/networkManagement2/lib/models/connectionMonitorResult.js new file mode 100644 index 0000000000..a26ce4b8f8 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitorResult.js @@ -0,0 +1,183 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Information about the connection monitor. + * + * @extends models['BaseResource'] + */ +class ConnectionMonitorResult extends models['BaseResource'] { + /** + * Create a ConnectionMonitorResult. + * @member {string} [name] Name of the connection monitor. + * @member {string} [id] ID of the connection monitor. + * @member {string} [etag] Default value: 'A unique read-only string that + * changes whenever the resource is updated.' . + * @member {string} [type] Connection monitor type. + * @member {string} [location] Connection monitor location. + * @member {object} [tags] Connection monitor tags. + * @member {object} source + * @member {string} [source.resourceId] The ID of the resource used as the + * source by connection monitor. + * @member {number} [source.port] The source port used by connection monitor. + * @member {object} destination + * @member {string} [destination.resourceId] The ID of the resource used as + * the destination by connection monitor. + * @member {string} [destination.address] Address of the connection monitor + * destination (IP or domain name). + * @member {number} [destination.port] The destination port used by + * connection monitor. + * @member {boolean} [autoStart] Determines if the connection monitor will + * start automatically once created. Default value: true . + * @member {number} [monitoringIntervalInSeconds] Monitoring interval in + * seconds. Default value: 60 . + * @member {string} [provisioningState] The provisioning state of the + * connection monitor. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * @member {date} [startTime] The date and time when the connection monitor + * was started. + * @member {string} [monitoringStatus] The monitoring status of the + * connection monitor. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ConnectionMonitorResult + * + * @returns {object} metadata of ConnectionMonitorResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitorResult', + type: { + name: 'Composite', + className: 'ConnectionMonitorResult', + modelProperties: { + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + id: { + required: false, + readOnly: true, + serializedName: 'id', + type: { + name: 'String' + } + }, + etag: { + required: false, + serializedName: 'etag', + defaultValue: 'A unique read-only string that changes whenever the resource is updated.', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + source: { + required: true, + serializedName: 'properties.source', + type: { + name: 'Composite', + className: 'ConnectionMonitorSource' + } + }, + destination: { + required: true, + serializedName: 'properties.destination', + type: { + name: 'Composite', + className: 'ConnectionMonitorDestination' + } + }, + autoStart: { + required: false, + serializedName: 'properties.autoStart', + defaultValue: true, + type: { + name: 'Boolean' + } + }, + monitoringIntervalInSeconds: { + required: false, + serializedName: 'properties.monitoringIntervalInSeconds', + defaultValue: 60, + type: { + name: 'Number' + } + }, + provisioningState: { + required: false, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + startTime: { + required: false, + serializedName: 'properties.startTime', + type: { + name: 'DateTime' + } + }, + monitoringStatus: { + required: false, + serializedName: 'properties.monitoringStatus', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitorResult; diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorSource.js b/lib/services/networkManagement2/lib/models/connectionMonitorSource.js new file mode 100644 index 0000000000..135c604d84 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionMonitorSource.js @@ -0,0 +1,61 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the source of connection monitor. + * + */ +class ConnectionMonitorSource { + /** + * Create a ConnectionMonitorSource. + * @member {string} resourceId The ID of the resource used as the source by + * connection monitor. + * @member {number} [port] The source port used by connection monitor. + */ + constructor() { + } + + /** + * Defines the metadata of ConnectionMonitorSource + * + * @returns {object} metadata of ConnectionMonitorSource + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionMonitorSource', + type: { + name: 'Composite', + className: 'ConnectionMonitorSource', + modelProperties: { + resourceId: { + required: true, + serializedName: 'resourceId', + type: { + name: 'String' + } + }, + port: { + required: false, + serializedName: 'port', + type: { + name: 'Number' + } + } + } + } + }; + } +} + +module.exports = ConnectionMonitorSource; diff --git a/lib/services/networkManagement2/lib/models/connectionStateSnapshot.js b/lib/services/networkManagement2/lib/models/connectionStateSnapshot.js new file mode 100644 index 0000000000..ccf3aeec06 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/connectionStateSnapshot.js @@ -0,0 +1,98 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Connection state snapshot. + * + */ +class ConnectionStateSnapshot { + /** + * Create a ConnectionStateSnapshot. + * @member {string} [connectionState] The connection state. Possible values + * include: 'Reachable', 'Unreachable', 'Unknown' + * @member {date} [startTime] The start time of the connection snapshot. + * @member {date} [endTime] The end time of the connection snapshot. + * @member {string} [evaluationState] Connectivity analysis evaluation state. + * Possible values include: 'NotStarted', 'InProgress', 'Completed' + * @member {array} [hops] List of hops between the source and the + * destination. + */ + constructor() { + } + + /** + * Defines the metadata of ConnectionStateSnapshot + * + * @returns {object} metadata of ConnectionStateSnapshot + * + */ + mapper() { + return { + required: false, + serializedName: 'ConnectionStateSnapshot', + type: { + name: 'Composite', + className: 'ConnectionStateSnapshot', + modelProperties: { + connectionState: { + required: false, + serializedName: 'connectionState', + type: { + name: 'String' + } + }, + startTime: { + required: false, + serializedName: 'startTime', + type: { + name: 'DateTime' + } + }, + endTime: { + required: false, + serializedName: 'endTime', + type: { + name: 'DateTime' + } + }, + evaluationState: { + required: false, + serializedName: 'evaluationState', + type: { + name: 'String' + } + }, + hops: { + required: false, + readOnly: true, + serializedName: 'hops', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ConnectivityHopElementType', + type: { + name: 'Composite', + className: 'ConnectivityHop' + } + } + } + } + } + } + }; + } +} + +module.exports = ConnectionStateSnapshot; diff --git a/lib/services/networkManagement2/lib/models/connectivityParameters.js b/lib/services/networkManagement2/lib/models/connectivityParameters.js index 28edbba72a..5177d874fd 100644 --- a/lib/services/networkManagement2/lib/models/connectivityParameters.js +++ b/lib/services/networkManagement2/lib/models/connectivityParameters.js @@ -31,6 +31,16 @@ class ConnectivityParameters { * to which a connection attempt will be made. * @member {number} [destination.port] Port on which check connectivity will * be performed. + * @member {string} [protocol] Network protocol. Possible values include: + * 'Tcp', 'Http', 'Https', 'Icmp' + * @member {object} [protocolConfiguration] + * @member {object} [protocolConfiguration.hTTPConfiguration] + * @member {string} [protocolConfiguration.hTTPConfiguration.method] HTTP + * method. Possible values include: 'Get' + * @member {array} [protocolConfiguration.hTTPConfiguration.headers] List of + * HTTP headers. + * @member {array} [protocolConfiguration.hTTPConfiguration.validStatusCodes] + * Valid status codes. */ constructor() { } @@ -64,6 +74,21 @@ class ConnectivityParameters { name: 'Composite', className: 'ConnectivityDestination' } + }, + protocol: { + required: false, + serializedName: 'protocol', + type: { + name: 'String' + } + }, + protocolConfiguration: { + required: false, + serializedName: 'protocolConfiguration', + type: { + name: 'Composite', + className: 'ProtocolConfiguration' + } } } } diff --git a/lib/services/networkManagement2/lib/models/ddosProtectionPlan.js b/lib/services/networkManagement2/lib/models/ddosProtectionPlan.js new file mode 100644 index 0000000000..d246e24d1f --- /dev/null +++ b/lib/services/networkManagement2/lib/models/ddosProtectionPlan.js @@ -0,0 +1,143 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * A DDoS protection plan in a resource group. + * + * @extends models['Resource'] + */ +class DdosProtectionPlan extends models['Resource'] { + /** + * Create a DdosProtectionPlan. + * @member {string} [resourceGuid] The resource GUID property of the DDoS + * protection plan resource. It uniquely identifies the resource, even if the + * user changes its name or migrate the resource across subscriptions or + * resource groups. + * @member {string} [provisioningState] The provisioning state of the DDoS + * protection plan resource. Possible values are: 'Succeeded', 'Updating', + * 'Deleting', and 'Failed'. + * @member {array} [virtualNetworks] The list of virtual networks associated + * with the DDoS protection plan resource. This list is read-only. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DdosProtectionPlan + * + * @returns {object} metadata of DdosProtectionPlan + * + */ + mapper() { + return { + required: false, + serializedName: 'DdosProtectionPlan', + type: { + name: 'Composite', + className: 'DdosProtectionPlan', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + resourceGuid: { + required: false, + readOnly: true, + serializedName: 'properties.resourceGuid', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + virtualNetworks: { + required: false, + readOnly: true, + serializedName: 'properties.virtualNetworks', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SubResourceElementType', + type: { + name: 'Composite', + className: 'SubResource' + } + } + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DdosProtectionPlan; diff --git a/lib/services/networkManagement2/lib/models/ddosProtectionPlanListResult.js b/lib/services/networkManagement2/lib/models/ddosProtectionPlanListResult.js new file mode 100644 index 0000000000..076979f5cd --- /dev/null +++ b/lib/services/networkManagement2/lib/models/ddosProtectionPlanListResult.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * A list of DDoS protection plans. + */ +class DdosProtectionPlanListResult extends Array { + /** + * Create a DdosProtectionPlanListResult. + * @member {string} [nextLink] The URL to get the next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DdosProtectionPlanListResult + * + * @returns {object} metadata of DdosProtectionPlanListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'DdosProtectionPlanListResult', + type: { + name: 'Composite', + className: 'DdosProtectionPlanListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'DdosProtectionPlanElementType', + type: { + name: 'Composite', + className: 'DdosProtectionPlan' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DdosProtectionPlanListResult; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js b/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js new file mode 100644 index 0000000000..053141896d --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js @@ -0,0 +1,135 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + * + * @extends models['SubResource'] + */ +class ExpressRouteCircuitConnection extends models['SubResource'] { + /** + * Create a ExpressRouteCircuitConnection. + * @member {object} [expressRouteCircuitPeering] Reference to Express Route + * Circuit Private Peering Resource of the circuit initiating connection. + * @member {string} [expressRouteCircuitPeering.id] Resource ID. + * @member {object} [peerExpressRouteCircuitPeering] Reference to Express + * Route Circuit Private Peering Resource of the peered circuit. + * @member {string} [peerExpressRouteCircuitPeering.id] Resource ID. + * @member {string} [addressPrefix] /29 IP address space to carve out + * Customer addresses for tunnels. + * @member {string} [authorizationKey] The authorization key. + * @member {string} [circuitConnectionStatus] Express Route Circuit + * Connection State. Possible values are: 'Connected' and 'Disconnected'. + * Possible values include: 'Connected', 'Connecting', 'Disconnected' + * @member {string} [provisioningState] Provisioning state of the circuit + * connection resource. Possible values are: 'Succeded', 'Updating', + * 'Deleting', and 'Failed'. + * @member {string} [name] Gets name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressRouteCircuitConnection + * + * @returns {object} metadata of ExpressRouteCircuitConnection + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCircuitConnection', + type: { + name: 'Composite', + className: 'ExpressRouteCircuitConnection', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + expressRouteCircuitPeering: { + required: false, + serializedName: 'properties.expressRouteCircuitPeering', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + peerExpressRouteCircuitPeering: { + required: false, + serializedName: 'properties.peerExpressRouteCircuitPeering', + type: { + name: 'Composite', + className: 'SubResource' + } + }, + addressPrefix: { + required: false, + serializedName: 'properties.addressPrefix', + type: { + name: 'String' + } + }, + authorizationKey: { + required: false, + serializedName: 'properties.authorizationKey', + type: { + name: 'String' + } + }, + circuitConnectionStatus: { + required: false, + readOnly: true, + serializedName: 'properties.circuitConnectionStatus', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCircuitConnection; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js b/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js index bf2fd98924..d965a8eb65 100644 --- a/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js +++ b/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js @@ -20,12 +20,10 @@ const models = require('./index'); class ExpressRouteCircuitPeering extends models['SubResource'] { /** * Create a ExpressRouteCircuitPeering. - * @member {string} [peeringType] The PeeringType. Possible values are: - * 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. - * Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', - * 'MicrosoftPeering' - * @member {string} [state] The state of peering. Possible values are: - * 'Disabled' and 'Enabled'. Possible values include: 'Disabled', 'Enabled' + * @member {string} [peeringType] The peering type. Possible values include: + * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @member {string} [state] The peering state. Possible values include: + * 'Disabled', 'Enabled' * @member {number} [azureASN] The Azure ASN. * @member {number} [peerASN] The peer ASN. * @member {string} [primaryPeerAddressPrefix] The primary address prefix. @@ -113,6 +111,8 @@ class ExpressRouteCircuitPeering extends models['SubResource'] { * @member {string} [ipv6PeeringConfig.state] The state of peering. Possible * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', * 'Enabled' + * @member {array} [connections] The list of circuit connections associated + * with Azure Private Peering for this circuit. * @member {string} [name] Gets name of the resource that is unique within a * resource group. This name can be used to access the resource. * @member {string} [etag] A unique read-only string that changes whenever @@ -167,6 +167,10 @@ class ExpressRouteCircuitPeering extends models['SubResource'] { peerASN: { required: false, serializedName: 'properties.peerASN', + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 1 + }, type: { name: 'Number' } @@ -266,6 +270,21 @@ class ExpressRouteCircuitPeering extends models['SubResource'] { className: 'Ipv6ExpressRouteCircuitPeeringConfig' } }, + connections: { + required: false, + serializedName: 'properties.connections', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressRouteCircuitConnectionElementType', + type: { + name: 'Composite', + className: 'ExpressRouteCircuitConnection' + } + } + } + }, name: { required: false, serializedName: 'name', diff --git a/lib/services/networkManagement2/lib/models/expressRouteCircuitReference.js b/lib/services/networkManagement2/lib/models/expressRouteCircuitReference.js new file mode 100644 index 0000000000..d7c4e7081c --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCircuitReference.js @@ -0,0 +1,51 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Class representing a ExpressRouteCircuitReference. + */ +class ExpressRouteCircuitReference { + /** + * Create a ExpressRouteCircuitReference. + * @member {string} [id] Corresponding Express Route Circuit Id. + */ + constructor() { + } + + /** + * Defines the metadata of ExpressRouteCircuitReference + * + * @returns {object} metadata of ExpressRouteCircuitReference + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCircuitReference', + type: { + name: 'Composite', + className: 'ExpressRouteCircuitReference', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCircuitReference; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnection.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnection.js new file mode 100644 index 0000000000..21e3b6f300 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnection.js @@ -0,0 +1,207 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * ExpressRouteCrossConnection resource + * + * @extends models['Resource'] + */ +class ExpressRouteCrossConnection extends models['Resource'] { + /** + * Create a ExpressRouteCrossConnection. + * @member {string} [primaryAzurePort] The name of the primary port. + * @member {string} [secondaryAzurePort] The name of the secondary port. + * @member {number} [sTag] The identifier of the circuit traffic. + * @member {string} [peeringLocation] The peering location of the + * ExpressRoute circuit. + * @member {number} [bandwidthInMbps] The circuit bandwidth In Mbps. + * @member {object} [expressRouteCircuit] The ExpressRouteCircuit + * @member {string} [expressRouteCircuit.id] Corresponding Express Route + * Circuit Id. + * @member {string} [serviceProviderProvisioningState] The provisioning state + * of the circuit in the connectivity provider system. Possible values are + * 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: + * 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + * @member {string} [serviceProviderNotes] Additional read only notes set by + * the connectivity provider. + * @member {string} [provisioningState] Gets the provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * @member {array} [peerings] The list of peerings. + * @member {string} [etag] Gets a unique read-only string that changes + * whenever the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressRouteCrossConnection + * + * @returns {object} metadata of ExpressRouteCrossConnection + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCrossConnection', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnection', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + name: { + required: false, + readOnly: true, + serializedName: 'name', + type: { + name: 'String' + } + }, + type: { + required: false, + readOnly: true, + serializedName: 'type', + type: { + name: 'String' + } + }, + location: { + required: false, + serializedName: 'location', + type: { + name: 'String' + } + }, + tags: { + required: false, + serializedName: 'tags', + type: { + name: 'Dictionary', + value: { + required: false, + serializedName: 'StringElementType', + type: { + name: 'String' + } + } + } + }, + primaryAzurePort: { + required: false, + readOnly: true, + serializedName: 'properties.primaryAzurePort', + type: { + name: 'String' + } + }, + secondaryAzurePort: { + required: false, + readOnly: true, + serializedName: 'properties.secondaryAzurePort', + type: { + name: 'String' + } + }, + sTag: { + required: false, + readOnly: true, + serializedName: 'properties.sTag', + type: { + name: 'Number' + } + }, + peeringLocation: { + required: false, + readOnly: true, + serializedName: 'properties.peeringLocation', + type: { + name: 'String' + } + }, + bandwidthInMbps: { + required: false, + readOnly: true, + serializedName: 'properties.bandwidthInMbps', + type: { + name: 'Number' + } + }, + expressRouteCircuit: { + required: false, + readOnly: true, + serializedName: 'properties.expressRouteCircuit', + type: { + name: 'Composite', + className: 'ExpressRouteCircuitReference' + } + }, + serviceProviderProvisioningState: { + required: false, + serializedName: 'properties.serviceProviderProvisioningState', + type: { + name: 'String' + } + }, + serviceProviderNotes: { + required: false, + serializedName: 'properties.serviceProviderNotes', + type: { + name: 'String' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + peerings: { + required: false, + serializedName: 'properties.peerings', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressRouteCrossConnectionPeeringElementType', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionPeering' + } + } + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCrossConnection; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionListResult.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionListResult.js new file mode 100644 index 0000000000..b96c2712da --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionListResult.js @@ -0,0 +1,68 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Response for ListExpressRouteCrossConnection API service call. + */ +class ExpressRouteCrossConnectionListResult extends Array { + /** + * Create a ExpressRouteCrossConnectionListResult. + * @member {string} [nextLink] The URL to get the next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressRouteCrossConnectionListResult + * + * @returns {object} metadata of ExpressRouteCrossConnectionListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCrossConnectionListResult', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionListResult', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressRouteCrossConnectionElementType', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnection' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCrossConnectionListResult; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js new file mode 100644 index 0000000000..31abfbf098 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js @@ -0,0 +1,266 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Peering in an ExpressRoute Cross Connection resource. + * + * @extends models['SubResource'] + */ +class ExpressRouteCrossConnectionPeering extends models['SubResource'] { + /** + * Create a ExpressRouteCrossConnectionPeering. + * @member {string} [peeringType] The peering type. Possible values include: + * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @member {string} [state] The peering state. Possible values include: + * 'Disabled', 'Enabled' + * @member {number} [azureASN] The Azure ASN. + * @member {number} [peerASN] The peer ASN. + * @member {string} [primaryPeerAddressPrefix] The primary address prefix. + * @member {string} [secondaryPeerAddressPrefix] The secondary address + * prefix. + * @member {string} [primaryAzurePort] The primary port. + * @member {string} [secondaryAzurePort] The secondary port. + * @member {string} [sharedKey] The shared key. + * @member {number} [vlanId] The VLAN ID. + * @member {object} [microsoftPeeringConfig] The Microsoft peering + * configuration. + * @member {array} [microsoftPeeringConfig.advertisedPublicPrefixes] The + * reference of AdvertisedPublicPrefixes. + * @member {array} [microsoftPeeringConfig.advertisedCommunities] The + * communities of bgp peering. Spepcified for microsoft peering + * @member {string} [microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * @member {number} [microsoftPeeringConfig.legacyMode] The legacy mode of + * the peering. + * @member {number} [microsoftPeeringConfig.customerASN] The CustomerASN of + * the peering. + * @member {string} [microsoftPeeringConfig.routingRegistryName] The + * RoutingRegistryName of the configuration. + * @member {string} [provisioningState] Gets the provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * @member {string} [gatewayManagerEtag] The GatewayManager Etag. + * @member {string} [lastModifiedBy] Gets whether the provider or the + * customer last modified the peering. + * @member {object} [ipv6PeeringConfig] The IPv6 peering configuration. + * @member {string} [ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * @member {string} [ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * @member {object} [ipv6PeeringConfig.microsoftPeeringConfig] The Microsoft + * peering configuration. + * @member {array} + * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] The + * reference of AdvertisedPublicPrefixes. + * @member {array} + * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] The + * communities of bgp peering. Spepcified for microsoft peering + * @member {string} + * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * @member {number} [ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * @member {number} [ipv6PeeringConfig.microsoftPeeringConfig.customerASN] + * The CustomerASN of the peering. + * @member {string} + * [ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] The + * RoutingRegistryName of the configuration. + * @member {object} [ipv6PeeringConfig.routeFilter] The reference of the + * RouteFilter resource. + * @member {array} [ipv6PeeringConfig.routeFilter.rules] Collection of + * RouteFilterRules contained within a route filter. + * @member {array} [ipv6PeeringConfig.routeFilter.peerings] A collection of + * references to express route circuit peerings. + * @member {string} [ipv6PeeringConfig.routeFilter.provisioningState] The + * provisioning state of the resource. Possible values are: 'Updating', + * 'Deleting', 'Succeeded' and 'Failed'. + * @member {string} [ipv6PeeringConfig.routeFilter.etag] Gets a unique + * read-only string that changes whenever the resource is updated. + * @member {string} [ipv6PeeringConfig.state] The state of peering. Possible + * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', + * 'Enabled' + * @member {string} [name] Gets name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressRouteCrossConnectionPeering + * + * @returns {object} metadata of ExpressRouteCrossConnectionPeering + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCrossConnectionPeering', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionPeering', + modelProperties: { + id: { + required: false, + serializedName: 'id', + type: { + name: 'String' + } + }, + peeringType: { + required: false, + serializedName: 'properties.peeringType', + type: { + name: 'String' + } + }, + state: { + required: false, + serializedName: 'properties.state', + type: { + name: 'String' + } + }, + azureASN: { + required: false, + readOnly: true, + serializedName: 'properties.azureASN', + type: { + name: 'Number' + } + }, + peerASN: { + required: false, + serializedName: 'properties.peerASN', + constraints: { + InclusiveMaximum: 4294967295, + InclusiveMinimum: 1 + }, + type: { + name: 'Number' + } + }, + primaryPeerAddressPrefix: { + required: false, + serializedName: 'properties.primaryPeerAddressPrefix', + type: { + name: 'String' + } + }, + secondaryPeerAddressPrefix: { + required: false, + serializedName: 'properties.secondaryPeerAddressPrefix', + type: { + name: 'String' + } + }, + primaryAzurePort: { + required: false, + readOnly: true, + serializedName: 'properties.primaryAzurePort', + type: { + name: 'String' + } + }, + secondaryAzurePort: { + required: false, + readOnly: true, + serializedName: 'properties.secondaryAzurePort', + type: { + name: 'String' + } + }, + sharedKey: { + required: false, + serializedName: 'properties.sharedKey', + type: { + name: 'String' + } + }, + vlanId: { + required: false, + serializedName: 'properties.vlanId', + type: { + name: 'Number' + } + }, + microsoftPeeringConfig: { + required: false, + serializedName: 'properties.microsoftPeeringConfig', + type: { + name: 'Composite', + className: 'ExpressRouteCircuitPeeringConfig' + } + }, + provisioningState: { + required: false, + readOnly: true, + serializedName: 'properties.provisioningState', + type: { + name: 'String' + } + }, + gatewayManagerEtag: { + required: false, + readOnly: true, + serializedName: 'properties.gatewayManagerEtag', + type: { + name: 'String' + } + }, + lastModifiedBy: { + required: false, + serializedName: 'properties.lastModifiedBy', + type: { + name: 'String' + } + }, + ipv6PeeringConfig: { + required: false, + serializedName: 'properties.ipv6PeeringConfig', + type: { + name: 'Composite', + className: 'Ipv6ExpressRouteCircuitPeeringConfig' + } + }, + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCrossConnectionPeering; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeeringList.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeeringList.js new file mode 100644 index 0000000000..5f35071118 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeeringList.js @@ -0,0 +1,69 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Response for ListPeering API service call retrieves all peerings that belong + * to an ExpressRouteCrossConnection. + */ +class ExpressRouteCrossConnectionPeeringList extends Array { + /** + * Create a ExpressRouteCrossConnectionPeeringList. + * @member {string} [nextLink] The URL to get the next set of results. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of ExpressRouteCrossConnectionPeeringList + * + * @returns {object} metadata of ExpressRouteCrossConnectionPeeringList + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCrossConnectionPeeringList', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionPeeringList', + modelProperties: { + value: { + required: false, + serializedName: '', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressRouteCrossConnectionPeeringElementType', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionPeering' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCrossConnectionPeeringList; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionRoutesTableSummary.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionRoutesTableSummary.js new file mode 100644 index 0000000000..20f7e76770 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionRoutesTableSummary.js @@ -0,0 +1,80 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * The routes table associated with the ExpressRouteCircuit. + * + */ +class ExpressRouteCrossConnectionRoutesTableSummary { + /** + * Create a ExpressRouteCrossConnectionRoutesTableSummary. + * @member {string} [neighbor] IP address of Neighbor router + * @member {number} [asn] Autonomous system number. + * @member {string} [upDown] The length of time that the BGP session has been + * in the Established state, or the current status if not in the Established + * state. + * @member {string} [stateOrPrefixesReceived] Current state of the BGP + * session, and the number of prefixes that have been received from a + * neighbor or peer group. + */ + constructor() { + } + + /** + * Defines the metadata of ExpressRouteCrossConnectionRoutesTableSummary + * + * @returns {object} metadata of ExpressRouteCrossConnectionRoutesTableSummary + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCrossConnectionRoutesTableSummary', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionRoutesTableSummary', + modelProperties: { + neighbor: { + required: false, + serializedName: 'neighbor', + type: { + name: 'String' + } + }, + asn: { + required: false, + serializedName: 'asn', + type: { + name: 'Number' + } + }, + upDown: { + required: false, + serializedName: 'upDown', + type: { + name: 'String' + } + }, + stateOrPrefixesReceived: { + required: false, + serializedName: 'stateOrPrefixesReceived', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCrossConnectionRoutesTableSummary; diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionsRoutesTableSummaryListResult.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionsRoutesTableSummaryListResult.js new file mode 100644 index 0000000000..cb01c31a22 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionsRoutesTableSummaryListResult.js @@ -0,0 +1,72 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Response for ListRoutesTable associated with the Express Route Cross + * Connections. + * + */ +class ExpressRouteCrossConnectionsRoutesTableSummaryListResult { + /** + * Create a ExpressRouteCrossConnectionsRoutesTableSummaryListResult. + * @member {array} [value] A list of the routes table. + * @member {string} [nextLink] The URL to get the next set of results. + */ + constructor() { + } + + /** + * Defines the metadata of ExpressRouteCrossConnectionsRoutesTableSummaryListResult + * + * @returns {object} metadata of ExpressRouteCrossConnectionsRoutesTableSummaryListResult + * + */ + mapper() { + return { + required: false, + serializedName: 'ExpressRouteCrossConnectionsRoutesTableSummaryListResult', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionsRoutesTableSummaryListResult', + modelProperties: { + value: { + required: false, + serializedName: 'value', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ExpressRouteCrossConnectionRoutesTableSummaryElementType', + type: { + name: 'Composite', + className: 'ExpressRouteCrossConnectionRoutesTableSummary' + } + } + } + }, + nextLink: { + required: false, + readOnly: true, + serializedName: 'nextLink', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ExpressRouteCrossConnectionsRoutesTableSummaryListResult; diff --git a/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js b/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js index 1e90c90edf..561dccc025 100644 --- a/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js +++ b/lib/services/networkManagement2/lib/models/frontendIPConfiguration.js @@ -186,6 +186,8 @@ class FrontendIPConfiguration extends models['SubResource'] { * resolves to this public IP address. If the reverseFqdn is specified, then * a PTR DNS record is created pointing from the IP address in the * in-addr.arpa domain to the reverse FQDN. + * @member {array} [publicIPAddress.ipTags] The list of tags associated with + * the public IP address. * @member {string} [publicIPAddress.ipAddress] The IP address associated * with the public IP address resource. * @member {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout diff --git a/lib/services/networkManagement2/lib/models/hTTPConfiguration.js b/lib/services/networkManagement2/lib/models/hTTPConfiguration.js new file mode 100644 index 0000000000..7c285c13f1 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/hTTPConfiguration.js @@ -0,0 +1,85 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * HTTP configuration of the connectivity check. + * + */ +class HTTPConfiguration { + /** + * Create a HTTPConfiguration. + * @member {string} [method] HTTP method. Possible values include: 'Get' + * @member {array} [headers] List of HTTP headers. + * @member {array} [validStatusCodes] Valid status codes. + */ + constructor() { + } + + /** + * Defines the metadata of HTTPConfiguration + * + * @returns {object} metadata of HTTPConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'HTTPConfiguration', + type: { + name: 'Composite', + className: 'HTTPConfiguration', + modelProperties: { + method: { + required: false, + serializedName: 'method', + type: { + name: 'String' + } + }, + headers: { + required: false, + serializedName: 'headers', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'HTTPHeaderElementType', + type: { + name: 'Composite', + className: 'HTTPHeader' + } + } + } + }, + validStatusCodes: { + required: false, + serializedName: 'validStatusCodes', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'NumberElementType', + type: { + name: 'Number' + } + } + } + } + } + } + }; + } +} + +module.exports = HTTPConfiguration; diff --git a/lib/services/networkManagement2/lib/models/hTTPHeader.js b/lib/services/networkManagement2/lib/models/hTTPHeader.js new file mode 100644 index 0000000000..fd5ca3516c --- /dev/null +++ b/lib/services/networkManagement2/lib/models/hTTPHeader.js @@ -0,0 +1,60 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Describes the HTTP header. + * + */ +class HTTPHeader { + /** + * Create a HTTPHeader. + * @member {string} [name] The name in HTTP header. + * @member {string} [value] The value in HTTP header. + */ + constructor() { + } + + /** + * Defines the metadata of HTTPHeader + * + * @returns {object} metadata of HTTPHeader + * + */ + mapper() { + return { + required: false, + serializedName: 'HTTPHeader', + type: { + name: 'Composite', + className: 'HTTPHeader', + modelProperties: { + name: { + required: false, + serializedName: 'name', + type: { + name: 'String' + } + }, + value: { + required: false, + serializedName: 'value', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = HTTPHeader; diff --git a/lib/services/networkManagement2/lib/models/iPConfiguration.js b/lib/services/networkManagement2/lib/models/iPConfiguration.js index d5879e150a..dbdb4959c8 100644 --- a/lib/services/networkManagement2/lib/models/iPConfiguration.js +++ b/lib/services/networkManagement2/lib/models/iPConfiguration.js @@ -99,6 +99,8 @@ class IPConfiguration extends models['SubResource'] { * resolves to this public IP address. If the reverseFqdn is specified, then * a PTR DNS record is created pointing from the IP address in the * in-addr.arpa domain to the reverse FQDN. + * @member {array} [publicIPAddress.ipTags] The list of tags associated with + * the public IP address. * @member {string} [publicIPAddress.ipAddress] The IP address associated * with the public IP address resource. * @member {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout diff --git a/lib/services/networkManagement2/lib/models/inboundNatPool.js b/lib/services/networkManagement2/lib/models/inboundNatPool.js index 546d840112..b8304b9e92 100644 --- a/lib/services/networkManagement2/lib/models/inboundNatPool.js +++ b/lib/services/networkManagement2/lib/models/inboundNatPool.js @@ -33,6 +33,15 @@ class InboundNatPool extends models['SubResource'] { * with a load balancer. Acceptable values range between 1 and 65535. * @member {number} backendPort The port used for internal connections on the * endpoint. Acceptable values are between 1 and 65535. + * @member {number} [idleTimeoutInMinutes] The timeout for the TCP idle + * connection. The value can be set between 4 and 30 minutes. The default + * value is 4 minutes. This element is only used when the protocol is set to + * TCP. + * @member {boolean} [enableFloatingIP] Configures a virtual machine's + * endpoint for the floating IP capability required to configure a SQL + * AlwaysOn Availability Group. This setting is required when using the SQL + * AlwaysOn Availability Groups in SQL server. This setting can't be changed + * after you create the endpoint. * @member {string} [provisioningState] Gets the provisioning state of the * PublicIP resource. Possible values are: 'Updating', 'Deleting', and * 'Failed'. @@ -102,6 +111,20 @@ class InboundNatPool extends models['SubResource'] { name: 'Number' } }, + idleTimeoutInMinutes: { + required: false, + serializedName: 'properties.idleTimeoutInMinutes', + type: { + name: 'Number' + } + }, + enableFloatingIP: { + required: false, + serializedName: 'properties.enableFloatingIP', + type: { + name: 'Boolean' + } + }, provisioningState: { required: false, serializedName: 'properties.provisioningState', diff --git a/lib/services/networkManagement2/lib/models/inboundNatRule.js b/lib/services/networkManagement2/lib/models/inboundNatRule.js index 384809d653..09299a448c 100644 --- a/lib/services/networkManagement2/lib/models/inboundNatRule.js +++ b/lib/services/networkManagement2/lib/models/inboundNatRule.js @@ -231,6 +231,8 @@ class InboundNatRule extends models['SubResource'] { * resolves to this public IP address. If the reverseFqdn is specified, then * a PTR DNS record is created pointing from the IP address in the * in-addr.arpa domain to the reverse FQDN. + * @member {array} [backendIPConfiguration.publicIPAddress.ipTags] The list + * of tags associated with the public IP address. * @member {string} [backendIPConfiguration.publicIPAddress.ipAddress] The IP * address associated with the public IP address resource. * @member {number} diff --git a/lib/services/networkManagement2/lib/models/index.d.ts b/lib/services/networkManagement2/lib/models/index.d.ts index e100141028..e620b9e1f6 100644 --- a/lib/services/networkManagement2/lib/models/index.d.ts +++ b/lib/services/networkManagement2/lib/models/index.d.ts @@ -270,6 +270,8 @@ export interface BackendAddressPool extends SubResource { * resolves to this public IP address. If the reverseFqdn is specified, then a * PTR DNS record is created pointing from the IP address in the in-addr.arpa * domain to the reverse FQDN. + * @member {array} [backendIPConfiguration.publicIPAddress.ipTags] The list of + * tags associated with the public IP address. * @member {string} [backendIPConfiguration.publicIPAddress.ipAddress] The IP * address associated with the public IP address resource. * @member {number} @@ -685,6 +687,22 @@ export interface PublicIPAddressDnsSettings { reverseFqdn?: string; } +/** + * @class + * Initializes a new instance of the IpTag class. + * @constructor + * Contains the IpTag associated with the public IP address + * + * @member {string} [ipTagType] Gets or sets the ipTag type: Example + * FirstPartyUsage. + * @member {string} [tag] Gets or sets value of the IpTag associated with the + * public IP. Example SQL, Storage etc + */ +export interface IpTag { + ipTagType?: string; + tag?: string; +} + /** * @class * Initializes a new instance of the PublicIPAddress class. @@ -783,6 +801,8 @@ export interface PublicIPAddressDnsSettings { * user-visible, fully qualified domain name that resolves to this public IP * address. If the reverseFqdn is specified, then a PTR DNS record is created * pointing from the IP address in the in-addr.arpa domain to the reverse FQDN. + * @member {array} [ipTags] The list of tags associated with the public IP + * address. * @member {string} [ipAddress] The IP address associated with the public IP * address resource. * @member {number} [idleTimeoutInMinutes] The idle timeout of the public IP @@ -802,6 +822,7 @@ export interface PublicIPAddress extends Resource { publicIPAddressVersion?: string; readonly ipConfiguration?: IPConfiguration; dnsSettings?: PublicIPAddressDnsSettings; + ipTags?: IpTag[]; ipAddress?: string; idleTimeoutInMinutes?: number; resourceGuid?: string; @@ -893,6 +914,8 @@ export interface PublicIPAddress extends Resource { * this public IP address. If the reverseFqdn is specified, then a PTR DNS * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. + * @member {array} [publicIPAddress.ipTags] The list of tags associated with + * the public IP address. * @member {string} [publicIPAddress.ipAddress] The IP address associated with * the public IP address resource. * @member {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout of @@ -1177,6 +1200,8 @@ export interface Subnet extends SubResource { * this public IP address. If the reverseFqdn is specified, then a PTR DNS * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. + * @member {array} [publicIPAddress.ipTags] The list of tags associated with + * the public IP address. * @member {string} [publicIPAddress.ipAddress] The IP address associated with * the public IP address resource. * @member {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout of @@ -1536,6 +1561,8 @@ export interface ApplicationGatewayBackendHttpSettings extends SubResource { * that resolves to this public IP address. If the reverseFqdn is specified, * then a PTR DNS record is created pointing from the IP address in the * in-addr.arpa domain to the reverse FQDN. + * @member {array} [ipConfiguration.publicIPAddress.ipTags] The list of tags + * associated with the public IP address. * @member {string} [ipConfiguration.publicIPAddress.ipAddress] The IP address * associated with the public IP address resource. * @member {number} [ipConfiguration.publicIPAddress.idleTimeoutInMinutes] The @@ -2151,6 +2178,9 @@ export interface ApplicationGatewayFirewallDisabledRuleGroup { * set. Possible values are: 'OWASP'. * @member {string} ruleSetVersion The version of the rule set type. * @member {array} [disabledRuleGroups] The disabled rule groups. + * @member {boolean} [requestBodyCheck] Whether allow WAF to check request + * Body. + * @member {number} [maxRequestBodySize] Maxium request body size for WAF. */ export interface ApplicationGatewayWebApplicationFirewallConfiguration { enabled: boolean; @@ -2158,6 +2188,8 @@ export interface ApplicationGatewayWebApplicationFirewallConfiguration { ruleSetType: string; ruleSetVersion: string; disabledRuleGroups?: ApplicationGatewayFirewallDisabledRuleGroup[]; + requestBodyCheck?: boolean; + maxRequestBodySize?: number; } /** @@ -2226,6 +2258,10 @@ export interface ApplicationGatewayWebApplicationFirewallConfiguration { * version of the rule set type. * @member {array} [webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. + * @member {boolean} [webApplicationFirewallConfiguration.requestBodyCheck] + * Whether allow WAF to check request Body. + * @member {number} [webApplicationFirewallConfiguration.maxRequestBodySize] + * Maxium request body size for WAF. * @member {boolean} [enableHttp2] Whether HTTP2 is enabled on the application * gateway resource. * @member {string} [resourceGuid] Resource GUID property of the application @@ -2390,6 +2426,31 @@ export interface DnsNameAvailabilityResult { available?: boolean; } +/** + * @class + * Initializes a new instance of the DdosProtectionPlan class. + * @constructor + * A DDoS protection plan in a resource group. + * + * @member {string} [resourceGuid] The resource GUID property of the DDoS + * protection plan resource. It uniquely identifies the resource, even if the + * user changes its name or migrate the resource across subscriptions or + * resource groups. + * @member {string} [provisioningState] The provisioning state of the DDoS + * protection plan resource. Possible values are: 'Succeeded', 'Updating', + * 'Deleting', and 'Failed'. + * @member {array} [virtualNetworks] The list of virtual networks associated + * with the DDoS protection plan resource. This list is read-only. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface DdosProtectionPlan extends Resource { + readonly resourceGuid?: string; + readonly provisioningState?: string; + readonly virtualNetworks?: SubResource[]; + readonly etag?: string; +} + /** * @class * Initializes a new instance of the EndpointServiceResult class. @@ -2475,7 +2536,6 @@ export interface ExpressRouteCircuitPeeringConfig { * @member {string} [location] Resource location. * @member {string} [etag] A unique read-only string that changes whenever the * resource is updated. - * @member {object} [tags] Resource tags. */ export interface RouteFilterRule extends SubResource { access: string; @@ -2484,7 +2544,6 @@ export interface RouteFilterRule extends SubResource { name?: string; location?: string; readonly etag?: string; - tags?: { [propertyName: string]: string }; } /** @@ -2505,18 +2564,53 @@ export interface ExpressRouteCircuitStats { secondarybytesOut?: number; } +/** + * @class + * Initializes a new instance of the ExpressRouteCircuitConnection class. + * @constructor + * Express Route Circuit Connection in an ExpressRouteCircuitPeering resource. + * + * @member {object} [expressRouteCircuitPeering] Reference to Express Route + * Circuit Private Peering Resource of the circuit initiating connection. + * @member {string} [expressRouteCircuitPeering.id] Resource ID. + * @member {object} [peerExpressRouteCircuitPeering] Reference to Express Route + * Circuit Private Peering Resource of the peered circuit. + * @member {string} [peerExpressRouteCircuitPeering.id] Resource ID. + * @member {string} [addressPrefix] /29 IP address space to carve out Customer + * addresses for tunnels. + * @member {string} [authorizationKey] The authorization key. + * @member {string} [circuitConnectionStatus] Express Route Circuit Connection + * State. Possible values are: 'Connected' and 'Disconnected'. Possible values + * include: 'Connected', 'Connecting', 'Disconnected' + * @member {string} [provisioningState] Provisioning state of the circuit + * connection resource. Possible values are: 'Succeded', 'Updating', + * 'Deleting', and 'Failed'. + * @member {string} [name] Gets name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface ExpressRouteCircuitConnection extends SubResource { + expressRouteCircuitPeering?: SubResource; + peerExpressRouteCircuitPeering?: SubResource; + addressPrefix?: string; + authorizationKey?: string; + readonly circuitConnectionStatus?: string; + readonly provisioningState?: string; + name?: string; + readonly etag?: string; +} + /** * @class * Initializes a new instance of the ExpressRouteCircuitPeering class. * @constructor * Peering in an ExpressRouteCircuit resource. * - * @member {string} [peeringType] The PeeringType. Possible values are: - * 'AzurePublicPeering', 'AzurePrivatePeering', and 'MicrosoftPeering'. - * Possible values include: 'AzurePublicPeering', 'AzurePrivatePeering', - * 'MicrosoftPeering' - * @member {string} [state] The state of peering. Possible values are: - * 'Disabled' and 'Enabled'. Possible values include: 'Disabled', 'Enabled' + * @member {string} [peeringType] The peering type. Possible values include: + * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @member {string} [state] The peering state. Possible values include: + * 'Disabled', 'Enabled' * @member {number} [azureASN] The Azure ASN. * @member {number} [peerASN] The peer ASN. * @member {string} [primaryPeerAddressPrefix] The primary address prefix. @@ -2603,6 +2697,8 @@ export interface ExpressRouteCircuitStats { * @member {string} [ipv6PeeringConfig.state] The state of peering. Possible * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', * 'Enabled' + * @member {array} [connections] The list of circuit connections associated + * with Azure Private Peering for this circuit. * @member {string} [name] Gets name of the resource that is unique within a * resource group. This name can be used to access the resource. * @member {string} [etag] A unique read-only string that changes whenever the @@ -2626,6 +2722,7 @@ export interface ExpressRouteCircuitPeering extends SubResource { lastModifiedBy?: string; routeFilter?: RouteFilter; ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; + connections?: ExpressRouteCircuitConnection[]; name?: string; readonly etag?: string; } @@ -2921,6 +3018,201 @@ export interface ExpressRouteServiceProvider extends Resource { provisioningState?: string; } +/** + * @class + * Initializes a new instance of the ExpressRouteCrossConnectionRoutesTableSummary class. + * @constructor + * The routes table associated with the ExpressRouteCircuit. + * + * @member {string} [neighbor] IP address of Neighbor router + * @member {number} [asn] Autonomous system number. + * @member {string} [upDown] The length of time that the BGP session has been + * in the Established state, or the current status if not in the Established + * state. + * @member {string} [stateOrPrefixesReceived] Current state of the BGP session, + * and the number of prefixes that have been received from a neighbor or peer + * group. + */ +export interface ExpressRouteCrossConnectionRoutesTableSummary { + neighbor?: string; + asn?: number; + upDown?: string; + stateOrPrefixesReceived?: string; +} + +/** + * @class + * Initializes a new instance of the ExpressRouteCrossConnectionsRoutesTableSummaryListResult class. + * @constructor + * Response for ListRoutesTable associated with the Express Route Cross + * Connections. + * + * @member {array} [value] A list of the routes table. + * @member {string} [nextLink] The URL to get the next set of results. + */ +export interface ExpressRouteCrossConnectionsRoutesTableSummaryListResult { + value?: ExpressRouteCrossConnectionRoutesTableSummary[]; + readonly nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ExpressRouteCircuitReference class. + * @constructor + * @member {string} [id] Corresponding Express Route Circuit Id. + */ +export interface ExpressRouteCircuitReference { + id?: string; +} + +/** + * @class + * Initializes a new instance of the ExpressRouteCrossConnectionPeering class. + * @constructor + * Peering in an ExpressRoute Cross Connection resource. + * + * @member {string} [peeringType] The peering type. Possible values include: + * 'AzurePublicPeering', 'AzurePrivatePeering', 'MicrosoftPeering' + * @member {string} [state] The peering state. Possible values include: + * 'Disabled', 'Enabled' + * @member {number} [azureASN] The Azure ASN. + * @member {number} [peerASN] The peer ASN. + * @member {string} [primaryPeerAddressPrefix] The primary address prefix. + * @member {string} [secondaryPeerAddressPrefix] The secondary address prefix. + * @member {string} [primaryAzurePort] The primary port. + * @member {string} [secondaryAzurePort] The secondary port. + * @member {string} [sharedKey] The shared key. + * @member {number} [vlanId] The VLAN ID. + * @member {object} [microsoftPeeringConfig] The Microsoft peering + * configuration. + * @member {array} [microsoftPeeringConfig.advertisedPublicPrefixes] The + * reference of AdvertisedPublicPrefixes. + * @member {array} [microsoftPeeringConfig.advertisedCommunities] The + * communities of bgp peering. Spepcified for microsoft peering + * @member {string} [microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * @member {number} [microsoftPeeringConfig.legacyMode] The legacy mode of the + * peering. + * @member {number} [microsoftPeeringConfig.customerASN] The CustomerASN of the + * peering. + * @member {string} [microsoftPeeringConfig.routingRegistryName] The + * RoutingRegistryName of the configuration. + * @member {string} [provisioningState] Gets the provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * @member {string} [gatewayManagerEtag] The GatewayManager Etag. + * @member {string} [lastModifiedBy] Gets whether the provider or the customer + * last modified the peering. + * @member {object} [ipv6PeeringConfig] The IPv6 peering configuration. + * @member {string} [ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * @member {string} [ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * @member {object} [ipv6PeeringConfig.microsoftPeeringConfig] The Microsoft + * peering configuration. + * @member {array} + * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] The + * reference of AdvertisedPublicPrefixes. + * @member {array} + * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] The + * communities of bgp peering. Spepcified for microsoft peering + * @member {string} + * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * @member {number} [ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * @member {number} [ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * @member {string} + * [ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] The + * RoutingRegistryName of the configuration. + * @member {object} [ipv6PeeringConfig.routeFilter] The reference of the + * RouteFilter resource. + * @member {array} [ipv6PeeringConfig.routeFilter.rules] Collection of + * RouteFilterRules contained within a route filter. + * @member {array} [ipv6PeeringConfig.routeFilter.peerings] A collection of + * references to express route circuit peerings. + * @member {string} [ipv6PeeringConfig.routeFilter.provisioningState] The + * provisioning state of the resource. Possible values are: 'Updating', + * 'Deleting', 'Succeeded' and 'Failed'. + * @member {string} [ipv6PeeringConfig.routeFilter.etag] Gets a unique + * read-only string that changes whenever the resource is updated. + * @member {string} [ipv6PeeringConfig.state] The state of peering. Possible + * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', + * 'Enabled' + * @member {string} [name] Gets name of the resource that is unique within a + * resource group. This name can be used to access the resource. + * @member {string} [etag] A unique read-only string that changes whenever the + * resource is updated. + */ +export interface ExpressRouteCrossConnectionPeering extends SubResource { + peeringType?: string; + state?: string; + readonly azureASN?: number; + peerASN?: number; + primaryPeerAddressPrefix?: string; + secondaryPeerAddressPrefix?: string; + readonly primaryAzurePort?: string; + readonly secondaryAzurePort?: string; + sharedKey?: string; + vlanId?: number; + microsoftPeeringConfig?: ExpressRouteCircuitPeeringConfig; + readonly provisioningState?: string; + readonly gatewayManagerEtag?: string; + lastModifiedBy?: string; + ipv6PeeringConfig?: Ipv6ExpressRouteCircuitPeeringConfig; + name?: string; + readonly etag?: string; +} + +/** + * @class + * Initializes a new instance of the ExpressRouteCrossConnection class. + * @constructor + * ExpressRouteCrossConnection resource + * + * @member {string} [primaryAzurePort] The name of the primary port. + * @member {string} [secondaryAzurePort] The name of the secondary port. + * @member {number} [sTag] The identifier of the circuit traffic. + * @member {string} [peeringLocation] The peering location of the ExpressRoute + * circuit. + * @member {number} [bandwidthInMbps] The circuit bandwidth In Mbps. + * @member {object} [expressRouteCircuit] The ExpressRouteCircuit + * @member {string} [expressRouteCircuit.id] Corresponding Express Route + * Circuit Id. + * @member {string} [serviceProviderProvisioningState] The provisioning state + * of the circuit in the connectivity provider system. Possible values are + * 'NotProvisioned', 'Provisioning', 'Provisioned'. Possible values include: + * 'NotProvisioned', 'Provisioning', 'Provisioned', 'Deprovisioning' + * @member {string} [serviceProviderNotes] Additional read only notes set by + * the connectivity provider. + * @member {string} [provisioningState] Gets the provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * @member {array} [peerings] The list of peerings. + * @member {string} [etag] Gets a unique read-only string that changes whenever + * the resource is updated. + */ +export interface ExpressRouteCrossConnection extends Resource { + readonly primaryAzurePort?: string; + readonly secondaryAzurePort?: string; + readonly sTag?: number; + readonly peeringLocation?: string; + readonly bandwidthInMbps?: number; + readonly expressRouteCircuit?: ExpressRouteCircuitReference; + serviceProviderProvisioningState?: string; + serviceProviderNotes?: string; + readonly provisioningState?: string; + peerings?: ExpressRouteCrossConnectionPeering[]; + readonly etag?: string; +} + /** * @class * Initializes a new instance of the LoadBalancerSku class. @@ -3101,6 +3393,8 @@ export interface LoadBalancerSku { * this public IP address. If the reverseFqdn is specified, then a PTR DNS * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. + * @member {array} [publicIPAddress.ipTags] The list of tags associated with + * the public IP address. * @member {string} [publicIPAddress.ipAddress] The IP address associated with * the public IP address resource. * @member {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout of @@ -3265,6 +3559,14 @@ export interface Probe extends SubResource { * with a load balancer. Acceptable values range between 1 and 65535. * @member {number} backendPort The port used for internal connections on the * endpoint. Acceptable values are between 1 and 65535. + * @member {number} [idleTimeoutInMinutes] The timeout for the TCP idle + * connection. The value can be set between 4 and 30 minutes. The default value + * is 4 minutes. This element is only used when the protocol is set to TCP. + * @member {boolean} [enableFloatingIP] Configures a virtual machine's endpoint + * for the floating IP capability required to configure a SQL AlwaysOn + * Availability Group. This setting is required when using the SQL AlwaysOn + * Availability Groups in SQL server. This setting can't be changed after you + * create the endpoint. * @member {string} [provisioningState] Gets the provisioning state of the * PublicIP resource. Possible values are: 'Updating', 'Deleting', and * 'Failed'. @@ -3279,6 +3581,8 @@ export interface InboundNatPool extends SubResource { frontendPortRangeStart: number; frontendPortRangeEnd: number; backendPort: number; + idleTimeoutInMinutes?: number; + enableFloatingIP?: boolean; provisioningState?: string; name?: string; etag?: string; @@ -4265,6 +4569,52 @@ export interface ConnectivityDestination { port?: number; } +/** + * @class + * Initializes a new instance of the HTTPHeader class. + * @constructor + * Describes the HTTP header. + * + * @member {string} [name] The name in HTTP header. + * @member {string} [value] The value in HTTP header. + */ +export interface HTTPHeader { + name?: string; + value?: string; +} + +/** + * @class + * Initializes a new instance of the HTTPConfiguration class. + * @constructor + * HTTP configuration of the connectivity check. + * + * @member {string} [method] HTTP method. Possible values include: 'Get' + * @member {array} [headers] List of HTTP headers. + * @member {array} [validStatusCodes] Valid status codes. + */ +export interface HTTPConfiguration { + method?: string; + headers?: HTTPHeader[]; + validStatusCodes?: number[]; +} + +/** + * @class + * Initializes a new instance of the ProtocolConfiguration class. + * @constructor + * Configuration of the protocol. + * + * @member {object} [hTTPConfiguration] + * @member {string} [hTTPConfiguration.method] HTTP method. Possible values + * include: 'Get' + * @member {array} [hTTPConfiguration.headers] List of HTTP headers. + * @member {array} [hTTPConfiguration.validStatusCodes] Valid status codes. + */ +export interface ProtocolConfiguration { + hTTPConfiguration?: HTTPConfiguration; +} + /** * @class * Initializes a new instance of the ConnectivityParameters class. @@ -4283,10 +4633,22 @@ export interface ConnectivityDestination { * which a connection attempt will be made. * @member {number} [destination.port] Port on which check connectivity will be * performed. + * @member {string} [protocol] Network protocol. Possible values include: + * 'Tcp', 'Http', 'Https', 'Icmp' + * @member {object} [protocolConfiguration] + * @member {object} [protocolConfiguration.hTTPConfiguration] + * @member {string} [protocolConfiguration.hTTPConfiguration.method] HTTP + * method. Possible values include: 'Get' + * @member {array} [protocolConfiguration.hTTPConfiguration.headers] List of + * HTTP headers. + * @member {array} [protocolConfiguration.hTTPConfiguration.validStatusCodes] + * Valid status codes. */ export interface ConnectivityParameters { source: ConnectivitySource; destination: ConnectivityDestination; + protocol?: string; + protocolConfiguration?: ProtocolConfiguration; } /** @@ -4528,6 +4890,190 @@ export interface AvailableProvidersList { countries: AvailableProvidersListCountry[]; } +/** + * @class + * Initializes a new instance of the ConnectionMonitorSource class. + * @constructor + * Describes the source of connection monitor. + * + * @member {string} resourceId The ID of the resource used as the source by + * connection monitor. + * @member {number} [port] The source port used by connection monitor. + */ +export interface ConnectionMonitorSource { + resourceId: string; + port?: number; +} + +/** + * @class + * Initializes a new instance of the ConnectionMonitorDestination class. + * @constructor + * Describes the destination of connection monitor. + * + * @member {string} [resourceId] The ID of the resource used as the destination + * by connection monitor. + * @member {string} [address] Address of the connection monitor destination (IP + * or domain name). + * @member {number} [port] The destination port used by connection monitor. + */ +export interface ConnectionMonitorDestination { + resourceId?: string; + address?: string; + port?: number; +} + +/** + * @class + * Initializes a new instance of the ConnectionMonitorParameters class. + * @constructor + * Parameters that define the operation to create a connection monitor. + * + * @member {object} source + * @member {string} [source.resourceId] The ID of the resource used as the + * source by connection monitor. + * @member {number} [source.port] The source port used by connection monitor. + * @member {object} destination + * @member {string} [destination.resourceId] The ID of the resource used as the + * destination by connection monitor. + * @member {string} [destination.address] Address of the connection monitor + * destination (IP or domain name). + * @member {number} [destination.port] The destination port used by connection + * monitor. + * @member {boolean} [autoStart] Determines if the connection monitor will + * start automatically once created. Default value: true . + * @member {number} [monitoringIntervalInSeconds] Monitoring interval in + * seconds. Default value: 60 . + */ +export interface ConnectionMonitorParameters { + source: ConnectionMonitorSource; + destination: ConnectionMonitorDestination; + autoStart?: boolean; + monitoringIntervalInSeconds?: number; +} + +/** + * @class + * Initializes a new instance of the ConnectionMonitor class. + * @constructor + * Parameters that define the operation to create a connection monitor. + * + * @member {string} [location] Connection monitor location. + * @member {object} [tags] Connection monitor tags. + * @member {object} source + * @member {string} [source.resourceId] The ID of the resource used as the + * source by connection monitor. + * @member {number} [source.port] The source port used by connection monitor. + * @member {object} destination + * @member {string} [destination.resourceId] The ID of the resource used as the + * destination by connection monitor. + * @member {string} [destination.address] Address of the connection monitor + * destination (IP or domain name). + * @member {number} [destination.port] The destination port used by connection + * monitor. + * @member {boolean} [autoStart] Determines if the connection monitor will + * start automatically once created. Default value: true . + * @member {number} [monitoringIntervalInSeconds] Monitoring interval in + * seconds. Default value: 60 . + */ +export interface ConnectionMonitor { + location?: string; + tags?: { [propertyName: string]: string }; + source: ConnectionMonitorSource; + destination: ConnectionMonitorDestination; + autoStart?: boolean; + monitoringIntervalInSeconds?: number; +} + +/** + * @class + * Initializes a new instance of the ConnectionMonitorResult class. + * @constructor + * Information about the connection monitor. + * + * @member {string} [name] Name of the connection monitor. + * @member {string} [id] ID of the connection monitor. + * @member {string} [etag] Default value: 'A unique read-only string that + * changes whenever the resource is updated.' . + * @member {string} [type] Connection monitor type. + * @member {string} [location] Connection monitor location. + * @member {object} [tags] Connection monitor tags. + * @member {object} source + * @member {string} [source.resourceId] The ID of the resource used as the + * source by connection monitor. + * @member {number} [source.port] The source port used by connection monitor. + * @member {object} destination + * @member {string} [destination.resourceId] The ID of the resource used as the + * destination by connection monitor. + * @member {string} [destination.address] Address of the connection monitor + * destination (IP or domain name). + * @member {number} [destination.port] The destination port used by connection + * monitor. + * @member {boolean} [autoStart] Determines if the connection monitor will + * start automatically once created. Default value: true . + * @member {number} [monitoringIntervalInSeconds] Monitoring interval in + * seconds. Default value: 60 . + * @member {string} [provisioningState] The provisioning state of the + * connection monitor. Possible values include: 'Succeeded', 'Updating', + * 'Deleting', 'Failed' + * @member {date} [startTime] The date and time when the connection monitor was + * started. + * @member {string} [monitoringStatus] The monitoring status of the connection + * monitor. + */ +export interface ConnectionMonitorResult extends BaseResource { + readonly name?: string; + readonly id?: string; + etag?: string; + readonly type?: string; + location?: string; + tags?: { [propertyName: string]: string }; + source: ConnectionMonitorSource; + destination: ConnectionMonitorDestination; + autoStart?: boolean; + monitoringIntervalInSeconds?: number; + provisioningState?: string; + startTime?: Date; + monitoringStatus?: string; +} + +/** + * @class + * Initializes a new instance of the ConnectionStateSnapshot class. + * @constructor + * Connection state snapshot. + * + * @member {string} [connectionState] The connection state. Possible values + * include: 'Reachable', 'Unreachable', 'Unknown' + * @member {date} [startTime] The start time of the connection snapshot. + * @member {date} [endTime] The end time of the connection snapshot. + * @member {string} [evaluationState] Connectivity analysis evaluation state. + * Possible values include: 'NotStarted', 'InProgress', 'Completed' + * @member {array} [hops] List of hops between the source and the destination. + */ +export interface ConnectionStateSnapshot { + connectionState?: string; + startTime?: Date; + endTime?: Date; + evaluationState?: string; + readonly hops?: ConnectivityHop[]; +} + +/** + * @class + * Initializes a new instance of the ConnectionMonitorQueryResult class. + * @constructor + * List of connection states snaphots. + * + * @member {string} [sourceStatus] Status of connection monitor source. + * Possible values include: 'Uknown', 'Active', 'Inactive' + * @member {array} [states] Information about connection states. + */ +export interface ConnectionMonitorQueryResult { + sourceStatus?: string; + states?: ConnectionStateSnapshot[]; +} + /** * @class * Initializes a new instance of the OperationDisplay class. @@ -4692,7 +5238,6 @@ export interface Operation { * resource group. This name can be used to access the resource. * @member {string} [etag] A unique read-only string that changes whenever the * resource is updated. - * @member {object} [tags] Resource tags. */ export interface PatchRouteFilterRule extends SubResource { access: string; @@ -4700,7 +5245,6 @@ export interface PatchRouteFilterRule extends SubResource { readonly provisioningState?: string; readonly name?: string; readonly etag?: string; - tags?: { [propertyName: string]: string }; } /** @@ -4909,9 +5453,13 @@ export interface DhcpOptions { * @member {string} [provisioningState] The provisioning state of the PublicIP * resource. Possible values are: 'Updating', 'Deleting', and 'Failed'. * @member {boolean} [enableDdosProtection] Indicates if DDoS protection is - * enabled for all the protected resources in a Virtual Network. - * @member {boolean} [enableVmProtection] Indicates if Vm protection is enabled - * for all the subnets in a Virtual Network. + * enabled for all the protected resources in the virtual network. It requires + * a DDoS protection plan associated with the resource. Default value: false . + * @member {boolean} [enableVmProtection] Indicates if VM protection is enabled + * for all the subnets in the virtual network. Default value: false . + * @member {object} [ddosProtectionPlan] The DDoS protection plan associated + * with the virtual network. + * @member {string} [ddosProtectionPlan.id] Resource ID. * @member {string} [etag] Gets a unique read-only string that changes whenever * the resource is updated. */ @@ -4924,6 +5472,7 @@ export interface VirtualNetwork extends Resource { provisioningState?: string; enableDdosProtection?: boolean; enableVmProtection?: boolean; + ddosProtectionPlan?: SubResource; etag?: string; } @@ -5074,6 +5623,48 @@ export interface VpnClientRevokedCertificate extends SubResource { etag?: string; } +/** + * @class + * Initializes a new instance of the IpsecPolicy class. + * @constructor + * An IPSec Policy configuration for a virtual network gateway connection + * + * @member {number} saLifeTimeSeconds The IPSec Security Association (also + * called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN + * tunnel. + * @member {number} saDataSizeKilobytes The IPSec Security Association (also + * called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN + * tunnel. + * @member {string} ipsecEncryption The IPSec encryption algorithm (IKE phase + * 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', + * 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * @member {string} ipsecIntegrity The IPSec integrity algorithm (IKE phase 1). + * Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', + * 'GCMAES256' + * @member {string} ikeEncryption The IKE encryption algorithm (IKE phase 2). + * Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + * 'GCMAES256', 'GCMAES128' + * @member {string} ikeIntegrity The IKE integrity algorithm (IKE phase 2). + * Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + * 'GCMAES128' + * @member {string} dhGroup The DH Groups used in IKE Phase 1 for initial SA. + * Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', + * 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * @member {string} pfsGroup The Pfs Groups used in IKE Phase 2 for new child + * SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', + * 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + */ +export interface IpsecPolicy { + saLifeTimeSeconds: number; + saDataSizeKilobytes: number; + ipsecEncryption: string; + ipsecIntegrity: string; + ikeEncryption: string; + ikeIntegrity: string; + dhGroup: string; + pfsGroup: string; +} + /** * @class * Initializes a new instance of the VpnClientConfiguration class. @@ -5090,6 +5681,8 @@ export interface VpnClientRevokedCertificate extends SubResource { * for Virtual network gateway. * @member {array} [vpnClientProtocols] VpnClientProtocols for Virtual network * gateway. + * @member {array} [vpnClientIpsecPolicies] VpnClientIpsecPolicies for virtual + * network gateway P2S client. * @member {string} [radiusServerAddress] The radius server address property of * the VirtualNetworkGateway resource for vpn client connection. * @member {string} [radiusServerSecret] The radius secret property of the @@ -5100,6 +5693,7 @@ export interface VpnClientConfiguration { vpnClientRootCertificates?: VpnClientRootCertificate[]; vpnClientRevokedCertificates?: VpnClientRevokedCertificate[]; vpnClientProtocols?: string[]; + vpnClientIpsecPolicies?: IpsecPolicy[]; radiusServerAddress?: string; radiusServerSecret?: string; } @@ -5220,6 +5814,8 @@ export interface GatewayRoute { * VpnClientRevokedCertificate for Virtual network gateway. * @member {array} [vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. + * @member {array} [vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. * @member {string} [vpnClientConfiguration.radiusServerAddress] The radius * server address property of the VirtualNetworkGateway resource for vpn client * connection. @@ -5366,46 +5962,6 @@ export interface LocalNetworkGateway extends Resource { etag?: string; } -/** - * @class - * Initializes a new instance of the IpsecPolicy class. - * @constructor - * An IPSec Policy configuration for a virtual network gateway connection - * - * @member {number} saLifeTimeSeconds The IPSec Security Association (also - * called Quick Mode or Phase 2 SA) lifetime in seconds for a site to site VPN - * tunnel. - * @member {number} saDataSizeKilobytes The IPSec Security Association (also - * called Quick Mode or Phase 2 SA) payload size in KB for a site to site VPN - * tunnel. - * @member {string} ipsecEncryption The IPSec encryption algorithm (IKE phase - * 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', - * 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' - * @member {string} ipsecIntegrity The IPSec integrity algorithm (IKE phase 1). - * Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', - * 'GCMAES256' - * @member {string} ikeEncryption The IKE encryption algorithm (IKE phase 2). - * Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' - * @member {string} ikeIntegrity The IKE integrity algorithm (IKE phase 2). - * Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' - * @member {string} dhGroup The DH Groups used in IKE Phase 1 for initial SA. - * Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', - * 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - * @member {string} pfsGroup The DH Groups used in IKE Phase 2 for new child - * SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', - * 'ECP384', 'PFS24' - */ -export interface IpsecPolicy { - saLifeTimeSeconds: number; - saDataSizeKilobytes: number; - ipsecEncryption: string; - ipsecIntegrity: string; - ikeEncryption: string; - ikeIntegrity: string; - dhGroup: string; - pfsGroup: string; -} - /** * @class * Initializes a new instance of the VirtualNetworkGatewayConnection class. @@ -5460,6 +6016,9 @@ export interface IpsecPolicy { * @member {array} * [virtualNetworkGateway1.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. + * @member {array} + * [virtualNetworkGateway1.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. * @member {string} * [virtualNetworkGateway1.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn @@ -5530,6 +6089,9 @@ export interface IpsecPolicy { * @member {array} * [virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. + * @member {array} + * [virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. * @member {string} * [virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn @@ -5653,6 +6215,46 @@ export interface ConnectionSharedKey { value: string; } +/** + * @class + * Initializes a new instance of the VpnClientIPsecParameters class. + * @constructor + * An IPSec parameters for a virtual network gateway P2S connection. + * + * @member {number} saLifeTimeSeconds The IPSec Security Association (also + * called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * @member {number} saDataSizeKilobytes The IPSec Security Association (also + * called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * @member {string} ipsecEncryption The IPSec encryption algorithm (IKE phase + * 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', + * 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * @member {string} ipsecIntegrity The IPSec integrity algorithm (IKE phase 1). + * Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', 'GCMAES192', + * 'GCMAES256' + * @member {string} ikeEncryption The IKE encryption algorithm (IKE phase 2). + * Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + * 'GCMAES256', 'GCMAES128' + * @member {string} ikeIntegrity The IKE integrity algorithm (IKE phase 2). + * Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + * 'GCMAES128' + * @member {string} dhGroup The DH Groups used in IKE Phase 1 for initial SA. + * Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', + * 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * @member {string} pfsGroup The Pfs Groups used in IKE Phase 2 for new child + * SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', + * 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + */ +export interface VpnClientIPsecParameters { + saLifeTimeSeconds: number; + saDataSizeKilobytes: number; + ipsecEncryption: string; + ipsecIntegrity: string; + ikeEncryption: string; + ikeIntegrity: string; + dhGroup: string; + pfsGroup: string; +} + /** * @class * Initializes a new instance of the VirtualNetworkConnectionGatewayReference class. @@ -5789,6 +6391,18 @@ export interface ApplicationSecurityGroupListResult extends Array { + readonly nextLink?: string; +} + /** * @class * Initializes a new instance of the EndpointServicesListResult class. @@ -5851,6 +6465,31 @@ export interface ExpressRouteServiceProviderListResult extends Array { + readonly nextLink?: string; +} + +/** + * @class + * Initializes a new instance of the ExpressRouteCrossConnectionPeeringList class. + * @constructor + * Response for ListPeering API service call retrieves all peerings that belong + * to an ExpressRouteCrossConnection. + * + * @member {string} [nextLink] The URL to get the next set of results. + */ +export interface ExpressRouteCrossConnectionPeeringList extends Array { + readonly nextLink?: string; +} + /** * @class * Initializes a new instance of the LoadBalancerListResult class. @@ -6004,6 +6643,16 @@ export interface NetworkWatcherListResult extends Array { export interface PacketCaptureListResult extends Array { } +/** + * @class + * Initializes a new instance of the ConnectionMonitorListResult class. + * @constructor + * List of connection monitors. + * + */ +export interface ConnectionMonitorListResult extends Array { +} + /** * @class * Initializes a new instance of the OperationListResult class. diff --git a/lib/services/networkManagement2/lib/models/index.js b/lib/services/networkManagement2/lib/models/index.js index f00395fbf5..4f242870be 100644 --- a/lib/services/networkManagement2/lib/models/index.js +++ b/lib/services/networkManagement2/lib/models/index.js @@ -32,6 +32,7 @@ exports.RouteTable = require('./routeTable'); exports.ServiceEndpointPropertiesFormat = require('./serviceEndpointPropertiesFormat'); exports.PublicIPAddressSku = require('./publicIPAddressSku'); exports.PublicIPAddressDnsSettings = require('./publicIPAddressDnsSettings'); +exports.IpTag = require('./ipTag'); exports.PublicIPAddress = require('./publicIPAddress'); exports.IPConfiguration = require('./iPConfiguration'); exports.ResourceNavigationLink = require('./resourceNavigationLink'); @@ -70,11 +71,13 @@ exports.ApplicationGatewayAvailableSslOptions = require('./applicationGatewayAva exports.ApplicationGatewaySslPredefinedPolicy = require('./applicationGatewaySslPredefinedPolicy'); exports.TagsObject = require('./tagsObject'); exports.DnsNameAvailabilityResult = require('./dnsNameAvailabilityResult'); +exports.DdosProtectionPlan = require('./ddosProtectionPlan'); exports.EndpointServiceResult = require('./endpointServiceResult'); exports.ExpressRouteCircuitAuthorization = require('./expressRouteCircuitAuthorization'); exports.ExpressRouteCircuitPeeringConfig = require('./expressRouteCircuitPeeringConfig'); exports.RouteFilterRule = require('./routeFilterRule'); exports.ExpressRouteCircuitStats = require('./expressRouteCircuitStats'); +exports.ExpressRouteCircuitConnection = require('./expressRouteCircuitConnection'); exports.ExpressRouteCircuitPeering = require('./expressRouteCircuitPeering'); exports.RouteFilter = require('./routeFilter'); exports.Ipv6ExpressRouteCircuitPeeringConfig = require('./ipv6ExpressRouteCircuitPeeringConfig'); @@ -89,6 +92,11 @@ exports.ExpressRouteCircuitRoutesTableSummary = require('./expressRouteCircuitRo exports.ExpressRouteCircuitsRoutesTableSummaryListResult = require('./expressRouteCircuitsRoutesTableSummaryListResult'); exports.ExpressRouteServiceProviderBandwidthsOffered = require('./expressRouteServiceProviderBandwidthsOffered'); exports.ExpressRouteServiceProvider = require('./expressRouteServiceProvider'); +exports.ExpressRouteCrossConnectionRoutesTableSummary = require('./expressRouteCrossConnectionRoutesTableSummary'); +exports.ExpressRouteCrossConnectionsRoutesTableSummaryListResult = require('./expressRouteCrossConnectionsRoutesTableSummaryListResult'); +exports.ExpressRouteCircuitReference = require('./expressRouteCircuitReference'); +exports.ExpressRouteCrossConnectionPeering = require('./expressRouteCrossConnectionPeering'); +exports.ExpressRouteCrossConnection = require('./expressRouteCrossConnection'); exports.LoadBalancerSku = require('./loadBalancerSku'); exports.FrontendIPConfiguration = require('./frontendIPConfiguration'); exports.LoadBalancingRule = require('./loadBalancingRule'); @@ -136,6 +144,9 @@ exports.FlowLogStatusParameters = require('./flowLogStatusParameters'); exports.FlowLogInformation = require('./flowLogInformation'); exports.ConnectivitySource = require('./connectivitySource'); exports.ConnectivityDestination = require('./connectivityDestination'); +exports.HTTPHeader = require('./hTTPHeader'); +exports.HTTPConfiguration = require('./hTTPConfiguration'); +exports.ProtocolConfiguration = require('./protocolConfiguration'); exports.ConnectivityParameters = require('./connectivityParameters'); exports.ConnectivityIssue = require('./connectivityIssue'); exports.ConnectivityHop = require('./connectivityHop'); @@ -150,6 +161,13 @@ exports.AvailableProvidersListCity = require('./availableProvidersListCity'); exports.AvailableProvidersListState = require('./availableProvidersListState'); exports.AvailableProvidersListCountry = require('./availableProvidersListCountry'); exports.AvailableProvidersList = require('./availableProvidersList'); +exports.ConnectionMonitorSource = require('./connectionMonitorSource'); +exports.ConnectionMonitorDestination = require('./connectionMonitorDestination'); +exports.ConnectionMonitorParameters = require('./connectionMonitorParameters'); +exports.ConnectionMonitor = require('./connectionMonitor'); +exports.ConnectionMonitorResult = require('./connectionMonitorResult'); +exports.ConnectionStateSnapshot = require('./connectionStateSnapshot'); +exports.ConnectionMonitorQueryResult = require('./connectionMonitorQueryResult'); exports.OperationDisplay = require('./operationDisplay'); exports.Availability = require('./availability'); exports.Dimension = require('./dimension'); @@ -174,6 +192,7 @@ exports.VirtualNetworkGatewayIPConfiguration = require('./virtualNetworkGatewayI exports.VirtualNetworkGatewaySku = require('./virtualNetworkGatewaySku'); exports.VpnClientRootCertificate = require('./vpnClientRootCertificate'); exports.VpnClientRevokedCertificate = require('./vpnClientRevokedCertificate'); +exports.IpsecPolicy = require('./ipsecPolicy'); exports.VpnClientConfiguration = require('./vpnClientConfiguration'); exports.BgpSettings = require('./bgpSettings'); exports.BgpPeerStatus = require('./bgpPeerStatus'); @@ -184,21 +203,24 @@ exports.BgpPeerStatusListResult = require('./bgpPeerStatusListResult'); exports.GatewayRouteListResult = require('./gatewayRouteListResult'); exports.TunnelConnectionHealth = require('./tunnelConnectionHealth'); exports.LocalNetworkGateway = require('./localNetworkGateway'); -exports.IpsecPolicy = require('./ipsecPolicy'); exports.VirtualNetworkGatewayConnection = require('./virtualNetworkGatewayConnection'); exports.ConnectionResetSharedKey = require('./connectionResetSharedKey'); exports.ConnectionSharedKey = require('./connectionSharedKey'); +exports.VpnClientIPsecParameters = require('./vpnClientIPsecParameters'); exports.VirtualNetworkConnectionGatewayReference = require('./virtualNetworkConnectionGatewayReference'); exports.VirtualNetworkGatewayConnectionListEntity = require('./virtualNetworkGatewayConnectionListEntity'); exports.VpnDeviceScriptParameters = require('./vpnDeviceScriptParameters'); exports.ApplicationGatewayListResult = require('./applicationGatewayListResult'); exports.ApplicationGatewayAvailableSslPredefinedPolicies = require('./applicationGatewayAvailableSslPredefinedPolicies'); exports.ApplicationSecurityGroupListResult = require('./applicationSecurityGroupListResult'); +exports.DdosProtectionPlanListResult = require('./ddosProtectionPlanListResult'); exports.EndpointServicesListResult = require('./endpointServicesListResult'); exports.AuthorizationListResult = require('./authorizationListResult'); exports.ExpressRouteCircuitPeeringListResult = require('./expressRouteCircuitPeeringListResult'); exports.ExpressRouteCircuitListResult = require('./expressRouteCircuitListResult'); exports.ExpressRouteServiceProviderListResult = require('./expressRouteServiceProviderListResult'); +exports.ExpressRouteCrossConnectionListResult = require('./expressRouteCrossConnectionListResult'); +exports.ExpressRouteCrossConnectionPeeringList = require('./expressRouteCrossConnectionPeeringList'); exports.LoadBalancerListResult = require('./loadBalancerListResult'); exports.LoadBalancerBackendAddressPoolListResult = require('./loadBalancerBackendAddressPoolListResult'); exports.LoadBalancerFrontendIPConfigurationListResult = require('./loadBalancerFrontendIPConfigurationListResult'); @@ -212,6 +234,7 @@ exports.NetworkSecurityGroupListResult = require('./networkSecurityGroupListResu exports.SecurityRuleListResult = require('./securityRuleListResult'); exports.NetworkWatcherListResult = require('./networkWatcherListResult'); exports.PacketCaptureListResult = require('./packetCaptureListResult'); +exports.ConnectionMonitorListResult = require('./connectionMonitorListResult'); exports.OperationListResult = require('./operationListResult'); exports.PublicIPAddressListResult = require('./publicIPAddressListResult'); exports.RouteFilterListResult = require('./routeFilterListResult'); diff --git a/lib/services/networkManagement2/lib/models/ipTag.js b/lib/services/networkManagement2/lib/models/ipTag.js new file mode 100644 index 0000000000..f6352a0ffa --- /dev/null +++ b/lib/services/networkManagement2/lib/models/ipTag.js @@ -0,0 +1,62 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * Contains the IpTag associated with the public IP address + * + */ +class IpTag { + /** + * Create a IpTag. + * @member {string} [ipTagType] Gets or sets the ipTag type: Example + * FirstPartyUsage. + * @member {string} [tag] Gets or sets value of the IpTag associated with the + * public IP. Example SQL, Storage etc + */ + constructor() { + } + + /** + * Defines the metadata of IpTag + * + * @returns {object} metadata of IpTag + * + */ + mapper() { + return { + required: false, + serializedName: 'IpTag', + type: { + name: 'Composite', + className: 'IpTag', + modelProperties: { + ipTagType: { + required: false, + serializedName: 'ipTagType', + type: { + name: 'String' + } + }, + tag: { + required: false, + serializedName: 'tag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = IpTag; diff --git a/lib/services/networkManagement2/lib/models/ipsecPolicy.js b/lib/services/networkManagement2/lib/models/ipsecPolicy.js index e760342aa7..ee16d6a604 100644 --- a/lib/services/networkManagement2/lib/models/ipsecPolicy.js +++ b/lib/services/networkManagement2/lib/models/ipsecPolicy.js @@ -30,15 +30,17 @@ class IpsecPolicy { * 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', * 'GCMAES192', 'GCMAES256' * @member {string} ikeEncryption The IKE encryption algorithm (IKE phase 2). - * Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256' + * Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + * 'GCMAES256', 'GCMAES128' * @member {string} ikeIntegrity The IKE integrity algorithm (IKE phase 2). - * Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384' + * Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + * 'GCMAES128' * @member {string} dhGroup The DH Groups used in IKE Phase 1 for initial SA. * Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', * 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' - * @member {string} pfsGroup The DH Groups used in IKE Phase 2 for new child + * @member {string} pfsGroup The Pfs Groups used in IKE Phase 2 for new child * SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', - * 'ECP384', 'PFS24' + * 'ECP384', 'PFS24', 'PFS14', 'PFSMM' */ constructor() { } diff --git a/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js b/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js index 1cba348048..21466e3abc 100644 --- a/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js +++ b/lib/services/networkManagement2/lib/models/networkInterfaceIPConfiguration.js @@ -190,6 +190,8 @@ class NetworkInterfaceIPConfiguration extends models['SubResource'] { * resolves to this public IP address. If the reverseFqdn is specified, then * a PTR DNS record is created pointing from the IP address in the * in-addr.arpa domain to the reverse FQDN. + * @member {array} [publicIPAddress.ipTags] The list of tags associated with + * the public IP address. * @member {string} [publicIPAddress.ipAddress] The IP address associated * with the public IP address resource. * @member {number} [publicIPAddress.idleTimeoutInMinutes] The idle timeout diff --git a/lib/services/networkManagement2/lib/models/patchRouteFilterRule.js b/lib/services/networkManagement2/lib/models/patchRouteFilterRule.js index 6554b189cc..2a576e68a4 100644 --- a/lib/services/networkManagement2/lib/models/patchRouteFilterRule.js +++ b/lib/services/networkManagement2/lib/models/patchRouteFilterRule.js @@ -31,7 +31,6 @@ class PatchRouteFilterRule extends models['SubResource'] { * resource group. This name can be used to access the resource. * @member {string} [etag] A unique read-only string that changes whenever * the resource is updated. - * @member {object} [tags] Resource tags. */ constructor() { super(); @@ -111,20 +110,6 @@ class PatchRouteFilterRule extends models['SubResource'] { type: { name: 'String' } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } } } } diff --git a/lib/services/networkManagement2/lib/models/protocolConfiguration.js b/lib/services/networkManagement2/lib/models/protocolConfiguration.js new file mode 100644 index 0000000000..e9073a2149 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/protocolConfiguration.js @@ -0,0 +1,59 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const models = require('./index'); + +/** + * Configuration of the protocol. + * + */ +class ProtocolConfiguration { + /** + * Create a ProtocolConfiguration. + * @member {object} [hTTPConfiguration] + * @member {string} [hTTPConfiguration.method] HTTP method. Possible values + * include: 'Get' + * @member {array} [hTTPConfiguration.headers] List of HTTP headers. + * @member {array} [hTTPConfiguration.validStatusCodes] Valid status codes. + */ + constructor() { + } + + /** + * Defines the metadata of ProtocolConfiguration + * + * @returns {object} metadata of ProtocolConfiguration + * + */ + mapper() { + return { + required: false, + serializedName: 'ProtocolConfiguration', + type: { + name: 'Composite', + className: 'ProtocolConfiguration', + modelProperties: { + hTTPConfiguration: { + required: false, + serializedName: 'HTTPConfiguration', + type: { + name: 'Composite', + className: 'HTTPConfiguration' + } + } + } + } + }; + } +} + +module.exports = ProtocolConfiguration; diff --git a/lib/services/networkManagement2/lib/models/publicIPAddress.js b/lib/services/networkManagement2/lib/models/publicIPAddress.js index 8c75b26ff2..343142c9ae 100644 --- a/lib/services/networkManagement2/lib/models/publicIPAddress.js +++ b/lib/services/networkManagement2/lib/models/publicIPAddress.js @@ -115,6 +115,8 @@ class PublicIPAddress extends models['Resource'] { * IP address. If the reverseFqdn is specified, then a PTR DNS record is * created pointing from the IP address in the in-addr.arpa domain to the * reverse FQDN. + * @member {array} [ipTags] The list of tags associated with the public IP + * address. * @member {string} [ipAddress] The IP address associated with the public IP * address resource. * @member {number} [idleTimeoutInMinutes] The idle timeout of the public IP @@ -230,6 +232,21 @@ class PublicIPAddress extends models['Resource'] { className: 'PublicIPAddressDnsSettings' } }, + ipTags: { + required: false, + serializedName: 'properties.ipTags', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'IpTagElementType', + type: { + name: 'Composite', + className: 'IpTag' + } + } + } + }, ipAddress: { required: false, serializedName: 'properties.ipAddress', diff --git a/lib/services/networkManagement2/lib/models/routeFilterRule.js b/lib/services/networkManagement2/lib/models/routeFilterRule.js index 4782bf3bee..026d2ba3cb 100644 --- a/lib/services/networkManagement2/lib/models/routeFilterRule.js +++ b/lib/services/networkManagement2/lib/models/routeFilterRule.js @@ -32,7 +32,6 @@ class RouteFilterRule extends models['SubResource'] { * @member {string} [location] Resource location. * @member {string} [etag] A unique read-only string that changes whenever * the resource is updated. - * @member {object} [tags] Resource tags. */ constructor() { super(); @@ -118,20 +117,6 @@ class RouteFilterRule extends models['SubResource'] { type: { name: 'String' } - }, - tags: { - required: false, - serializedName: 'tags', - type: { - name: 'Dictionary', - value: { - required: false, - serializedName: 'StringElementType', - type: { - name: 'String' - } - } - } } } } diff --git a/lib/services/networkManagement2/lib/models/virtualNetwork.js b/lib/services/networkManagement2/lib/models/virtualNetwork.js index 57858bfad9..824d27e2a4 100644 --- a/lib/services/networkManagement2/lib/models/virtualNetwork.js +++ b/lib/services/networkManagement2/lib/models/virtualNetwork.js @@ -37,9 +37,14 @@ class VirtualNetwork extends models['Resource'] { * PublicIP resource. Possible values are: 'Updating', 'Deleting', and * 'Failed'. * @member {boolean} [enableDdosProtection] Indicates if DDoS protection is - * enabled for all the protected resources in a Virtual Network. - * @member {boolean} [enableVmProtection] Indicates if Vm protection is - * enabled for all the subnets in a Virtual Network. + * enabled for all the protected resources in the virtual network. It + * requires a DDoS protection plan associated with the resource. Default + * value: false . + * @member {boolean} [enableVmProtection] Indicates if VM protection is + * enabled for all the subnets in the virtual network. Default value: false . + * @member {object} [ddosProtectionPlan] The DDoS protection plan associated + * with the virtual network. + * @member {string} [ddosProtectionPlan.id] Resource ID. * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. */ @@ -168,6 +173,7 @@ class VirtualNetwork extends models['Resource'] { enableDdosProtection: { required: false, serializedName: 'properties.enableDdosProtection', + defaultValue: false, type: { name: 'Boolean' } @@ -175,10 +181,19 @@ class VirtualNetwork extends models['Resource'] { enableVmProtection: { required: false, serializedName: 'properties.enableVmProtection', + defaultValue: false, type: { name: 'Boolean' } }, + ddosProtectionPlan: { + required: false, + serializedName: 'properties.ddosProtectionPlan', + type: { + name: 'Composite', + className: 'SubResource' + } + }, etag: { required: false, serializedName: 'etag', diff --git a/lib/services/networkManagement2/lib/models/virtualNetworkGateway.js b/lib/services/networkManagement2/lib/models/virtualNetworkGateway.js index 78394c86a4..a8853085dc 100644 --- a/lib/services/networkManagement2/lib/models/virtualNetworkGateway.js +++ b/lib/services/networkManagement2/lib/models/virtualNetworkGateway.js @@ -60,6 +60,8 @@ class VirtualNetworkGateway extends models['Resource'] { * VpnClientRevokedCertificate for Virtual network gateway. * @member {array} [vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. + * @member {array} [vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. * @member {string} [vpnClientConfiguration.radiusServerAddress] The radius * server address property of the VirtualNetworkGateway resource for vpn * client connection. diff --git a/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js b/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js index f271073db5..b6dc8791ef 100644 --- a/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js +++ b/lib/services/networkManagement2/lib/models/virtualNetworkGatewayConnection.js @@ -70,6 +70,9 @@ class VirtualNetworkGatewayConnection extends models['Resource'] { * @member {array} * [virtualNetworkGateway1.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. + * @member {array} + * [virtualNetworkGateway1.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. * @member {string} * [virtualNetworkGateway1.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for @@ -142,6 +145,9 @@ class VirtualNetworkGatewayConnection extends models['Resource'] { * @member {array} * [virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. + * @member {array} + * [virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. * @member {string} * [virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for diff --git a/lib/services/networkManagement2/lib/models/vpnClientConfiguration.js b/lib/services/networkManagement2/lib/models/vpnClientConfiguration.js index bacec54289..b4f14facc0 100644 --- a/lib/services/networkManagement2/lib/models/vpnClientConfiguration.js +++ b/lib/services/networkManagement2/lib/models/vpnClientConfiguration.js @@ -29,6 +29,8 @@ class VpnClientConfiguration { * for Virtual network gateway. * @member {array} [vpnClientProtocols] VpnClientProtocols for Virtual * network gateway. + * @member {array} [vpnClientIpsecPolicies] VpnClientIpsecPolicies for + * virtual network gateway P2S client. * @member {string} [radiusServerAddress] The radius server address property * of the VirtualNetworkGateway resource for vpn client connection. * @member {string} [radiusServerSecret] The radius secret property of the @@ -103,6 +105,21 @@ class VpnClientConfiguration { } } }, + vpnClientIpsecPolicies: { + required: false, + serializedName: 'vpnClientIpsecPolicies', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'IpsecPolicyElementType', + type: { + name: 'Composite', + className: 'IpsecPolicy' + } + } + } + }, radiusServerAddress: { required: false, serializedName: 'radiusServerAddress', diff --git a/lib/services/networkManagement2/lib/models/vpnClientIPsecParameters.js b/lib/services/networkManagement2/lib/models/vpnClientIPsecParameters.js new file mode 100644 index 0000000000..b166295913 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/vpnClientIPsecParameters.js @@ -0,0 +1,122 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +/** + * An IPSec parameters for a virtual network gateway P2S connection. + * + */ +class VpnClientIPsecParameters { + /** + * Create a VpnClientIPsecParameters. + * @member {number} saLifeTimeSeconds The IPSec Security Association (also + * called Quick Mode or Phase 2 SA) lifetime in seconds for P2S client. + * @member {number} saDataSizeKilobytes The IPSec Security Association (also + * called Quick Mode or Phase 2 SA) payload size in KB for P2S client.. + * @member {string} ipsecEncryption The IPSec encryption algorithm (IKE phase + * 1). Possible values include: 'None', 'DES', 'DES3', 'AES128', 'AES192', + * 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * @member {string} ipsecIntegrity The IPSec integrity algorithm (IKE phase + * 1). Possible values include: 'MD5', 'SHA1', 'SHA256', 'GCMAES128', + * 'GCMAES192', 'GCMAES256' + * @member {string} ikeEncryption The IKE encryption algorithm (IKE phase 2). + * Possible values include: 'DES', 'DES3', 'AES128', 'AES192', 'AES256', + * 'GCMAES256', 'GCMAES128' + * @member {string} ikeIntegrity The IKE integrity algorithm (IKE phase 2). + * Possible values include: 'MD5', 'SHA1', 'SHA256', 'SHA384', 'GCMAES256', + * 'GCMAES128' + * @member {string} dhGroup The DH Groups used in IKE Phase 1 for initial SA. + * Possible values include: 'None', 'DHGroup1', 'DHGroup2', 'DHGroup14', + * 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * @member {string} pfsGroup The Pfs Groups used in IKE Phase 2 for new child + * SA. Possible values include: 'None', 'PFS1', 'PFS2', 'PFS2048', 'ECP256', + * 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + */ + constructor() { + } + + /** + * Defines the metadata of VpnClientIPsecParameters + * + * @returns {object} metadata of VpnClientIPsecParameters + * + */ + mapper() { + return { + required: false, + serializedName: 'VpnClientIPsecParameters', + type: { + name: 'Composite', + className: 'VpnClientIPsecParameters', + modelProperties: { + saLifeTimeSeconds: { + required: true, + serializedName: 'saLifeTimeSeconds', + type: { + name: 'Number' + } + }, + saDataSizeKilobytes: { + required: true, + serializedName: 'saDataSizeKilobytes', + type: { + name: 'Number' + } + }, + ipsecEncryption: { + required: true, + serializedName: 'ipsecEncryption', + type: { + name: 'String' + } + }, + ipsecIntegrity: { + required: true, + serializedName: 'ipsecIntegrity', + type: { + name: 'String' + } + }, + ikeEncryption: { + required: true, + serializedName: 'ikeEncryption', + type: { + name: 'String' + } + }, + ikeIntegrity: { + required: true, + serializedName: 'ikeIntegrity', + type: { + name: 'String' + } + }, + dhGroup: { + required: true, + serializedName: 'dhGroup', + type: { + name: 'String' + } + }, + pfsGroup: { + required: true, + serializedName: 'pfsGroup', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = VpnClientIPsecParameters; diff --git a/lib/services/networkManagement2/lib/networkManagementClient.d.ts b/lib/services/networkManagement2/lib/networkManagementClient.d.ts index 07537b5c79..259f40a1a6 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.d.ts +++ b/lib/services/networkManagement2/lib/networkManagementClient.d.ts @@ -13,7 +13,7 @@ import { AzureServiceClient, AzureServiceClientOptions } from 'ms-rest-azure'; import * as models from "./models"; import * as operations from "./operations"; -declare class NetworkManagementClient extends AzureServiceClient { +export default class NetworkManagementClient extends AzureServiceClient { /** * Initializes a new instance of the NetworkManagementClient class. * @constructor @@ -56,11 +56,15 @@ declare class NetworkManagementClient extends AzureServiceClient { // Operation groups applicationGateways: operations.ApplicationGateways; applicationSecurityGroups: operations.ApplicationSecurityGroups; + ddosProtectionPlans: operations.DdosProtectionPlans; availableEndpointServices: operations.AvailableEndpointServices; expressRouteCircuitAuthorizations: operations.ExpressRouteCircuitAuthorizations; expressRouteCircuitPeerings: operations.ExpressRouteCircuitPeerings; + expressRouteCircuitConnections: operations.ExpressRouteCircuitConnections; expressRouteCircuits: operations.ExpressRouteCircuits; expressRouteServiceProviders: operations.ExpressRouteServiceProviders; + expressRouteCrossConnections: operations.ExpressRouteCrossConnections; + expressRouteCrossConnectionPeerings: operations.ExpressRouteCrossConnectionPeerings; loadBalancers: operations.LoadBalancers; loadBalancerBackendAddressPools: operations.LoadBalancerBackendAddressPools; loadBalancerFrontendIPConfigurations: operations.LoadBalancerFrontendIPConfigurations; @@ -76,6 +80,7 @@ declare class NetworkManagementClient extends AzureServiceClient { defaultSecurityRules: operations.DefaultSecurityRules; networkWatchers: operations.NetworkWatchers; packetCaptures: operations.PacketCaptures; + connectionMonitors: operations.ConnectionMonitors; operations: operations.Operations; publicIPAddresses: operations.PublicIPAddresses; routeFilters: operations.RouteFilters; @@ -156,4 +161,4 @@ declare class NetworkManagementClient extends AzureServiceClient { checkDnsNameAvailability(location: string, domainNameLabel: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } -export = NetworkManagementClient; +export { NetworkManagementClient, models as NetworkManagementModels }; diff --git a/lib/services/networkManagement2/lib/networkManagementClient.js b/lib/services/networkManagement2/lib/networkManagementClient.js index c8732ee23d..96ad44890a 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.js +++ b/lib/services/networkManagement2/lib/networkManagementClient.js @@ -61,7 +61,7 @@ function _checkDnsNameAvailability(location, domainNameLabel, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { @@ -220,11 +220,15 @@ class NetworkManagementClient extends ServiceClient { } this.applicationGateways = new operations.ApplicationGateways(this); this.applicationSecurityGroups = new operations.ApplicationSecurityGroups(this); + this.ddosProtectionPlans = new operations.DdosProtectionPlans(this); this.availableEndpointServices = new operations.AvailableEndpointServices(this); this.expressRouteCircuitAuthorizations = new operations.ExpressRouteCircuitAuthorizations(this); this.expressRouteCircuitPeerings = new operations.ExpressRouteCircuitPeerings(this); + this.expressRouteCircuitConnections = new operations.ExpressRouteCircuitConnections(this); this.expressRouteCircuits = new operations.ExpressRouteCircuits(this); this.expressRouteServiceProviders = new operations.ExpressRouteServiceProviders(this); + this.expressRouteCrossConnections = new operations.ExpressRouteCrossConnections(this); + this.expressRouteCrossConnectionPeerings = new operations.ExpressRouteCrossConnectionPeerings(this); this.loadBalancers = new operations.LoadBalancers(this); this.loadBalancerBackendAddressPools = new operations.LoadBalancerBackendAddressPools(this); this.loadBalancerFrontendIPConfigurations = new operations.LoadBalancerFrontendIPConfigurations(this); @@ -240,6 +244,7 @@ class NetworkManagementClient extends ServiceClient { this.defaultSecurityRules = new operations.DefaultSecurityRules(this); this.networkWatchers = new operations.NetworkWatchers(this); this.packetCaptures = new operations.PacketCaptures(this); + this.connectionMonitors = new operations.ConnectionMonitors(this); this.operations = new operations.Operations(this); this.publicIPAddresses = new operations.PublicIPAddresses(this); this.routeFilters = new operations.RouteFilters(this); @@ -353,3 +358,6 @@ class NetworkManagementClient extends ServiceClient { } module.exports = NetworkManagementClient; +module.exports['default'] = NetworkManagementClient; +module.exports.NetworkManagementClient = NetworkManagementClient; +module.exports.NetworkManagementModels = models; diff --git a/lib/services/networkManagement2/lib/operations/applicationGateways.js b/lib/services/networkManagement2/lib/operations/applicationGateways.js index e1de4ed13c..c05e4b5530 100644 --- a/lib/services/networkManagement2/lib/operations/applicationGateways.js +++ b/lib/services/networkManagement2/lib/operations/applicationGateways.js @@ -112,7 +112,7 @@ function _get(resourceGroupName, applicationGatewayName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -321,6 +321,14 @@ function _get(resourceGroupName, applicationGatewayName, options, callback) { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -527,7 +535,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -663,7 +671,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1005,7 +1013,7 @@ function _listAvailableWafRuleSets(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1137,7 +1145,7 @@ function _listAvailableSslOptions(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1270,7 +1278,7 @@ function _listAvailableSslPredefinedPolicies(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1404,7 +1412,7 @@ function _getSslPredefinedPolicy(predefinedPolicyName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1542,7 +1550,7 @@ function _beginDeleteMethod(resourceGroupName, applicationGatewayName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1600,7 +1608,7 @@ function _beginDeleteMethod(resourceGroupName, applicationGatewayName, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1733,6 +1741,14 @@ function _beginDeleteMethod(resourceGroupName, applicationGatewayName, options, * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -1780,7 +1796,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationGatewayName, paramet if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1855,7 +1871,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationGatewayName, paramet return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1884,7 +1900,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationGatewayName, paramet let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1901,7 +1917,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationGatewayName, paramet } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1962,7 +1978,7 @@ function _beginUpdateTags(resourceGroupName, applicationGatewayName, parameters, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2121,7 +2137,7 @@ function _beginStart(resourceGroupName, applicationGatewayName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2246,7 +2262,7 @@ function _beginStop(resourceGroupName, applicationGatewayName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2378,7 +2394,7 @@ function _beginBackendHealth(resourceGroupName, applicationGatewayName, options, throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3180,6 +3196,14 @@ class ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -3324,6 +3348,14 @@ class ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -4420,6 +4452,14 @@ class ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -4564,6 +4604,14 @@ class ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * diff --git a/lib/services/networkManagement2/lib/operations/applicationSecurityGroups.js b/lib/services/networkManagement2/lib/operations/applicationSecurityGroups.js index 0d2f12cbd3..7c8972e9d1 100644 --- a/lib/services/networkManagement2/lib/operations/applicationSecurityGroups.js +++ b/lib/services/networkManagement2/lib/operations/applicationSecurityGroups.js @@ -115,7 +115,7 @@ function _get(resourceGroupName, applicationSecurityGroupName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -344,7 +344,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -478,7 +478,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -617,7 +617,7 @@ function _beginDeleteMethod(resourceGroupName, applicationSecurityGroupName, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -675,7 +675,7 @@ function _beginDeleteMethod(resourceGroupName, applicationSecurityGroupName, opt return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -754,7 +754,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, p if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -829,7 +829,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, p return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -858,7 +858,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, p let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -875,7 +875,7 @@ function _beginCreateOrUpdate(resourceGroupName, applicationSecurityGroupName, p } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); diff --git a/lib/services/networkManagement2/lib/operations/availableEndpointServices.js b/lib/services/networkManagement2/lib/operations/availableEndpointServices.js index 92db2c1283..d406ad216c 100644 --- a/lib/services/networkManagement2/lib/operations/availableEndpointServices.js +++ b/lib/services/networkManagement2/lib/operations/availableEndpointServices.js @@ -48,7 +48,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/bgpServiceCommunities.js b/lib/services/networkManagement2/lib/operations/bgpServiceCommunities.js index 9116ccbc69..301e2a5673 100644 --- a/lib/services/networkManagement2/lib/operations/bgpServiceCommunities.js +++ b/lib/services/networkManagement2/lib/operations/bgpServiceCommunities.js @@ -46,7 +46,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/connectionMonitors.js b/lib/services/networkManagement2/lib/operations/connectionMonitors.js new file mode 100644 index 0000000000..6cb83da8c6 --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/connectionMonitors.js @@ -0,0 +1,2746 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Create or update a connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. + * + * @param {string} [parameters.location] Connection monitor location. + * + * @param {object} [parameters.tags] Connection monitor tags. + * + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets a connection monitor by name. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (connectionMonitorName === null || connectionMonitorName === undefined || typeof connectionMonitorName.valueOf() !== 'string') { + throw new Error('connectionMonitorName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{connectionMonitorName}', encodeURIComponent(connectionMonitorName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Deletes the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Stops the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _stop(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Starts the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _start(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorQueryResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _query(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorQueryResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Lists all connection monitors for the specified Network Watcher. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, networkWatcherName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Create or update a connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. + * + * @param {string} [parameters.location] Connection monitor location. + * + * @param {object} [parameters.tags] Connection monitor tags. + * + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (connectionMonitorName === null || connectionMonitorName === undefined || typeof connectionMonitorName.valueOf() !== 'string') { + throw new Error('connectionMonitorName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{connectionMonitorName}', encodeURIComponent(connectionMonitorName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['ConnectionMonitor']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (connectionMonitorName === null || connectionMonitorName === undefined || typeof connectionMonitorName.valueOf() !== 'string') { + throw new Error('connectionMonitorName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{connectionMonitorName}', encodeURIComponent(connectionMonitorName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Stops the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (connectionMonitorName === null || connectionMonitorName === undefined || typeof connectionMonitorName.valueOf() !== 'string') { + throw new Error('connectionMonitorName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/stop'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{connectionMonitorName}', encodeURIComponent(connectionMonitorName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Starts the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (connectionMonitorName === null || connectionMonitorName === undefined || typeof connectionMonitorName.valueOf() !== 'string') { + throw new Error('connectionMonitorName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/start'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{connectionMonitorName}', encodeURIComponent(connectionMonitorName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorQueryResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (networkWatcherName === null || networkWatcherName === undefined || typeof networkWatcherName.valueOf() !== 'string') { + throw new Error('networkWatcherName cannot be null or undefined and it must be of type string.'); + } + if (connectionMonitorName === null || connectionMonitorName === undefined || typeof connectionMonitorName.valueOf() !== 'string') { + throw new Error('connectionMonitorName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/networkWatchers/{networkWatcherName}/connectionMonitors/{connectionMonitorName}/query'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{networkWatcherName}', encodeURIComponent(networkWatcherName)); + requestUrl = requestUrl.replace('{connectionMonitorName}', encodeURIComponent(connectionMonitorName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorQueryResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 202) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ConnectionMonitorQueryResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ConnectionMonitors. */ +class ConnectionMonitors { + /** + * Create a ConnectionMonitors. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._createOrUpdate = _createOrUpdate; + this._get = _get; + this._deleteMethod = _deleteMethod; + this._stop = _stop; + this._start = _start; + this._query = _query; + this._list = _list; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginStop = _beginStop; + this._beginStart = _beginStart; + this._beginQuery = _beginQuery; + } + + /** + * Create or update a connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. + * + * @param {string} [parameters.location] Connection monitor location. + * + * @param {object} [parameters.tags] Connection monitor tags. + * + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. + * + * @param {string} [parameters.location] Connection monitor location. + * + * @param {object} [parameters.tags] Connection monitor tags. + * + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ConnectionMonitorResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, optionalCallback); + } + } + + /** + * Gets a connection monitor by name. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a connection monitor by name. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ConnectionMonitorResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Deletes the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Stops the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + stopWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._stop(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Stops the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + stop(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._stop(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._stop(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Starts the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + startWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._start(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Starts the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + start(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._start(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._start(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + queryWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._query(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ConnectionMonitorQueryResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorQueryResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + query(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._query(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._query(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, networkWatcherName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, networkWatcherName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Lists all connection monitors for the specified Network Watcher. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ConnectionMonitorListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, networkWatcherName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, networkWatcherName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, networkWatcherName, options, optionalCallback); + } + } + + /** + * Create or update a connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. + * + * @param {string} [parameters.location] Connection monitor location. + * + * @param {object} [parameters.tags] Connection monitor tags. + * + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Create or update a connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. + * + * @param {string} [parameters.location] Connection monitor location. + * + * @param {object} [parameters.tags] Connection monitor tags. + * + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ConnectionMonitorResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, networkWatcherName, connectionMonitorName, parameters, options, optionalCallback); + } + } + + /** + * Deletes the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Stops the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginStopWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Stops the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStop(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Starts the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginStartWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Starts the specified connection monitor. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name of the connection monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginStart(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginQueryWithHttpOperationResponse(resourceGroupName, networkWatcherName, connectionMonitorName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ConnectionMonitorQueryResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorQueryResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginQuery(resourceGroupName, networkWatcherName, connectionMonitorName, options, optionalCallback); + } + } + +} + +module.exports = ConnectionMonitors; diff --git a/lib/services/networkManagement2/lib/operations/ddosProtectionPlans.js b/lib/services/networkManagement2/lib/operations/ddosProtectionPlans.js new file mode 100644 index 0000000000..907ea57fc1 --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/ddosProtectionPlans.js @@ -0,0 +1,1964 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Deletes the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, ddosProtectionPlanName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, ddosProtectionPlanName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets information about the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, ddosProtectionPlanName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (ddosProtectionPlanName === null || ddosProtectionPlanName === undefined || typeof ddosProtectionPlanName.valueOf() !== 'string') { + throw new Error('ddosProtectionPlanName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosProtectionPlanName}', encodeURIComponent(ddosProtectionPlanName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlan']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates or updates a DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlan']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets all DDoS protection plans in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Network/ddosProtectionPlans'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlanListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlanListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Deletes the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, ddosProtectionPlanName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (ddosProtectionPlanName === null || ddosProtectionPlanName === undefined || typeof ddosProtectionPlanName.valueOf() !== 'string') { + throw new Error('ddosProtectionPlanName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosProtectionPlanName}', encodeURIComponent(ddosProtectionPlanName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates a DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (ddosProtectionPlanName === null || ddosProtectionPlanName === undefined || typeof ddosProtectionPlanName.valueOf() !== 'string') { + throw new Error('ddosProtectionPlanName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/ddosProtectionPlans/{ddosProtectionPlanName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosProtectionPlanName}', encodeURIComponent(ddosProtectionPlanName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['DdosProtectionPlan']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlan']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlan']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all DDoS protection plans in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlanListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['DdosProtectionPlanListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a DdosProtectionPlans. */ +class DdosProtectionPlans { + /** + * Create a DdosProtectionPlans. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._list = _list; + this._listByResourceGroup = _listByResourceGroup; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._listNext = _listNext; + this._listByResourceGroupNext = _listByResourceGroupNext; + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, ddosProtectionPlanName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, ddosProtectionPlanName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, ddosProtectionPlanName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, ddosProtectionPlanName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, ddosProtectionPlanName, options, optionalCallback); + } + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, ddosProtectionPlanName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, ddosProtectionPlanName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets information about the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlan} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, ddosProtectionPlanName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, ddosProtectionPlanName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, ddosProtectionPlanName, options, optionalCallback); + } + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, ddosProtectionPlanName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlan} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, optionalCallback); + } + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, ddosProtectionPlanName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, ddosProtectionPlanName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, ddosProtectionPlanName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, ddosProtectionPlanName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, ddosProtectionPlanName, options, optionalCallback); + } + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, ddosProtectionPlanName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a DDoS protection plan. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlan} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, ddosProtectionPlanName, parameters, options, optionalCallback); + } + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all DDoS protection plans in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = DdosProtectionPlans; diff --git a/lib/services/networkManagement2/lib/operations/defaultSecurityRules.js b/lib/services/networkManagement2/lib/operations/defaultSecurityRules.js index 81747498c8..b3c7d514ec 100644 --- a/lib/services/networkManagement2/lib/operations/defaultSecurityRules.js +++ b/lib/services/networkManagement2/lib/operations/defaultSecurityRules.js @@ -51,7 +51,7 @@ function _list(resourceGroupName, networkSecurityGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -198,7 +198,7 @@ function _get(resourceGroupName, networkSecurityGroupName, defaultSecurityRuleNa if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCircuitAuthorizations.js b/lib/services/networkManagement2/lib/operations/expressRouteCircuitAuthorizations.js index 41d8e4bc94..f8f6c392ae 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteCircuitAuthorizations.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteCircuitAuthorizations.js @@ -118,7 +118,7 @@ function _get(resourceGroupName, circuitName, authorizationName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -367,7 +367,7 @@ function _list(resourceGroupName, circuitName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -512,7 +512,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, authorizationName, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -574,7 +574,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, authorizationName, o return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -665,7 +665,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -744,7 +744,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -773,7 +773,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -790,7 +790,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, authorizationName, } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js b/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js new file mode 100644 index 0000000000..910077bc4c --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js @@ -0,0 +1,1342 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + + +/** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, circuitName, peeringName, connectionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (circuitName === null || circuitName === undefined || typeof circuitName.valueOf() !== 'string') { + throw new Error('circuitName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { + throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{circuitName}', encodeURIComponent(circuitName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (circuitName === null || circuitName === undefined || typeof circuitName.valueOf() !== 'string') { + throw new Error('circuitName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { + throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{circuitName}', encodeURIComponent(circuitName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (circuitName === null || circuitName === undefined || typeof circuitName.valueOf() !== 'string') { + throw new Error('circuitName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (connectionName === null || connectionName === undefined || typeof connectionName.valueOf() !== 'string') { + throw new Error('connectionName cannot be null or undefined and it must be of type string.'); + } + if (expressRouteCircuitConnectionParameters === null || expressRouteCircuitConnectionParameters === undefined) { + throw new Error('expressRouteCircuitConnectionParameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCircuits/{circuitName}/peerings/{peeringName}/connections/{connectionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{circuitName}', encodeURIComponent(circuitName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{connectionName}', encodeURIComponent(connectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (expressRouteCircuitConnectionParameters !== null && expressRouteCircuitConnectionParameters !== undefined) { + let requestModelMapper = new client.models['ExpressRouteCircuitConnection']().mapper(); + requestModel = client.serialize(requestModelMapper, expressRouteCircuitConnectionParameters, 'expressRouteCircuitConnectionParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(expressRouteCircuitConnectionParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ExpressRouteCircuitConnections. */ +class ExpressRouteCircuitConnections { + /** + * Create a ExpressRouteCircuitConnections. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, circuitName, peeringName, connectionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, optionalCallback); + } + } + + /** + * Gets the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, circuitName, peeringName, connectionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, circuitName, peeringName, connectionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, circuitName, peeringName, connectionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, circuitName, peeringName, connectionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, circuitName, peeringName, connectionName, options, optionalCallback); + } + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, optionalCallback); + } + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, circuitName, peeringName, connectionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, circuitName, peeringName, connectionName, options, optionalCallback); + } + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, connectionName, expressRouteCircuitConnectionParameters, options, optionalCallback); + } + } + +} + +module.exports = ExpressRouteCircuitConnections; diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js b/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js index 40550eba60..772e968fe7 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js @@ -117,7 +117,7 @@ function _get(resourceGroupName, circuitName, peeringName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -242,14 +242,12 @@ function _get(resourceGroupName, circuitName, peeringName, options, callback) { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -362,6 +360,9 @@ function _get(resourceGroupName, circuitName, peeringName, options, callback) { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -475,7 +476,7 @@ function _list(resourceGroupName, circuitName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -619,7 +620,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, peeringName, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -726,14 +727,12 @@ function _beginDeleteMethod(resourceGroupName, circuitName, peeringName, options * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -846,6 +845,9 @@ function _beginDeleteMethod(resourceGroupName, circuitName, peeringName, options * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -881,7 +883,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, peeringName, peeri if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1364,14 +1366,12 @@ class ExpressRouteCircuitPeerings { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -1484,6 +1484,9 @@ class ExpressRouteCircuitPeerings { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -1527,14 +1530,12 @@ class ExpressRouteCircuitPeerings { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -1647,6 +1648,9 @@ class ExpressRouteCircuitPeerings { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -1889,14 +1893,12 @@ class ExpressRouteCircuitPeerings { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -2009,6 +2011,9 @@ class ExpressRouteCircuitPeerings { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -2052,14 +2057,12 @@ class ExpressRouteCircuitPeerings { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -2172,6 +2175,9 @@ class ExpressRouteCircuitPeerings { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCircuits.js b/lib/services/networkManagement2/lib/operations/expressRouteCircuits.js index e39fd37f59..96abaea1ec 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteCircuits.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteCircuits.js @@ -112,7 +112,7 @@ function _get(resourceGroupName, circuitName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -728,7 +728,7 @@ function _getStats(resourceGroupName, circuitName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -874,7 +874,7 @@ function _getPeeringStats(resourceGroupName, circuitName, peeringName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1020,7 +1020,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1156,7 +1156,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -1290,7 +1290,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1348,7 +1348,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, options, callback) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1474,7 +1474,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, parameters, option if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1549,7 +1549,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, parameters, option return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1578,7 +1578,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, parameters, option let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1595,7 +1595,7 @@ function _beginCreateOrUpdate(resourceGroupName, circuitName, parameters, option } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1656,7 +1656,7 @@ function _beginUpdateTags(resourceGroupName, circuitName, parameters, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1822,7 +1822,7 @@ function _beginListArpTable(resourceGroupName, circuitName, peeringName, deviceP if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1979,7 +1979,7 @@ function _beginListRoutesTable(resourceGroupName, circuitName, peeringName, devi if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2137,7 +2137,7 @@ function _beginListRoutesTableSummary(resourceGroupName, circuitName, peeringNam if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js b/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js new file mode 100644 index 0000000000..335d82ab08 --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js @@ -0,0 +1,2142 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeeringList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(resourceGroupName, crossConnectionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionPeeringList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _deleteMethod(resourceGroupName, crossConnectionName, peeringName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, crossConnectionName, peeringName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionPeering']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionPeering']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'DELETE'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (peeringParameters === null || peeringParameters === undefined) { + throw new Error('peeringParameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (peeringParameters !== null && peeringParameters !== undefined) { + let requestModelMapper = new client.models['ExpressRouteCrossConnectionPeering']().mapper(); + requestModel = client.serialize(requestModelMapper, peeringParameters, 'peeringParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(peeringParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 201) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionPeering']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + // Deserialize Response + if (statusCode === 201) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionPeering']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError1 = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError1.request = msRest.stripRequest(httpRequest); + deserializationError1.response = msRest.stripResponse(response); + return callback(deserializationError1); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeeringList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionPeeringList']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ExpressRouteCrossConnectionPeerings. */ +class ExpressRouteCrossConnectionPeerings { + /** + * Create a ExpressRouteCrossConnectionPeerings. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._listNext = _listNext; + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName, crossConnectionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(resourceGroupName, crossConnectionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionPeeringList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeeringList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName, crossConnectionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(resourceGroupName, crossConnectionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(resourceGroupName, crossConnectionName, options, optionalCallback); + } + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, crossConnectionName, peeringName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName, crossConnectionName, peeringName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, crossConnectionName, peeringName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, crossConnectionName, peeringName, options, optionalCallback); + } + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, crossConnectionName, peeringName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionPeering} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, crossConnectionName, peeringName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, crossConnectionName, peeringName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, crossConnectionName, peeringName, options, optionalCallback); + } + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionPeering} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, optionalCallback); + } + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, options, optionalCallback); + } + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Creates or updates a peering in the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionPeering} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, crossConnectionName, peeringName, peeringParameters, options, optionalCallback); + } + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionPeeringList} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeeringList} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ExpressRouteCrossConnectionPeerings; diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCrossConnections.js b/lib/services/networkManagement2/lib/operations/expressRouteCrossConnections.js new file mode 100644 index 0000000000..3529e8b314 --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/expressRouteCrossConnections.js @@ -0,0 +1,3450 @@ +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for + * license information. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is + * regenerated. + */ + +'use strict'; + +const msRest = require('ms-rest'); +const msRestAzure = require('ms-rest-azure'); +const WebResource = msRest.WebResource; + +/** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _list(options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/providers/Microsoft.Network/expressRouteCrossConnections'; + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroup(resourceGroupName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group (peering + * location of the circuit). + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection (service key of the circuit). + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _get(resourceGroupName, crossConnectionName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + + +/** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _createOrUpdate(resourceGroupName, crossConnectionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginCreateOrUpdate(resourceGroupName, crossConnectionName, parameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _updateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginUpdateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitsArpTableListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCrossConnectionsRoutesTableSummaryListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionsRoutesTableSummaryListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitsRoutesTableListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + +/** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginCreateOrUpdate(resourceGroupName, crossConnectionName, parameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (parameters === null || parameters === undefined) { + throw new Error('parameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PUT'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['ExpressRouteCrossConnection']().mapper(); + requestModel = client.serialize(requestModelMapper, parameters, 'parameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(parameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginUpdateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionParameters === null || crossConnectionParameters === undefined) { + throw new Error('crossConnectionParameters cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'PATCH'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (crossConnectionParameters !== null && crossConnectionParameters !== undefined) { + let requestModelMapper = new client.models['TagsObject']().mapper(); + requestModel = client.serialize(requestModelMapper, crossConnectionParameters, 'crossConnectionParameters'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(crossConnectionParameters, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnection']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (devicePath === null || devicePath === undefined || typeof devicePath.valueOf() !== 'string') { + throw new Error('devicePath cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/arpTables/{devicePath}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{devicePath}', encodeURIComponent(devicePath)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitsArpTableListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCrossConnectionsRoutesTableSummaryListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (devicePath === null || devicePath === undefined || typeof devicePath.valueOf() !== 'string') { + throw new Error('devicePath cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTablesSummary/{devicePath}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{devicePath}', encodeURIComponent(devicePath)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionsRoutesTableSummaryListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + let apiVersion = '2018-02-01'; + // Validate + try { + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (crossConnectionName === null || crossConnectionName === undefined || typeof crossConnectionName.valueOf() !== 'string') { + throw new Error('crossConnectionName cannot be null or undefined and it must be of type string.'); + } + if (peeringName === null || peeringName === undefined || typeof peeringName.valueOf() !== 'string') { + throw new Error('peeringName cannot be null or undefined and it must be of type string.'); + } + if (devicePath === null || devicePath === undefined || typeof devicePath.valueOf() !== 'string') { + throw new Error('devicePath cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/expressRouteCrossConnections/{crossConnectionName}/peerings/{peeringName}/routeTables/{devicePath}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{crossConnectionName}', encodeURIComponent(crossConnectionName)); + requestUrl = requestUrl.replace('{peeringName}', encodeURIComponent(peeringName)); + requestUrl = requestUrl.replace('{devicePath}', encodeURIComponent(devicePath)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'POST'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200 && statusCode !== 202) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCircuitsRoutesTableListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listByResourceGroupNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['ExpressRouteCrossConnectionListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a ExpressRouteCrossConnections. */ +class ExpressRouteCrossConnections { + /** + * Create a ExpressRouteCrossConnections. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._list = _list; + this._listByResourceGroup = _listByResourceGroup; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._updateTags = _updateTags; + this._listArpTable = _listArpTable; + this._listRoutesTableSummary = _listRoutesTableSummary; + this._listRoutesTable = _listRoutesTable; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginUpdateTags = _beginUpdateTags; + this._beginListArpTable = _beginListArpTable; + this._beginListRoutesTableSummary = _beginListRoutesTableSummary; + this._beginListRoutesTable = _beginListRoutesTable; + this._listNext = _listNext; + this._listByResourceGroupNext = _listByResourceGroupNext; + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listWithHttpOperationResponse(options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + list(options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._list(options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._list(options, optionalCallback); + } + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroup(resourceGroupName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroup(resourceGroupName, options, optionalCallback); + } + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group (peering + * location of the circuit). + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection (service key of the circuit). + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName, crossConnectionName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, crossConnectionName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group (peering + * location of the circuit). + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection (service key of the circuit). + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName, crossConnectionName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._get(resourceGroupName, crossConnectionName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, crossConnectionName, options, optionalCallback); + } + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName, crossConnectionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, crossConnectionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName, crossConnectionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, crossConnectionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, crossConnectionName, parameters, options, optionalCallback); + } + } + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + updateTagsWithHttpOperationResponse(resourceGroupName, crossConnectionName, crossConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._updateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + updateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._updateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, optionalCallback); + } + } + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listArpTableWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, devicePath, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback); + } + } + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listRoutesTableSummaryWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, devicePath, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionsRoutesTableSummaryListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCrossConnectionsRoutesTableSummaryListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback); + } + } + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listRoutesTableWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, devicePath, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback); + } + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName, crossConnectionName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, crossConnectionName, parameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName, crossConnectionName, parameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, crossConnectionName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, crossConnectionName, parameters, options, optionalCallback); + } + } + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginUpdateTagsWithHttpOperationResponse(resourceGroupName, crossConnectionName, crossConnectionParameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginUpdateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdateTags(resourceGroupName, crossConnectionName, crossConnectionParameters, options, optionalCallback); + } + } + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginListArpTableWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, devicePath, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginListArpTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback); + } + } + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginListRoutesTableSummaryWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, devicePath, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionsRoutesTableSummaryListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCrossConnectionsRoutesTableSummaryListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginListRoutesTableSummary(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback); + } + } + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginListRoutesTableWithHttpOperationResponse(resourceGroupName, crossConnectionName, peeringName, devicePath, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginListRoutesTable(resourceGroupName, crossConnectionName, peeringName, devicePath, options, optionalCallback); + } + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listNext(nextPageLink, options, optionalCallback); + } + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._listByResourceGroupNext(nextPageLink, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._listByResourceGroupNext(nextPageLink, options, optionalCallback); + } + } + +} + +module.exports = ExpressRouteCrossConnections; diff --git a/lib/services/networkManagement2/lib/operations/expressRouteServiceProviders.js b/lib/services/networkManagement2/lib/operations/expressRouteServiceProviders.js index 2346cc366e..5ce17fe6e4 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteServiceProviders.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteServiceProviders.js @@ -46,7 +46,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/inboundNatRules.js b/lib/services/networkManagement2/lib/operations/inboundNatRules.js index 0e2bb1a5ff..bc908254e8 100644 --- a/lib/services/networkManagement2/lib/operations/inboundNatRules.js +++ b/lib/services/networkManagement2/lib/operations/inboundNatRules.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, loadBalancerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -263,7 +263,7 @@ function _get(resourceGroupName, loadBalancerName, inboundNatRuleName, options, throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -540,7 +540,7 @@ function _beginDeleteMethod(resourceGroupName, loadBalancerName, inboundNatRuleN if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -602,7 +602,7 @@ function _beginDeleteMethod(resourceGroupName, loadBalancerName, inboundNatRuleN return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -715,7 +715,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRul if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -794,7 +794,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRul return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -823,7 +823,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRul let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -840,7 +840,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, inboundNatRul } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); diff --git a/lib/services/networkManagement2/lib/operations/index.d.ts b/lib/services/networkManagement2/lib/operations/index.d.ts index 2b86ea5a8b..ebd9602206 100644 --- a/lib/services/networkManagement2/lib/operations/index.d.ts +++ b/lib/services/networkManagement2/lib/operations/index.d.ts @@ -238,6 +238,14 @@ export interface ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -370,6 +378,14 @@ export interface ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -1154,6 +1170,14 @@ export interface ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -1286,6 +1310,14 @@ export interface ApplicationGateways { * [parameters.webApplicationFirewallConfiguration.disabledRuleGroups] The * disabled rule groups. * + * @param {boolean} + * [parameters.webApplicationFirewallConfiguration.requestBodyCheck] Whether + * allow WAF to check request Body. + * + * @param {number} + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * request body size for WAF. + * * @param {boolean} [parameters.enableHttp2] Whether HTTP2 is enabled on the * application gateway resource. * @@ -2342,17 +2374,19 @@ export interface ApplicationSecurityGroups { /** * @class - * AvailableEndpointServices + * DdosProtectionPlans * __NOTE__: An instance of this class is automatically created for an * instance of the NetworkManagementClient. */ -export interface AvailableEndpointServices { +export interface DdosProtectionPlans { /** - * List what values of endpoint services are available for use. + * Deletes the specified DDoS protection plan. * - * @param {string} location The location to check available endpoint services. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * * @param {object} [options] Optional Parameters. * @@ -2361,16 +2395,18 @@ export interface AvailableEndpointServices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, ddosProtectionPlanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List what values of endpoint services are available for use. + * Deletes the specified DDoS protection plan. * - * @param {string} location The location to check available endpoint services. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * * @param {object} [options] Optional Parameters. * @@ -2384,7 +2420,7 @@ export interface AvailableEndpointServices { * * {Promise} A promise is returned. * - * @resolve {EndpointServicesListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2392,24 +2428,23 @@ export interface AvailableEndpointServices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EndpointServicesListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EndpointServicesListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(location: string, callback: ServiceCallback): void; - list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, ddosProtectionPlanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, ddosProtectionPlanName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, ddosProtectionPlanName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List what values of endpoint services are available for use. + * Gets information about the specified DDoS protection plan. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * * @param {object} [options] Optional Parameters. * @@ -2418,17 +2453,18 @@ export interface AvailableEndpointServices { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, ddosProtectionPlanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List what values of endpoint services are available for use. + * Gets information about the specified DDoS protection plan. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * * @param {object} [options] Optional Parameters. * @@ -2442,7 +2478,7 @@ export interface AvailableEndpointServices { * * {Promise} A promise is returned. * - * @resolve {EndpointServicesListResult} - The deserialized result object. + * @resolve {DdosProtectionPlan} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2450,37 +2486,33 @@ export interface AvailableEndpointServices { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EndpointServicesListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EndpointServicesListResult} for more - * information. + * {DdosProtectionPlan} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ExpressRouteCircuitAuthorizations - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface ExpressRouteCircuitAuthorizations { + get(resourceGroupName: string, ddosProtectionPlanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, ddosProtectionPlanName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, ddosProtectionPlanName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified authorization from the specified express route - * circuit. + * Creates or updates a DDoS protection plan. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * - * @param {string} authorizationName The name of the authorization. + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -2489,21 +2521,27 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified authorization from the specified express route - * circuit. + * Creates or updates a DDoS protection plan. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * - * @param {string} authorizationName The name of the authorization. + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -2517,7 +2555,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DdosProtectionPlan} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2525,25 +2563,20 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DdosProtectionPlan} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified authorization from the specified express route circuit. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} authorizationName The name of the authorization. + * Gets all DDoS protection plans in a subscription. * * @param {object} [options] Optional Parameters. * @@ -2552,20 +2585,14 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified authorization from the specified express route circuit. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} authorizationName The name of the authorization. + * Gets all DDoS protection plans in a subscription. * * @param {object} [options] Optional Parameters. * @@ -2579,7 +2606,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitAuthorization} - The deserialized result object. + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2587,48 +2614,24 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitAuthorization} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitAuthorization} for more + * {DdosProtectionPlanListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, circuitName: string, authorizationName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, circuitName: string, authorizationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates an authorization in the specified express route circuit. + * Gets all the DDoS protection plans in a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} authorizationName The name of the authorization. - * - * @param {object} authorizationParameters Parameters supplied to the create or - * update express route circuit authorization operation. - * - * @param {string} [authorizationParameters.authorizationKey] The authorization - * key. - * - * @param {string} [authorizationParameters.authorizationUseStatus] - * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - * Possible values include: 'Available', 'InUse' - * - * @param {string} [authorizationParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. - * - * @param {string} [authorizationParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [authorizationParameters.id] Resource ID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2636,41 +2639,17 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an authorization in the specified express route circuit. + * Gets all the DDoS protection plans in a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} authorizationName The name of the authorization. - * - * @param {object} authorizationParameters Parameters supplied to the create or - * update express route circuit authorization operation. - * - * @param {string} [authorizationParameters.authorizationKey] The authorization - * key. - * - * @param {string} [authorizationParameters.authorizationUseStatus] - * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - * Possible values include: 'Available', 'InUse' - * - * @param {string} [authorizationParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. - * - * @param {string} [authorizationParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [authorizationParameters.id] Resource ID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -2683,7 +2662,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitAuthorization} - The deserialized result object. + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2691,25 +2670,25 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitAuthorization} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitAuthorization} for more + * {DdosProtectionPlanListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all authorizations in an express route circuit. + * Deletes the specified DDoS protection plan. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * * @param {object} [options] Optional Parameters. * @@ -2718,18 +2697,18 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, ddosProtectionPlanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all authorizations in an express route circuit. + * Deletes the specified DDoS protection plan. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * * @param {object} [options] Optional Parameters. * @@ -2743,7 +2722,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {AuthorizationListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2751,28 +2730,32 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AuthorizationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link AuthorizationListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, ddosProtectionPlanName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, ddosProtectionPlanName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, ddosProtectionPlanName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified authorization from the specified express route - * circuit. + * Creates or updates a DDoS protection plan. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * - * @param {string} authorizationName The name of the authorization. + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -2781,21 +2764,27 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified authorization from the specified express route - * circuit. + * Creates or updates a DDoS protection plan. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} ddosProtectionPlanName The name of the DDoS protection plan. * - * @param {string} authorizationName The name of the authorization. + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -2809,7 +2798,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {DdosProtectionPlan} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2817,45 +2806,23 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {DdosProtectionPlan} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlan} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, ddosProtectionPlanName: string, parameters: models.DdosProtectionPlan, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates an authorization in the specified express route circuit. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} authorizationName The name of the authorization. - * - * @param {object} authorizationParameters Parameters supplied to the create or - * update express route circuit authorization operation. - * - * @param {string} [authorizationParameters.authorizationKey] The authorization - * key. - * - * @param {string} [authorizationParameters.authorizationUseStatus] - * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - * Possible values include: 'Available', 'InUse' - * - * @param {string} [authorizationParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. - * - * @param {string} [authorizationParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. + * Gets all DDoS protection plans in a subscription. * - * @param {string} [authorizationParameters.id] Resource ID. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -2864,40 +2831,75 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an authorization in the specified express route circuit. + * Gets all DDoS protection plans in a subscription. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {string} circuitName The name of the express route circuit. + * @param {object} [options] Optional Parameters. * - * @param {string} authorizationName The name of the authorization. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} authorizationParameters Parameters supplied to the create or - * update express route circuit authorization operation. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [authorizationParameters.authorizationKey] The authorization - * key. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [authorizationParameters.authorizationUseStatus] - * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. - * Possible values include: 'Available', 'InUse' + * {Promise} A promise is returned. * - * @param {string} [authorizationParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. * - * @param {string} [authorizationParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [authorizationParameters.id] Resource ID. + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {DdosProtectionPlanListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the DDoS protection plans in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -2911,7 +2913,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitAuthorization} - The deserialized result object. + * @resolve {DdosProtectionPlanListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2919,21 +2921,86 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitAuthorization} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitAuthorization} for more + * {DdosProtectionPlanListResult} [result] - The deserialized result object if an error did not occur. + * See {@link DdosProtectionPlanListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * AvailableEndpointServices + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface AvailableEndpointServices { /** - * Gets all authorizations in an express route circuit. + * List what values of endpoint services are available for use. + * + * @param {string} location The location to check available endpoint services. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List what values of endpoint services are available for use. + * + * @param {string} location The location to check available endpoint services. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {EndpointServicesListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EndpointServicesListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointServicesListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(location: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(location: string, callback: ServiceCallback): void; + list(location: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * List what values of endpoint services are available for use. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -2945,14 +3012,14 @@ export interface ExpressRouteCircuitAuthorizations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all authorizations in an express route circuit. + * List what values of endpoint services are available for use. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -2969,7 +3036,7 @@ export interface ExpressRouteCircuitAuthorizations { * * {Promise} A promise is returned. * - * @resolve {AuthorizationListResult} - The deserialized result object. + * @resolve {EndpointServicesListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -2977,36 +3044,37 @@ export interface ExpressRouteCircuitAuthorizations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AuthorizationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link AuthorizationListResult} for more + * {EndpointServicesListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EndpointServicesListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * ExpressRouteCircuitPeerings + * ExpressRouteCircuitAuthorizations * __NOTE__: An instance of this class is automatically created for an * instance of the NetworkManagementClient. */ -export interface ExpressRouteCircuitPeerings { +export interface ExpressRouteCircuitAuthorizations { /** - * Deletes the specified peering from the specified express route circuit. + * Deletes the specified authorization from the specified express route + * circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * - * @param {string} peeringName The name of the peering. + * @param {string} authorizationName The name of the authorization. * * @param {object} [options] Optional Parameters. * @@ -3019,16 +3087,17 @@ export interface ExpressRouteCircuitPeerings { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified peering from the specified express route circuit. + * Deletes the specified authorization from the specified express route + * circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * - * @param {string} peeringName The name of the peering. + * @param {string} authorizationName The name of the authorization. * * @param {object} [options] Optional Parameters. * @@ -3056,9 +3125,9 @@ export interface ExpressRouteCircuitPeerings { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3068,7 +3137,7 @@ export interface ExpressRouteCircuitPeerings { * * @param {string} circuitName The name of the express route circuit. * - * @param {string} peeringName The name of the peering. + * @param {string} authorizationName The name of the authorization. * * @param {object} [options] Optional Parameters. * @@ -3077,11 +3146,11 @@ export interface ExpressRouteCircuitPeerings { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the specified authorization from the specified express route circuit. @@ -3090,7 +3159,7 @@ export interface ExpressRouteCircuitPeerings { * * @param {string} circuitName The name of the express route circuit. * - * @param {string} peeringName The name of the peering. + * @param {string} authorizationName The name of the authorization. * * @param {object} [options] Optional Parameters. * @@ -3104,7 +3173,7 @@ export interface ExpressRouteCircuitPeerings { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitPeering} - The deserialized result object. + * @resolve {ExpressRouteCircuitAuthorization} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3112,156 +3181,129 @@ export interface ExpressRouteCircuitPeerings { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitPeering} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitPeering} for more + * {ExpressRouteCircuitAuthorization} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitAuthorization} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, circuitName: string, authorizationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, circuitName: string, authorizationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a peering in the specified express route circuits. + * Creates or updates an authorization in the specified express route circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * - * @param {string} peeringName The name of the peering. + * @param {string} authorizationName The name of the authorization. * - * @param {object} peeringParameters Parameters supplied to the create or - * update express route circuit peering operation. + * @param {object} authorizationParameters Parameters supplied to the create or + * update express route circuit authorization operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [authorizationParameters.authorizationKey] The authorization + * key. * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [authorizationParameters.authorizationUseStatus] + * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. + * Possible values include: 'Available', 'InUse' * - * @param {number} [peeringParameters.azureASN] The Azure ASN. + * @param {string} [authorizationParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. * - * @param {number} [peeringParameters.peerASN] The peer ASN. + * @param {string} [authorizationParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. * - * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary - * address prefix. + * @param {string} [authorizationParameters.id] Resource ID. * - * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary - * address prefix. + * @param {object} [options] Optional Parameters. * - * @param {string} [peeringParameters.primaryAzurePort] The primary port. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [peeringParameters.secondaryAzurePort] The secondary port. + * @returns {Promise} A promise is returned * - * @param {string} [peeringParameters.sharedKey] The shared key. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {number} [peeringParameters.vlanId] The VLAN ID. + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an authorization in the specified express route circuit. * - * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft - * peering configuration. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [peeringParameters.stats] Gets peering stats. + * @param {string} circuitName The name of the express route circuit. * - * @param {number} [peeringParameters.stats.primarybytesIn] Gets BytesIn of the - * peering. + * @param {string} authorizationName The name of the authorization. * - * @param {number} [peeringParameters.stats.primarybytesOut] Gets BytesOut of - * the peering. + * @param {object} authorizationParameters Parameters supplied to the create or + * update express route circuit authorization operation. * - * @param {number} [peeringParameters.stats.secondarybytesIn] Gets BytesIn of - * the peering. + * @param {string} [authorizationParameters.authorizationKey] The authorization + * key. * - * @param {number} [peeringParameters.stats.secondarybytesOut] Gets BytesOut of - * the peering. + * @param {string} [authorizationParameters.authorizationUseStatus] + * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. + * Possible values include: 'Available', 'InUse' * - * @param {string} [peeringParameters.provisioningState] Gets the provisioning - * state of the public IP resource. Possible values are: 'Updating', - * 'Deleting', and 'Failed'. + * @param {string} [authorizationParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. * - * @param {string} [peeringParameters.gatewayManagerEtag] The GatewayManager - * Etag. - * - * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider - * or the customer last modified the peering. - * - * @param {object} [peeringParameters.routeFilter] The reference of the - * RouteFilter resource. - * - * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering - * configuration. - * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary - * address prefix. - * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The - * secondary address prefix. - * - * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] - * The Microsoft peering configuration. + * @param {string} [authorizationParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. * - * @param {array} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] - * The reference of AdvertisedPublicPrefixes. + * @param {string} [authorizationParameters.id] Resource ID. * - * @param {array} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * @param {object} [options] Optional Parameters. * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] - * AdvertisedPublicPrefixState of the Peering resource. Possible values are - * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - * Possible values include: 'NotConfigured', 'Configuring', 'Configured', - * 'ValidationNeeded' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {number} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The - * legacy mode of the peering. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {number} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The - * CustomerASN of the peering. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] - * The RoutingRegistryName of the configuration. + * {Promise} A promise is returned. * - * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The - * reference of the RouteFilter resource. + * @resolve {ExpressRouteCircuitAuthorization} - The deserialized result object. * - * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] - * Collection of RouteFilterRules contained within a route filter. + * @reject {Error|ServiceError} - The error object. * - * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A - * collection of references to express route circuit peerings. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] - * Resource ID. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] - * Resource location. + * {ExpressRouteCircuitAuthorization} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitAuthorization} for more + * information. * - * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] - * Resource tags. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of - * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values - * include: 'Disabled', 'Enabled' + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all authorizations in an express route circuit. * - * @param {string} [peeringParameters.name] Gets name of the resource that is - * unique within a resource group. This name can be used to access the - * resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [peeringParameters.id] Resource ID. + * @param {string} circuitName The name of the circuit. * * @param {object} [options] Optional Parameters. * @@ -3270,149 +3312,18 @@ export interface ExpressRouteCircuitPeerings { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a peering in the specified express route circuits. + * Gets all authorizations in an express route circuit. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} peeringName The name of the peering. - * - * @param {object} peeringParameters Parameters supplied to the create or - * update express route circuit peering operation. - * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' - * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' - * - * @param {number} [peeringParameters.azureASN] The Azure ASN. - * - * @param {number} [peeringParameters.peerASN] The peer ASN. - * - * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary - * address prefix. - * - * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary - * address prefix. - * - * @param {string} [peeringParameters.primaryAzurePort] The primary port. - * - * @param {string} [peeringParameters.secondaryAzurePort] The secondary port. - * - * @param {string} [peeringParameters.sharedKey] The shared key. - * - * @param {number} [peeringParameters.vlanId] The VLAN ID. - * - * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft - * peering configuration. - * - * @param {object} [peeringParameters.stats] Gets peering stats. - * - * @param {number} [peeringParameters.stats.primarybytesIn] Gets BytesIn of the - * peering. - * - * @param {number} [peeringParameters.stats.primarybytesOut] Gets BytesOut of - * the peering. - * - * @param {number} [peeringParameters.stats.secondarybytesIn] Gets BytesIn of - * the peering. - * - * @param {number} [peeringParameters.stats.secondarybytesOut] Gets BytesOut of - * the peering. - * - * @param {string} [peeringParameters.provisioningState] Gets the provisioning - * state of the public IP resource. Possible values are: 'Updating', - * 'Deleting', and 'Failed'. - * - * @param {string} [peeringParameters.gatewayManagerEtag] The GatewayManager - * Etag. - * - * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider - * or the customer last modified the peering. - * - * @param {object} [peeringParameters.routeFilter] The reference of the - * RouteFilter resource. - * - * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering - * configuration. - * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary - * address prefix. - * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The - * secondary address prefix. - * - * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] - * The Microsoft peering configuration. - * - * @param {array} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] - * The reference of AdvertisedPublicPrefixes. - * - * @param {array} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering - * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] - * AdvertisedPublicPrefixState of the Peering resource. Possible values are - * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. - * Possible values include: 'NotConfigured', 'Configuring', 'Configured', - * 'ValidationNeeded' - * - * @param {number} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The - * legacy mode of the peering. - * - * @param {number} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The - * CustomerASN of the peering. - * - * @param {string} - * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] - * The RoutingRegistryName of the configuration. - * - * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The - * reference of the RouteFilter resource. - * - * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] - * Collection of RouteFilterRules contained within a route filter. - * - * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A - * collection of references to express route circuit peerings. - * - * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] - * Resource ID. - * - * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] - * Resource location. - * - * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] - * Resource tags. - * - * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of - * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values - * include: 'Disabled', 'Enabled' - * - * @param {string} [peeringParameters.name] Gets name of the resource that is - * unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [peeringParameters.id] Resource ID. + * @param {string} circuitName The name of the circuit. * * @param {object} [options] Optional Parameters. * @@ -3426,7 +3337,7 @@ export interface ExpressRouteCircuitPeerings { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitPeering} - The deserialized result object. + * @resolve {AuthorizationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3434,26 +3345,29 @@ export interface ExpressRouteCircuitPeerings { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitPeering} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitPeering} for more + * {AuthorizationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AuthorizationListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all peerings in a specified express route circuit. + * Deletes the specified authorization from the specified express route + * circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * + * @param {string} authorizationName The name of the authorization. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3461,19 +3375,22 @@ export interface ExpressRouteCircuitPeerings { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all peerings in a specified express route circuit. + * Deletes the specified authorization from the specified express route + * circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * + * @param {string} authorizationName The name of the authorization. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3486,7 +3403,7 @@ export interface ExpressRouteCircuitPeerings { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitPeeringListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -3494,17 +3411,186 @@ export interface ExpressRouteCircuitPeerings { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitPeeringListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitPeeringListResult} for - * more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, circuitName: string, authorizationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} authorizationName The name of the authorization. + * + * @param {object} authorizationParameters Parameters supplied to the create or + * update express route circuit authorization operation. + * + * @param {string} [authorizationParameters.authorizationKey] The authorization + * key. + * + * @param {string} [authorizationParameters.authorizationUseStatus] + * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. + * Possible values include: 'Available', 'InUse' + * + * @param {string} [authorizationParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. + * + * @param {string} [authorizationParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [authorizationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an authorization in the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} authorizationName The name of the authorization. + * + * @param {object} authorizationParameters Parameters supplied to the create or + * update express route circuit authorization operation. + * + * @param {string} [authorizationParameters.authorizationKey] The authorization + * key. + * + * @param {string} [authorizationParameters.authorizationUseStatus] + * AuthorizationUseStatus. Possible values are: 'Available' and 'InUse'. + * Possible values include: 'Available', 'InUse' + * + * @param {string} [authorizationParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. + * + * @param {string} [authorizationParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [authorizationParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitAuthorization} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitAuthorization} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitAuthorization} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, authorizationName: string, authorizationParameters: models.ExpressRouteCircuitAuthorization, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all authorizations in an express route circuit. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all authorizations in an express route circuit. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {AuthorizationListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {AuthorizationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link AuthorizationListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ExpressRouteCircuitPeerings + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ExpressRouteCircuitPeerings { /** @@ -3527,7 +3613,7 @@ export interface ExpressRouteCircuitPeerings { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Deletes the specified peering from the specified express route circuit. @@ -3564,9 +3650,73 @@ export interface ExpressRouteCircuitPeerings { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the specified authorization from the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitPeering} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitPeering} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitPeering} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -3581,14 +3731,12 @@ export interface ExpressRouteCircuitPeerings { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -3701,6 +3849,9 @@ export interface ExpressRouteCircuitPeerings { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -3718,7 +3869,7 @@ export interface ExpressRouteCircuitPeerings { * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates or updates a peering in the specified express route circuits. @@ -3732,14 +3883,12 @@ export interface ExpressRouteCircuitPeerings { * @param {object} peeringParameters Parameters supplied to the create or * update express route circuit peering operation. * - * @param {string} [peeringParameters.peeringType] The PeeringType. Possible - * values are: 'AzurePublicPeering', 'AzurePrivatePeering', and - * 'MicrosoftPeering'. Possible values include: 'AzurePublicPeering', - * 'AzurePrivatePeering', 'MicrosoftPeering' + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [peeringParameters.state] The state of peering. Possible - * values are: 'Disabled' and 'Enabled'. Possible values include: 'Disabled', - * 'Enabled' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * * @param {number} [peeringParameters.azureASN] The Azure ASN. * @@ -3852,6 +4001,9 @@ export interface ExpressRouteCircuitPeerings { * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values * include: 'Disabled', 'Enabled' * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * * @param {string} [peeringParameters.name] Gets name of the resource that is * unique within a resource group. This name can be used to access the * resource. @@ -3886,16 +4038,17 @@ export interface ExpressRouteCircuitPeerings { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** * Gets all peerings in a specified express route circuit. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. * * @param {object} [options] Optional Parameters. * @@ -3908,13 +4061,14 @@ export interface ExpressRouteCircuitPeerings { * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all peerings in a specified express route circuit. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. * * @param {object} [options] Optional Parameters. * @@ -3944,27 +4098,20 @@ export interface ExpressRouteCircuitPeerings { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * ExpressRouteCircuits - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface ExpressRouteCircuits { + list(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified express route circuit. + * Deletes the specified peering from the specified express route circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * + * @param {string} peeringName The name of the peering. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3976,15 +4123,17 @@ export interface ExpressRouteCircuits { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified express route circuit. + * Deletes the specified peering from the specified express route circuit. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} circuitName The name of the express route circuit. * + * @param {string} peeringName The name of the peering. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4011,134 +4160,149 @@ export interface ExpressRouteCircuits { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets information about the specified express route circuit. + * Creates or updates a peering in the specified express route circuits. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of express route circuit. + * @param {string} circuitName The name of the express route circuit. * - * @param {object} [options] Optional Parameters. + * @param {string} peeringName The name of the peering. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} peeringParameters Parameters supplied to the create or + * update express route circuit peering operation. * - * @returns {Promise} A promise is returned + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * - * @reject {Error|ServiceError} - The error object. - */ - getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets information about the specified express route circuit. + * @param {number} [peeringParameters.azureASN] The Azure ASN. * - * @param {string} resourceGroupName The name of the resource group. + * @param {number} [peeringParameters.peerASN] The peer ASN. * - * @param {string} circuitName The name of express route circuit. + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. * - * @param {object} [options] Optional Parameters. + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [peeringParameters.primaryAzurePort] The primary port. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} [peeringParameters.secondaryAzurePort] The secondary port. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [peeringParameters.sharedKey] The shared key. * - * {Promise} A promise is returned. + * @param {number} [peeringParameters.vlanId] The VLAN ID. * - * @resolve {ExpressRouteCircuit} - The deserialized result object. + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. * - * @reject {Error|ServiceError} - The error object. + * @param {object} [peeringParameters.stats] Gets peering stats. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {number} [peeringParameters.stats.primarybytesIn] Gets BytesIn of the + * peering. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {number} [peeringParameters.stats.primarybytesOut] Gets BytesOut of + * the peering. * - * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuit} for more information. + * @param {number} [peeringParameters.stats.secondarybytesIn] Gets BytesIn of + * the peering. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {number} [peeringParameters.stats.secondarybytesOut] Gets BytesOut of + * the peering. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Creates or updates an express route circuit. + * @param {string} [peeringParameters.provisioningState] Gets the provisioning + * state of the public IP resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [peeringParameters.gatewayManagerEtag] The GatewayManager + * Etag. * - * @param {string} circuitName The name of the circuit. + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. * - * @param {object} parameters Parameters supplied to the create or update - * express route circuit operation. + * @param {object} [peeringParameters.routeFilter] The reference of the + * RouteFilter resource. * - * @param {object} [parameters.sku] The SKU. + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. * - * @param {string} [parameters.sku.name] The name of the SKU. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. * - * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values - * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. * - * @param {string} [parameters.sku.family] The family of the SKU. Possible - * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: - * 'UnlimitedData', 'MeteredData' + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. * - * @param {boolean} [parameters.allowClassicOperations] Allow classic - * operations + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. * - * @param {string} [parameters.circuitProvisioningState] The - * CircuitProvisioningState state of the resource. + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering * - * @param {string} [parameters.serviceProviderProvisioningState] The - * ServiceProviderProvisioningState state of the resource. Possible values are - * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', - * 'Deprovisioning' + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' * - * @param {array} [parameters.authorizations] The list of authorizations. + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. * - * @param {array} [parameters.peerings] The list of peerings. + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. * - * @param {string} [parameters.serviceKey] The ServiceKey. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. * - * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. * - * @param {object} [parameters.serviceProviderProperties] The - * ServiceProviderProperties. + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. * - * @param {string} [parameters.serviceProviderProperties.serviceProviderName] - * The serviceProviderName. + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. * - * @param {string} [parameters.serviceProviderProperties.peeringLocation] The - * peering location. + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. * - * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The - * BandwidthInMbps. + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. * - * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' * - * @param {string} [parameters.id] Resource ID. + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. * - * @param {string} [parameters.location] Resource location. + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [peeringParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -4147,76 +4311,3526 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an express route circuit. + * Creates or updates a peering in the specified express route circuits. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. + * @param {string} circuitName The name of the express route circuit. * - * @param {object} parameters Parameters supplied to the create or update - * express route circuit operation. + * @param {string} peeringName The name of the peering. * - * @param {object} [parameters.sku] The SKU. + * @param {object} peeringParameters Parameters supplied to the create or + * update express route circuit peering operation. * - * @param {string} [parameters.sku.name] The name of the SKU. + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values - * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * - * @param {string} [parameters.sku.family] The family of the SKU. Possible - * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: - * 'UnlimitedData', 'MeteredData' + * @param {number} [peeringParameters.azureASN] The Azure ASN. * - * @param {boolean} [parameters.allowClassicOperations] Allow classic - * operations + * @param {number} [peeringParameters.peerASN] The peer ASN. * - * @param {string} [parameters.circuitProvisioningState] The - * CircuitProvisioningState state of the resource. + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. * - * @param {string} [parameters.serviceProviderProvisioningState] The - * ServiceProviderProvisioningState state of the resource. Possible values are - * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', - * 'Deprovisioning' + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. * - * @param {array} [parameters.authorizations] The list of authorizations. + * @param {string} [peeringParameters.primaryAzurePort] The primary port. * - * @param {array} [parameters.peerings] The list of peerings. + * @param {string} [peeringParameters.secondaryAzurePort] The secondary port. * - * @param {string} [parameters.serviceKey] The ServiceKey. + * @param {string} [peeringParameters.sharedKey] The shared key. * - * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * @param {number} [peeringParameters.vlanId] The VLAN ID. * - * @param {object} [parameters.serviceProviderProperties] The - * ServiceProviderProperties. + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {object} [peeringParameters.stats] Gets peering stats. + * + * @param {number} [peeringParameters.stats.primarybytesIn] Gets BytesIn of the + * peering. + * + * @param {number} [peeringParameters.stats.primarybytesOut] Gets BytesOut of + * the peering. + * + * @param {number} [peeringParameters.stats.secondarybytesIn] Gets BytesIn of + * the peering. + * + * @param {number} [peeringParameters.stats.secondarybytesOut] Gets BytesOut of + * the peering. + * + * @param {string} [peeringParameters.provisioningState] Gets the provisioning + * state of the public IP resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * + * @param {string} [peeringParameters.gatewayManagerEtag] The GatewayManager + * Etag. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.routeFilter] The reference of the + * RouteFilter resource. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {array} [peeringParameters.connections] The list of circuit + * connections associated with Azure Private Peering for this circuit. + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitPeering} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitPeering} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitPeering} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, peeringParameters: models.ExpressRouteCircuitPeering, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all peerings in a specified express route circuit. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all peerings in a specified express route circuit. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitPeeringListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitPeeringListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitPeeringListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ExpressRouteCircuitConnections + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ExpressRouteCircuitConnections { + + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified Express Route Circuit Connection from the specified + * express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a Express Route Circuit Connection in the specified + * express route circuits. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} connectionName The name of the express route circuit + * connection. + * + * @param {object} expressRouteCircuitConnectionParameters Parameters supplied + * to the create or update express route circuit circuit connection operation. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the circuit + * initiating connection. + * + * @param {object} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering] + * Reference to Express Route Circuit Private Peering Resource of the peered + * circuit. + * + * @param {string} + * [expressRouteCircuitConnectionParameters.peerExpressRouteCircuitPeering.id] + * Resource ID. + * + * @param {string} [expressRouteCircuitConnectionParameters.addressPrefix] /29 + * IP address space to carve out Customer addresses for tunnels. + * + * @param {string} [expressRouteCircuitConnectionParameters.authorizationKey] + * The authorization key. + * + * @param {string} [expressRouteCircuitConnectionParameters.name] Gets name of + * the resource that is unique within a resource group. This name can be used + * to access the resource. + * + * @param {string} [expressRouteCircuitConnectionParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, peeringName: string, connectionName: string, expressRouteCircuitConnectionParameters: models.ExpressRouteCircuitConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ExpressRouteCircuits + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ExpressRouteCircuits { + + + /** + * Deletes the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets information about the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets information about the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuit} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuit} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to the create or update + * express route circuit operation. + * + * @param {object} [parameters.sku] The SKU. + * + * @param {string} [parameters.sku.name] The name of the SKU. + * + * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values + * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * + * @param {string} [parameters.sku.family] The family of the SKU. Possible + * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: + * 'UnlimitedData', 'MeteredData' + * + * @param {boolean} [parameters.allowClassicOperations] Allow classic + * operations + * + * @param {string} [parameters.circuitProvisioningState] The + * CircuitProvisioningState state of the resource. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * ServiceProviderProvisioningState state of the resource. Possible values are + * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {array} [parameters.authorizations] The list of authorizations. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.serviceKey] The ServiceKey. + * + * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * + * @param {object} [parameters.serviceProviderProperties] The + * ServiceProviderProperties. + * + * @param {string} [parameters.serviceProviderProperties.serviceProviderName] + * The serviceProviderName. + * + * @param {string} [parameters.serviceProviderProperties.peeringLocation] The + * peering location. + * + * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The + * BandwidthInMbps. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to the create or update + * express route circuit operation. + * + * @param {object} [parameters.sku] The SKU. + * + * @param {string} [parameters.sku.name] The name of the SKU. + * + * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values + * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * + * @param {string} [parameters.sku.family] The family of the SKU. Possible + * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: + * 'UnlimitedData', 'MeteredData' + * + * @param {boolean} [parameters.allowClassicOperations] Allow classic + * operations + * + * @param {string} [parameters.circuitProvisioningState] The + * CircuitProvisioningState state of the resource. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * ServiceProviderProvisioningState state of the resource. Possible values are + * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {array} [parameters.authorizations] The list of authorizations. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.serviceKey] The ServiceKey. + * + * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * + * @param {object} [parameters.serviceProviderProperties] The + * ServiceProviderProperties. + * + * @param {string} [parameters.serviceProviderProperties.serviceProviderName] + * The serviceProviderName. + * + * @param {string} [parameters.serviceProviderProperties.peeringLocation] The + * peering location. + * + * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The + * BandwidthInMbps. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuit} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuit} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates an express route circuit tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to update express route + * circuit tags. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateTagsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates an express route circuit tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to update express route + * circuit tags. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuit} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuit} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised ARP table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listArpTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised ARP table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsArpTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + listArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised routes table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRoutesTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised routes table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsRoutesTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + listRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised routes table summary associated with the + * express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRoutesTableSummaryWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised routes table summary associated with the + * express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsRoutesTableSummaryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsRoutesTableSummaryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCircuitsRoutesTableSummaryListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + listRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getStatsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the stats from an express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitStats} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitStats} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitStats} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getStats(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStats(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; + getStats(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all stats from an express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getPeeringStatsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all stats from an express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitStats} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitStats} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitStats} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; + getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the express route circuits in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the express route circuits in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the express route circuits in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the express route circuits in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {null} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates an express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to the create or update + * express route circuit operation. + * + * @param {object} [parameters.sku] The SKU. + * + * @param {string} [parameters.sku.name] The name of the SKU. + * + * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values + * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * + * @param {string} [parameters.sku.family] The family of the SKU. Possible + * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: + * 'UnlimitedData', 'MeteredData' + * + * @param {boolean} [parameters.allowClassicOperations] Allow classic + * operations + * + * @param {string} [parameters.circuitProvisioningState] The + * CircuitProvisioningState state of the resource. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * ServiceProviderProvisioningState state of the resource. Possible values are + * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {array} [parameters.authorizations] The list of authorizations. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.serviceKey] The ServiceKey. + * + * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * + * @param {object} [parameters.serviceProviderProperties] The + * ServiceProviderProperties. + * + * @param {string} [parameters.serviceProviderProperties.serviceProviderName] + * The serviceProviderName. + * + * @param {string} [parameters.serviceProviderProperties.peeringLocation] The + * peering location. + * + * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The + * BandwidthInMbps. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates an express route circuit. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to the create or update + * express route circuit operation. + * + * @param {object} [parameters.sku] The SKU. + * + * @param {string} [parameters.sku.name] The name of the SKU. + * + * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values + * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * + * @param {string} [parameters.sku.family] The family of the SKU. Possible + * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: + * 'UnlimitedData', 'MeteredData' + * + * @param {boolean} [parameters.allowClassicOperations] Allow classic + * operations + * + * @param {string} [parameters.circuitProvisioningState] The + * CircuitProvisioningState state of the resource. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * ServiceProviderProvisioningState state of the resource. Possible values are + * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {array} [parameters.authorizations] The list of authorizations. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.serviceKey] The ServiceKey. + * + * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * + * @param {object} [parameters.serviceProviderProperties] The + * ServiceProviderProperties. + * + * @param {string} [parameters.serviceProviderProperties.serviceProviderName] + * The serviceProviderName. + * + * @param {string} [parameters.serviceProviderProperties.peeringLocation] The + * peering location. + * + * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The + * BandwidthInMbps. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuit} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuit} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates an express route circuit tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to update express route + * circuit tags. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates an express route circuit tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the circuit. + * + * @param {object} parameters Parameters supplied to update express route + * circuit tags. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuit} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuit} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised ARP table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginListArpTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised ARP table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsArpTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised routes table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginListRoutesTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised routes table associated with the express route + * circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsRoutesTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised routes table summary associated with the + * express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginListRoutesTableSummaryWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised routes table summary associated with the + * express route circuit in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} circuitName The name of the express route circuit. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsRoutesTableSummaryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsRoutesTableSummaryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCircuitsRoutesTableSummaryListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the express route circuits in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the express route circuits in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the express route circuits in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the express route circuits in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ExpressRouteServiceProviders + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ExpressRouteServiceProviders { + + + /** + * Gets all the available express route service providers. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the available express route service providers. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteServiceProviderListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteServiceProviderListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteServiceProviderListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the available express route service providers. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the available express route service providers. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteServiceProviderListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteServiceProviderListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteServiceProviderListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ExpressRouteCrossConnections + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ExpressRouteCrossConnections { + + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(callback: ServiceCallback): void; + list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroup(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroup(resourceGroupName: string, callback: ServiceCallback): void; + listByResourceGroup(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group (peering + * location of the circuit). + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection (service key of the circuit). + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets details about the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group (peering + * location of the circuit). + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection (service key of the circuit). + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, crossConnectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, crossConnectionName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, crossConnectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + updateTagsWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listArpTableWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsArpTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + listArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRoutesTableSummaryWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionsRoutesTableSummaryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionsRoutesTableSummaryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCrossConnectionsRoutesTableSummaryListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + listRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listRoutesTableWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsRoutesTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + listRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update the specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} parameters Parameters supplied to the update express route + * crossConnection operation. + * + * @param {string} [parameters.serviceProviderProvisioningState] The + * provisioning state of the circuit in the connectivity provider system. + * Possible values are 'NotProvisioned', 'Provisioning', 'Provisioned'. + * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', + * 'Deprovisioning' + * + * @param {string} [parameters.serviceProviderNotes] Additional read only notes + * set by the connectivity provider. + * + * @param {array} [parameters.peerings] The list of peerings. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, parameters: models.ExpressRouteCrossConnection, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Updates an express route cross connection tags. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the cross connection. + * + * @param {object} crossConnectionParameters Parameters supplied to update + * express route cross connection tags. + * + * @param {object} [crossConnectionParameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnection} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnection} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnection} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginUpdateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, crossConnectionName: string, crossConnectionParameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginListArpTableWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised ARP table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsArpTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsArpTableListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginListArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + beginListArpTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginListRoutesTableSummaryWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the route table summary associated with the express route cross + * connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionsRoutesTableSummaryListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionsRoutesTableSummaryListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * ExpressRouteCrossConnectionsRoutesTableSummaryListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginListRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + beginListRoutesTableSummary(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginListRoutesTableWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the currently advertised routes table associated with the express route + * cross connection in a resource group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {string} devicePath The path of the device. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCircuitsRoutesTableListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCircuitsRoutesTableListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginListRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; + beginListRoutesTable(resourceGroupName: string, crossConnectionName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all the ExpressRouteCrossConnections in a subscription. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listByResourceGroupNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Retrieves all the ExpressRouteCrossConnections in a resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionListResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionListResult} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listByResourceGroupNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listByResourceGroupNext(nextPageLink: string, callback: ServiceCallback): void; + listByResourceGroupNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ExpressRouteCrossConnectionPeerings + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ExpressRouteCrossConnectionPeerings { + + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all peerings in a specified ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ExpressRouteCrossConnectionPeeringList} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ExpressRouteCrossConnectionPeeringList} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeeringList} for + * more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, crossConnectionName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, crossConnectionName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, crossConnectionName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + deleteMethodWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified peering from the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.serviceProviderProperties.serviceProviderName] - * The serviceProviderName. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.serviceProviderProperties.peeringLocation] The - * peering location. + * {Promise} A promise is returned. * - * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The - * BandwidthInMbps. + * @resolve {null} - The deserialized result object. * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.id] Resource ID. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.location] Resource location. + * {null} [result] - The deserialized result object if an error did not occur. * - * @param {object} [parameters.tags] Resource tags. + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + deleteMethod(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, crossConnectionName: string, peeringName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, crossConnectionName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets the specified peering for the ExpressRouteCrossConnection. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. + * + * @param {string} peeringName The name of the peering. * * @param {object} [options] Optional Parameters. * @@ -4230,7 +7844,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuit} - The deserialized result object. + * @resolve {ExpressRouteCrossConnectionPeering} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4238,29 +7852,125 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuit} for more information. + * {ExpressRouteCrossConnectionPeering} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, crossConnectionName: string, peeringName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, crossConnectionName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates an express route circuit tags. + * Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. * - * @param {object} parameters Parameters supplied to update express route - * circuit tags. + * @param {string} peeringName The name of the peering. * - * @param {object} [parameters.tags] Resource tags. + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -4269,23 +7979,118 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an express route circuit tags. + * Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. * - * @param {object} parameters Parameters supplied to update express route - * circuit tags. + * @param {string} peeringName The name of the peering. * - * @param {object} [parameters.tags] Resource tags. + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. + * + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' + * + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {number} [peeringParameters.peerASN] The peer ASN. + * + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. + * + * @param {string} [peeringParameters.sharedKey] The shared key. + * + * @param {number} [peeringParameters.vlanId] The VLAN ID. + * + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. + * + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. + * + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. + * + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. + * + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. + * + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -4299,7 +8104,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuit} - The deserialized result object. + * @resolve {ExpressRouteCrossConnectionPeering} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4307,30 +8112,29 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuit} for more information. + * {ExpressRouteCrossConnectionPeering} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the currently advertised ARP table associated with the express route - * circuit in a resource group. + * Deletes the specified peering from the ExpressRouteCrossConnection. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. * * @param {string} peeringName The name of the peering. * - * @param {string} devicePath The path of the device. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4338,24 +8142,22 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listArpTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the currently advertised ARP table associated with the express route - * circuit in a resource group. + * Deletes the specified peering from the ExpressRouteCrossConnection. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. * * @param {string} peeringName The name of the peering. * - * @param {string} devicePath The path of the device. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4368,7 +8170,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4376,100 +8178,123 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitsArpTableListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitsArpTableListResult} for - * more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; - listArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, crossConnectionName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, crossConnectionName: string, peeringName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, crossConnectionName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the currently advertised routes table associated with the express route - * circuit in a resource group. + * Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. * * @param {string} peeringName The name of the peering. * - * @param {string} devicePath The path of the device. + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. * - * @param {object} [options] Optional Parameters. + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * - * @returns {Promise} A promise is returned + * @param {number} [peeringParameters.peerASN] The peer ASN. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. * - * @reject {Error|ServiceError} - The error object. - */ - listRoutesTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets the currently advertised routes table associated with the express route - * circuit in a resource group. + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [peeringParameters.sharedKey] The shared key. * - * @param {string} circuitName The name of the express route circuit. + * @param {number} [peeringParameters.vlanId] The VLAN ID. * - * @param {string} peeringName The name of the peering. + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. * - * @param {string} devicePath The path of the device. + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. * - * @param {object} [options] Optional Parameters. + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. * - * {Promise} A promise is returned. + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. * - * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering * - * @reject {Error|ServiceError} - The error object. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. * - * {ExpressRouteCircuitsRoutesTableListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitsRoutesTableListResult} - * for more information. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; - listRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets the currently advertised routes table summary associated with the - * express route circuit in a resource group. + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. * - * @param {string} peeringName The name of the peering. + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. * - * @param {string} devicePath The path of the device. + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [peeringParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -4478,84 +8303,118 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listRoutesTableSummaryWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the currently advertised routes table summary associated with the - * express route circuit in a resource group. + * Creates or updates a peering in the specified ExpressRouteCrossConnection. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} crossConnectionName The name of the + * ExpressRouteCrossConnection. * * @param {string} peeringName The name of the peering. * - * @param {string} devicePath The path of the device. + * @param {object} peeringParameters Parameters supplied to the create or + * update ExpressRouteCrossConnection peering operation. * - * @param {object} [options] Optional Parameters. + * @param {string} [peeringParameters.peeringType] The peering type. Possible + * values include: 'AzurePublicPeering', 'AzurePrivatePeering', + * 'MicrosoftPeering' * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [peeringParameters.state] The peering state. Possible values + * include: 'Disabled', 'Enabled' * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {number} [peeringParameters.peerASN] The peer ASN. * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} [peeringParameters.primaryPeerAddressPrefix] The primary + * address prefix. * - * {Promise} A promise is returned. + * @param {string} [peeringParameters.secondaryPeerAddressPrefix] The secondary + * address prefix. * - * @resolve {ExpressRouteCircuitsRoutesTableSummaryListResult} - The deserialized result object. + * @param {string} [peeringParameters.sharedKey] The shared key. * - * @reject {Error|ServiceError} - The error object. + * @param {number} [peeringParameters.vlanId] The VLAN ID. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [peeringParameters.microsoftPeeringConfig] The Microsoft + * peering configuration. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {string} [peeringParameters.lastModifiedBy] Gets whether the provider + * or the customer last modified the peering. * - * {ExpressRouteCircuitsRoutesTableSummaryListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ExpressRouteCircuitsRoutesTableSummaryListResult} for - * more information. + * @param {object} [peeringParameters.ipv6PeeringConfig] The IPv6 peering + * configuration. * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.primaryPeerAddressPrefix] The primary + * address prefix. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; - listRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets all the stats from an express route circuit in a resource group. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.secondaryPeerAddressPrefix] The + * secondary address prefix. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig] + * The Microsoft peering configuration. * - * @param {string} circuitName The name of the express route circuit. + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixes] + * The reference of AdvertisedPublicPrefixes. * - * @param {object} [options] Optional Parameters. + * @param {array} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] + * The communities of bgp peering. Spepcified for microsoft peering * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] + * AdvertisedPublicPrefixState of the Peering resource. Possible values are + * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. + * Possible values include: 'NotConfigured', 'Configuring', 'Configured', + * 'ValidationNeeded' * - * @returns {Promise} A promise is returned + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.legacyMode] The + * legacy mode of the peering. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.customerASN] The + * CustomerASN of the peering. * - * @reject {Error|ServiceError} - The error object. - */ - getStatsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets all the stats from an express route circuit in a resource group. + * @param {string} + * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.routingRegistryName] + * The RoutingRegistryName of the configuration. * - * @param {string} resourceGroupName The name of the resource group. + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter] The + * reference of the RouteFilter resource. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.rules] + * Collection of RouteFilterRules contained within a route filter. + * + * @param {array} [peeringParameters.ipv6PeeringConfig.routeFilter.peerings] A + * collection of references to express route circuit peerings. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.id] + * Resource ID. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.routeFilter.location] + * Resource location. + * + * @param {object} [peeringParameters.ipv6PeeringConfig.routeFilter.tags] + * Resource tags. + * + * @param {string} [peeringParameters.ipv6PeeringConfig.state] The state of + * peering. Possible values are: 'Disabled' and 'Enabled'. Possible values + * include: 'Disabled', 'Enabled' + * + * @param {string} [peeringParameters.name] Gets name of the resource that is + * unique within a resource group. This name can be used to access the + * resource. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} [peeringParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -4569,7 +8428,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitStats} - The deserialized result object. + * @resolve {ExpressRouteCrossConnectionPeering} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4577,27 +8436,24 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitStats} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitStats} for more + * {ExpressRouteCrossConnectionPeering} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeering} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStats(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStats(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; - getStats(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, crossConnectionName: string, peeringName: string, peeringParameters: models.ExpressRouteCrossConnectionPeering, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all stats from an express route circuit in a resource group. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all peerings in a specified ExpressRouteCrossConnection. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} peeringName The name of the peering. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4606,20 +8462,17 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getPeeringStatsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all stats from an express route circuit in a resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} circuitName The name of the express route circuit. + * Gets all peerings in a specified ExpressRouteCrossConnection. * - * @param {string} peeringName The name of the peering. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -4633,7 +8486,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitStats} - The deserialized result object. + * @resolve {ExpressRouteCrossConnectionPeeringList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4641,24 +8494,35 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitStats} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitStats} for more - * information. + * {ExpressRouteCrossConnectionPeeringList} [result] - The deserialized result object if an error did not occur. + * See {@link ExpressRouteCrossConnectionPeeringList} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, callback: ServiceCallback): void; - getPeeringStats(resourceGroupName: string, circuitName: string, peeringName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * LoadBalancers + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface LoadBalancers { /** - * Gets all the express route circuits in a resource group. + * Deletes the specified load balancer. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} loadBalancerName The name of the load balancer. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4666,17 +8530,19 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the express route circuits in a resource group. + * Deletes the specified load balancer. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} loadBalancerName The name of the load balancer. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4689,7 +8555,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4697,40 +8563,50 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the express route circuits in a subscription. + * Gets the specified load balancer. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the express route circuits in a subscription. + * Gets the specified load balancer. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -4741,7 +8617,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * @resolve {LoadBalancer} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4749,25 +8625,79 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitListResult} for more - * information. + * {LoadBalancer} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancer} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified express route circuit. + * Creates or updates a load balancer. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {object} parameters Parameters supplied to the create or update load + * balancer operation. + * + * @param {object} [parameters.sku] The load balancer SKU. + * + * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible + * values include: 'Basic', 'Standard' + * + * @param {array} [parameters.frontendIPConfigurations] Object representing the + * frontend IPs to be used for the load balancer + * + * @param {array} [parameters.backendAddressPools] Collection of backend + * address pools used by a load balancer + * + * @param {array} [parameters.loadBalancingRules] Object collection + * representing the load balancing rules Gets the provisioning + * + * @param {array} [parameters.probes] Collection of probe objects used in the + * load balancer + * + * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules + * used by a load balancer. Defining inbound NAT rules on your load balancer is + * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are + * referenced from virtual machine scale sets. NICs that are associated with + * individual virtual machines cannot reference an Inbound NAT pool. They have + * to reference individual inbound NAT rules. + * + * @param {array} [parameters.inboundNatPools] Defines an external port range + * for inbound NAT to a single backend port on NICs associated with a load + * balancer. Inbound NAT rules are created automatically for each NIC + * associated with the Load Balancer using an external port from this range. + * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive + * with defining inbound Nat rules. Inbound NAT pools are referenced from + * virtual machine scale sets. NICs that are associated with individual virtual + * machines cannot reference an inbound NAT pool. They have to reference + * individual inbound NAT rules. + * + * @param {array} [parameters.outboundNatRules] The outbound NAT rules. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * load balancer resource. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -4776,112 +8706,114 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified express route circuit. + * Creates or updates a load balancer. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {string} loadBalancerName The name of the load balancer. * - * {Promise} A promise is returned. + * @param {object} parameters Parameters supplied to the create or update load + * balancer operation. * - * @resolve {null} - The deserialized result object. + * @param {object} [parameters.sku] The load balancer SKU. * - * @reject {Error|ServiceError} - The error object. + * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible + * values include: 'Basic', 'Standard' * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {array} [parameters.frontendIPConfigurations] Object representing the + * frontend IPs to be used for the load balancer * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {array} [parameters.backendAddressPools] Collection of backend + * address pools used by a load balancer * - * {null} [result] - The deserialized result object if an error did not occur. + * @param {array} [parameters.loadBalancingRules] Object collection + * representing the load balancing rules Gets the provisioning * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @param {array} [parameters.probes] Collection of probe objects used in the + * load balancer * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginDeleteMethod(resourceGroupName: string, circuitName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, circuitName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, circuitName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Creates or updates an express route circuit. + * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules + * used by a load balancer. Defining inbound NAT rules on your load balancer is + * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are + * referenced from virtual machine scale sets. NICs that are associated with + * individual virtual machines cannot reference an Inbound NAT pool. They have + * to reference individual inbound NAT rules. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.inboundNatPools] Defines an external port range + * for inbound NAT to a single backend port on NICs associated with a load + * balancer. Inbound NAT rules are created automatically for each NIC + * associated with the Load Balancer using an external port from this range. + * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive + * with defining inbound Nat rules. Inbound NAT pools are referenced from + * virtual machine scale sets. NICs that are associated with individual virtual + * machines cannot reference an inbound NAT pool. They have to reference + * individual inbound NAT rules. * - * @param {string} circuitName The name of the circuit. + * @param {array} [parameters.outboundNatRules] The outbound NAT rules. * - * @param {object} parameters Parameters supplied to the create or update - * express route circuit operation. + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * load balancer resource. * - * @param {object} [parameters.sku] The SKU. + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. * - * @param {string} [parameters.sku.name] The name of the SKU. + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. * - * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values - * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * @param {string} [parameters.id] Resource ID. * - * @param {string} [parameters.sku.family] The family of the SKU. Possible - * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: - * 'UnlimitedData', 'MeteredData' + * @param {string} [parameters.location] Resource location. * - * @param {boolean} [parameters.allowClassicOperations] Allow classic - * operations + * @param {object} [parameters.tags] Resource tags. * - * @param {string} [parameters.circuitProvisioningState] The - * CircuitProvisioningState state of the resource. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.serviceProviderProvisioningState] The - * ServiceProviderProvisioningState state of the resource. Possible values are - * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', - * 'Deprovisioning' + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {array} [parameters.authorizations] The list of authorizations. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {array} [parameters.peerings] The list of peerings. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.serviceKey] The ServiceKey. + * {Promise} A promise is returned. * - * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * @resolve {LoadBalancer} - The deserialized result object. * - * @param {object} [parameters.serviceProviderProperties] The - * ServiceProviderProperties. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.serviceProviderProperties.serviceProviderName] - * The serviceProviderName. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.serviceProviderProperties.peeringLocation] The - * peering location. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The - * BandwidthInMbps. + * {LoadBalancer} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancer} for more information. * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + createOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Updates a load balancer tags. * - * @param {string} [parameters.id] Resource ID. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.location] Resource location. + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {object} parameters Parameters supplied to update load balancer tags. * * @param {object} [parameters.tags] Resource tags. * @@ -4892,76 +8824,73 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates an express route circuit. + * Updates a load balancer tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. - * - * @param {object} parameters Parameters supplied to the create or update - * express route circuit operation. - * - * @param {object} [parameters.sku] The SKU. + * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} [parameters.sku.name] The name of the SKU. + * @param {object} parameters Parameters supplied to update load balancer tags. * - * @param {string} [parameters.sku.tier] The tier of the SKU. Possible values - * are 'Standard' and 'Premium'. Possible values include: 'Standard', 'Premium' + * @param {object} [parameters.tags] Resource tags. * - * @param {string} [parameters.sku.family] The family of the SKU. Possible - * values are: 'UnlimitedData' and 'MeteredData'. Possible values include: - * 'UnlimitedData', 'MeteredData' + * @param {object} [options] Optional Parameters. * - * @param {boolean} [parameters.allowClassicOperations] Allow classic - * operations + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.circuitProvisioningState] The - * CircuitProvisioningState state of the resource. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.serviceProviderProvisioningState] The - * ServiceProviderProvisioningState state of the resource. Possible values are - * 'NotProvisioned', 'Provisioning', 'Provisioned', and 'Deprovisioning'. - * Possible values include: 'NotProvisioned', 'Provisioning', 'Provisioned', - * 'Deprovisioning' + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {array} [parameters.authorizations] The list of authorizations. + * {Promise} A promise is returned. * - * @param {array} [parameters.peerings] The list of peerings. + * @resolve {LoadBalancer} - The deserialized result object. * - * @param {string} [parameters.serviceKey] The ServiceKey. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.serviceProviderNotes] The ServiceProviderNotes. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.serviceProviderProperties] The - * ServiceProviderProperties. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.serviceProviderProperties.serviceProviderName] - * The serviceProviderName. + * {LoadBalancer} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancer} for more information. * - * @param {string} [parameters.serviceProviderProperties.peeringLocation] The - * peering location. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {number} [parameters.serviceProviderProperties.bandwidthInMbps] The - * BandwidthInMbps. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + updateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets all the load balancers in a subscription. * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.gatewayManagerEtag] The GatewayManager Etag. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.id] Resource ID. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.location] Resource location. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.tags] Resource tags. + * @reject {Error|ServiceError} - The error object. + */ + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets all the load balancers in a subscription. * * @param {object} [options] Optional Parameters. * @@ -4975,7 +8904,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuit} - The deserialized result object. + * @resolve {LoadBalancerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -4983,30 +8912,24 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuit} for more information. + * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, circuitName: string, parameters: models.ExpressRouteCircuit, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates an express route circuit tags. + * Gets all the load balancers in a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. - * - * @param {object} parameters Parameters supplied to update express route - * circuit tags. - * - * @param {object} [parameters.tags] Resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5014,24 +8937,17 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates an express route circuit tags. + * Gets all the load balancers in a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the circuit. - * - * @param {object} parameters Parameters supplied to update express route - * circuit tags. - * - * @param {object} [parameters.tags] Resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5044,7 +8960,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuit} - The deserialized result object. + * @resolve {LoadBalancerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5052,29 +8968,25 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuit} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuit} for more information. + * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, circuitName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the currently advertised ARP table associated with the express route - * circuit in a resource group. + * Deletes the specified load balancer. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} peeringName The name of the peering. - * - * @param {string} devicePath The path of the device. + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * @@ -5083,23 +8995,18 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginListArpTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the currently advertised ARP table associated with the express route - * circuit in a resource group. + * Deletes the specified load balancer. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. - * - * @param {string} peeringName The name of the peering. - * - * @param {string} devicePath The path of the device. + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * @@ -5113,7 +9020,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitsArpTableListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5121,30 +9028,78 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitsArpTableListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitsArpTableListResult} for - * more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; - beginListArpTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets the currently advertised routes table associated with the express route - * circuit in a resource group. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a load balancer. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {object} parameters Parameters supplied to the create or update load + * balancer operation. + * + * @param {object} [parameters.sku] The load balancer SKU. + * + * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible + * values include: 'Basic', 'Standard' + * + * @param {array} [parameters.frontendIPConfigurations] Object representing the + * frontend IPs to be used for the load balancer + * + * @param {array} [parameters.backendAddressPools] Collection of backend + * address pools used by a load balancer + * + * @param {array} [parameters.loadBalancingRules] Object collection + * representing the load balancing rules Gets the provisioning + * + * @param {array} [parameters.probes] Collection of probe objects used in the + * load balancer + * + * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules + * used by a load balancer. Defining inbound NAT rules on your load balancer is + * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are + * referenced from virtual machine scale sets. NICs that are associated with + * individual virtual machines cannot reference an Inbound NAT pool. They have + * to reference individual inbound NAT rules. + * + * @param {array} [parameters.inboundNatPools] Defines an external port range + * for inbound NAT to a single backend port on NICs associated with a load + * balancer. Inbound NAT rules are created automatically for each NIC + * associated with the Load Balancer using an external port from this range. + * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive + * with defining inbound Nat rules. Inbound NAT pools are referenced from + * virtual machine scale sets. NICs that are associated with individual virtual + * machines cannot reference an inbound NAT pool. They have to reference + * individual inbound NAT rules. + * + * @param {array} [parameters.outboundNatRules] The outbound NAT rules. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * load balancer resource. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} [parameters.id] Resource ID. * - * @param {string} peeringName The name of the peering. + * @param {string} [parameters.location] Resource location. * - * @param {string} devicePath The path of the device. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -5153,23 +9108,73 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginListRoutesTableWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the currently advertised routes table associated with the express route - * circuit in a resource group. + * Creates or updates a load balancer. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} peeringName The name of the peering. + * @param {object} parameters Parameters supplied to the create or update load + * balancer operation. * - * @param {string} devicePath The path of the device. + * @param {object} [parameters.sku] The load balancer SKU. + * + * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible + * values include: 'Basic', 'Standard' + * + * @param {array} [parameters.frontendIPConfigurations] Object representing the + * frontend IPs to be used for the load balancer + * + * @param {array} [parameters.backendAddressPools] Collection of backend + * address pools used by a load balancer + * + * @param {array} [parameters.loadBalancingRules] Object collection + * representing the load balancing rules Gets the provisioning + * + * @param {array} [parameters.probes] Collection of probe objects used in the + * load balancer + * + * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules + * used by a load balancer. Defining inbound NAT rules on your load balancer is + * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are + * referenced from virtual machine scale sets. NICs that are associated with + * individual virtual machines cannot reference an Inbound NAT pool. They have + * to reference individual inbound NAT rules. + * + * @param {array} [parameters.inboundNatPools] Defines an external port range + * for inbound NAT to a single backend port on NICs associated with a load + * balancer. Inbound NAT rules are created automatically for each NIC + * associated with the Load Balancer using an external port from this range. + * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive + * with defining inbound Nat rules. Inbound NAT pools are referenced from + * virtual machine scale sets. NICs that are associated with individual virtual + * machines cannot reference an inbound NAT pool. They have to reference + * individual inbound NAT rules. + * + * @param {array} [parameters.outboundNatRules] The outbound NAT rules. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * load balancer resource. + * + * @param {string} [parameters.provisioningState] Gets the provisioning state + * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -5183,7 +9188,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitsRoutesTableListResult} - The deserialized result object. + * @resolve {LoadBalancer} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5191,30 +9196,28 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitsRoutesTableListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitsRoutesTableListResult} - * for more information. + * {LoadBalancer} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancer} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; - beginListRoutesTable(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the currently advertised routes table summary associated with the - * express route circuit in a resource group. + * Updates a load balancer tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} peeringName The name of the peering. + * @param {object} parameters Parameters supplied to update load balancer tags. * - * @param {string} devicePath The path of the device. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -5223,23 +9226,22 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginListRoutesTableSummaryWithHttpOperationResponse(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the currently advertised routes table summary associated with the - * express route circuit in a resource group. + * Updates a load balancer tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} circuitName The name of the express route circuit. + * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} peeringName The name of the peering. + * @param {object} parameters Parameters supplied to update load balancer tags. * - * @param {string} devicePath The path of the device. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -5253,7 +9255,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitsRoutesTableSummaryListResult} - The deserialized result object. + * @resolve {LoadBalancer} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5261,22 +9263,20 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitsRoutesTableSummaryListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * ExpressRouteCircuitsRoutesTableSummaryListResult} for - * more information. + * {LoadBalancer} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancer} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, callback: ServiceCallback): void; - beginListRoutesTableSummary(resourceGroupName: string, circuitName: string, peeringName: string, devicePath: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the express route circuits in a resource group. + * Gets all the load balancers in a subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5288,14 +9288,14 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the express route circuits in a resource group. + * Gets all the load balancers in a subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5312,7 +9312,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * @resolve {LoadBalancerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5320,21 +9320,21 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitListResult} for more + * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the express route circuits in a subscription. + * Gets all the load balancers in a resource group. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5346,14 +9346,14 @@ export interface ExpressRouteCircuits { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the express route circuits in a subscription. + * Gets all the load balancers in a resource group. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -5370,7 +9370,7 @@ export interface ExpressRouteCircuits { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteCircuitListResult} - The deserialized result object. + * @resolve {LoadBalancerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5378,30 +9378,34 @@ export interface ExpressRouteCircuits { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteCircuitListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteCircuitListResult} for more + * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * ExpressRouteServiceProviders + * LoadBalancerBackendAddressPools * __NOTE__: An instance of this class is automatically created for an * instance of the NetworkManagementClient. */ -export interface ExpressRouteServiceProviders { +export interface LoadBalancerBackendAddressPools { /** - * Gets all the available express route service providers. + * Gets all the load balancer backed address pools. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * @@ -5410,14 +9414,18 @@ export interface ExpressRouteServiceProviders { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the available express route service providers. + * Gets all the load balancer backed address pools. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * @@ -5431,7 +9439,7 @@ export interface ExpressRouteServiceProviders { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteServiceProviderListResult} - The deserialized result object. + * @resolve {LoadBalancerBackendAddressPoolListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5439,24 +9447,27 @@ export interface ExpressRouteServiceProviders { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteServiceProviderListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteServiceProviderListResult} for - * more information. + * {LoadBalancerBackendAddressPoolListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerBackendAddressPoolListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(callback: ServiceCallback): void; - list(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the available express route service providers. + * Gets load balancer backend address pool. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {string} backendAddressPoolName The name of the backend address pool. * * @param {object} [options] Optional Parameters. * @@ -5465,17 +9476,20 @@ export interface ExpressRouteServiceProviders { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the available express route service providers. + * Gets load balancer backend address pool. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {string} backendAddressPoolName The name of the backend address pool. * * @param {object} [options] Optional Parameters. * @@ -5489,7 +9503,7 @@ export interface ExpressRouteServiceProviders { * * {Promise} A promise is returned. * - * @resolve {ExpressRouteServiceProviderListResult} - The deserialized result object. + * @resolve {BackendAddressPool} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5497,34 +9511,23 @@ export interface ExpressRouteServiceProviders { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ExpressRouteServiceProviderListResult} [result] - The deserialized result object if an error did not occur. - * See {@link ExpressRouteServiceProviderListResult} for - * more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * LoadBalancers - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface LoadBalancers { + * {BackendAddressPool} [result] - The deserialized result object if an error did not occur. + * See {@link BackendAddressPool} for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified load balancer. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all the load balancer backed address pools. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -5533,18 +9536,17 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified load balancer. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all the load balancer backed address pools. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -5558,7 +9560,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {LoadBalancerBackendAddressPoolListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5566,19 +9568,30 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {LoadBalancerBackendAddressPoolListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerBackendAddressPoolListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * LoadBalancerFrontendIPConfigurations + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface LoadBalancerFrontendIPConfigurations { /** - * Gets the specified load balancer. + * Gets all the load balancer frontend IP configurations. * * @param {string} resourceGroupName The name of the resource group. * @@ -5586,21 +9599,19 @@ export interface LoadBalancers { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified load balancer. + * Gets all the load balancer frontend IP configurations. * * @param {string} resourceGroupName The name of the resource group. * @@ -5608,8 +9619,6 @@ export interface LoadBalancers { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -5620,7 +9629,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancer} - The deserialized result object. + * @resolve {LoadBalancerFrontendIPConfigurationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5628,79 +9637,29 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancer} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancer} for more information. + * {LoadBalancerFrontendIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * LoadBalancerFrontendIPConfigurationListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, loadBalancerName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, loadBalancerName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a load balancer. + * Gets load balancer frontend IP configuration. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {object} parameters Parameters supplied to the create or update load - * balancer operation. - * - * @param {object} [parameters.sku] The load balancer SKU. - * - * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible - * values include: 'Basic', 'Standard' - * - * @param {array} [parameters.frontendIPConfigurations] Object representing the - * frontend IPs to be used for the load balancer - * - * @param {array} [parameters.backendAddressPools] Collection of backend - * address pools used by a load balancer - * - * @param {array} [parameters.loadBalancingRules] Object collection - * representing the load balancing rules Gets the provisioning - * - * @param {array} [parameters.probes] Collection of probe objects used in the - * load balancer - * - * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules - * used by a load balancer. Defining inbound NAT rules on your load balancer is - * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are - * referenced from virtual machine scale sets. NICs that are associated with - * individual virtual machines cannot reference an Inbound NAT pool. They have - * to reference individual inbound NAT rules. - * - * @param {array} [parameters.inboundNatPools] Defines an external port range - * for inbound NAT to a single backend port on NICs associated with a load - * balancer. Inbound NAT rules are created automatically for each NIC - * associated with the Load Balancer using an external port from this range. - * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive - * with defining inbound Nat rules. Inbound NAT pools are referenced from - * virtual machine scale sets. NICs that are associated with individual virtual - * machines cannot reference an inbound NAT pool. They have to reference - * individual inbound NAT rules. - * - * @param {array} [parameters.outboundNatRules] The outbound NAT rules. - * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * load balancer resource. - * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. - * - * @param {string} [parameters.id] Resource ID. - * - * @param {string} [parameters.location] Resource location. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} frontendIPConfigurationName The name of the frontend IP + * configuration. * * @param {object} [options] Optional Parameters. * @@ -5709,73 +9668,21 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a load balancer. + * Gets load balancer frontend IP configuration. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {object} parameters Parameters supplied to the create or update load - * balancer operation. - * - * @param {object} [parameters.sku] The load balancer SKU. - * - * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible - * values include: 'Basic', 'Standard' - * - * @param {array} [parameters.frontendIPConfigurations] Object representing the - * frontend IPs to be used for the load balancer - * - * @param {array} [parameters.backendAddressPools] Collection of backend - * address pools used by a load balancer - * - * @param {array} [parameters.loadBalancingRules] Object collection - * representing the load balancing rules Gets the provisioning - * - * @param {array} [parameters.probes] Collection of probe objects used in the - * load balancer - * - * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules - * used by a load balancer. Defining inbound NAT rules on your load balancer is - * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are - * referenced from virtual machine scale sets. NICs that are associated with - * individual virtual machines cannot reference an Inbound NAT pool. They have - * to reference individual inbound NAT rules. - * - * @param {array} [parameters.inboundNatPools] Defines an external port range - * for inbound NAT to a single backend port on NICs associated with a load - * balancer. Inbound NAT rules are created automatically for each NIC - * associated with the Load Balancer using an external port from this range. - * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive - * with defining inbound Nat rules. Inbound NAT pools are referenced from - * virtual machine scale sets. NICs that are associated with individual virtual - * machines cannot reference an inbound NAT pool. They have to reference - * individual inbound NAT rules. - * - * @param {array} [parameters.outboundNatRules] The outbound NAT rules. - * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * load balancer resource. - * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. - * - * @param {string} [parameters.id] Resource ID. - * - * @param {string} [parameters.location] Resource location. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} frontendIPConfigurationName The name of the frontend IP + * configuration. * * @param {object} [options] Optional Parameters. * @@ -5789,7 +9696,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancer} - The deserialized result object. + * @resolve {FrontendIPConfiguration} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5797,28 +9704,24 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancer} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancer} for more information. + * {FrontendIPConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link FrontendIPConfiguration} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a load balancer tags. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {object} parameters Parameters supplied to update load balancer tags. + * Gets all the load balancer frontend IP configurations. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -5827,22 +9730,17 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a load balancer tags. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {object} parameters Parameters supplied to update load balancer tags. + * Gets all the load balancer frontend IP configurations. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -5856,7 +9754,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancer} - The deserialized result object. + * @resolve {LoadBalancerFrontendIPConfigurationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5864,20 +9762,35 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancer} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancer} for more information. + * {LoadBalancerFrontendIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link + * LoadBalancerFrontendIPConfigurationListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * InboundNatRules + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface InboundNatRules { /** - * Gets all the load balancers in a subscription. + * Gets all the inbound nat rules in a load balancer. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * @@ -5886,14 +9799,18 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancers in a subscription. + * Gets all the inbound nat rules in a load balancer. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. * * @param {object} [options] Optional Parameters. * @@ -5907,7 +9824,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerListResult} - The deserialized result object. + * @resolve {InboundNatRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5915,24 +9832,28 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerListResult} for more + * {InboundNatRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link InboundNatRuleListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancers in a resource group. + * Deletes the specified load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {string} inboundNatRuleName The name of the inbound nat rule. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5940,17 +9861,21 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancers in a resource group. + * Deletes the specified load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {string} inboundNatRuleName The name of the inbound nat rule. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5963,7 +9888,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -5971,48 +9896,54 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified load balancer. + * Gets the specified load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * + * @param {string} inboundNatRuleName The name of the inbound nat rule. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified load balancer. + * Gets the specified load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * + * @param {string} inboundNatRuleName The name of the inbound nat rule. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -6023,7 +9954,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {InboundNatRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6031,78 +9962,69 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {InboundNatRule} [result] - The deserialized result object if an error did not occur. + * See {@link InboundNatRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a load balancer. + * Creates or updates a load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {object} parameters Parameters supplied to the create or update load - * balancer operation. - * - * @param {object} [parameters.sku] The load balancer SKU. - * - * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible - * values include: 'Basic', 'Standard' - * - * @param {array} [parameters.frontendIPConfigurations] Object representing the - * frontend IPs to be used for the load balancer + * @param {string} inboundNatRuleName The name of the inbound nat rule. * - * @param {array} [parameters.backendAddressPools] Collection of backend - * address pools used by a load balancer + * @param {object} inboundNatRuleParameters Parameters supplied to the create + * or update inbound nat rule operation. * - * @param {array} [parameters.loadBalancingRules] Object collection - * representing the load balancing rules Gets the provisioning + * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A + * reference to frontend IP addresses. * - * @param {array} [parameters.probes] Collection of probe objects used in the - * load balancer + * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] + * Resource ID. * - * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules - * used by a load balancer. Defining inbound NAT rules on your load balancer is - * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are - * referenced from virtual machine scale sets. NICs that are associated with - * individual virtual machines cannot reference an Inbound NAT pool. They have - * to reference individual inbound NAT rules. + * @param {string} [inboundNatRuleParameters.protocol] Possible values include: + * 'Udp', 'Tcp', 'All' * - * @param {array} [parameters.inboundNatPools] Defines an external port range - * for inbound NAT to a single backend port on NICs associated with a load - * balancer. Inbound NAT rules are created automatically for each NIC - * associated with the Load Balancer using an external port from this range. - * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive - * with defining inbound Nat rules. Inbound NAT pools are referenced from - * virtual machine scale sets. NICs that are associated with individual virtual - * machines cannot reference an inbound NAT pool. They have to reference - * individual inbound NAT rules. + * @param {number} [inboundNatRuleParameters.frontendPort] The port for the + * external endpoint. Port numbers for each rule must be unique within the Load + * Balancer. Acceptable values range from 1 to 65534. * - * @param {array} [parameters.outboundNatRules] The outbound NAT rules. + * @param {number} [inboundNatRuleParameters.backendPort] The port used for the + * internal endpoint. Acceptable values range from 1 to 65535. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * load balancer resource. + * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout + * for the TCP idle connection. The value can be set between 4 and 30 minutes. + * The default value is 4 minutes. This element is only used when the protocol + * is set to TCP. * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a + * virtual machine's endpoint for the floating IP capability required to + * configure a SQL AlwaysOn Availability Group. This setting is required when + * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't + * be changed after you create the endpoint. * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. + * @param {string} [inboundNatRuleParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. * - * @param {string} [parameters.id] Resource ID. + * @param {string} [inboundNatRuleParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. * - * @param {string} [parameters.location] Resource location. + * @param {string} [inboundNatRuleParameters.etag] A unique read-only string + * that changes whenever the resource is updated. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [inboundNatRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -6111,73 +10033,63 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a load balancer. + * Creates or updates a load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {object} parameters Parameters supplied to the create or update load - * balancer operation. - * - * @param {object} [parameters.sku] The load balancer SKU. - * - * @param {string} [parameters.sku.name] Name of a load balancer SKU. Possible - * values include: 'Basic', 'Standard' - * - * @param {array} [parameters.frontendIPConfigurations] Object representing the - * frontend IPs to be used for the load balancer + * @param {string} inboundNatRuleName The name of the inbound nat rule. * - * @param {array} [parameters.backendAddressPools] Collection of backend - * address pools used by a load balancer + * @param {object} inboundNatRuleParameters Parameters supplied to the create + * or update inbound nat rule operation. * - * @param {array} [parameters.loadBalancingRules] Object collection - * representing the load balancing rules Gets the provisioning + * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A + * reference to frontend IP addresses. * - * @param {array} [parameters.probes] Collection of probe objects used in the - * load balancer + * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] + * Resource ID. * - * @param {array} [parameters.inboundNatRules] Collection of inbound NAT Rules - * used by a load balancer. Defining inbound NAT rules on your load balancer is - * mutually exclusive with defining an inbound NAT pool. Inbound NAT pools are - * referenced from virtual machine scale sets. NICs that are associated with - * individual virtual machines cannot reference an Inbound NAT pool. They have - * to reference individual inbound NAT rules. + * @param {string} [inboundNatRuleParameters.protocol] Possible values include: + * 'Udp', 'Tcp', 'All' * - * @param {array} [parameters.inboundNatPools] Defines an external port range - * for inbound NAT to a single backend port on NICs associated with a load - * balancer. Inbound NAT rules are created automatically for each NIC - * associated with the Load Balancer using an external port from this range. - * Defining an Inbound NAT pool on your Load Balancer is mutually exclusive - * with defining inbound Nat rules. Inbound NAT pools are referenced from - * virtual machine scale sets. NICs that are associated with individual virtual - * machines cannot reference an inbound NAT pool. They have to reference - * individual inbound NAT rules. + * @param {number} [inboundNatRuleParameters.frontendPort] The port for the + * external endpoint. Port numbers for each rule must be unique within the Load + * Balancer. Acceptable values range from 1 to 65534. * - * @param {array} [parameters.outboundNatRules] The outbound NAT rules. + * @param {number} [inboundNatRuleParameters.backendPort] The port used for the + * internal endpoint. Acceptable values range from 1 to 65535. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * load balancer resource. + * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout + * for the TCP idle connection. The value can be set between 4 and 30 minutes. + * The default value is 4 minutes. This element is only used when the protocol + * is set to TCP. * - * @param {string} [parameters.provisioningState] Gets the provisioning state - * of the PublicIP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a + * virtual machine's endpoint for the floating IP capability required to + * configure a SQL AlwaysOn Availability Group. This setting is required when + * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't + * be changed after you create the endpoint. * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. + * @param {string} [inboundNatRuleParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. * - * @param {string} [parameters.id] Resource ID. + * @param {string} [inboundNatRuleParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. * - * @param {string} [parameters.location] Resource location. + * @param {string} [inboundNatRuleParameters.etag] A unique read-only string + * that changes whenever the resource is updated. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} [inboundNatRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -6191,7 +10103,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancer} - The deserialized result object. + * @resolve {InboundNatRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6199,28 +10111,26 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancer} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancer} for more information. + * {InboundNatRule} [result] - The deserialized result object if an error did not occur. + * See {@link InboundNatRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, parameters: models.LoadBalancer, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a load balancer tags. + * Deletes the specified load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {object} parameters Parameters supplied to update load balancer tags. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} inboundNatRuleName The name of the inbound nat rule. * * @param {object} [options] Optional Parameters. * @@ -6229,22 +10139,20 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a load balancer tags. + * Deletes the specified load balancer inbound nat rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {object} parameters Parameters supplied to update load balancer tags. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} inboundNatRuleName The name of the inbound nat rule. * * @param {object} [options] Optional Parameters. * @@ -6258,7 +10166,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancer} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6266,23 +10174,68 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancer} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancer} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, loadBalancerName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancers in a subscription. + * Creates or updates a load balancer inbound nat rule. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {string} inboundNatRuleName The name of the inbound nat rule. + * + * @param {object} inboundNatRuleParameters Parameters supplied to the create + * or update inbound nat rule operation. + * + * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A + * reference to frontend IP addresses. + * + * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] + * Resource ID. + * + * @param {string} [inboundNatRuleParameters.protocol] Possible values include: + * 'Udp', 'Tcp', 'All' + * + * @param {number} [inboundNatRuleParameters.frontendPort] The port for the + * external endpoint. Port numbers for each rule must be unique within the Load + * Balancer. Acceptable values range from 1 to 65534. + * + * @param {number} [inboundNatRuleParameters.backendPort] The port used for the + * internal endpoint. Acceptable values range from 1 to 65535. + * + * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout + * for the TCP idle connection. The value can be set between 4 and 30 minutes. + * The default value is 4 minutes. This element is only used when the protocol + * is set to TCP. + * + * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a + * virtual machine's endpoint for the floating IP capability required to + * configure a SQL AlwaysOn Availability Group. This setting is required when + * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't + * be changed after you create the endpoint. + * + * @param {string} [inboundNatRuleParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. + * + * @param {string} [inboundNatRuleParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [inboundNatRuleParameters.etag] A unique read-only string + * that changes whenever the resource is updated. + * + * @param {string} [inboundNatRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -6291,17 +10244,63 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancers in a subscription. + * Creates or updates a load balancer inbound nat rule. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} loadBalancerName The name of the load balancer. + * + * @param {string} inboundNatRuleName The name of the inbound nat rule. + * + * @param {object} inboundNatRuleParameters Parameters supplied to the create + * or update inbound nat rule operation. + * + * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A + * reference to frontend IP addresses. + * + * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] + * Resource ID. + * + * @param {string} [inboundNatRuleParameters.protocol] Possible values include: + * 'Udp', 'Tcp', 'All' + * + * @param {number} [inboundNatRuleParameters.frontendPort] The port for the + * external endpoint. Port numbers for each rule must be unique within the Load + * Balancer. Acceptable values range from 1 to 65534. + * + * @param {number} [inboundNatRuleParameters.backendPort] The port used for the + * internal endpoint. Acceptable values range from 1 to 65535. + * + * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout + * for the TCP idle connection. The value can be set between 4 and 30 minutes. + * The default value is 4 minutes. This element is only used when the protocol + * is set to TCP. + * + * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a + * virtual machine's endpoint for the floating IP capability required to + * configure a SQL AlwaysOn Availability Group. This setting is required when + * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't + * be changed after you create the endpoint. + * + * @param {string} [inboundNatRuleParameters.provisioningState] Gets the + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. + * + * @param {string} [inboundNatRuleParameters.name] Gets name of the resource + * that is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [inboundNatRuleParameters.etag] A unique read-only string + * that changes whenever the resource is updated. + * + * @param {string} [inboundNatRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -6315,7 +10314,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerListResult} - The deserialized result object. + * @resolve {InboundNatRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6323,21 +10322,20 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerListResult} for more - * information. + * {InboundNatRule} [result] - The deserialized result object if an error did not occur. + * See {@link InboundNatRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancers in a resource group. + * Gets all the inbound nat rules in a load balancer. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6349,14 +10347,14 @@ export interface LoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancers in a resource group. + * Gets all the inbound nat rules in a load balancer. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6373,7 +10371,7 @@ export interface LoadBalancers { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerListResult} - The deserialized result object. + * @resolve {InboundNatRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6381,30 +10379,30 @@ export interface LoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerListResult} for more + * {InboundNatRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link InboundNatRuleListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * LoadBalancerBackendAddressPools + * LoadBalancerLoadBalancingRules * __NOTE__: An instance of this class is automatically created for an * instance of the NetworkManagementClient. */ -export interface LoadBalancerBackendAddressPools { +export interface LoadBalancerLoadBalancingRules { /** - * Gets all the load balancer backed address pools. + * Gets all the load balancing rules in a load balancer. * * @param {string} resourceGroupName The name of the resource group. * @@ -6417,14 +10415,14 @@ export interface LoadBalancerBackendAddressPools { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancer backed address pools. + * Gets all the load balancing rules in a load balancer. * * @param {string} resourceGroupName The name of the resource group. * @@ -6442,7 +10440,7 @@ export interface LoadBalancerBackendAddressPools { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerBackendAddressPoolListResult} - The deserialized result object. + * @resolve {LoadBalancerLoadBalancingRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6450,27 +10448,27 @@ export interface LoadBalancerBackendAddressPools { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerBackendAddressPoolListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerBackendAddressPoolListResult} - * for more information. + * {LoadBalancerLoadBalancingRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerLoadBalancingRuleListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets load balancer backend address pool. + * Gets the specified load balancer load balancing rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} backendAddressPoolName The name of the backend address pool. + * @param {string} loadBalancingRuleName The name of the load balancing rule. * * @param {object} [options] Optional Parameters. * @@ -6479,77 +10477,20 @@ export interface LoadBalancerBackendAddressPools { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets load balancer backend address pool. + * Gets the specified load balancer load balancing rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} backendAddressPoolName The name of the backend address pool. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {BackendAddressPool} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {BackendAddressPool} [result] - The deserialized result object if an error did not occur. - * See {@link BackendAddressPool} for more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, loadBalancerName: string, backendAddressPoolName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets all the load balancer backed address pools. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets all the load balancer backed address pools. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} loadBalancingRuleName The name of the load balancing rule. * * @param {object} [options] Optional Parameters. * @@ -6563,7 +10504,7 @@ export interface LoadBalancerBackendAddressPools { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerBackendAddressPoolListResult} - The deserialized result object. + * @resolve {LoadBalancingRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6571,34 +10512,23 @@ export interface LoadBalancerBackendAddressPools { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerBackendAddressPoolListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerBackendAddressPoolListResult} - * for more information. + * {LoadBalancingRule} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancingRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * LoadBalancerFrontendIPConfigurations - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface LoadBalancerFrontendIPConfigurations { + get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancer frontend IP configurations. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all the load balancing rules in a load balancer. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -6607,18 +10537,17 @@ export interface LoadBalancerFrontendIPConfigurations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancer frontend IP configurations. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all the load balancing rules in a load balancer. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -6632,7 +10561,7 @@ export interface LoadBalancerFrontendIPConfigurations { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerFrontendIPConfigurationListResult} - The deserialized result object. + * @resolve {LoadBalancerLoadBalancingRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6640,30 +10569,35 @@ export interface LoadBalancerFrontendIPConfigurations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerFrontendIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * LoadBalancerFrontendIPConfigurationListResult} for more - * information. + * {LoadBalancerLoadBalancingRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerLoadBalancingRuleListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * LoadBalancerNetworkInterfaces + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface LoadBalancerNetworkInterfaces { /** - * Gets load balancer frontend IP configuration. + * Gets associated load balancer network interfaces. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} frontendIPConfigurationName The name of the frontend IP - * configuration. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6671,22 +10605,19 @@ export interface LoadBalancerFrontendIPConfigurations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets load balancer frontend IP configuration. + * Gets associated load balancer network interfaces. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} frontendIPConfigurationName The name of the frontend IP - * configuration. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6699,7 +10630,7 @@ export interface LoadBalancerFrontendIPConfigurations { * * {Promise} A promise is returned. * - * @resolve {FrontendIPConfiguration} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6707,21 +10638,21 @@ export interface LoadBalancerFrontendIPConfigurations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {FrontendIPConfiguration} [result] - The deserialized result object if an error did not occur. - * See {@link FrontendIPConfiguration} for more + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, loadBalancerName: string, frontendIPConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancer frontend IP configurations. + * Gets associated load balancer network interfaces. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6733,14 +10664,14 @@ export interface LoadBalancerFrontendIPConfigurations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancer frontend IP configurations. + * Gets associated load balancer network interfaces. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -6757,7 +10688,7 @@ export interface LoadBalancerFrontendIPConfigurations { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerFrontendIPConfigurationListResult} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6765,31 +10696,30 @@ export interface LoadBalancerFrontendIPConfigurations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerFrontendIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link - * LoadBalancerFrontendIPConfigurationListResult} for more + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** * @class - * InboundNatRules + * LoadBalancerProbes * __NOTE__: An instance of this class is automatically created for an * instance of the NetworkManagementClient. */ -export interface InboundNatRules { +export interface LoadBalancerProbes { /** - * Gets all the inbound nat rules in a load balancer. + * Gets all the load balancer probes. * * @param {string} resourceGroupName The name of the resource group. * @@ -6802,14 +10732,14 @@ export interface InboundNatRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the inbound nat rules in a load balancer. + * Gets all the load balancer probes. * * @param {string} resourceGroupName The name of the resource group. * @@ -6827,7 +10757,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {InboundNatRuleListResult} - The deserialized result object. + * @resolve {LoadBalancerProbeListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6835,27 +10765,27 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InboundNatRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link InboundNatRuleListResult} for more + * {LoadBalancerProbeListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerProbeListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified load balancer inbound nat rule. + * Gets load balancer probe. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} probeName The name of the probe. * * @param {object} [options] Optional Parameters. * @@ -6864,20 +10794,20 @@ export interface InboundNatRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, probeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified load balancer inbound nat rule. + * Gets load balancer probe. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} loadBalancerName The name of the load balancer. * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} probeName The name of the probe. * * @param {object} [options] Optional Parameters. * @@ -6891,7 +10821,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Probe} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6899,54 +10829,45 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Probe} [result] - The deserialized result object if an error did not occur. + * See {@link Probe} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, probeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, loadBalancerName: string, probeName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, loadBalancerName: string, probeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified load balancer inbound nat rule. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. + * Gets all the load balancer probes. * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified load balancer inbound nat rule. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. + * Gets all the load balancer probes. * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -6957,7 +10878,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {InboundNatRule} - The deserialized result object. + * @resolve {LoadBalancerProbeListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -6965,69 +10886,34 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InboundNatRule} [result] - The deserialized result object if an error did not occur. - * See {@link InboundNatRule} for more information. + * {LoadBalancerProbeListResult} [result] - The deserialized result object if an error did not occur. + * See {@link LoadBalancerProbeListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * NetworkInterfaces + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface NetworkInterfaces { /** - * Creates or updates a load balancer inbound nat rule. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} inboundNatRuleName The name of the inbound nat rule. - * - * @param {object} inboundNatRuleParameters Parameters supplied to the create - * or update inbound nat rule operation. - * - * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A - * reference to frontend IP addresses. - * - * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] - * Resource ID. - * - * @param {string} [inboundNatRuleParameters.protocol] Possible values include: - * 'Udp', 'Tcp', 'All' - * - * @param {number} [inboundNatRuleParameters.frontendPort] The port for the - * external endpoint. Port numbers for each rule must be unique within the Load - * Balancer. Acceptable values range from 1 to 65534. - * - * @param {number} [inboundNatRuleParameters.backendPort] The port used for the - * internal endpoint. Acceptable values range from 1 to 65535. - * - * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout - * for the TCP idle connection. The value can be set between 4 and 30 minutes. - * The default value is 4 minutes. This element is only used when the protocol - * is set to TCP. - * - * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a - * virtual machine's endpoint for the floating IP capability required to - * configure a SQL AlwaysOn Availability Group. This setting is required when - * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't - * be changed after you create the endpoint. - * - * @param {string} [inboundNatRuleParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. - * - * @param {string} [inboundNatRuleParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [inboundNatRuleParameters.etag] A unique read-only string - * that changes whenever the resource is updated. + * Deletes the specified network interface. * - * @param {string} [inboundNatRuleParameters.id] Resource ID. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -7036,63 +10922,18 @@ export interface InboundNatRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a load balancer inbound nat rule. + * Deletes the specified network interface. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} inboundNatRuleName The name of the inbound nat rule. - * - * @param {object} inboundNatRuleParameters Parameters supplied to the create - * or update inbound nat rule operation. - * - * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A - * reference to frontend IP addresses. - * - * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] - * Resource ID. - * - * @param {string} [inboundNatRuleParameters.protocol] Possible values include: - * 'Udp', 'Tcp', 'All' - * - * @param {number} [inboundNatRuleParameters.frontendPort] The port for the - * external endpoint. Port numbers for each rule must be unique within the Load - * Balancer. Acceptable values range from 1 to 65534. - * - * @param {number} [inboundNatRuleParameters.backendPort] The port used for the - * internal endpoint. Acceptable values range from 1 to 65535. - * - * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout - * for the TCP idle connection. The value can be set between 4 and 30 minutes. - * The default value is 4 minutes. This element is only used when the protocol - * is set to TCP. - * - * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a - * virtual machine's endpoint for the floating IP capability required to - * configure a SQL AlwaysOn Availability Group. This setting is required when - * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't - * be changed after you create the endpoint. - * - * @param {string} [inboundNatRuleParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. - * - * @param {string} [inboundNatRuleParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [inboundNatRuleParameters.etag] A unique read-only string - * that changes whenever the resource is updated. - * - * @param {string} [inboundNatRuleParameters.id] Resource ID. + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -7106,7 +10947,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {InboundNatRule} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7114,51 +10955,50 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InboundNatRule} [result] - The deserialized result object if an error did not occur. - * See {@link InboundNatRule} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified load balancer inbound nat rule. + * Gets information about the specified network interface. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified load balancer inbound nat rule. + * Gets information about the specified network interface. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7169,7 +11009,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {NetworkInterface} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7177,133 +11017,226 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {NetworkInterface} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterface} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkInterfaceName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a load balancer inbound nat rule. + * Creates or updates a network interface. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} inboundNatRuleName The name of the inbound nat rule. - * - * @param {object} inboundNatRuleParameters Parameters supplied to the create - * or update inbound nat rule operation. + * @param {string} networkInterfaceName The name of the network interface. * - * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A - * reference to frontend IP addresses. + * @param {object} parameters Parameters supplied to the create or update + * network interface operation. * - * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] - * Resource ID. + * @param {object} [parameters.virtualMachine] The reference of a virtual + * machine. * - * @param {string} [inboundNatRuleParameters.protocol] Possible values include: - * 'Udp', 'Tcp', 'All' + * @param {string} [parameters.virtualMachine.id] Resource ID. * - * @param {number} [inboundNatRuleParameters.frontendPort] The port for the - * external endpoint. Port numbers for each rule must be unique within the Load - * Balancer. Acceptable values range from 1 to 65534. + * @param {object} [parameters.networkSecurityGroup] The reference of the + * NetworkSecurityGroup resource. * - * @param {number} [inboundNatRuleParameters.backendPort] The port used for the - * internal endpoint. Acceptable values range from 1 to 65535. + * @param {array} [parameters.networkSecurityGroup.securityRules] A collection + * of security rules of the network security group. * - * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout - * for the TCP idle connection. The value can be set between 4 and 30 minutes. - * The default value is 4 minutes. This element is only used when the protocol - * is set to TCP. + * @param {array} [parameters.networkSecurityGroup.defaultSecurityRules] The + * default security rules of network security group. * - * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a - * virtual machine's endpoint for the floating IP capability required to - * configure a SQL AlwaysOn Availability Group. This setting is required when - * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't - * be changed after you create the endpoint. + * @param {string} [parameters.networkSecurityGroup.resourceGuid] The resource + * GUID property of the network security group resource. * - * @param {string} [inboundNatRuleParameters.provisioningState] Gets the + * @param {string} [parameters.networkSecurityGroup.provisioningState] The * provisioning state of the public IP resource. Possible values are: * 'Updating', 'Deleting', and 'Failed'. * - * @param {string} [inboundNatRuleParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. + * @param {string} [parameters.networkSecurityGroup.etag] A unique read-only + * string that changes whenever the resource is updated. * - * @param {string} [inboundNatRuleParameters.etag] A unique read-only string - * that changes whenever the resource is updated. + * @param {string} [parameters.networkSecurityGroup.id] Resource ID. + * + * @param {string} [parameters.networkSecurityGroup.location] Resource + * location. + * + * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. + * + * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of + * the network interface. + * + * @param {object} [parameters.dnsSettings] The DNS settings in network + * interface. + * + * @param {array} [parameters.dnsSettings.dnsServers] List of DNS servers IP + * addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS + * resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it + * must be the only value in dnsServers collection. + * + * @param {array} [parameters.dnsSettings.appliedDnsServers] If the VM that + * uses this NIC is part of an Availability Set, then this list will have the + * union of all DNS servers from all NICs that are part of the Availability + * Set. This property is what is configured on each of those VMs. + * + * @param {string} [parameters.dnsSettings.internalDnsNameLabel] Relative DNS + * name for this NIC used for internal communications between VMs in the same + * virtual network. + * + * @param {string} [parameters.dnsSettings.internalFqdn] Fully qualified DNS + * name supporting internal communications between VMs in the same virtual + * network. + * + * @param {string} [parameters.dnsSettings.internalDomainNameSuffix] Even if + * internalDnsNameLabel is not specified, a DNS entry is created for the + * primary NIC of the VM. This DNS name can be constructed by concatenating the + * VM name with the value of internalDomainNameSuffix. + * + * @param {string} [parameters.macAddress] The MAC address of the network + * interface. + * + * @param {boolean} [parameters.primary] Gets whether this is a primary network + * interface on a virtual machine. + * + * @param {boolean} [parameters.enableAcceleratedNetworking] If the network + * interface is accelerated networking enabled. + * + * @param {boolean} [parameters.enableIPForwarding] Indicates whether IP + * forwarding is enabled on this network interface. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * network interface resource. + * + * @param {string} [parameters.provisioningState] The provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a network interface. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. + * + * @param {object} parameters Parameters supplied to the create or update + * network interface operation. + * + * @param {object} [parameters.virtualMachine] The reference of a virtual + * machine. + * + * @param {string} [parameters.virtualMachine.id] Resource ID. + * + * @param {object} [parameters.networkSecurityGroup] The reference of the + * NetworkSecurityGroup resource. + * + * @param {array} [parameters.networkSecurityGroup.securityRules] A collection + * of security rules of the network security group. + * + * @param {array} [parameters.networkSecurityGroup.defaultSecurityRules] The + * default security rules of network security group. + * + * @param {string} [parameters.networkSecurityGroup.resourceGuid] The resource + * GUID property of the network security group resource. + * + * @param {string} [parameters.networkSecurityGroup.provisioningState] The + * provisioning state of the public IP resource. Possible values are: + * 'Updating', 'Deleting', and 'Failed'. * - * @param {string} [inboundNatRuleParameters.id] Resource ID. + * @param {string} [parameters.networkSecurityGroup.etag] A unique read-only + * string that changes whenever the resource is updated. * - * @param {object} [options] Optional Parameters. + * @param {string} [parameters.networkSecurityGroup.id] Resource ID. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.networkSecurityGroup.location] Resource + * location. * - * @returns {Promise} A promise is returned + * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of + * the network interface. * - * @reject {Error|ServiceError} - The error object. - */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Creates or updates a load balancer inbound nat rule. + * @param {object} [parameters.dnsSettings] The DNS settings in network + * interface. * - * @param {string} resourceGroupName The name of the resource group. + * @param {array} [parameters.dnsSettings.dnsServers] List of DNS servers IP + * addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS + * resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it + * must be the only value in dnsServers collection. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {array} [parameters.dnsSettings.appliedDnsServers] If the VM that + * uses this NIC is part of an Availability Set, then this list will have the + * union of all DNS servers from all NICs that are part of the Availability + * Set. This property is what is configured on each of those VMs. * - * @param {string} inboundNatRuleName The name of the inbound nat rule. + * @param {string} [parameters.dnsSettings.internalDnsNameLabel] Relative DNS + * name for this NIC used for internal communications between VMs in the same + * virtual network. * - * @param {object} inboundNatRuleParameters Parameters supplied to the create - * or update inbound nat rule operation. + * @param {string} [parameters.dnsSettings.internalFqdn] Fully qualified DNS + * name supporting internal communications between VMs in the same virtual + * network. * - * @param {object} [inboundNatRuleParameters.frontendIPConfiguration] A - * reference to frontend IP addresses. + * @param {string} [parameters.dnsSettings.internalDomainNameSuffix] Even if + * internalDnsNameLabel is not specified, a DNS entry is created for the + * primary NIC of the VM. This DNS name can be constructed by concatenating the + * VM name with the value of internalDomainNameSuffix. * - * @param {string} [inboundNatRuleParameters.frontendIPConfiguration.id] - * Resource ID. + * @param {string} [parameters.macAddress] The MAC address of the network + * interface. * - * @param {string} [inboundNatRuleParameters.protocol] Possible values include: - * 'Udp', 'Tcp', 'All' + * @param {boolean} [parameters.primary] Gets whether this is a primary network + * interface on a virtual machine. * - * @param {number} [inboundNatRuleParameters.frontendPort] The port for the - * external endpoint. Port numbers for each rule must be unique within the Load - * Balancer. Acceptable values range from 1 to 65534. + * @param {boolean} [parameters.enableAcceleratedNetworking] If the network + * interface is accelerated networking enabled. * - * @param {number} [inboundNatRuleParameters.backendPort] The port used for the - * internal endpoint. Acceptable values range from 1 to 65535. + * @param {boolean} [parameters.enableIPForwarding] Indicates whether IP + * forwarding is enabled on this network interface. * - * @param {number} [inboundNatRuleParameters.idleTimeoutInMinutes] The timeout - * for the TCP idle connection. The value can be set between 4 and 30 minutes. - * The default value is 4 minutes. This element is only used when the protocol - * is set to TCP. + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * network interface resource. * - * @param {boolean} [inboundNatRuleParameters.enableFloatingIP] Configures a - * virtual machine's endpoint for the floating IP capability required to - * configure a SQL AlwaysOn Availability Group. This setting is required when - * using the SQL AlwaysOn Availability Groups in SQL server. This setting can't - * be changed after you create the endpoint. + * @param {string} [parameters.provisioningState] The provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. * - * @param {string} [inboundNatRuleParameters.provisioningState] Gets the - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. * - * @param {string} [inboundNatRuleParameters.name] Gets name of the resource - * that is unique within a resource group. This name can be used to access the - * resource. + * @param {string} [parameters.id] Resource ID. * - * @param {string} [inboundNatRuleParameters.etag] A unique read-only string - * that changes whenever the resource is updated. + * @param {string} [parameters.location] Resource location. * - * @param {string} [inboundNatRuleParameters.id] Resource ID. + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -7317,7 +11250,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {InboundNatRule} - The deserialized result object. + * @resolve {NetworkInterface} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7325,23 +11258,29 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InboundNatRule} [result] - The deserialized result object if an error did not occur. - * See {@link InboundNatRule} for more information. + * {NetworkInterface} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterface} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, loadBalancerName: string, inboundNatRuleName: string, inboundNatRuleParameters: models.InboundNatRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the inbound nat rules in a load balancer. + * Updates a network interface tags. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. + * + * @param {object} parameters Parameters supplied to update network interface + * tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -7350,17 +11289,23 @@ export interface InboundNatRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the inbound nat rules in a load balancer. + * Updates a network interface tags. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. + * + * @param {object} parameters Parameters supplied to update network interface + * tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -7374,7 +11319,7 @@ export interface InboundNatRules { * * {Promise} A promise is returned. * - * @resolve {InboundNatRuleListResult} - The deserialized result object. + * @resolve {NetworkInterface} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7382,34 +11327,20 @@ export interface InboundNatRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {InboundNatRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link InboundNatRuleListResult} for more - * information. + * {NetworkInterface} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterface} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * LoadBalancerLoadBalancingRules - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface LoadBalancerLoadBalancingRules { + updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancing rules in a load balancer. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. + * Gets all network interfaces in a subscription. * * @param {object} [options] Optional Parameters. * @@ -7418,18 +11349,14 @@ export interface LoadBalancerLoadBalancingRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancing rules in a load balancer. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} loadBalancerName The name of the load balancer. + * Gets all network interfaces in a subscription. * * @param {object} [options] Optional Parameters. * @@ -7443,7 +11370,7 @@ export interface LoadBalancerLoadBalancingRules { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerLoadBalancingRuleListResult} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7451,28 +11378,24 @@ export interface LoadBalancerLoadBalancingRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerLoadBalancingRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerLoadBalancingRuleListResult} for - * more information. + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified load balancer load balancing rule. + * Gets all network interfaces in a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} loadBalancingRuleName The name of the load balancing rule. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -7480,21 +11403,17 @@ export interface LoadBalancerLoadBalancingRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified load balancer load balancing rule. + * Gets all network interfaces in a resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. - * - * @param {string} loadBalancingRuleName The name of the load balancing rule. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -7507,7 +11426,7 @@ export interface LoadBalancerLoadBalancingRules { * * {Promise} A promise is returned. * - * @resolve {LoadBalancingRule} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7515,23 +11434,25 @@ export interface LoadBalancerLoadBalancingRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancingRule} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancingRule} for more information. + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, loadBalancerName: string, loadBalancingRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancing rules in a load balancer. + * Gets all route tables applied to a network interface. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -7540,17 +11461,18 @@ export interface LoadBalancerLoadBalancingRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getEffectiveRouteTableWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancing rules in a load balancer. + * Gets all route tables applied to a network interface. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -7564,42 +11486,33 @@ export interface LoadBalancerLoadBalancingRules { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerLoadBalancingRuleListResult} - The deserialized result object. + * @resolve {EffectiveRouteListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * * {ServiceCallback} optionalCallback(err, result, request, response) * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {LoadBalancerLoadBalancingRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerLoadBalancingRuleListResult} for - * more information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * LoadBalancerNetworkInterfaces - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface LoadBalancerNetworkInterfaces { + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {EffectiveRouteListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EffectiveRouteListResult} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + getEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets associated load balancer network interfaces. + * Gets all network security groups applied to a network interface. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -7608,18 +11521,18 @@ export interface LoadBalancerNetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listEffectiveNetworkSecurityGroupsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets associated load balancer network interfaces. + * Gets all network security groups applied to a network interface. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -7633,7 +11546,7 @@ export interface LoadBalancerNetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. + * @resolve {EffectiveNetworkSecurityGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7641,24 +11554,29 @@ export interface LoadBalancerNetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more - * information. + * {EffectiveNetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link EffectiveNetworkSecurityGroupListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + listEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets associated load balancer network interfaces. + * Gets information about all network interfaces in a virtual machine in a + * virtual machine scale set. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. + * + * @param {string} virtualmachineIndex The virtual machine index. * * @param {object} [options] Optional Parameters. * @@ -7671,13 +11589,18 @@ export interface LoadBalancerNetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listVirtualMachineScaleSetVMNetworkInterfacesWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets associated load balancer network interfaces. + * Gets information about all network interfaces in a virtual machine in a + * virtual machine scale set. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. + * + * @param {string} virtualmachineIndex The virtual machine index. * * @param {object} [options] Optional Parameters. * @@ -7707,26 +11630,18 @@ export interface LoadBalancerNetworkInterfaces { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * LoadBalancerProbes - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface LoadBalancerProbes { + listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, callback: ServiceCallback): void; + listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancer probes. + * Gets all network interfaces in a virtual machine scale set. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. * * @param {object} [options] Optional Parameters. * @@ -7735,18 +11650,19 @@ export interface LoadBalancerProbes { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listVirtualMachineScaleSetNetworkInterfacesWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancer probes. + * Gets all network interfaces in a virtual machine scale set. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. * * @param {object} [options] Optional Parameters. * @@ -7760,7 +11676,7 @@ export interface LoadBalancerProbes { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerProbeListResult} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7768,52 +11684,62 @@ export interface LoadBalancerProbes { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerProbeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerProbeListResult} for more + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, loadBalancerName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, loadBalancerName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, loadBalancerName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, callback: ServiceCallback): void; + listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets load balancer probe. + * Get the specified network interface in a virtual machine scale set. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. * - * @param {string} probeName The name of the probe. + * @param {string} virtualmachineIndex The virtual machine index. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, loadBalancerName: string, probeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getVirtualMachineScaleSetNetworkInterfaceWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets load balancer probe. + * Get the specified network interface in a virtual machine scale set. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} loadBalancerName The name of the load balancer. + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. * - * @param {string} probeName The name of the probe. + * @param {string} virtualmachineIndex The virtual machine index. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7824,7 +11750,7 @@ export interface LoadBalancerProbes { * * {Promise} A promise is returned. * - * @resolve {Probe} - The deserialized result object. + * @resolve {NetworkInterface} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7832,45 +11758,63 @@ export interface LoadBalancerProbes { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Probe} [result] - The deserialized result object if an error did not occur. - * See {@link Probe} for more information. + * {NetworkInterface} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterface} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, loadBalancerName: string, probeName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, loadBalancerName: string, probeName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, loadBalancerName: string, probeName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, callback: ServiceCallback): void; + getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all the load balancer probes. + * Get the specified network interface ip configuration in a virtual machine + * scale set. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. + * + * @param {string} virtualmachineIndex The virtual machine index. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listVirtualMachineScaleSetIpConfigurationsWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all the load balancer probes. + * Get the specified network interface ip configuration in a virtual machine + * scale set. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. + * + * @param {string} virtualmachineIndex The virtual machine index. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7881,7 +11825,7 @@ export interface LoadBalancerProbes { * * {Promise} A promise is returned. * - * @resolve {LoadBalancerProbeListResult} - The deserialized result object. + * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7889,57 +11833,68 @@ export interface LoadBalancerProbes { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {LoadBalancerProbeListResult} [result] - The deserialized result object if an error did not occur. - * See {@link LoadBalancerProbeListResult} for more - * information. + * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceIPConfigurationListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * NetworkInterfaces - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface NetworkInterfaces { + listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, callback: ServiceCallback): void; + listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified network interface. + * Get the specified network interface ip configuration in a virtual machine + * scale set. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. + * + * @param {string} virtualmachineIndex The virtual machine index. + * * @param {string} networkInterfaceName The name of the network interface. * + * @param {string} ipConfigurationName The name of the ip configuration. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getVirtualMachineScaleSetIpConfigurationWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network interface. + * Get the specified network interface ip configuration in a virtual machine + * scale set. * * @param {string} resourceGroupName The name of the resource group. * + * @param {string} virtualMachineScaleSetName The name of the virtual machine + * scale set. + * + * @param {string} virtualmachineIndex The virtual machine index. + * * @param {string} networkInterfaceName The name of the network interface. * + * @param {string} ipConfigurationName The name of the ip configuration. + * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -7950,7 +11905,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {NetworkInterfaceIPConfiguration} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -7958,19 +11913,21 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {NetworkInterfaceIPConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceIPConfiguration} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, callback: ServiceCallback): void; + getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets information about the specified network interface. + * Deletes the specified network interface. * * @param {string} resourceGroupName The name of the resource group. * @@ -7978,21 +11935,19 @@ export interface NetworkInterfaces { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets information about the specified network interface. + * Deletes the specified network interface. * * @param {string} resourceGroupName The name of the resource group. * @@ -8000,8 +11955,6 @@ export interface NetworkInterfaces { * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8012,7 +11965,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterface} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8020,16 +11973,15 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterface} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterface} for more information. - * + * {null} [result] - The deserialized result object if an error did not occur. + * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkInterfaceName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8141,7 +12093,7 @@ export interface NetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Creates or updates a network interface. @@ -8268,9 +12220,9 @@ export interface NetworkInterfaces { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8296,7 +12248,7 @@ export interface NetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Updates a network interface tags. @@ -8337,117 +12289,9 @@ export interface NetworkInterfaces { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets all network interfaces in a subscription. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets all network interfaces in a subscription. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Gets all network interfaces in a resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets all network interfaces in a resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8468,7 +12312,7 @@ export interface NetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - getEffectiveRouteTableWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetEffectiveRouteTableWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all route tables applied to a network interface. @@ -8505,9 +12349,9 @@ export interface NetworkInterfaces { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - getEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -8528,7 +12372,7 @@ export interface NetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - listEffectiveNetworkSecurityGroupsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginListEffectiveNetworkSecurityGroupsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets all network security groups applied to a network interface. @@ -8565,21 +12409,16 @@ export interface NetworkInterfaces { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - listEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets information about all network interfaces in a virtual machine in a - * virtual machine scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. + * Gets all network interfaces in a subscription. * - * @param {string} virtualmachineIndex The virtual machine index. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8592,18 +12431,13 @@ export interface NetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - listVirtualMachineScaleSetVMNetworkInterfacesWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets information about all network interfaces in a virtual machine in a - * virtual machine scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. + * Gets all network interfaces in a subscription. * - * @param {string} virtualmachineIndex The virtual machine index. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8633,18 +12467,16 @@ export interface NetworkInterfaces { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, callback: ServiceCallback): void; - listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network interfaces in a virtual machine scale set. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all network interfaces in a resource group. * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8657,92 +12489,16 @@ export interface NetworkInterfaces { * * @reject {Error|ServiceError} - The error object. */ - listVirtualMachineScaleSetNetworkInterfacesWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Gets all network interfaces in a virtual machine scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {object} [options] Optional Parameters. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @param {ServiceCallback} [optionalCallback] - The optional callback. - * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. - * - * {Promise} A promise is returned. - * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - * - * {ServiceCallback} optionalCallback(err, result, request, response) - * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. - * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more - * information. - * - * {WebResource} [request] - The HTTP Request object if an error did not occur. - * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, callback: ServiceCallback): void; - listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName: string, virtualMachineScaleSetName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - - - /** - * Get the specified network interface in a virtual machine scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {string} virtualmachineIndex The virtual machine index. - * - * @param {string} networkInterfaceName The name of the network interface. - * - * @param {object} [options] Optional Parameters. - * - * @param {string} [options.expand] Expands referenced resources. - * - * @param {object} [options.customHeaders] Headers that will be added to the - * request - * - * @returns {Promise} A promise is returned - * - * @resolve {HttpOperationResponse} - The deserialized result object. - * - * @reject {Error|ServiceError} - The error object. - */ - getVirtualMachineScaleSetNetworkInterfaceWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the specified network interface in a virtual machine scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {string} virtualmachineIndex The virtual machine index. + * Gets all network interfaces in a resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8753,7 +12509,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterface} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8761,63 +12517,48 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterface} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterface} for more information. + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, callback: ServiceCallback): void; - getVirtualMachineScaleSetNetworkInterface(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get the specified network interface ip configuration in a virtual machine - * scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {string} virtualmachineIndex The virtual machine index. + * Gets information about all network interfaces in a virtual machine in a + * virtual machine scale set. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listVirtualMachineScaleSetIpConfigurationsWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listVirtualMachineScaleSetVMNetworkInterfacesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the specified network interface ip configuration in a virtual machine - * scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {string} virtualmachineIndex The virtual machine index. + * Gets information about all network interfaces in a virtual machine in a + * virtual machine scale set. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8828,7 +12569,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8836,68 +12577,46 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceIPConfigurationListResult} - * for more information. + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, callback: ServiceCallback): void; - listVirtualMachineScaleSetIpConfigurations(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listVirtualMachineScaleSetVMNetworkInterfacesNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVirtualMachineScaleSetVMNetworkInterfacesNext(nextPageLink: string, callback: ServiceCallback): void; + listVirtualMachineScaleSetVMNetworkInterfacesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get the specified network interface ip configuration in a virtual machine - * scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {string} virtualmachineIndex The virtual machine index. - * - * @param {string} networkInterfaceName The name of the network interface. + * Gets all network interfaces in a virtual machine scale set. * - * @param {string} ipConfigurationName The name of the ip configuration. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getVirtualMachineScaleSetIpConfigurationWithHttpOperationResponse(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + listVirtualMachineScaleSetNetworkInterfacesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the specified network interface ip configuration in a virtual machine - * scale set. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} virtualMachineScaleSetName The name of the virtual machine - * scale set. - * - * @param {string} virtualmachineIndex The virtual machine index. - * - * @param {string} networkInterfaceName The name of the network interface. + * Gets all network interfaces in a virtual machine scale set. * - * @param {string} ipConfigurationName The name of the ip configuration. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * - * @param {string} [options.expand] Expands referenced resources. - * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -8908,7 +12627,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceIPConfiguration} - The deserialized result object. + * @resolve {NetworkInterfaceListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8916,25 +12635,25 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceIPConfiguration} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceIPConfiguration} for more + * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, callback: ServiceCallback): void; - getVirtualMachineScaleSetIpConfiguration(resourceGroupName: string, virtualMachineScaleSetName: string, virtualmachineIndex: string, networkInterfaceName: string, ipConfigurationName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listVirtualMachineScaleSetNetworkInterfacesNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVirtualMachineScaleSetNetworkInterfacesNext(nextPageLink: string, callback: ServiceCallback): void; + listVirtualMachineScaleSetNetworkInterfacesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified network interface. - * - * @param {string} resourceGroupName The name of the resource group. + * Get the specified network interface ip configuration in a virtual machine + * scale set. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8943,18 +12662,18 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listVirtualMachineScaleSetIpConfigurationsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network interface. - * - * @param {string} resourceGroupName The name of the resource group. + * Get the specified network interface ip configuration in a virtual machine + * scale set. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -8968,7 +12687,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -8976,114 +12695,96 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceIPConfigurationListResult} + * for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listVirtualMachineScaleSetIpConfigurationsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listVirtualMachineScaleSetIpConfigurationsNext(nextPageLink: string, callback: ServiceCallback): void; + listVirtualMachineScaleSetIpConfigurationsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * NetworkInterfaceIPConfigurations + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface NetworkInterfaceIPConfigurations { /** - * Creates or updates a network interface. + * Get all ip configurations in a network interface * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkInterfaceName The name of the network interface. * - * @param {object} parameters Parameters supplied to the create or update - * network interface operation. - * - * @param {object} [parameters.virtualMachine] The reference of a virtual - * machine. - * - * @param {string} [parameters.virtualMachine.id] Resource ID. - * - * @param {object} [parameters.networkSecurityGroup] The reference of the - * NetworkSecurityGroup resource. - * - * @param {array} [parameters.networkSecurityGroup.securityRules] A collection - * of security rules of the network security group. - * - * @param {array} [parameters.networkSecurityGroup.defaultSecurityRules] The - * default security rules of network security group. - * - * @param {string} [parameters.networkSecurityGroup.resourceGuid] The resource - * GUID property of the network security group resource. - * - * @param {string} [parameters.networkSecurityGroup.provisioningState] The - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.networkSecurityGroup.etag] A unique read-only - * string that changes whenever the resource is updated. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.networkSecurityGroup.id] Resource ID. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.networkSecurityGroup.location] Resource - * location. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get all ip configurations in a network interface * - * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of - * the network interface. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.dnsSettings] The DNS settings in network - * interface. + * @param {string} networkInterfaceName The name of the network interface. * - * @param {array} [parameters.dnsSettings.dnsServers] List of DNS servers IP - * addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS - * resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it - * must be the only value in dnsServers collection. + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.dnsSettings.appliedDnsServers] If the VM that - * uses this NIC is part of an Availability Set, then this list will have the - * union of all DNS servers from all NICs that are part of the Availability - * Set. This property is what is configured on each of those VMs. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.dnsSettings.internalDnsNameLabel] Relative DNS - * name for this NIC used for internal communications between VMs in the same - * virtual network. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.dnsSettings.internalFqdn] Fully qualified DNS - * name supporting internal communications between VMs in the same virtual - * network. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.dnsSettings.internalDomainNameSuffix] Even if - * internalDnsNameLabel is not specified, a DNS entry is created for the - * primary NIC of the VM. This DNS name can be constructed by concatenating the - * VM name with the value of internalDomainNameSuffix. + * {Promise} A promise is returned. * - * @param {string} [parameters.macAddress] The MAC address of the network - * interface. + * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. * - * @param {boolean} [parameters.primary] Gets whether this is a primary network - * interface on a virtual machine. + * @reject {Error|ServiceError} - The error object. * - * @param {boolean} [parameters.enableAcceleratedNetworking] If the network - * interface is accelerated networking enabled. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {boolean} [parameters.enableIPForwarding] Indicates whether IP - * forwarding is enabled on this network interface. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * network interface resource. + * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceIPConfigurationListResult} + * for more information. * - * @param {string} [parameters.provisioningState] The provisioning state of the - * public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + list(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets the specified network interface ip configuration. * - * @param {string} [parameters.id] Resource ID. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.location] Resource location. + * @param {string} networkInterfaceName The name of the network interface. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} ipConfigurationName The name of the ip configuration name. * * @param {object} [options] Optional Parameters. * @@ -9092,109 +12793,147 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a network interface. + * Gets the specified network interface ip configuration. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkInterfaceName The name of the network interface. * - * @param {object} parameters Parameters supplied to the create or update - * network interface operation. + * @param {string} ipConfigurationName The name of the ip configuration name. * - * @param {object} [parameters.virtualMachine] The reference of a virtual - * machine. + * @param {object} [options] Optional Parameters. * - * @param {string} [parameters.virtualMachine.id] Resource ID. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {object} [parameters.networkSecurityGroup] The reference of the - * NetworkSecurityGroup resource. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {array} [parameters.networkSecurityGroup.securityRules] A collection - * of security rules of the network security group. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {array} [parameters.networkSecurityGroup.defaultSecurityRules] The - * default security rules of network security group. + * {Promise} A promise is returned. * - * @param {string} [parameters.networkSecurityGroup.resourceGuid] The resource - * GUID property of the network security group resource. + * @resolve {NetworkInterfaceIPConfiguration} - The deserialized result object. * - * @param {string} [parameters.networkSecurityGroup.provisioningState] The - * provisioning state of the public IP resource. Possible values are: - * 'Updating', 'Deleting', and 'Failed'. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.networkSecurityGroup.etag] A unique read-only - * string that changes whenever the resource is updated. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {string} [parameters.networkSecurityGroup.id] Resource ID. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * @param {string} [parameters.networkSecurityGroup.location] Resource - * location. + * {NetworkInterfaceIPConfiguration} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceIPConfiguration} for more + * information. * - * @param {object} [parameters.networkSecurityGroup.tags] Resource tags. + * {WebResource} [request] - The HTTP Request object if an error did not occur. * - * @param {array} [parameters.ipConfigurations] A list of IPConfigurations of - * the network interface. + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Get all ip configurations in a network interface * - * @param {object} [parameters.dnsSettings] The DNS settings in network - * interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {array} [parameters.dnsSettings.dnsServers] List of DNS servers IP - * addresses. Use 'AzureProvidedDNS' to switch to azure provided DNS - * resolution. 'AzureProvidedDNS' value cannot be combined with other IPs, it - * must be the only value in dnsServers collection. + * @param {object} [options] Optional Parameters. * - * @param {array} [parameters.dnsSettings.appliedDnsServers] If the VM that - * uses this NIC is part of an Availability Set, then this list will have the - * union of all DNS servers from all NICs that are part of the Availability - * Set. This property is what is configured on each of those VMs. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {string} [parameters.dnsSettings.internalDnsNameLabel] Relative DNS - * name for this NIC used for internal communications between VMs in the same - * virtual network. + * @returns {Promise} A promise is returned * - * @param {string} [parameters.dnsSettings.internalFqdn] Fully qualified DNS - * name supporting internal communications between VMs in the same virtual - * network. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * @param {string} [parameters.dnsSettings.internalDomainNameSuffix] Even if - * internalDnsNameLabel is not specified, a DNS entry is created for the - * primary NIC of the VM. This DNS name can be constructed by concatenating the - * VM name with the value of internalDomainNameSuffix. + * @reject {Error|ServiceError} - The error object. + */ + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Get all ip configurations in a network interface * - * @param {string} [parameters.macAddress] The MAC address of the network - * interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * - * @param {boolean} [parameters.primary] Gets whether this is a primary network - * interface on a virtual machine. + * @param {object} [options] Optional Parameters. * - * @param {boolean} [parameters.enableAcceleratedNetworking] If the network - * interface is accelerated networking enabled. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * @param {boolean} [parameters.enableIPForwarding] Indicates whether IP - * forwarding is enabled on this network interface. + * @param {ServiceCallback} [optionalCallback] - The optional callback. * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * network interface resource. + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. * - * @param {string} [parameters.provisioningState] The provisioning state of the - * public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. + * {Promise} A promise is returned. * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. + * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. * - * @param {string} [parameters.id] Resource ID. + * @reject {Error|ServiceError} - The error object. * - * @param {string} [parameters.location] Resource location. + * {ServiceCallback} optionalCallback(err, result, request, response) * - * @param {object} [parameters.tags] Resource tags. + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceIPConfigurationListResult} + * for more information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * NetworkInterfaceLoadBalancers + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface NetworkInterfaceLoadBalancers { + + + /** + * List all load balancers in a network interface. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + listWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * List all load balancers in a network interface. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkInterfaceName The name of the network interface. * * @param {object} [options] Optional Parameters. * @@ -9208,7 +12947,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterface} - The deserialized result object. + * @resolve {NetworkInterfaceLoadBalancerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9216,29 +12955,24 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterface} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterface} for more information. + * {NetworkInterfaceLoadBalancerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceLoadBalancerListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, networkInterfaceName: string, parameters: models.NetworkInterface, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a network interface tags. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkInterfaceName The name of the network interface. - * - * @param {object} parameters Parameters supplied to update network interface - * tags. + * List all load balancers in a network interface. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -9247,23 +12981,17 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a network interface tags. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkInterfaceName The name of the network interface. - * - * @param {object} parameters Parameters supplied to update network interface - * tags. + * List all load balancers in a network interface. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -9277,7 +13005,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterface} - The deserialized result object. + * @resolve {NetworkInterfaceLoadBalancerListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9285,24 +13013,35 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterface} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterface} for more information. + * {NetworkInterfaceLoadBalancerListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkInterfaceLoadBalancerListResult} for + * more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, networkInterfaceName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * NetworkSecurityGroups + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface NetworkSecurityGroups { /** - * Gets all route tables applied to a network interface. + * Deletes the specified network security group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * @@ -9311,18 +13050,19 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetEffectiveRouteTableWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all route tables applied to a network interface. + * Deletes the specified network security group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * @@ -9336,7 +13076,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {EffectiveRouteListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9344,48 +13084,52 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EffectiveRouteListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EffectiveRouteListResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - beginGetEffectiveRouteTable(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network security groups applied to a network interface. + * Gets the specified network security group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginListEffectiveNetworkSecurityGroupsWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network security groups applied to a network interface. + * Gets the specified network security group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * + * @param {string} [options.expand] Expands referenced resources. + * * @param {object} [options.customHeaders] Headers that will be added to the * request * @@ -9396,7 +13140,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {EffectiveNetworkSecurityGroupListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9404,24 +13148,50 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {EffectiveNetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link EffectiveNetworkSecurityGroupListResult} for - * more information. + * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroup} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - beginListEffectiveNetworkSecurityGroups(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, networkSecurityGroupName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkSecurityGroupName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network interfaces in a subscription. + * Creates or updates a network security group in the specified resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {object} parameters Parameters supplied to the create or update + * network security group operation. + * + * @param {array} [parameters.securityRules] A collection of security rules of + * the network security group. + * + * @param {array} [parameters.defaultSecurityRules] The default security rules + * of network security group. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * network security group resource. + * + * @param {string} [parameters.provisioningState] The provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9430,17 +13200,44 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network interfaces in a subscription. + * Creates or updates a network security group in the specified resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {object} parameters Parameters supplied to the create or update + * network security group operation. + * + * @param {array} [parameters.securityRules] A collection of security rules of + * the network security group. + * + * @param {array} [parameters.defaultSecurityRules] The default security rules + * of network security group. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * network security group resource. + * + * @param {string} [parameters.provisioningState] The provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9454,7 +13251,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9462,24 +13259,30 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more - * information. + * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroup} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network interfaces in a resource group. + * Updates a network security group tags. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {object} parameters Parameters supplied to update network security + * group tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9488,17 +13291,24 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network interfaces in a resource group. + * Updates a network security group tags. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {object} parameters Parameters supplied to update network security + * group tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9512,7 +13322,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9520,25 +13330,20 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more - * information. + * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroup} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets information about all network interfaces in a virtual machine in a - * virtual machine scale set. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * Gets all network security groups in a subscription. * * @param {object} [options] Optional Parameters. * @@ -9547,18 +13352,14 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listVirtualMachineScaleSetVMNetworkInterfacesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets information about all network interfaces in a virtual machine in a - * virtual machine scale set. - * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * Gets all network security groups in a subscription. * * @param {object} [options] Optional Parameters. * @@ -9572,7 +13373,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9580,24 +13381,23 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more + * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroupListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listVirtualMachineScaleSetVMNetworkInterfacesNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVirtualMachineScaleSetVMNetworkInterfacesNext(nextPageLink: string, callback: ServiceCallback): void; - listVirtualMachineScaleSetVMNetworkInterfacesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network interfaces in a virtual machine scale set. + * Gets all network security groups in a resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * @@ -9606,17 +13406,16 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listVirtualMachineScaleSetNetworkInterfacesNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network interfaces in a virtual machine scale set. + * Gets all network security groups in a resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. * * @param {object} [options] Optional Parameters. * @@ -9630,7 +13429,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9638,25 +13437,26 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceListResult} for more + * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroupListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listVirtualMachineScaleSetNetworkInterfacesNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVirtualMachineScaleSetNetworkInterfacesNext(nextPageLink: string, callback: ServiceCallback): void; - listVirtualMachineScaleSetNetworkInterfacesNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get the specified network interface ip configuration in a virtual machine - * scale set. + * Deletes the specified network security group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * @@ -9665,18 +13465,19 @@ export interface NetworkInterfaces { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listVirtualMachineScaleSetIpConfigurationsNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the specified network interface ip configuration in a virtual machine - * scale set. + * Deletes the specified network security group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * @@ -9690,7 +13491,7 @@ export interface NetworkInterfaces { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9698,34 +13499,49 @@ export interface NetworkInterfaces { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceIPConfigurationListResult} - * for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listVirtualMachineScaleSetIpConfigurationsNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listVirtualMachineScaleSetIpConfigurationsNext(nextPageLink: string, callback: ServiceCallback): void; - listVirtualMachineScaleSetIpConfigurationsNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * NetworkInterfaceIPConfigurations - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface NetworkInterfaceIPConfigurations { + beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get all ip configurations in a network interface + * Creates or updates a network security group in the specified resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {object} parameters Parameters supplied to the create or update + * network security group operation. + * + * @param {array} [parameters.securityRules] A collection of security rules of + * the network security group. + * + * @param {array} [parameters.defaultSecurityRules] The default security rules + * of network security group. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * network security group resource. + * + * @param {string} [parameters.provisioningState] The provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9734,18 +13550,44 @@ export interface NetworkInterfaceIPConfigurations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get all ip configurations in a network interface + * Creates or updates a network security group in the specified resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {object} parameters Parameters supplied to the create or update + * network security group operation. + * + * @param {array} [parameters.securityRules] A collection of security rules of + * the network security group. + * + * @param {array} [parameters.defaultSecurityRules] The default security rules + * of network security group. + * + * @param {string} [parameters.resourceGuid] The resource GUID property of the + * network security group resource. + * + * @param {string} [parameters.provisioningState] The provisioning state of the + * public IP resource. Possible values are: 'Updating', 'Deleting', and + * 'Failed'. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9759,7 +13601,7 @@ export interface NetworkInterfaceIPConfigurations { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9767,27 +13609,30 @@ export interface NetworkInterfaceIPConfigurations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceIPConfigurationListResult} - * for more information. + * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroup} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified network interface ip configuration. + * Updates a network security group tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. * - * @param {string} ipConfigurationName The name of the ip configuration name. + * @param {object} parameters Parameters supplied to update network security + * group tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9796,20 +13641,24 @@ export interface NetworkInterfaceIPConfigurations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified network interface ip configuration. + * Updates a network security group tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} networkSecurityGroupName The name of the network security + * group. * - * @param {string} ipConfigurationName The name of the ip configuration name. + * @param {object} parameters Parameters supplied to update network security + * group tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -9823,7 +13672,7 @@ export interface NetworkInterfaceIPConfigurations { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceIPConfiguration} - The deserialized result object. + * @resolve {NetworkSecurityGroup} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9831,21 +13680,20 @@ export interface NetworkInterfaceIPConfigurations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceIPConfiguration} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceIPConfiguration} for more - * information. + * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroup} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkInterfaceName: string, ipConfigurationName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get all ip configurations in a network interface + * Gets all network security groups in a subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -9857,14 +13705,14 @@ export interface NetworkInterfaceIPConfigurations { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get all ip configurations in a network interface + * Gets all network security groups in a subscription. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -9881,7 +13729,7 @@ export interface NetworkInterfaceIPConfigurations { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceIPConfigurationListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9889,34 +13737,24 @@ export interface NetworkInterfaceIPConfigurations { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceIPConfigurationListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceIPConfigurationListResult} - * for more information. + * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroupListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * NetworkInterfaceLoadBalancers - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface NetworkInterfaceLoadBalancers { + listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAllNext(nextPageLink: string, callback: ServiceCallback): void; + listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * List all load balancers in a network interface. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all network security groups in a resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -9925,18 +13763,17 @@ export interface NetworkInterfaceLoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List all load balancers in a network interface. - * - * @param {string} resourceGroupName The name of the resource group. + * Gets all network security groups in a resource group. * - * @param {string} networkInterfaceName The name of the network interface. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -9950,7 +13787,7 @@ export interface NetworkInterfaceLoadBalancers { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceLoadBalancerListResult} - The deserialized result object. + * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -9958,24 +13795,37 @@ export interface NetworkInterfaceLoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceLoadBalancerListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceLoadBalancerListResult} for - * more information. + * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkSecurityGroupListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, networkInterfaceName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, networkInterfaceName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, networkInterfaceName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * SecurityRules + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface SecurityRules { /** - * List all load balancers in a network interface. + * Deletes the specified network security rule. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {string} securityRuleName The name of the security rule. * * @param {object} [options] Optional Parameters. * @@ -9984,17 +13834,21 @@ export interface NetworkInterfaceLoadBalancers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * List all load balancers in a network interface. + * Deletes the specified network security rule. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {string} securityRuleName The name of the security rule. * * @param {object} [options] Optional Parameters. * @@ -10008,7 +13862,7 @@ export interface NetworkInterfaceLoadBalancers { * * {Promise} A promise is returned. * - * @resolve {NetworkInterfaceLoadBalancerListResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10016,36 +13870,27 @@ export interface NetworkInterfaceLoadBalancers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkInterfaceLoadBalancerListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkInterfaceLoadBalancerListResult} for - * more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * NetworkSecurityGroups - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface NetworkSecurityGroups { + deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified network security group. + * Get the specified network security rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * + * @param {string} securityRuleName The name of the security rule. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -10053,20 +13898,22 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network security group. + * Get the specified network security rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * + * @param {string} securityRuleName The name of the security rule. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -10079,7 +13926,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SecurityRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10087,51 +13934,200 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SecurityRule} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified network security group. + * Creates or updates a security rule in the specified network security group. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} [options] Optional Parameters. + * @param {string} securityRuleName The name of the security rule. * - * @param {string} [options.expand] Expands referenced resources. + * @param {object} securityRuleParameters Parameters supplied to the create or + * update network security rule operation. + * + * @param {string} [securityRuleParameters.description] A description for this + * rule. Restricted to 140 chars. + * + * @param {string} securityRuleParameters.protocol Network protocol this rule + * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values + * include: 'Tcp', 'Udp', '*' + * + * @param {string} [securityRuleParameters.sourcePortRange] The source port or + * range. Integer or range between 0 and 65535. Asterix '*' can also be used to + * match all ports. + * + * @param {string} [securityRuleParameters.destinationPortRange] The + * destination port or range. Integer or range between 0 and 65535. Asterix '*' + * can also be used to match all ports. + * + * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or + * source IP range. Asterix '*' can also be used to match all source IPs. + * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + * can also be used. If this is an ingress rule, specifies where network + * traffic originates from. + * + * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or + * source IP ranges. + * + * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The + * application security group specified as source. + * + * @param {string} [securityRuleParameters.destinationAddressPrefix] The + * destination address prefix. CIDR or destination IP range. Asterix '*' can + * also be used to match all source IPs. Default tags such as 'VirtualNetwork', + * 'AzureLoadBalancer' and 'Internet' can also be used. + * + * @param {array} [securityRuleParameters.destinationAddressPrefixes] The + * destination address prefixes. CIDR or destination IP ranges. + * + * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] + * The application security group specified as destination. + * + * @param {array} [securityRuleParameters.sourcePortRanges] The source port + * ranges. + * + * @param {array} [securityRuleParameters.destinationPortRanges] The + * destination port ranges. + * + * @param {string} securityRuleParameters.access The network traffic is allowed + * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: + * 'Allow', 'Deny' + * + * @param {number} [securityRuleParameters.priority] The priority of the rule. + * The value can be between 100 and 4096. The priority number must be unique + * for each rule in the collection. The lower the priority number, the higher + * the priority of the rule. + * + * @param {string} securityRuleParameters.direction The direction of the rule. + * The direction specifies if rule will be evaluated on incoming or outcoming + * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values + * include: 'Inbound', 'Outbound' + * + * @param {string} [securityRuleParameters.provisioningState] The provisioning + * state of the public IP resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * + * @param {string} [securityRuleParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [securityRuleParameters.etag] A unique read-only string that + * changes whenever the resource is updated. + * + * @param {string} [securityRuleParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified network security group. + * Creates or updates a security rule in the specified network security group. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} [options] Optional Parameters. + * @param {string} securityRuleName The name of the security rule. * - * @param {string} [options.expand] Expands referenced resources. + * @param {object} securityRuleParameters Parameters supplied to the create or + * update network security rule operation. + * + * @param {string} [securityRuleParameters.description] A description for this + * rule. Restricted to 140 chars. + * + * @param {string} securityRuleParameters.protocol Network protocol this rule + * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values + * include: 'Tcp', 'Udp', '*' + * + * @param {string} [securityRuleParameters.sourcePortRange] The source port or + * range. Integer or range between 0 and 65535. Asterix '*' can also be used to + * match all ports. + * + * @param {string} [securityRuleParameters.destinationPortRange] The + * destination port or range. Integer or range between 0 and 65535. Asterix '*' + * can also be used to match all ports. + * + * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or + * source IP range. Asterix '*' can also be used to match all source IPs. + * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + * can also be used. If this is an ingress rule, specifies where network + * traffic originates from. + * + * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or + * source IP ranges. + * + * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The + * application security group specified as source. + * + * @param {string} [securityRuleParameters.destinationAddressPrefix] The + * destination address prefix. CIDR or destination IP range. Asterix '*' can + * also be used to match all source IPs. Default tags such as 'VirtualNetwork', + * 'AzureLoadBalancer' and 'Internet' can also be used. + * + * @param {array} [securityRuleParameters.destinationAddressPrefixes] The + * destination address prefixes. CIDR or destination IP ranges. + * + * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] + * The application security group specified as destination. + * + * @param {array} [securityRuleParameters.sourcePortRanges] The source port + * ranges. + * + * @param {array} [securityRuleParameters.destinationPortRanges] The + * destination port ranges. + * + * @param {string} securityRuleParameters.access The network traffic is allowed + * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: + * 'Allow', 'Deny' + * + * @param {number} [securityRuleParameters.priority] The priority of the rule. + * The value can be between 100 and 4096. The priority number must be unique + * for each rule in the collection. The lower the priority number, the higher + * the priority of the rule. + * + * @param {string} securityRuleParameters.direction The direction of the rule. + * The direction specifies if rule will be evaluated on incoming or outcoming + * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values + * include: 'Inbound', 'Outbound' + * + * @param {string} [securityRuleParameters.provisioningState] The provisioning + * state of the public IP resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * + * @param {string} [securityRuleParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [securityRuleParameters.etag] A unique read-only string that + * changes whenever the resource is updated. + * + * @param {string} [securityRuleParameters.id] Resource ID. + * + * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the * request @@ -10143,7 +14139,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroup} - The deserialized result object. + * @resolve {SecurityRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10151,51 +14147,26 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroup} for more information. + * {SecurityRule} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkSecurityGroupName: string, options?: { expand? : string, customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkSecurityGroupName: string, options: { expand? : string, customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a network security group in the specified resource group. + * Gets all security rules in a network security group. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} parameters Parameters supplied to the create or update - * network security group operation. - * - * @param {array} [parameters.securityRules] A collection of security rules of - * the network security group. - * - * @param {array} [parameters.defaultSecurityRules] The default security rules - * of network security group. - * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * network security group resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. - * - * @param {string} [parameters.id] Resource ID. - * - * @param {string} [parameters.location] Resource location. - * - * @param {object} [parameters.tags] Resource tags. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -10203,44 +14174,19 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a network security group in the specified resource group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {object} parameters Parameters supplied to the create or update - * network security group operation. - * - * @param {array} [parameters.securityRules] A collection of security rules of - * the network security group. - * - * @param {array} [parameters.defaultSecurityRules] The default security rules - * of network security group. - * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * network security group resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. - * - * @param {string} [parameters.id] Resource ID. + * Gets all security rules in a network security group. * - * @param {string} [parameters.location] Resource location. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} networkSecurityGroupName The name of the network security + * group. * * @param {object} [options] Optional Parameters. * @@ -10254,7 +14200,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroup} - The deserialized result object. + * @resolve {SecurityRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10262,30 +14208,28 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroup} for more information. + * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRuleListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a network security group tags. + * Deletes the specified network security rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} parameters Parameters supplied to update network security - * group tags. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} securityRuleName The name of the security rule. * * @param {object} [options] Optional Parameters. * @@ -10294,24 +14238,21 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a network security group tags. + * Deletes the specified network security rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} parameters Parameters supplied to update network security - * group tags. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} securityRuleName The name of the security rule. * * @param {object} [options] Optional Parameters. * @@ -10325,7 +14266,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroup} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10333,20 +14274,100 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroup} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network security groups in a subscription. + * Creates or updates a security rule in the specified network security group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {string} securityRuleName The name of the security rule. + * + * @param {object} securityRuleParameters Parameters supplied to the create or + * update network security rule operation. + * + * @param {string} [securityRuleParameters.description] A description for this + * rule. Restricted to 140 chars. + * + * @param {string} securityRuleParameters.protocol Network protocol this rule + * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values + * include: 'Tcp', 'Udp', '*' + * + * @param {string} [securityRuleParameters.sourcePortRange] The source port or + * range. Integer or range between 0 and 65535. Asterix '*' can also be used to + * match all ports. + * + * @param {string} [securityRuleParameters.destinationPortRange] The + * destination port or range. Integer or range between 0 and 65535. Asterix '*' + * can also be used to match all ports. + * + * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or + * source IP range. Asterix '*' can also be used to match all source IPs. + * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + * can also be used. If this is an ingress rule, specifies where network + * traffic originates from. + * + * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or + * source IP ranges. + * + * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The + * application security group specified as source. + * + * @param {string} [securityRuleParameters.destinationAddressPrefix] The + * destination address prefix. CIDR or destination IP range. Asterix '*' can + * also be used to match all source IPs. Default tags such as 'VirtualNetwork', + * 'AzureLoadBalancer' and 'Internet' can also be used. + * + * @param {array} [securityRuleParameters.destinationAddressPrefixes] The + * destination address prefixes. CIDR or destination IP ranges. + * + * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] + * The application security group specified as destination. + * + * @param {array} [securityRuleParameters.sourcePortRanges] The source port + * ranges. + * + * @param {array} [securityRuleParameters.destinationPortRanges] The + * destination port ranges. + * + * @param {string} securityRuleParameters.access The network traffic is allowed + * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: + * 'Allow', 'Deny' + * + * @param {number} [securityRuleParameters.priority] The priority of the rule. + * The value can be between 100 and 4096. The priority number must be unique + * for each rule in the collection. The lower the priority number, the higher + * the priority of the rule. + * + * @param {string} securityRuleParameters.direction The direction of the rule. + * The direction specifies if rule will be evaluated on incoming or outcoming + * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values + * include: 'Inbound', 'Outbound' + * + * @param {string} [securityRuleParameters.provisioningState] The provisioning + * state of the public IP resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * + * @param {string} [securityRuleParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [securityRuleParameters.etag] A unique read-only string that + * changes whenever the resource is updated. + * + * @param {string} [securityRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -10355,14 +14376,95 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network security groups in a subscription. + * Creates or updates a security rule in the specified network security group. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkSecurityGroupName The name of the network security + * group. + * + * @param {string} securityRuleName The name of the security rule. + * + * @param {object} securityRuleParameters Parameters supplied to the create or + * update network security rule operation. + * + * @param {string} [securityRuleParameters.description] A description for this + * rule. Restricted to 140 chars. + * + * @param {string} securityRuleParameters.protocol Network protocol this rule + * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values + * include: 'Tcp', 'Udp', '*' + * + * @param {string} [securityRuleParameters.sourcePortRange] The source port or + * range. Integer or range between 0 and 65535. Asterix '*' can also be used to + * match all ports. + * + * @param {string} [securityRuleParameters.destinationPortRange] The + * destination port or range. Integer or range between 0 and 65535. Asterix '*' + * can also be used to match all ports. + * + * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or + * source IP range. Asterix '*' can also be used to match all source IPs. + * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' + * can also be used. If this is an ingress rule, specifies where network + * traffic originates from. + * + * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or + * source IP ranges. + * + * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The + * application security group specified as source. + * + * @param {string} [securityRuleParameters.destinationAddressPrefix] The + * destination address prefix. CIDR or destination IP range. Asterix '*' can + * also be used to match all source IPs. Default tags such as 'VirtualNetwork', + * 'AzureLoadBalancer' and 'Internet' can also be used. + * + * @param {array} [securityRuleParameters.destinationAddressPrefixes] The + * destination address prefixes. CIDR or destination IP ranges. + * + * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] + * The application security group specified as destination. + * + * @param {array} [securityRuleParameters.sourcePortRanges] The source port + * ranges. + * + * @param {array} [securityRuleParameters.destinationPortRanges] The + * destination port ranges. + * + * @param {string} securityRuleParameters.access The network traffic is allowed + * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: + * 'Allow', 'Deny' + * + * @param {number} [securityRuleParameters.priority] The priority of the rule. + * The value can be between 100 and 4096. The priority number must be unique + * for each rule in the collection. The lower the priority number, the higher + * the priority of the rule. + * + * @param {string} securityRuleParameters.direction The direction of the rule. + * The direction specifies if rule will be evaluated on incoming or outcoming + * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values + * include: 'Inbound', 'Outbound' + * + * @param {string} [securityRuleParameters.provisioningState] The provisioning + * state of the public IP resource. Possible values are: 'Updating', + * 'Deleting', and 'Failed'. + * + * @param {string} [securityRuleParameters.name] The name of the resource that + * is unique within a resource group. This name can be used to access the + * resource. + * + * @param {string} [securityRuleParameters.etag] A unique read-only string that + * changes whenever the resource is updated. + * + * @param {string} [securityRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -10376,7 +14478,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. + * @resolve {SecurityRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10384,23 +14486,23 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroupListResult} for more - * information. + * {SecurityRule} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network security groups in a resource group. + * Gets all security rules in a network security group. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -10409,16 +14511,17 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network security groups in a resource group. + * Gets all security rules in a network security group. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -10432,7 +14535,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. + * @resolve {SecurityRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10440,21 +14543,30 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroupListResult} for more + * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRuleListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * DefaultSecurityRules + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface DefaultSecurityRules { /** - * Deletes the specified network security group. + * Gets all default security rules in a network security group. * * @param {string} resourceGroupName The name of the resource group. * @@ -10468,14 +14580,14 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network security group. + * Gets all default security rules in a network security group. * * @param {string} resourceGroupName The name of the resource group. * @@ -10494,7 +14606,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {SecurityRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10502,49 +14614,29 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRuleListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a network security group in the specified resource group. + * Get the specified default network security rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} parameters Parameters supplied to the create or update - * network security group operation. - * - * @param {array} [parameters.securityRules] A collection of security rules of - * the network security group. - * - * @param {array} [parameters.defaultSecurityRules] The default security rules - * of network security group. - * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * network security group resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. - * - * @param {string} [parameters.id] Resource ID. - * - * @param {string} [parameters.location] Resource location. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} defaultSecurityRuleName The name of the default security + * rule. * * @param {object} [options] Optional Parameters. * @@ -10553,44 +14645,22 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a network security group in the specified resource group. + * Get the specified default network security rule. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkSecurityGroupName The name of the network security * group. * - * @param {object} parameters Parameters supplied to the create or update - * network security group operation. - * - * @param {array} [parameters.securityRules] A collection of security rules of - * the network security group. - * - * @param {array} [parameters.defaultSecurityRules] The default security rules - * of network security group. - * - * @param {string} [parameters.resourceGuid] The resource GUID property of the - * network security group resource. - * - * @param {string} [parameters.provisioningState] The provisioning state of the - * public IP resource. Possible values are: 'Updating', 'Deleting', and - * 'Failed'. - * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. - * - * @param {string} [parameters.id] Resource ID. - * - * @param {string} [parameters.location] Resource location. - * - * @param {object} [parameters.tags] Resource tags. + * @param {string} defaultSecurityRuleName The name of the default security + * rule. * * @param {object} [options] Optional Parameters. * @@ -10604,7 +14674,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroup} - The deserialized result object. + * @resolve {SecurityRule} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10612,30 +14682,23 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroup} for more information. + * {SecurityRule} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRule} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.NetworkSecurityGroup, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Updates a network security group tags. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {object} parameters Parameters supplied to update network security - * group tags. + * Gets all default security rules in a network security group. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -10644,24 +14707,17 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginUpdateTagsWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a network security group tags. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {object} parameters Parameters supplied to update network security - * group tags. + * Gets all default security rules in a network security group. * - * @param {object} [parameters.tags] Resource tags. + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. * * @param {object} [options] Optional Parameters. * @@ -10675,7 +14731,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroup} - The deserialized result object. + * @resolve {SecurityRuleListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10683,23 +14739,46 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroup} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroup} for more information. + * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityRuleListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginUpdateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginUpdateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - beginUpdateTags(resourceGroupName: string, networkSecurityGroupName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listNext(nextPageLink: string, callback: ServiceCallback): void; + listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * NetworkWatchers + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface NetworkWatchers { /** - * Gets all network security groups in a subscription. + * Creates or updates a network watcher in the specified resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher. + * + * @param {object} parameters Parameters that define the network watcher + * resource. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -10708,17 +14787,30 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network security groups in a subscription. + * Creates or updates a network watcher in the specified resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher. + * + * @param {object} parameters Parameters that define the network watcher + * resource. + * + * @param {string} [parameters.etag] A unique read-only string that changes + * whenever the resource is updated. + * + * @param {string} [parameters.id] Resource ID. + * + * @param {string} [parameters.location] Resource location. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -10732,7 +14824,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. + * @resolve {NetworkWatcher} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10740,24 +14832,24 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroupListResult} for more - * information. + * {NetworkWatcher} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkWatcher} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAllNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAllNext(nextPageLink: string, callback: ServiceCallback): void; - listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network security groups in a resource group. + * Gets the specified network watcher by resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher. * * @param {object} [options] Optional Parameters. * @@ -10766,17 +14858,18 @@ export interface NetworkSecurityGroups { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network security groups in a resource group. + * Gets the specified network watcher by resource group. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher. * * @param {object} [options] Optional Parameters. * @@ -10790,7 +14883,7 @@ export interface NetworkSecurityGroups { * * {Promise} A promise is returned. * - * @resolve {NetworkSecurityGroupListResult} - The deserialized result object. + * @resolve {NetworkWatcher} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10798,37 +14891,24 @@ export interface NetworkSecurityGroups { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkSecurityGroupListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkSecurityGroupListResult} for more - * information. + * {NetworkWatcher} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkWatcher} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * SecurityRules - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface SecurityRules { + get(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified network security rule. + * Deletes the specified network watcher resource. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {string} securityRuleName The name of the security rule. + * @param {string} networkWatcherName The name of the network watcher. * * @param {object} [options] Optional Parameters. * @@ -10841,17 +14921,14 @@ export interface SecurityRules { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network security rule. + * Deletes the specified network watcher resource. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {string} securityRuleName The name of the security rule. + * @param {string} networkWatcherName The name of the network watcher. * * @param {object} [options] Optional Parameters. * @@ -10879,20 +14956,22 @@ export interface SecurityRules { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get the specified network security rule. + * Updates a network watcher tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {string} securityRuleName The name of the security rule. + * @param {object} parameters Parameters supplied to update network watcher + * tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -10901,21 +14980,23 @@ export interface SecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + updateTagsWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the specified network security rule. + * Updates a network watcher tags. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {string} securityRuleName The name of the security rule. + * @param {object} parameters Parameters supplied to update network watcher + * tags. + * + * @param {object} [parameters.tags] Resource tags. * * @param {object} [options] Optional Parameters. * @@ -10929,7 +15010,7 @@ export interface SecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRule} - The deserialized result object. + * @resolve {NetworkWatcher} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -10937,102 +15018,23 @@ export interface SecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRule} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRule} for more information. + * {NetworkWatcher} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkWatcher} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a security rule in the specified network security group. + * Gets all network watchers by resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {string} securityRuleName The name of the security rule. - * - * @param {object} securityRuleParameters Parameters supplied to the create or - * update network security rule operation. - * - * @param {string} [securityRuleParameters.description] A description for this - * rule. Restricted to 140 chars. - * - * @param {string} securityRuleParameters.protocol Network protocol this rule - * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values - * include: 'Tcp', 'Udp', '*' - * - * @param {string} [securityRuleParameters.sourcePortRange] The source port or - * range. Integer or range between 0 and 65535. Asterix '*' can also be used to - * match all ports. - * - * @param {string} [securityRuleParameters.destinationPortRange] The - * destination port or range. Integer or range between 0 and 65535. Asterix '*' - * can also be used to match all ports. - * - * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or - * source IP range. Asterix '*' can also be used to match all source IPs. - * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - * can also be used. If this is an ingress rule, specifies where network - * traffic originates from. - * - * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or - * source IP ranges. - * - * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The - * application security group specified as source. - * - * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can - * also be used to match all source IPs. Default tags such as 'VirtualNetwork', - * 'AzureLoadBalancer' and 'Internet' can also be used. - * - * @param {array} [securityRuleParameters.destinationAddressPrefixes] The - * destination address prefixes. CIDR or destination IP ranges. - * - * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] - * The application security group specified as destination. - * - * @param {array} [securityRuleParameters.sourcePortRanges] The source port - * ranges. - * - * @param {array} [securityRuleParameters.destinationPortRanges] The - * destination port ranges. - * - * @param {string} securityRuleParameters.access The network traffic is allowed - * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: - * 'Allow', 'Deny' - * - * @param {number} [securityRuleParameters.priority] The priority of the rule. - * The value can be between 100 and 4096. The priority number must be unique - * for each rule in the collection. The lower the priority number, the higher - * the priority of the rule. - * - * @param {string} securityRuleParameters.direction The direction of the rule. - * The direction specifies if rule will be evaluated on incoming or outcoming - * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - * include: 'Inbound', 'Outbound' - * - * @param {string} [securityRuleParameters.provisioningState] The provisioning - * state of the public IP resource. Possible values are: 'Updating', - * 'Deleting', and 'Failed'. - * - * @param {string} [securityRuleParameters.name] The name of the resource that - * is unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [securityRuleParameters.etag] A unique read-only string that - * changes whenever the resource is updated. - * - * @param {string} [securityRuleParameters.id] Resource ID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -11040,96 +15042,17 @@ export interface SecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a security rule in the specified network security group. + * Gets all network watchers by resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {string} securityRuleName The name of the security rule. - * - * @param {object} securityRuleParameters Parameters supplied to the create or - * update network security rule operation. - * - * @param {string} [securityRuleParameters.description] A description for this - * rule. Restricted to 140 chars. - * - * @param {string} securityRuleParameters.protocol Network protocol this rule - * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values - * include: 'Tcp', 'Udp', '*' - * - * @param {string} [securityRuleParameters.sourcePortRange] The source port or - * range. Integer or range between 0 and 65535. Asterix '*' can also be used to - * match all ports. - * - * @param {string} [securityRuleParameters.destinationPortRange] The - * destination port or range. Integer or range between 0 and 65535. Asterix '*' - * can also be used to match all ports. - * - * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or - * source IP range. Asterix '*' can also be used to match all source IPs. - * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - * can also be used. If this is an ingress rule, specifies where network - * traffic originates from. - * - * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or - * source IP ranges. - * - * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The - * application security group specified as source. - * - * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can - * also be used to match all source IPs. Default tags such as 'VirtualNetwork', - * 'AzureLoadBalancer' and 'Internet' can also be used. - * - * @param {array} [securityRuleParameters.destinationAddressPrefixes] The - * destination address prefixes. CIDR or destination IP ranges. - * - * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] - * The application security group specified as destination. - * - * @param {array} [securityRuleParameters.sourcePortRanges] The source port - * ranges. - * - * @param {array} [securityRuleParameters.destinationPortRanges] The - * destination port ranges. - * - * @param {string} securityRuleParameters.access The network traffic is allowed - * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: - * 'Allow', 'Deny' - * - * @param {number} [securityRuleParameters.priority] The priority of the rule. - * The value can be between 100 and 4096. The priority number must be unique - * for each rule in the collection. The lower the priority number, the higher - * the priority of the rule. - * - * @param {string} securityRuleParameters.direction The direction of the rule. - * The direction specifies if rule will be evaluated on incoming or outcoming - * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - * include: 'Inbound', 'Outbound' - * - * @param {string} [securityRuleParameters.provisioningState] The provisioning - * state of the public IP resource. Possible values are: 'Updating', - * 'Deleting', and 'Failed'. - * - * @param {string} [securityRuleParameters.name] The name of the resource that - * is unique within a resource group. This name can be used to access the - * resource. - * - * @param {string} [securityRuleParameters.etag] A unique read-only string that - * changes whenever the resource is updated. - * - * @param {string} [securityRuleParameters.id] Resource ID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -11142,7 +15065,7 @@ export interface SecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRule} - The deserialized result object. + * @resolve {NetworkWatcherListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11150,25 +15073,21 @@ export interface SecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRule} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRule} for more information. + * {NetworkWatcherListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkWatcherListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all security rules in a network security group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * Gets all network watchers by subscription. * * @param {object} [options] Optional Parameters. * @@ -11177,19 +15096,14 @@ export interface SecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all security rules in a network security group. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * Gets all network watchers by subscription. * * @param {object} [options] Optional Parameters. * @@ -11203,7 +15117,7 @@ export interface SecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRuleListResult} - The deserialized result object. + * @resolve {NetworkWatcherListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11211,28 +15125,39 @@ export interface SecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRuleListResult} for more + * {NetworkWatcherListResult} [result] - The deserialized result object if an error did not occur. + * See {@link NetworkWatcherListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. - */ - list(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + */ + listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAll(callback: ServiceCallback): void; + listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified network security rule. + * Gets the current network topology by resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {string} securityRuleName The name of the security rule. + * @param {object} parameters Parameters that define the representation of + * topology. + * + * @param {string} [parameters.targetResourceGroupName] The name of the target + * resource group to perform topology on. + * + * @param {object} [parameters.targetVirtualNetwork] The reference of the + * Virtual Network resource. + * + * @param {object} [parameters.targetSubnet] The reference of the Subnet + * resource. + * + * @param {string} [parameters.targetSubnet.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -11241,21 +15166,32 @@ export interface SecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getTopologyWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network security rule. + * Gets the current network topology by resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {string} securityRuleName The name of the security rule. + * @param {object} parameters Parameters that define the representation of + * topology. + * + * @param {string} [parameters.targetResourceGroupName] The name of the target + * resource group to perform topology on. + * + * @param {object} [parameters.targetVirtualNetwork] The reference of the + * Virtual Network resource. + * + * @param {object} [parameters.targetSubnet] The reference of the Subnet + * resource. + * + * @param {string} [parameters.targetSubnet.id] Resource ID. * * @param {object} [options] Optional Parameters. * @@ -11269,7 +15205,7 @@ export interface SecurityRules { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {Topology} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11277,100 +15213,55 @@ export interface SecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {Topology} [result] - The deserialized result object if an error did not occur. + * See {@link Topology} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getTopology(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getTopology(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, callback: ServiceCallback): void; + getTopology(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a security rule in the specified network security group. + * Verify IP flow from the specified VM to a location given the currently + * configured NSG rules. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {string} securityRuleName The name of the security rule. - * - * @param {object} securityRuleParameters Parameters supplied to the create or - * update network security rule operation. - * - * @param {string} [securityRuleParameters.description] A description for this - * rule. Restricted to 140 chars. - * - * @param {string} securityRuleParameters.protocol Network protocol this rule - * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values - * include: 'Tcp', 'Udp', '*' - * - * @param {string} [securityRuleParameters.sourcePortRange] The source port or - * range. Integer or range between 0 and 65535. Asterix '*' can also be used to - * match all ports. - * - * @param {string} [securityRuleParameters.destinationPortRange] The - * destination port or range. Integer or range between 0 and 65535. Asterix '*' - * can also be used to match all ports. - * - * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or - * source IP range. Asterix '*' can also be used to match all source IPs. - * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - * can also be used. If this is an ingress rule, specifies where network - * traffic originates from. - * - * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or - * source IP ranges. - * - * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The - * application security group specified as source. - * - * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can - * also be used to match all source IPs. Default tags such as 'VirtualNetwork', - * 'AzureLoadBalancer' and 'Internet' can also be used. - * - * @param {array} [securityRuleParameters.destinationAddressPrefixes] The - * destination address prefixes. CIDR or destination IP ranges. - * - * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] - * The application security group specified as destination. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {array} [securityRuleParameters.sourcePortRanges] The source port - * ranges. + * @param {object} parameters Parameters that define the IP flow to be + * verified. * - * @param {array} [securityRuleParameters.destinationPortRanges] The - * destination port ranges. + * @param {string} parameters.targetResourceId The ID of the target resource to + * perform next-hop on. * - * @param {string} securityRuleParameters.access The network traffic is allowed - * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: - * 'Allow', 'Deny' + * @param {string} parameters.direction The direction of the packet represented + * as a 5-tuple. Possible values include: 'Inbound', 'Outbound' * - * @param {number} [securityRuleParameters.priority] The priority of the rule. - * The value can be between 100 and 4096. The priority number must be unique - * for each rule in the collection. The lower the priority number, the higher - * the priority of the rule. + * @param {string} parameters.protocol Protocol to be verified on. Possible + * values include: 'TCP', 'UDP' * - * @param {string} securityRuleParameters.direction The direction of the rule. - * The direction specifies if rule will be evaluated on incoming or outcoming - * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - * include: 'Inbound', 'Outbound' + * @param {string} parameters.localPort The local port. Acceptable values are a + * single integer in the range (0-65535). Support for * for the source port, + * which depends on the direction. * - * @param {string} [securityRuleParameters.provisioningState] The provisioning - * state of the public IP resource. Possible values are: 'Updating', - * 'Deleting', and 'Failed'. + * @param {string} parameters.remotePort The remote port. Acceptable values are + * a single integer in the range (0-65535). Support for * for the source port, + * which depends on the direction. * - * @param {string} [securityRuleParameters.name] The name of the resource that - * is unique within a resource group. This name can be used to access the - * resource. + * @param {string} parameters.localIPAddress The local IP address. Acceptable + * values are valid IPv4 addresses. * - * @param {string} [securityRuleParameters.etag] A unique read-only string that - * changes whenever the resource is updated. + * @param {string} parameters.remoteIPAddress The remote IP address. Acceptable + * values are valid IPv4 addresses. * - * @param {string} [securityRuleParameters.id] Resource ID. + * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has + * multiple NICs and IP forwarding is enabled on any of them, then this + * parameter must be specified. Otherwise optional). * * @param {object} [options] Optional Parameters. * @@ -11379,95 +15270,49 @@ export interface SecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + verifyIPFlowWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a security rule in the specified network security group. + * Verify IP flow from the specified VM to a location given the currently + * configured NSG rules. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. - * - * @param {string} securityRuleName The name of the security rule. - * - * @param {object} securityRuleParameters Parameters supplied to the create or - * update network security rule operation. - * - * @param {string} [securityRuleParameters.description] A description for this - * rule. Restricted to 140 chars. - * - * @param {string} securityRuleParameters.protocol Network protocol this rule - * applies to. Possible values are 'Tcp', 'Udp', and '*'. Possible values - * include: 'Tcp', 'Udp', '*' - * - * @param {string} [securityRuleParameters.sourcePortRange] The source port or - * range. Integer or range between 0 and 65535. Asterix '*' can also be used to - * match all ports. - * - * @param {string} [securityRuleParameters.destinationPortRange] The - * destination port or range. Integer or range between 0 and 65535. Asterix '*' - * can also be used to match all ports. - * - * @param {string} [securityRuleParameters.sourceAddressPrefix] The CIDR or - * source IP range. Asterix '*' can also be used to match all source IPs. - * Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and 'Internet' - * can also be used. If this is an ingress rule, specifies where network - * traffic originates from. - * - * @param {array} [securityRuleParameters.sourceAddressPrefixes] The CIDR or - * source IP ranges. - * - * @param {array} [securityRuleParameters.sourceApplicationSecurityGroups] The - * application security group specified as source. - * - * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can - * also be used to match all source IPs. Default tags such as 'VirtualNetwork', - * 'AzureLoadBalancer' and 'Internet' can also be used. - * - * @param {array} [securityRuleParameters.destinationAddressPrefixes] The - * destination address prefixes. CIDR or destination IP ranges. - * - * @param {array} [securityRuleParameters.destinationApplicationSecurityGroups] - * The application security group specified as destination. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {array} [securityRuleParameters.sourcePortRanges] The source port - * ranges. + * @param {object} parameters Parameters that define the IP flow to be + * verified. * - * @param {array} [securityRuleParameters.destinationPortRanges] The - * destination port ranges. + * @param {string} parameters.targetResourceId The ID of the target resource to + * perform next-hop on. * - * @param {string} securityRuleParameters.access The network traffic is allowed - * or denied. Possible values are: 'Allow' and 'Deny'. Possible values include: - * 'Allow', 'Deny' + * @param {string} parameters.direction The direction of the packet represented + * as a 5-tuple. Possible values include: 'Inbound', 'Outbound' * - * @param {number} [securityRuleParameters.priority] The priority of the rule. - * The value can be between 100 and 4096. The priority number must be unique - * for each rule in the collection. The lower the priority number, the higher - * the priority of the rule. + * @param {string} parameters.protocol Protocol to be verified on. Possible + * values include: 'TCP', 'UDP' * - * @param {string} securityRuleParameters.direction The direction of the rule. - * The direction specifies if rule will be evaluated on incoming or outcoming - * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values - * include: 'Inbound', 'Outbound' + * @param {string} parameters.localPort The local port. Acceptable values are a + * single integer in the range (0-65535). Support for * for the source port, + * which depends on the direction. * - * @param {string} [securityRuleParameters.provisioningState] The provisioning - * state of the public IP resource. Possible values are: 'Updating', - * 'Deleting', and 'Failed'. + * @param {string} parameters.remotePort The remote port. Acceptable values are + * a single integer in the range (0-65535). Support for * for the source port, + * which depends on the direction. * - * @param {string} [securityRuleParameters.name] The name of the resource that - * is unique within a resource group. This name can be used to access the - * resource. + * @param {string} parameters.localIPAddress The local IP address. Acceptable + * values are valid IPv4 addresses. * - * @param {string} [securityRuleParameters.etag] A unique read-only string that - * changes whenever the resource is updated. + * @param {string} parameters.remoteIPAddress The remote IP address. Acceptable + * values are valid IPv4 addresses. * - * @param {string} [securityRuleParameters.id] Resource ID. + * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has + * multiple NICs and IP forwarding is enabled on any of them, then this + * parameter must be specified. Otherwise optional). * * @param {object} [options] Optional Parameters. * @@ -11481,7 +15326,7 @@ export interface SecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRule} - The deserialized result object. + * @resolve {VerificationIPFlowResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11489,23 +15334,39 @@ export interface SecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRule} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRule} for more information. + * {VerificationIPFlowResult} [result] - The deserialized result object if an error did not occur. + * See {@link VerificationIPFlowResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, callback: ServiceCallback): void; - beginCreateOrUpdate(resourceGroupName: string, networkSecurityGroupName: string, securityRuleName: string, securityRuleParameters: models.SecurityRule, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + verifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + verifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, callback: ServiceCallback): void; + verifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all security rules in a network security group. + * Gets the next hop from the specified VM. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher. + * + * @param {object} parameters Parameters that define the source and destination + * endpoint. + * + * @param {string} parameters.targetResourceId The resource identifier of the + * target resource against which the action is to be performed. + * + * @param {string} parameters.sourceIPAddress The source IP address. + * + * @param {string} parameters.destinationIPAddress The destination IP address. + * + * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has + * multiple NICs and IP forwarding is enabled on any of the nics, then this + * parameter must be specified. Otherwise optional). * * @param {object} [options] Optional Parameters. * @@ -11514,17 +15375,32 @@ export interface SecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getNextHopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all security rules in a network security group. + * Gets the next hop from the specified VM. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher. + * + * @param {object} parameters Parameters that define the source and destination + * endpoint. + * + * @param {string} parameters.targetResourceId The resource identifier of the + * target resource against which the action is to be performed. + * + * @param {string} parameters.sourceIPAddress The source IP address. + * + * @param {string} parameters.destinationIPAddress The destination IP address. + * + * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has + * multiple NICs and IP forwarding is enabled on any of the nics, then this + * parameter must be specified. Otherwise optional). * * @param {object} [options] Optional Parameters. * @@ -11538,7 +15414,7 @@ export interface SecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRuleListResult} - The deserialized result object. + * @resolve {NextHopResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11546,35 +15422,29 @@ export interface SecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRuleListResult} for more - * information. + * {NextHopResult} [result] - The deserialized result object if an error did not occur. + * See {@link NextHopResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * DefaultSecurityRules - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface DefaultSecurityRules { + getNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, callback: ServiceCallback): void; + getNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all default security rules in a network security group. + * Gets the configured and effective security group rules on the specified VM. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher. + * + * @param {object} parameters Parameters that define the VM to check security + * groups for. + * + * @param {string} parameters.targetResourceId ID of the target VM. * * @param {object} [options] Optional Parameters. * @@ -11583,19 +15453,23 @@ export interface DefaultSecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getVMSecurityRulesWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all default security rules in a network security group. + * Gets the configured and effective security group rules on the specified VM. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher. + * + * @param {object} parameters Parameters that define the VM to check security + * groups for. + * + * @param {string} parameters.targetResourceId ID of the target VM. * * @param {object} [options] Optional Parameters. * @@ -11609,7 +15483,7 @@ export interface DefaultSecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRuleListResult} - The deserialized result object. + * @resolve {SecurityGroupViewResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11617,29 +15491,37 @@ export interface DefaultSecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRuleListResult} for more + * {SecurityGroupViewResult} [result] - The deserialized result object if an error did not occur. + * See {@link SecurityGroupViewResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, networkSecurityGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, networkSecurityGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, networkSecurityGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, callback: ServiceCallback): void; + getVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get the specified default network security rule. + * Initiate troubleshooting on a specified resource * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher resource. * - * @param {string} defaultSecurityRuleName The name of the default security - * rule. + * @param {object} parameters Parameters that define the resource to + * troubleshoot. + * + * @param {string} parameters.targetResourceId The target resource to + * troubleshoot. + * + * @param {string} parameters.storageId The ID for the storage account to save + * the troubleshoot result. + * + * @param {string} parameters.storagePath The path to the blob to save the + * troubleshoot result in. * * @param {object} [options] Optional Parameters. * @@ -11648,22 +15530,30 @@ export interface DefaultSecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getTroubleshootingWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the specified default network security rule. + * Initiate troubleshooting on a specified resource * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkSecurityGroupName The name of the network security - * group. + * @param {string} networkWatcherName The name of the network watcher resource. * - * @param {string} defaultSecurityRuleName The name of the default security - * rule. + * @param {object} parameters Parameters that define the resource to + * troubleshoot. + * + * @param {string} parameters.targetResourceId The target resource to + * troubleshoot. + * + * @param {string} parameters.storageId The ID for the storage account to save + * the troubleshoot result. + * + * @param {string} parameters.storagePath The path to the blob to save the + * troubleshoot result in. * * @param {object} [options] Optional Parameters. * @@ -11677,7 +15567,7 @@ export interface DefaultSecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRule} - The deserialized result object. + * @resolve {TroubleshootingResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11685,23 +15575,30 @@ export interface DefaultSecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRule} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRule} for more information. + * {TroubleshootingResult} [result] - The deserialized result object if an error did not occur. + * See {@link TroubleshootingResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkSecurityGroupName: string, defaultSecurityRuleName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, callback: ServiceCallback): void; + getTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all default security rules in a network security group. + * Get the last completed troubleshooting result on a specified resource * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that define the resource to query the + * troubleshooting result. + * + * @param {string} parameters.targetResourceId The target resource ID to query + * the troubleshooting result. * * @param {object} [options] Optional Parameters. * @@ -11710,17 +15607,24 @@ export interface DefaultSecurityRules { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listNextWithHttpOperationResponse(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getTroubleshootingResultWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all default security rules in a network security group. + * Get the last completed troubleshooting result on a specified resource * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that define the resource to query the + * troubleshooting result. + * + * @param {string} parameters.targetResourceId The target resource ID to query + * the troubleshooting result. * * @param {object} [options] Optional Parameters. * @@ -11734,7 +15638,7 @@ export interface DefaultSecurityRules { * * {Promise} A promise is returned. * - * @resolve {SecurityRuleListResult} - The deserialized result object. + * @resolve {TroubleshootingResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11742,46 +15646,44 @@ export interface DefaultSecurityRules { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityRuleListResult} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityRuleListResult} for more - * information. + * {TroubleshootingResult} [result] - The deserialized result object if an error did not occur. + * See {@link TroubleshootingResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listNext(nextPageLink: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listNext(nextPageLink: string, callback: ServiceCallback): void; - listNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * NetworkWatchers - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface NetworkWatchers { + getTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, callback: ServiceCallback): void; + getTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Creates or updates a network watcher in the specified resource group. + * Configures flow log on a specified resource. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the network watcher resource. * - * @param {object} parameters Parameters that define the network watcher - * resource. + * @param {object} parameters Parameters that define the configuration of flow + * log. * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. + * @param {string} parameters.targetResourceId The ID of the resource to + * configure for flow logging. * - * @param {string} [parameters.id] Resource ID. + * @param {string} parameters.storageId ID of the storage account which is used + * to store the flow log. * - * @param {string} [parameters.location] Resource location. + * @param {boolean} parameters.enabled Flag to enable/disable flow logging. * - * @param {object} [parameters.tags] Resource tags. + * @param {object} [parameters.retentionPolicy] + * + * @param {number} [parameters.retentionPolicy.days] Number of days to retain + * flow log records. + * + * @param {boolean} [parameters.retentionPolicy.enabled] Flag to enable/disable + * retention. * * @param {object} [options] Optional Parameters. * @@ -11790,30 +15692,38 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + setFlowLogConfigurationWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Creates or updates a network watcher in the specified resource group. + * Configures flow log on a specified resource. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that define the configuration of flow + * log. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} parameters.targetResourceId The ID of the resource to + * configure for flow logging. * - * @param {object} parameters Parameters that define the network watcher - * resource. + * @param {string} parameters.storageId ID of the storage account which is used + * to store the flow log. * - * @param {string} [parameters.etag] A unique read-only string that changes - * whenever the resource is updated. + * @param {boolean} parameters.enabled Flag to enable/disable flow logging. * - * @param {string} [parameters.id] Resource ID. + * @param {object} [parameters.retentionPolicy] * - * @param {string} [parameters.location] Resource location. + * @param {number} [parameters.retentionPolicy.days] Number of days to retain + * flow log records. * - * @param {object} [parameters.tags] Resource tags. + * @param {boolean} [parameters.retentionPolicy.enabled] Flag to enable/disable + * retention. * * @param {object} [options] Optional Parameters. * @@ -11827,7 +15737,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {NetworkWatcher} - The deserialized result object. + * @resolve {FlowLogInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11835,24 +15745,31 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkWatcher} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkWatcher} for more information. + * {FlowLogInformation} [result] - The deserialized result object if an error did not occur. + * See {@link FlowLogInformation} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, callback: ServiceCallback): void; - createOrUpdate(resourceGroupName: string, networkWatcherName: string, parameters: models.NetworkWatcher, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + setFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + setFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, callback: ServiceCallback): void; + setFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the specified network watcher by resource group. + * Queries status of flow log on a specified resource. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that define a resource to query flow + * log status. + * + * @param {string} parameters.targetResourceId The target resource where + * getting the flow logging status. * * @param {object} [options] Optional Parameters. * @@ -11861,18 +15778,25 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getFlowLogStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the specified network watcher by resource group. + * Queries status of flow log on a specified resource. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that define a resource to query flow + * log status. + * + * @param {string} parameters.targetResourceId The target resource where + * getting the flow logging status. * * @param {object} [options] Optional Parameters. * @@ -11886,7 +15810,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {NetworkWatcher} - The deserialized result object. + * @resolve {FlowLogInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -11894,112 +15818,128 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkWatcher} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkWatcher} for more information. + * {FlowLogInformation} [result] - The deserialized result object if an error did not occur. + * See {@link FlowLogInformation} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, callback: ServiceCallback): void; + getFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified network watcher resource. + * Verifies the possibility of establishing a direct TCP connection from a + * virtual machine to a given endpoint including another VM or an arbitrary + * remote server. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the network watcher resource. * - * @param {object} [options] Optional Parameters. + * @param {object} parameters Parameters that determine how the connectivity + * check will be performed. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {object} parameters.source * - * @returns {Promise} A promise is returned + * @param {string} parameters.source.resourceId The ID of the resource from + * which a connectivity check will be initiated. * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {number} [parameters.source.port] The source port from which a + * connectivity check will be performed. * - * @reject {Error|ServiceError} - The error object. - */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Deletes the specified network watcher resource. + * @param {object} parameters.destination * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} [parameters.destination.resourceId] The ID of the resource + * to which a connection attempt will be made. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} [parameters.destination.address] The IP address or URI the + * resource to which a connection attempt will be made. * - * @param {object} [options] Optional Parameters. + * @param {number} [parameters.destination.port] Port on which check + * connectivity will be performed. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' * - * @param {ServiceCallback} [optionalCallback] - The optional callback. + * @param {object} [parameters.protocolConfiguration] * - * @returns {ServiceCallback|Promise} If a callback was passed as the last - * parameter then it returns the callback else returns a Promise. + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] * - * {Promise} A promise is returned. + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' * - * @resolve {null} - The deserialized result object. + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. * - * @reject {Error|ServiceError} - The error object. + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. * - * {ServiceCallback} optionalCallback(err, result, request, response) + * @param {object} [options] Optional Parameters. * - * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * @param {object} [options.customHeaders] Headers that will be added to the + * request * - * {null} [result] - The deserialized result object if an error did not occur. + * @returns {Promise} A promise is returned * - * {WebResource} [request] - The HTTP Request object if an error did not occur. + * @resolve {HttpOperationResponse} - The deserialized result object. * - * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + * @reject {Error|ServiceError} - The error object. */ - deleteMethod(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; - + checkConnectivityWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Updates a network watcher tags. + * Verifies the possibility of establishing a direct TCP connection from a + * virtual machine to a given endpoint including another VM or an arbitrary + * remote server. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the network watcher resource. * - * @param {object} parameters Parameters supplied to update network watcher - * tags. + * @param {object} parameters Parameters that determine how the connectivity + * check will be performed. * - * @param {object} [parameters.tags] Resource tags. + * @param {object} parameters.source * - * @param {object} [options] Optional Parameters. + * @param {string} parameters.source.resourceId The ID of the resource from + * which a connectivity check will be initiated. * - * @param {object} [options.customHeaders] Headers that will be added to the - * request + * @param {number} [parameters.source.port] The source port from which a + * connectivity check will be performed. * - * @returns {Promise} A promise is returned + * @param {object} parameters.destination * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @param {string} [parameters.destination.resourceId] The ID of the resource + * to which a connection attempt will be made. * - * @reject {Error|ServiceError} - The error object. - */ - updateTagsWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; - - /** - * Updates a network watcher tags. + * @param {string} [parameters.destination.address] The IP address or URI the + * resource to which a connection attempt will be made. * - * @param {string} resourceGroupName The name of the resource group. + * @param {number} [parameters.destination.port] Port on which check + * connectivity will be performed. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' * - * @param {object} parameters Parameters supplied to update network watcher - * tags. + * @param {object} [parameters.protocolConfiguration] * - * @param {object} [parameters.tags] Resource tags. + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. * * @param {object} [options] Optional Parameters. * @@ -12013,7 +15953,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {NetworkWatcher} - The deserialized result object. + * @resolve {ConnectivityInformation} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12021,22 +15961,50 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkWatcher} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkWatcher} for more information. + * {ConnectivityInformation} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectivityInformation} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - updateTags(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - updateTags(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, callback: ServiceCallback): void; - updateTags(resourceGroupName: string, networkWatcherName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + checkConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + checkConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, callback: ServiceCallback): void; + checkConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network watchers by resource group. + * Gets the relative latency score for internet service providers from a + * specified location to Azure regions. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the network watcher resource + * group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that determine Azure reachability + * report configuration. + * + * @param {object} parameters.providerLocation + * + * @param {string} parameters.providerLocation.country The name of the country. + * + * @param {string} [parameters.providerLocation.state] The name of the state. + * + * @param {string} [parameters.providerLocation.city] The name of the city or + * town. + * + * @param {array} [parameters.providers] List of Internet service providers. + * + * @param {array} [parameters.azureLocations] Optional Azure regions to scope + * the query to. + * + * @param {date} parameters.startTime The start time for the Azure reachability + * report. + * + * @param {date} parameters.endTime The end time for the Azure reachability + * report. * * @param {object} [options] Optional Parameters. * @@ -12045,16 +16013,43 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getAzureReachabilityReportWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network watchers by resource group. + * Gets the relative latency score for internet service providers from a + * specified location to Azure regions. + * + * @param {string} resourceGroupName The name of the network watcher resource + * group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that determine Azure reachability + * report configuration. + * + * @param {object} parameters.providerLocation + * + * @param {string} parameters.providerLocation.country The name of the country. + * + * @param {string} [parameters.providerLocation.state] The name of the state. + * + * @param {string} [parameters.providerLocation.city] The name of the city or + * town. + * + * @param {array} [parameters.providers] List of Internet service providers. + * + * @param {array} [parameters.azureLocations] Optional Azure regions to scope + * the query to. + * + * @param {date} parameters.startTime The start time for the Azure reachability + * report. * - * @param {string} resourceGroupName The name of the resource group. + * @param {date} parameters.endTime The end time for the Azure reachability + * report. * * @param {object} [options] Optional Parameters. * @@ -12068,7 +16063,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {NetworkWatcherListResult} - The deserialized result object. + * @resolve {AzureReachabilityReport} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12076,21 +16071,39 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkWatcherListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkWatcherListResult} for more + * {AzureReachabilityReport} [result] - The deserialized result object if an error did not occur. + * See {@link AzureReachabilityReport} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, callback: ServiceCallback): void; + getAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets all network watchers by subscription. + * Lists all available internet service providers for a specified Azure region. + * + * @param {string} resourceGroupName The name of the network watcher resource + * group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that scope the list of available + * providers. + * + * @param {array} [parameters.azureLocations] A list of Azure regions. + * + * @param {string} [parameters.country] The country for available providers + * list. + * + * @param {string} [parameters.state] The state for available providers list. + * + * @param {string} [parameters.city] The city or town for available providers + * list. * * @param {object} [options] Optional Parameters. * @@ -12099,14 +16112,32 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listAllWithHttpOperationResponse(options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listAvailableProvidersWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets all network watchers by subscription. + * Lists all available internet service providers for a specified Azure region. + * + * @param {string} resourceGroupName The name of the network watcher resource + * group. + * + * @param {string} networkWatcherName The name of the network watcher resource. + * + * @param {object} parameters Parameters that scope the list of available + * providers. + * + * @param {array} [parameters.azureLocations] A list of Azure regions. + * + * @param {string} [parameters.country] The country for available providers + * list. + * + * @param {string} [parameters.state] The state for available providers list. + * + * @param {string} [parameters.city] The city or town for available providers + * list. * * @param {object} [options] Optional Parameters. * @@ -12120,7 +16151,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {NetworkWatcherListResult} - The deserialized result object. + * @resolve {AvailableProvidersList} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12128,40 +16159,26 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NetworkWatcherListResult} [result] - The deserialized result object if an error did not occur. - * See {@link NetworkWatcherListResult} for more + * {AvailableProvidersList} [result] - The deserialized result object if an error did not occur. + * See {@link AvailableProvidersList} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAll(options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAll(callback: ServiceCallback): void; - listAll(options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + listAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + listAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, callback: ServiceCallback): void; + listAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the current network topology by resource group. + * Deletes the specified network watcher resource. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the representation of - * topology. - * - * @param {string} [parameters.targetResourceGroupName] The name of the target - * resource group to perform topology on. - * - * @param {object} [parameters.targetVirtualNetwork] The reference of the - * Virtual Network resource. - * - * @param {object} [parameters.targetSubnet] The reference of the Subnet - * resource. - * - * @param {string} [parameters.targetSubnet.id] Resource ID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -12169,33 +16186,19 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getTopologyWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the current network topology by resource group. + * Deletes the specified network watcher resource. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the representation of - * topology. - * - * @param {string} [parameters.targetResourceGroupName] The name of the target - * resource group to perform topology on. - * - * @param {object} [parameters.targetVirtualNetwork] The reference of the - * Virtual Network resource. - * - * @param {object} [parameters.targetSubnet] The reference of the Subnet - * resource. - * - * @param {string} [parameters.targetSubnet.id] Resource ID. - * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -12208,7 +16211,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {Topology} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -12216,16 +16219,15 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {Topology} [result] - The deserialized result object if an error did not occur. - * See {@link Topology} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTopology(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getTopology(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, callback: ServiceCallback): void; - getTopology(resourceGroupName: string, networkWatcherName: string, parameters: models.TopologyParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12277,7 +16279,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - verifyIPFlowWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginVerifyIPFlowWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Verify IP flow from the specified VM to a location given the currently @@ -12345,9 +16347,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - verifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - verifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, callback: ServiceCallback): void; - verifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, callback: ServiceCallback): void; + beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12382,7 +16384,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - getNextHopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetNextHopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the next hop from the specified VM. @@ -12432,9 +16434,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, callback: ServiceCallback): void; - getNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, callback: ServiceCallback): void; + beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12460,7 +16462,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - getVMSecurityRulesWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetVMSecurityRulesWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the configured and effective security group rules on the specified VM. @@ -12502,9 +16504,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, callback: ServiceCallback): void; - getVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, callback: ServiceCallback): void; + beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12537,7 +16539,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - getTroubleshootingWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetTroubleshootingWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Initiate troubleshooting on a specified resource @@ -12585,9 +16587,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, callback: ServiceCallback): void; - getTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, callback: ServiceCallback): void; + beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12614,7 +16616,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - getTroubleshootingResultWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetTroubleshootingResultWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Get the last completed troubleshooting result on a specified resource @@ -12656,9 +16658,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, callback: ServiceCallback): void; - getTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, callback: ServiceCallback): void; + beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12699,7 +16701,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - setFlowLogConfigurationWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginSetFlowLogConfigurationWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Configures flow log on a specified resource. @@ -12755,9 +16757,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - setFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - setFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, callback: ServiceCallback): void; - setFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, callback: ServiceCallback): void; + beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12785,7 +16787,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - getFlowLogStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetFlowLogStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Queries status of flow log on a specified resource. @@ -12828,9 +16830,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, callback: ServiceCallback): void; - getFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, callback: ServiceCallback): void; + beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12865,6 +16867,23 @@ export interface NetworkWatchers { * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -12876,7 +16895,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - checkConnectivityWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCheckConnectivityWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Verifies the possibility of establishing a direct TCP connection from a @@ -12910,6 +16929,23 @@ export interface NetworkWatchers { * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -12938,9 +16974,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - checkConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - checkConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, callback: ServiceCallback): void; - checkConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, callback: ServiceCallback): void; + beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -12986,7 +17022,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - getAzureReachabilityReportWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetAzureReachabilityReportWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Gets the relative latency score for internet service providers from a @@ -13048,9 +17084,9 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, callback: ServiceCallback): void; - getAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, callback: ServiceCallback): void; + beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** @@ -13085,7 +17121,7 @@ export interface NetworkWatchers { * * @reject {Error|ServiceError} - The error object. */ - listAvailableProvidersWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginListAvailableProvidersWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** * Lists all available internet service providers for a specified Azure region. @@ -13136,18 +17172,61 @@ export interface NetworkWatchers { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - listAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - listAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, callback: ServiceCallback): void; - listAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, callback: ServiceCallback): void; + beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * PacketCaptures + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface PacketCaptures { /** - * Deletes the specified network watcher resource. + * Create and start a packet capture on the specified VM. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * + * @param {string} packetCaptureName The name of the packet capture session. + * + * @param {object} parameters Parameters that define the create packet capture + * operation. + * + * @param {string} parameters.target The ID of the targeted resource, only VM + * is currently supported. + * + * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes + * captured per packet, the remaining bytes are truncated. + * + * @param {number} [parameters.totalBytesPerSession] Maximum size of the + * capture output. + * + * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the + * capture session in seconds. + * + * @param {object} parameters.storageLocation + * + * @param {string} [parameters.storageLocation.storageId] The ID of the storage + * account to save the packet capture session. Required if no local file path + * is provided. + * + * @param {string} [parameters.storageLocation.storagePath] The URI of the + * storage path to save the packet capture. Must be a well-formed URI + * describing the location to save the packet capture. + * + * @param {string} [parameters.storageLocation.filePath] A valid local path on + * the targeting VM. Must include the name of the capture file (*.cap). For + * linux virtual machine it must start with /var/captures. Required if no + * storage ID is provided, otherwise optional. + * + * @param {array} [parameters.filters] + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -13155,19 +17234,53 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified network watcher resource. + * Create and start a packet capture on the specified VM. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * + * @param {string} packetCaptureName The name of the packet capture session. + * + * @param {object} parameters Parameters that define the create packet capture + * operation. + * + * @param {string} parameters.target The ID of the targeted resource, only VM + * is currently supported. + * + * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes + * captured per packet, the remaining bytes are truncated. + * + * @param {number} [parameters.totalBytesPerSession] Maximum size of the + * capture output. + * + * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the + * capture session in seconds. + * + * @param {object} parameters.storageLocation + * + * @param {string} [parameters.storageLocation.storageId] The ID of the storage + * account to save the packet capture session. Required if no local file path + * is provided. + * + * @param {string} [parameters.storageLocation.storagePath] The URI of the + * storage path to save the packet capture. Must be a well-formed URI + * describing the location to save the packet capture. + * + * @param {string} [parameters.storageLocation.filePath] A valid local path on + * the targeting VM. Must include the name of the capture file (*.cap). For + * linux virtual machine it must start with /var/captures. Required if no + * storage ID is provided, otherwise optional. + * + * @param {array} [parameters.filters] + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -13180,7 +17293,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {null} - The deserialized result object. + * @resolve {PacketCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13188,54 +17301,26 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {null} [result] - The deserialized result object if an error did not occur. + * {PacketCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link PacketCaptureResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + create(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + create(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, callback: ServiceCallback): void; + create(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Verify IP flow from the specified VM to a location given the currently - * configured NSG rules. + * Gets a packet capture session by name. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the IP flow to be - * verified. - * - * @param {string} parameters.targetResourceId The ID of the target resource to - * perform next-hop on. - * - * @param {string} parameters.direction The direction of the packet represented - * as a 5-tuple. Possible values include: 'Inbound', 'Outbound' - * - * @param {string} parameters.protocol Protocol to be verified on. Possible - * values include: 'TCP', 'UDP' - * - * @param {string} parameters.localPort The local port. Acceptable values are a - * single integer in the range (0-65535). Support for * for the source port, - * which depends on the direction. - * - * @param {string} parameters.remotePort The remote port. Acceptable values are - * a single integer in the range (0-65535). Support for * for the source port, - * which depends on the direction. - * - * @param {string} parameters.localIPAddress The local IP address. Acceptable - * values are valid IPv4 addresses. - * - * @param {string} parameters.remoteIPAddress The remote IP address. Acceptable - * values are valid IPv4 addresses. - * - * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has - * multiple NICs and IP forwarding is enabled on any of them, then this - * parameter must be specified. Otherwise optional). + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13244,49 +17329,20 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginVerifyIPFlowWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Verify IP flow from the specified VM to a location given the currently - * configured NSG rules. + * Gets a packet capture session by name. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the IP flow to be - * verified. - * - * @param {string} parameters.targetResourceId The ID of the target resource to - * perform next-hop on. - * - * @param {string} parameters.direction The direction of the packet represented - * as a 5-tuple. Possible values include: 'Inbound', 'Outbound' - * - * @param {string} parameters.protocol Protocol to be verified on. Possible - * values include: 'TCP', 'UDP' - * - * @param {string} parameters.localPort The local port. Acceptable values are a - * single integer in the range (0-65535). Support for * for the source port, - * which depends on the direction. - * - * @param {string} parameters.remotePort The remote port. Acceptable values are - * a single integer in the range (0-65535). Support for * for the source port, - * which depends on the direction. - * - * @param {string} parameters.localIPAddress The local IP address. Acceptable - * values are valid IPv4 addresses. - * - * @param {string} parameters.remoteIPAddress The remote IP address. Acceptable - * values are valid IPv4 addresses. - * - * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has - * multiple NICs and IP forwarding is enabled on any of them, then this - * parameter must be specified. Otherwise optional). + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13300,7 +17356,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {VerificationIPFlowResult} - The deserialized result object. + * @resolve {PacketCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13308,39 +17364,26 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {VerificationIPFlowResult} [result] - The deserialized result object if an error did not occur. - * See {@link VerificationIPFlowResult} for more - * information. + * {PacketCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link PacketCaptureResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, callback: ServiceCallback): void; - beginVerifyIPFlow(resourceGroupName: string, networkWatcherName: string, parameters: models.VerificationIPFlowParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the next hop from the specified VM. + * Deletes the specified packet capture session. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the source and destination - * endpoint. - * - * @param {string} parameters.targetResourceId The resource identifier of the - * target resource against which the action is to be performed. - * - * @param {string} parameters.sourceIPAddress The source IP address. - * - * @param {string} parameters.destinationIPAddress The destination IP address. - * - * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has - * multiple NICs and IP forwarding is enabled on any of the nics, then this - * parameter must be specified. Otherwise optional). + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13349,32 +17392,20 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetNextHopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the next hop from the specified VM. + * Deletes the specified packet capture session. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the source and destination - * endpoint. - * - * @param {string} parameters.targetResourceId The resource identifier of the - * target resource against which the action is to be performed. - * - * @param {string} parameters.sourceIPAddress The source IP address. - * - * @param {string} parameters.destinationIPAddress The destination IP address. - * - * @param {string} [parameters.targetNicResourceId] The NIC ID. (If VM has - * multiple NICs and IP forwarding is enabled on any of the nics, then this - * parameter must be specified. Otherwise optional). + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13388,7 +17419,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {NextHopResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13396,29 +17427,25 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {NextHopResult} [result] - The deserialized result object if an error did not occur. - * See {@link NextHopResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, callback: ServiceCallback): void; - beginGetNextHop(resourceGroupName: string, networkWatcherName: string, parameters: models.NextHopParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the configured and effective security group rules on the specified VM. + * Stops a specified packet capture session. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the VM to check security - * groups for. - * - * @param {string} parameters.targetResourceId ID of the target VM. + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13427,23 +17454,20 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetVMSecurityRulesWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the configured and effective security group rules on the specified VM. + * Stops a specified packet capture session. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the VM to check security - * groups for. - * - * @param {string} parameters.targetResourceId ID of the target VM. + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13457,7 +17481,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {SecurityGroupViewResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13465,37 +17489,26 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {SecurityGroupViewResult} [result] - The deserialized result object if an error did not occur. - * See {@link SecurityGroupViewResult} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, callback: ServiceCallback): void; - beginGetVMSecurityRules(resourceGroupName: string, networkWatcherName: string, parameters: models.SecurityGroupViewParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Initiate troubleshooting on a specified resource + * Query the status of a running packet capture session. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that define the resource to - * troubleshoot. - * - * @param {string} parameters.targetResourceId The target resource to - * troubleshoot. - * - * @param {string} parameters.storageId The ID for the storage account to save - * the troubleshoot result. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} parameters.storagePath The path to the blob to save the - * troubleshoot result in. + * @param {string} packetCaptureName The name given to the packet capture + * session. * * @param {object} [options] Optional Parameters. * @@ -13504,30 +17517,21 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetTroubleshootingWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Initiate troubleshooting on a specified resource + * Query the status of a running packet capture session. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that define the resource to - * troubleshoot. - * - * @param {string} parameters.targetResourceId The target resource to - * troubleshoot. - * - * @param {string} parameters.storageId The ID for the storage account to save - * the troubleshoot result. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} parameters.storagePath The path to the blob to save the - * troubleshoot result in. + * @param {string} packetCaptureName The name given to the packet capture + * session. * * @param {object} [options] Optional Parameters. * @@ -13541,7 +17545,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {TroubleshootingResult} - The deserialized result object. + * @resolve {PacketCaptureQueryStatusResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13549,30 +17553,25 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {TroubleshootingResult} [result] - The deserialized result object if an error did not occur. - * See {@link TroubleshootingResult} for more information. + * {PacketCaptureQueryStatusResult} [result] - The deserialized result object if an error did not occur. + * See {@link PacketCaptureQueryStatusResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, callback: ServiceCallback): void; - beginGetTroubleshooting(resourceGroupName: string, networkWatcherName: string, parameters: models.TroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + getStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + getStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Get the last completed troubleshooting result on a specified resource + * Lists all packet capture sessions within the specified resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that define the resource to query the - * troubleshooting result. - * - * @param {string} parameters.targetResourceId The target resource ID to query - * the troubleshooting result. + * @param {string} networkWatcherName The name of the Network Watcher resource. * * @param {object} [options] Optional Parameters. * @@ -13581,24 +17580,18 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetTroubleshootingResultWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Get the last completed troubleshooting result on a specified resource + * Lists all packet capture sessions within the specified resource group. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that define the resource to query the - * troubleshooting result. - * - * @param {string} parameters.targetResourceId The target resource ID to query - * the troubleshooting result. + * @param {string} networkWatcherName The name of the Network Watcher resource. * * @param {object} [options] Optional Parameters. * @@ -13612,7 +17605,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {TroubleshootingResult} - The deserialized result object. + * @resolve {PacketCaptureListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13620,44 +17613,59 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {TroubleshootingResult} [result] - The deserialized result object if an error did not occur. - * See {@link TroubleshootingResult} for more information. + * {PacketCaptureListResult} [result] - The deserialized result object if an error did not occur. + * See {@link PacketCaptureListResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, callback: ServiceCallback): void; - beginGetTroubleshootingResult(resourceGroupName: string, networkWatcherName: string, parameters: models.QueryTroubleshootingParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Configures flow log on a specified resource. + * Create and start a packet capture on the specified VM. * - * @param {string} resourceGroupName The name of the network watcher resource - * group. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkWatcherName The name of the network watcher resource. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the configuration of flow - * log. + * @param {string} packetCaptureName The name of the packet capture session. * - * @param {string} parameters.targetResourceId The ID of the resource to - * configure for flow logging. + * @param {object} parameters Parameters that define the create packet capture + * operation. * - * @param {string} parameters.storageId ID of the storage account which is used - * to store the flow log. + * @param {string} parameters.target The ID of the targeted resource, only VM + * is currently supported. * - * @param {boolean} parameters.enabled Flag to enable/disable flow logging. + * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes + * captured per packet, the remaining bytes are truncated. * - * @param {object} [parameters.retentionPolicy] + * @param {number} [parameters.totalBytesPerSession] Maximum size of the + * capture output. * - * @param {number} [parameters.retentionPolicy.days] Number of days to retain - * flow log records. + * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the + * capture session in seconds. * - * @param {boolean} [parameters.retentionPolicy.enabled] Flag to enable/disable - * retention. + * @param {object} parameters.storageLocation + * + * @param {string} [parameters.storageLocation.storageId] The ID of the storage + * account to save the packet capture session. Required if no local file path + * is provided. + * + * @param {string} [parameters.storageLocation.storagePath] The URI of the + * storage path to save the packet capture. Must be a well-formed URI + * describing the location to save the packet capture. + * + * @param {string} [parameters.storageLocation.filePath] A valid local path on + * the targeting VM. Must include the name of the capture file (*.cap). For + * linux virtual machine it must start with /var/captures. Required if no + * storage ID is provided, otherwise optional. + * + * @param {array} [parameters.filters] * * @param {object} [options] Optional Parameters. * @@ -13666,38 +17674,52 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginSetFlowLogConfigurationWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Configures flow log on a specified resource. + * Create and start a packet capture on the specified VM. * - * @param {string} resourceGroupName The name of the network watcher resource - * group. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkWatcherName The name of the network watcher resource. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {object} parameters Parameters that define the configuration of flow - * log. + * @param {string} packetCaptureName The name of the packet capture session. * - * @param {string} parameters.targetResourceId The ID of the resource to - * configure for flow logging. + * @param {object} parameters Parameters that define the create packet capture + * operation. * - * @param {string} parameters.storageId ID of the storage account which is used - * to store the flow log. + * @param {string} parameters.target The ID of the targeted resource, only VM + * is currently supported. * - * @param {boolean} parameters.enabled Flag to enable/disable flow logging. + * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes + * captured per packet, the remaining bytes are truncated. * - * @param {object} [parameters.retentionPolicy] + * @param {number} [parameters.totalBytesPerSession] Maximum size of the + * capture output. * - * @param {number} [parameters.retentionPolicy.days] Number of days to retain - * flow log records. + * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the + * capture session in seconds. * - * @param {boolean} [parameters.retentionPolicy.enabled] Flag to enable/disable - * retention. + * @param {object} parameters.storageLocation + * + * @param {string} [parameters.storageLocation.storageId] The ID of the storage + * account to save the packet capture session. Required if no local file path + * is provided. + * + * @param {string} [parameters.storageLocation.storagePath] The URI of the + * storage path to save the packet capture. Must be a well-formed URI + * describing the location to save the packet capture. + * + * @param {string} [parameters.storageLocation.filePath] A valid local path on + * the targeting VM. Must include the name of the capture file (*.cap). For + * linux virtual machine it must start with /var/captures. Required if no + * storage ID is provided, otherwise optional. + * + * @param {array} [parameters.filters] * * @param {object} [options] Optional Parameters. * @@ -13711,7 +17733,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {FlowLogInformation} - The deserialized result object. + * @resolve {PacketCaptureResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13719,31 +17741,26 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {FlowLogInformation} [result] - The deserialized result object if an error did not occur. - * See {@link FlowLogInformation} for more information. + * {PacketCaptureResult} [result] - The deserialized result object if an error did not occur. + * See {@link PacketCaptureResult} for more information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, callback: ServiceCallback): void; - beginSetFlowLogConfiguration(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogInformation, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, callback: ServiceCallback): void; + beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Queries status of flow log on a specified resource. - * - * @param {string} resourceGroupName The name of the network watcher resource - * group. + * Deletes the specified packet capture session. * - * @param {string} networkWatcherName The name of the network watcher resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} parameters Parameters that define a resource to query flow - * log status. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {string} parameters.targetResourceId The target resource where - * getting the flow logging status. + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13752,25 +17769,20 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetFlowLogStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Queries status of flow log on a specified resource. - * - * @param {string} resourceGroupName The name of the network watcher resource - * group. + * Deletes the specified packet capture session. * - * @param {string} networkWatcherName The name of the network watcher resource. + * @param {string} resourceGroupName The name of the resource group. * - * @param {object} parameters Parameters that define a resource to query flow - * log status. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {string} parameters.targetResourceId The target resource where - * getting the flow logging status. + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13784,7 +17796,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {FlowLogInformation} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13792,49 +17804,25 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {FlowLogInformation} [result] - The deserialized result object if an error did not occur. - * See {@link FlowLogInformation} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, callback: ServiceCallback): void; - beginGetFlowLogStatus(resourceGroupName: string, networkWatcherName: string, parameters: models.FlowLogStatusParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Verifies the possibility of establishing a direct TCP connection from a - * virtual machine to a given endpoint including another VM or an arbitrary - * remote server. - * - * @param {string} resourceGroupName The name of the network watcher resource - * group. - * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that determine how the connectivity - * check will be performed. - * - * @param {object} parameters.source - * - * @param {string} parameters.source.resourceId The ID of the resource from - * which a connectivity check will be initiated. - * - * @param {number} [parameters.source.port] The source port from which a - * connectivity check will be performed. - * - * @param {object} parameters.destination + * Stops a specified packet capture session. * - * @param {string} [parameters.destination.resourceId] The ID of the resource - * to which a connection attempt will be made. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.destination.address] The IP address or URI the - * resource to which a connection attempt will be made. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {number} [parameters.destination.port] Port on which check - * connectivity will be performed. + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13843,43 +17831,20 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCheckConnectivityWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Verifies the possibility of establishing a direct TCP connection from a - * virtual machine to a given endpoint including another VM or an arbitrary - * remote server. - * - * @param {string} resourceGroupName The name of the network watcher resource - * group. - * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that determine how the connectivity - * check will be performed. - * - * @param {object} parameters.source - * - * @param {string} parameters.source.resourceId The ID of the resource from - * which a connectivity check will be initiated. - * - * @param {number} [parameters.source.port] The source port from which a - * connectivity check will be performed. - * - * @param {object} parameters.destination + * Stops a specified packet capture session. * - * @param {string} [parameters.destination.resourceId] The ID of the resource - * to which a connection attempt will be made. + * @param {string} resourceGroupName The name of the resource group. * - * @param {string} [parameters.destination.address] The IP address or URI the - * resource to which a connection attempt will be made. + * @param {string} networkWatcherName The name of the network watcher. * - * @param {number} [parameters.destination.port] Port on which check - * connectivity will be performed. + * @param {string} packetCaptureName The name of the packet capture session. * * @param {object} [options] Optional Parameters. * @@ -13893,7 +17858,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {ConnectivityInformation} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -13901,50 +17866,26 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {ConnectivityInformation} [result] - The deserialized result object if an error did not occur. - * See {@link ConnectivityInformation} for more - * information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, callback: ServiceCallback): void; - beginCheckConnectivity(resourceGroupName: string, networkWatcherName: string, parameters: models.ConnectivityParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets the relative latency score for internet service providers from a - * specified location to Azure regions. - * - * @param {string} resourceGroupName The name of the network watcher resource - * group. - * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that determine Azure reachability - * report configuration. - * - * @param {object} parameters.providerLocation - * - * @param {string} parameters.providerLocation.country The name of the country. - * - * @param {string} [parameters.providerLocation.state] The name of the state. - * - * @param {string} [parameters.providerLocation.city] The name of the city or - * town. - * - * @param {array} [parameters.providers] List of Internet service providers. + * Query the status of a running packet capture session. * - * @param {array} [parameters.azureLocations] Optional Azure regions to scope - * the query to. + * @param {string} resourceGroupName The name of the resource group. * - * @param {date} parameters.startTime The start time for the Azure reachability - * report. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {date} parameters.endTime The end time for the Azure reachability - * report. + * @param {string} packetCaptureName The name given to the packet capture + * session. * * @param {object} [options] Optional Parameters. * @@ -13953,43 +17894,21 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetAzureReachabilityReportWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginGetStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets the relative latency score for internet service providers from a - * specified location to Azure regions. - * - * @param {string} resourceGroupName The name of the network watcher resource - * group. - * - * @param {string} networkWatcherName The name of the network watcher resource. - * - * @param {object} parameters Parameters that determine Azure reachability - * report configuration. - * - * @param {object} parameters.providerLocation - * - * @param {string} parameters.providerLocation.country The name of the country. - * - * @param {string} [parameters.providerLocation.state] The name of the state. - * - * @param {string} [parameters.providerLocation.city] The name of the city or - * town. - * - * @param {array} [parameters.providers] List of Internet service providers. + * Query the status of a running packet capture session. * - * @param {array} [parameters.azureLocations] Optional Azure regions to scope - * the query to. + * @param {string} resourceGroupName The name of the resource group. * - * @param {date} parameters.startTime The start time for the Azure reachability - * report. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {date} parameters.endTime The end time for the Azure reachability - * report. + * @param {string} packetCaptureName The name given to the packet capture + * session. * * @param {object} [options] Optional Parameters. * @@ -14003,7 +17922,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {AzureReachabilityReport} - The deserialized result object. + * @resolve {PacketCaptureQueryStatusResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14011,39 +17930,69 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AzureReachabilityReport} [result] - The deserialized result object if an error did not occur. - * See {@link AzureReachabilityReport} for more + * {PacketCaptureQueryStatusResult} [result] - The deserialized result object if an error did not occur. + * See {@link PacketCaptureQueryStatusResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, callback: ServiceCallback): void; - beginGetAzureReachabilityReport(resourceGroupName: string, networkWatcherName: string, parameters: models.AzureReachabilityReportParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; + beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + +/** + * @class + * ConnectionMonitors + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface ConnectionMonitors { /** - * Lists all available internet service providers for a specified Azure region. + * Create or update a connection monitor. * - * @param {string} resourceGroupName The name of the network watcher resource - * group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher resource. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {object} parameters Parameters that scope the list of available - * providers. + * @param {string} connectionMonitorName The name of the connection monitor. * - * @param {array} [parameters.azureLocations] A list of Azure regions. + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. * - * @param {string} [parameters.country] The country for available providers - * list. + * @param {string} [parameters.location] Connection monitor location. * - * @param {string} [parameters.state] The state for available providers list. + * @param {object} [parameters.tags] Connection monitor tags. * - * @param {string} [parameters.city] The city or town for available providers - * list. + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. * * @param {object} [options] Optional Parameters. * @@ -14052,32 +18001,53 @@ export interface NetworkWatchers { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginListAvailableProvidersWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + createOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all available internet service providers for a specified Azure region. + * Create or update a connection monitor. * - * @param {string} resourceGroupName The name of the network watcher resource - * group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher resource. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {object} parameters Parameters that scope the list of available - * providers. + * @param {string} connectionMonitorName The name of the connection monitor. * - * @param {array} [parameters.azureLocations] A list of Azure regions. + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. * - * @param {string} [parameters.country] The country for available providers - * list. + * @param {string} [parameters.location] Connection monitor location. * - * @param {string} [parameters.state] The state for available providers list. + * @param {object} [parameters.tags] Connection monitor tags. * - * @param {string} [parameters.city] The city or town for available providers - * list. + * @param {object} parameters.source + * + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. + * + * @param {number} [parameters.source.port] The source port used by connection + * monitor. + * + * @param {object} parameters.destination + * + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. + * + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). + * + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. * * @param {object} [options] Optional Parameters. * @@ -14091,7 +18061,7 @@ export interface NetworkWatchers { * * {Promise} A promise is returned. * - * @resolve {AvailableProvidersList} - The deserialized result object. + * @resolve {ConnectionMonitorResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14099,68 +18069,28 @@ export interface NetworkWatchers { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {AvailableProvidersList} [result] - The deserialized result object if an error did not occur. - * See {@link AvailableProvidersList} for more + * {ConnectionMonitorResult} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, callback: ServiceCallback): void; - beginListAvailableProviders(resourceGroupName: string, networkWatcherName: string, parameters: models.AvailableProvidersListParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; -} - -/** - * @class - * PacketCaptures - * __NOTE__: An instance of this class is automatically created for an - * instance of the NetworkManagementClient. - */ -export interface PacketCaptures { + createOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create and start a packet capture on the specified VM. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkWatcherName The name of the network watcher. - * - * @param {string} packetCaptureName The name of the packet capture session. - * - * @param {object} parameters Parameters that define the create packet capture - * operation. - * - * @param {string} parameters.target The ID of the targeted resource, only VM - * is currently supported. - * - * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes - * captured per packet, the remaining bytes are truncated. - * - * @param {number} [parameters.totalBytesPerSession] Maximum size of the - * capture output. - * - * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the - * capture session in seconds. - * - * @param {object} parameters.storageLocation - * - * @param {string} [parameters.storageLocation.storageId] The ID of the storage - * account to save the packet capture session. Required if no local file path - * is provided. + * Gets a connection monitor by name. * - * @param {string} [parameters.storageLocation.storagePath] The URI of the - * storage path to save the packet capture. Must be a well-formed URI - * describing the location to save the packet capture. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} [parameters.storageLocation.filePath] A valid local path on - * the targeting VM. Must include the name of the capture file (*.cap). For - * linux virtual machine it must start with /var/captures. Required if no - * storage ID is provided, otherwise optional. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {array} [parameters.filters] + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14169,52 +18099,21 @@ export interface PacketCaptures { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - createWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + getWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create and start a packet capture on the specified VM. - * - * @param {string} resourceGroupName The name of the resource group. - * - * @param {string} networkWatcherName The name of the network watcher. - * - * @param {string} packetCaptureName The name of the packet capture session. - * - * @param {object} parameters Parameters that define the create packet capture - * operation. - * - * @param {string} parameters.target The ID of the targeted resource, only VM - * is currently supported. - * - * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes - * captured per packet, the remaining bytes are truncated. - * - * @param {number} [parameters.totalBytesPerSession] Maximum size of the - * capture output. - * - * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the - * capture session in seconds. - * - * @param {object} parameters.storageLocation - * - * @param {string} [parameters.storageLocation.storageId] The ID of the storage - * account to save the packet capture session. Required if no local file path - * is provided. + * Gets a connection monitor by name. * - * @param {string} [parameters.storageLocation.storagePath] The URI of the - * storage path to save the packet capture. Must be a well-formed URI - * describing the location to save the packet capture. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} [parameters.storageLocation.filePath] A valid local path on - * the targeting VM. Must include the name of the capture file (*.cap). For - * linux virtual machine it must start with /var/captures. Required if no - * storage ID is provided, otherwise optional. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {array} [parameters.filters] + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14228,7 +18127,7 @@ export interface PacketCaptures { * * {Promise} A promise is returned. * - * @resolve {PacketCaptureResult} - The deserialized result object. + * @resolve {ConnectionMonitorResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14236,26 +18135,28 @@ export interface PacketCaptures { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PacketCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link PacketCaptureResult} for more information. + * {ConnectionMonitorResult} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - create(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - create(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, callback: ServiceCallback): void; - create(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + get(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Gets a packet capture session by name. + * Deletes the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14264,20 +18165,21 @@ export interface PacketCaptures { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Gets a packet capture session by name. + * Deletes the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14291,7 +18193,7 @@ export interface PacketCaptures { * * {Promise} A promise is returned. * - * @resolve {PacketCaptureResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14299,26 +18201,26 @@ export interface PacketCaptures { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PacketCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link PacketCaptureResult} for more information. + * {null} [result] - The deserialized result object if an error did not occur. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - get(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified packet capture session. + * Stops the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14331,16 +18233,17 @@ export interface PacketCaptures { * * @reject {Error|ServiceError} - The error object. */ - deleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + stopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified packet capture session. + * Stops the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14368,19 +18271,20 @@ export interface PacketCaptures { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - deleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - deleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - deleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + stop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + stop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + stop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Stops a specified packet capture session. + * Starts the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14393,16 +18297,17 @@ export interface PacketCaptures { * * @reject {Error|ServiceError} - The error object. */ - stopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + startWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Stops a specified packet capture session. + * Starts the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14430,20 +18335,21 @@ export interface PacketCaptures { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - stop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - stop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - stop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + start(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + start(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + start(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Query the status of a running packet capture session. + * Query a snapshot of the most recent connection states. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name given to the packet capture - * session. + * @param {string} connectionMonitorName The name given to the connection + * monitor. * * @param {object} [options] Optional Parameters. * @@ -14452,21 +18358,22 @@ export interface PacketCaptures { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - getStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + queryWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Query the status of a running packet capture session. + * Query a snapshot of the most recent connection states. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name given to the packet capture - * session. + * @param {string} connectionMonitorName The name given to the connection + * monitor. * * @param {object} [options] Optional Parameters. * @@ -14480,7 +18387,7 @@ export interface PacketCaptures { * * {Promise} A promise is returned. * - * @resolve {PacketCaptureQueryStatusResult} - The deserialized result object. + * @resolve {ConnectionMonitorQueryResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14488,23 +18395,24 @@ export interface PacketCaptures { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PacketCaptureQueryStatusResult} [result] - The deserialized result object if an error did not occur. - * See {@link PacketCaptureQueryStatusResult} for more + * {ConnectionMonitorQueryResult} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorQueryResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - getStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - getStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - getStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + query(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + query(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + query(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Lists all packet capture sessions within the specified resource group. + * Lists all connection monitors for the specified Network Watcher. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * * @param {string} networkWatcherName The name of the Network Watcher resource. * @@ -14515,16 +18423,17 @@ export interface PacketCaptures { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - listWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + listWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Lists all packet capture sessions within the specified resource group. + * Lists all connection monitors for the specified Network Watcher. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * * @param {string} networkWatcherName The name of the Network Watcher resource. * @@ -14540,7 +18449,7 @@ export interface PacketCaptures { * * {Promise} A promise is returned. * - * @resolve {PacketCaptureListResult} - The deserialized result object. + * @resolve {ConnectionMonitorListResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14548,59 +18457,60 @@ export interface PacketCaptures { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PacketCaptureListResult} [result] - The deserialized result object if an error did not occur. - * See {@link PacketCaptureListResult} for more + * {ConnectionMonitorListResult} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorListResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - list(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - list(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; - list(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + list(resourceGroupName: string, networkWatcherName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + list(resourceGroupName: string, networkWatcherName: string, callback: ServiceCallback): void; + list(resourceGroupName: string, networkWatcherName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Create and start a packet capture on the specified VM. + * Create or update a connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * - * @param {object} parameters Parameters that define the create packet capture - * operation. + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. * - * @param {string} parameters.target The ID of the targeted resource, only VM - * is currently supported. + * @param {string} [parameters.location] Connection monitor location. * - * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes - * captured per packet, the remaining bytes are truncated. + * @param {object} [parameters.tags] Connection monitor tags. * - * @param {number} [parameters.totalBytesPerSession] Maximum size of the - * capture output. + * @param {object} parameters.source * - * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the - * capture session in seconds. + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. * - * @param {object} parameters.storageLocation + * @param {number} [parameters.source.port] The source port used by connection + * monitor. * - * @param {string} [parameters.storageLocation.storageId] The ID of the storage - * account to save the packet capture session. Required if no local file path - * is provided. + * @param {object} parameters.destination * - * @param {string} [parameters.storageLocation.storagePath] The URI of the - * storage path to save the packet capture. Must be a well-formed URI - * describing the location to save the packet capture. + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. * - * @param {string} [parameters.storageLocation.filePath] A valid local path on - * the targeting VM. Must include the name of the capture file (*.cap). For - * linux virtual machine it must start with /var/captures. Required if no - * storage ID is provided, otherwise optional. + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). * - * @param {array} [parameters.filters] + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. * * @param {object} [options] Optional Parameters. * @@ -14609,52 +18519,53 @@ export interface PacketCaptures { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginCreateWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginCreateOrUpdateWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Create and start a packet capture on the specified VM. + * Create or update a connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * - * @param {object} parameters Parameters that define the create packet capture - * operation. + * @param {object} parameters Parameters that define the operation to create a + * connection monitor. * - * @param {string} parameters.target The ID of the targeted resource, only VM - * is currently supported. + * @param {string} [parameters.location] Connection monitor location. * - * @param {number} [parameters.bytesToCapturePerPacket] Number of bytes - * captured per packet, the remaining bytes are truncated. + * @param {object} [parameters.tags] Connection monitor tags. * - * @param {number} [parameters.totalBytesPerSession] Maximum size of the - * capture output. + * @param {object} parameters.source * - * @param {number} [parameters.timeLimitInSeconds] Maximum duration of the - * capture session in seconds. + * @param {string} parameters.source.resourceId The ID of the resource used as + * the source by connection monitor. * - * @param {object} parameters.storageLocation + * @param {number} [parameters.source.port] The source port used by connection + * monitor. * - * @param {string} [parameters.storageLocation.storageId] The ID of the storage - * account to save the packet capture session. Required if no local file path - * is provided. + * @param {object} parameters.destination * - * @param {string} [parameters.storageLocation.storagePath] The URI of the - * storage path to save the packet capture. Must be a well-formed URI - * describing the location to save the packet capture. + * @param {string} [parameters.destination.resourceId] The ID of the resource + * used as the destination by connection monitor. * - * @param {string} [parameters.storageLocation.filePath] A valid local path on - * the targeting VM. Must include the name of the capture file (*.cap). For - * linux virtual machine it must start with /var/captures. Required if no - * storage ID is provided, otherwise optional. + * @param {string} [parameters.destination.address] Address of the connection + * monitor destination (IP or domain name). * - * @param {array} [parameters.filters] + * @param {number} [parameters.destination.port] The destination port used by + * connection monitor. + * + * @param {boolean} [parameters.autoStart] Determines if the connection monitor + * will start automatically once created. + * + * @param {number} [parameters.monitoringIntervalInSeconds] Monitoring interval + * in seconds. * * @param {object} [options] Optional Parameters. * @@ -14668,7 +18579,7 @@ export interface PacketCaptures { * * {Promise} A promise is returned. * - * @resolve {PacketCaptureResult} - The deserialized result object. + * @resolve {ConnectionMonitorResult} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14676,26 +18587,28 @@ export interface PacketCaptures { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PacketCaptureResult} [result] - The deserialized result object if an error did not occur. - * See {@link PacketCaptureResult} for more information. + * {ConnectionMonitorResult} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorResult} for more + * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, callback: ServiceCallback): void; - beginCreate(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, parameters: models.PacketCapture, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, parameters: models.ConnectionMonitor, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Deletes the specified packet capture session. + * Deletes the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14708,16 +18621,17 @@ export interface PacketCaptures { * * @reject {Error|ServiceError} - The error object. */ - beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginDeleteMethodWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Deletes the specified packet capture session. + * Deletes the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14745,19 +18659,20 @@ export interface PacketCaptures { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Stops a specified packet capture session. + * Stops the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14770,16 +18685,17 @@ export interface PacketCaptures { * * @reject {Error|ServiceError} - The error object. */ - beginStopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStopWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Stops a specified packet capture session. + * Stops the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * - * @param {string} networkWatcherName The name of the network watcher. + * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name of the packet capture session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14807,20 +18723,20 @@ export interface PacketCaptures { * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - beginStop(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + beginStop(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; /** - * Query the status of a running packet capture session. + * Starts the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name given to the packet capture - * session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14829,21 +18745,21 @@ export interface PacketCaptures { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. */ - beginGetStatusWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + beginStartWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Query the status of a running packet capture session. + * Starts the specified connection monitor. * - * @param {string} resourceGroupName The name of the resource group. + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. * * @param {string} networkWatcherName The name of the Network Watcher resource. * - * @param {string} packetCaptureName The name given to the packet capture - * session. + * @param {string} connectionMonitorName The name of the connection monitor. * * @param {object} [options] Optional Parameters. * @@ -14857,7 +18773,7 @@ export interface PacketCaptures { * * {Promise} A promise is returned. * - * @resolve {PacketCaptureQueryStatusResult} - The deserialized result object. + * @resolve {null} - The deserialized result object. * * @reject {Error|ServiceError} - The error object. * @@ -14865,17 +18781,83 @@ export interface PacketCaptures { * * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. * - * {PacketCaptureQueryStatusResult} [result] - The deserialized result object if an error did not occur. - * See {@link PacketCaptureQueryStatusResult} for more + * {null} [result] - The deserialized result object if an error did not occur. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginStart(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginStart(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + beginStart(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginQueryWithHttpOperationResponse(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Query a snapshot of the most recent connection states. + * + * @param {string} resourceGroupName The name of the resource group containing + * Network Watcher. + * + * @param {string} networkWatcherName The name of the Network Watcher resource. + * + * @param {string} connectionMonitorName The name given to the connection + * monitor. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {ConnectionMonitorQueryResult} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {ConnectionMonitorQueryResult} [result] - The deserialized result object if an error did not occur. + * See {@link ConnectionMonitorQueryResult} for more * information. * * {WebResource} [request] - The HTTP Request object if an error did not occur. * * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. */ - beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; - beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, callback: ServiceCallback): void; - beginGetStatus(resourceGroupName: string, networkWatcherName: string, packetCaptureName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + beginQuery(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginQuery(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, callback: ServiceCallback): void; + beginQuery(resourceGroupName: string, networkWatcherName: string, connectionMonitorName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } /** @@ -15167,6 +19149,9 @@ export interface PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -15247,6 +19232,9 @@ export interface PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -15802,6 +19790,9 @@ export interface PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -15882,6 +19873,9 @@ export interface PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -17161,8 +21155,6 @@ export interface RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17203,8 +21195,6 @@ export interface RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17258,8 +21248,6 @@ export interface RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17294,8 +21282,6 @@ export interface RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17477,8 +21463,6 @@ export interface RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17519,8 +21503,6 @@ export interface RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17574,8 +21556,6 @@ export interface RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -17610,8 +21590,6 @@ export interface RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -19407,10 +23385,16 @@ export interface VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. + * + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -19469,10 +23453,16 @@ export interface VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. + * + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -19909,10 +23899,16 @@ export interface VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. + * + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -19971,10 +23967,16 @@ export interface VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. + * + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -21740,6 +25742,9 @@ export interface VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -21855,6 +25860,9 @@ export interface VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -22825,6 +26833,208 @@ export interface VirtualNetworkGateways { getAdvertisedRoutes(resourceGroupName: string, virtualNetworkGatewayName: string, peer: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + setVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnClientIPsecParameters} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnClientIPsecParameters} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + setVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + setVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, callback: ServiceCallback): void; + setVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + getVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnClientIPsecParameters} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnClientIPsecParameters} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + getVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + getVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, callback: ServiceCallback): void; + getVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets a xml format representation for vpn device configuration script. * @@ -22978,6 +27188,9 @@ export interface VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -23093,6 +27306,9 @@ export interface VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -23824,6 +28040,208 @@ export interface VirtualNetworkGateways { beginGetAdvertisedRoutes(resourceGroupName: string, virtualNetworkGatewayName: string, peer: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginSetVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnClientIPsecParameters} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnClientIPsecParameters} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginSetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginSetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, callback: ServiceCallback): void; + beginSetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, vpnclientIpsecParams: models.VpnClientIPsecParameters, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + */ + beginGetVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {ServiceCallback} [optionalCallback] - The optional callback. + * + * @returns {ServiceCallback|Promise} If a callback was passed as the last + * parameter then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned. + * + * @resolve {VpnClientIPsecParameters} - The deserialized result object. + * + * @reject {Error|ServiceError} - The error object. + * + * {ServiceCallback} optionalCallback(err, result, request, response) + * + * {Error|ServiceError} err - The Error object if an error occurred, null otherwise. + * + * {VpnClientIPsecParameters} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {WebResource} [request] - The HTTP Request object if an error did not occur. + * + * {http.IncomingMessage} [response] - The HTTP Response stream if an error did not occur. + */ + beginGetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginGetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, callback: ServiceCallback): void; + beginGetVpnclientIpsecParameters(resourceGroupName: string, virtualNetworkGatewayName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + /** * Gets all virtual network gateways by resource group. * @@ -24027,6 +28445,10 @@ export interface VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -24215,6 +28637,10 @@ export interface VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -24903,6 +29329,10 @@ export interface VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -25091,6 +29521,10 @@ export interface VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for diff --git a/lib/services/networkManagement2/lib/operations/index.js b/lib/services/networkManagement2/lib/operations/index.js index afb42b96eb..b71044c90d 100644 --- a/lib/services/networkManagement2/lib/operations/index.js +++ b/lib/services/networkManagement2/lib/operations/index.js @@ -16,11 +16,15 @@ exports.ApplicationGateways = require('./applicationGateways'); exports.ApplicationSecurityGroups = require('./applicationSecurityGroups'); +exports.DdosProtectionPlans = require('./ddosProtectionPlans'); exports.AvailableEndpointServices = require('./availableEndpointServices'); exports.ExpressRouteCircuitAuthorizations = require('./expressRouteCircuitAuthorizations'); exports.ExpressRouteCircuitPeerings = require('./expressRouteCircuitPeerings'); +exports.ExpressRouteCircuitConnections = require('./expressRouteCircuitConnections'); exports.ExpressRouteCircuits = require('./expressRouteCircuits'); exports.ExpressRouteServiceProviders = require('./expressRouteServiceProviders'); +exports.ExpressRouteCrossConnections = require('./expressRouteCrossConnections'); +exports.ExpressRouteCrossConnectionPeerings = require('./expressRouteCrossConnectionPeerings'); exports.LoadBalancers = require('./loadBalancers'); exports.LoadBalancerBackendAddressPools = require('./loadBalancerBackendAddressPools'); exports.LoadBalancerFrontendIPConfigurations = require('./loadBalancerFrontendIPConfigurations'); @@ -36,6 +40,7 @@ exports.SecurityRules = require('./securityRules'); exports.DefaultSecurityRules = require('./defaultSecurityRules'); exports.NetworkWatchers = require('./networkWatchers'); exports.PacketCaptures = require('./packetCaptures'); +exports.ConnectionMonitors = require('./connectionMonitors'); exports.Operations = require('./operations'); exports.PublicIPAddresses = require('./publicIPAddresses'); exports.RouteFilters = require('./routeFilters'); diff --git a/lib/services/networkManagement2/lib/operations/loadBalancerBackendAddressPools.js b/lib/services/networkManagement2/lib/operations/loadBalancerBackendAddressPools.js index 0f637a0bc9..7ff40ef853 100644 --- a/lib/services/networkManagement2/lib/operations/loadBalancerBackendAddressPools.js +++ b/lib/services/networkManagement2/lib/operations/loadBalancerBackendAddressPools.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, loadBalancerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -195,7 +195,7 @@ function _get(resourceGroupName, loadBalancerName, backendAddressPoolName, optio if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/loadBalancerFrontendIPConfigurations.js b/lib/services/networkManagement2/lib/operations/loadBalancerFrontendIPConfigurations.js index 04c9e8207c..b71f1418fa 100644 --- a/lib/services/networkManagement2/lib/operations/loadBalancerFrontendIPConfigurations.js +++ b/lib/services/networkManagement2/lib/operations/loadBalancerFrontendIPConfigurations.js @@ -51,7 +51,7 @@ function _list(resourceGroupName, loadBalancerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -198,7 +198,7 @@ function _get(resourceGroupName, loadBalancerName, frontendIPConfigurationName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/loadBalancerLoadBalancingRules.js b/lib/services/networkManagement2/lib/operations/loadBalancerLoadBalancingRules.js index d1b14869e6..ae60d4849a 100644 --- a/lib/services/networkManagement2/lib/operations/loadBalancerLoadBalancingRules.js +++ b/lib/services/networkManagement2/lib/operations/loadBalancerLoadBalancingRules.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, loadBalancerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -195,7 +195,7 @@ function _get(resourceGroupName, loadBalancerName, loadBalancingRuleName, option if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/loadBalancerNetworkInterfaces.js b/lib/services/networkManagement2/lib/operations/loadBalancerNetworkInterfaces.js index 3f9ecf40be..cd605042fa 100644 --- a/lib/services/networkManagement2/lib/operations/loadBalancerNetworkInterfaces.js +++ b/lib/services/networkManagement2/lib/operations/loadBalancerNetworkInterfaces.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, loadBalancerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/loadBalancerProbes.js b/lib/services/networkManagement2/lib/operations/loadBalancerProbes.js index c06ce9e4c4..61a9053ab2 100644 --- a/lib/services/networkManagement2/lib/operations/loadBalancerProbes.js +++ b/lib/services/networkManagement2/lib/operations/loadBalancerProbes.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, loadBalancerName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -195,7 +195,7 @@ function _get(resourceGroupName, loadBalancerName, probeName, options, callback) if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/loadBalancers.js b/lib/services/networkManagement2/lib/operations/loadBalancers.js index 292c4fd182..5adef86148 100644 --- a/lib/services/networkManagement2/lib/operations/loadBalancers.js +++ b/lib/services/networkManagement2/lib/operations/loadBalancers.js @@ -115,7 +115,7 @@ function _get(resourceGroupName, loadBalancerName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -476,7 +476,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -610,7 +610,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -748,7 +748,7 @@ function _beginDeleteMethod(resourceGroupName, loadBalancerName, options, callba if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -806,7 +806,7 @@ function _beginDeleteMethod(resourceGroupName, loadBalancerName, options, callba return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -929,7 +929,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, parameters, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1004,7 +1004,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, parameters, o return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1033,7 +1033,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, parameters, o let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1050,7 +1050,7 @@ function _beginCreateOrUpdate(resourceGroupName, loadBalancerName, parameters, o } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1110,7 +1110,7 @@ function _beginUpdateTags(resourceGroupName, loadBalancerName, parameters, optio if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/localNetworkGateways.js b/lib/services/networkManagement2/lib/operations/localNetworkGateways.js index 77f186dd3c..f9b250d3f2 100644 --- a/lib/services/networkManagement2/lib/operations/localNetworkGateways.js +++ b/lib/services/networkManagement2/lib/operations/localNetworkGateways.js @@ -164,7 +164,7 @@ function _get(resourceGroupName, localNetworkGatewayName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -460,7 +460,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -635,7 +635,7 @@ function _beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, parame if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -716,7 +716,7 @@ function _beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, parame return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -745,7 +745,7 @@ function _beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, parame let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -762,7 +762,7 @@ function _beginCreateOrUpdate(resourceGroupName, localNetworkGatewayName, parame } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -818,7 +818,7 @@ function _beginDeleteMethod(resourceGroupName, localNetworkGatewayName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -882,7 +882,7 @@ function _beginDeleteMethod(resourceGroupName, localNetworkGatewayName, options, return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 200 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -956,7 +956,7 @@ function _beginUpdateTags(resourceGroupName, localNetworkGatewayName, parameters if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/networkInterfaceIPConfigurations.js b/lib/services/networkManagement2/lib/operations/networkInterfaceIPConfigurations.js index c77c3287b8..1fdc6b0504 100644 --- a/lib/services/networkManagement2/lib/operations/networkInterfaceIPConfigurations.js +++ b/lib/services/networkManagement2/lib/operations/networkInterfaceIPConfigurations.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, networkInterfaceName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -196,7 +196,7 @@ function _get(resourceGroupName, networkInterfaceName, ipConfigurationName, opti if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/networkInterfaceLoadBalancers.js b/lib/services/networkManagement2/lib/operations/networkInterfaceLoadBalancers.js index 2660784c76..b24a894f20 100644 --- a/lib/services/networkManagement2/lib/operations/networkInterfaceLoadBalancers.js +++ b/lib/services/networkManagement2/lib/operations/networkInterfaceLoadBalancers.js @@ -50,7 +50,7 @@ function _list(resourceGroupName, networkInterfaceName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/networkInterfaces.js b/lib/services/networkManagement2/lib/operations/networkInterfaces.js index 53f453a6f0..470904d1a1 100644 --- a/lib/services/networkManagement2/lib/operations/networkInterfaces.js +++ b/lib/services/networkManagement2/lib/operations/networkInterfaces.js @@ -115,7 +115,7 @@ function _get(resourceGroupName, networkInterfaceName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -513,7 +513,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -647,7 +647,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -949,7 +949,7 @@ function _listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtu if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1098,7 +1098,7 @@ function _listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtual if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1249,7 +1249,7 @@ function _getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMa throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1416,7 +1416,7 @@ function _listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualM throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1585,7 +1585,7 @@ function _getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMac throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1745,7 +1745,7 @@ function _beginDeleteMethod(resourceGroupName, networkInterfaceName, options, ca if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1803,7 +1803,7 @@ function _beginDeleteMethod(resourceGroupName, networkInterfaceName, options, ca return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1962,7 +1962,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkInterfaceName, parameter if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2037,7 +2037,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkInterfaceName, parameter return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2066,7 +2066,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkInterfaceName, parameter let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -2083,7 +2083,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkInterfaceName, parameter } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -2144,7 +2144,7 @@ function _beginUpdateTags(resourceGroupName, networkInterfaceName, parameters, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2305,7 +2305,7 @@ function _beginGetEffectiveRouteTable(resourceGroupName, networkInterfaceName, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2449,7 +2449,7 @@ function _beginListEffectiveNetworkSecurityGroups(resourceGroupName, networkInte if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/networkSecurityGroups.js b/lib/services/networkManagement2/lib/operations/networkSecurityGroups.js index 2eefeffa02..cae736c890 100644 --- a/lib/services/networkManagement2/lib/operations/networkSecurityGroups.js +++ b/lib/services/networkManagement2/lib/operations/networkSecurityGroups.js @@ -117,7 +117,7 @@ function _get(resourceGroupName, networkSecurityGroupName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -451,7 +451,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -585,7 +585,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -724,7 +724,7 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -782,7 +782,7 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, options return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -876,7 +876,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, param if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -951,7 +951,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, param return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -980,7 +980,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, param let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -997,7 +997,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, param } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1059,7 +1059,7 @@ function _beginUpdateTags(resourceGroupName, networkSecurityGroupName, parameter if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/networkWatchers.js b/lib/services/networkManagement2/lib/operations/networkWatchers.js index beeea7ca6f..e97208f157 100644 --- a/lib/services/networkManagement2/lib/operations/networkWatchers.js +++ b/lib/services/networkManagement2/lib/operations/networkWatchers.js @@ -61,7 +61,7 @@ function _createOrUpdate(resourceGroupName, networkWatcherName, parameters, opti if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -238,7 +238,7 @@ function _get(resourceGroupName, networkWatcherName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -449,7 +449,7 @@ function _updateTags(resourceGroupName, networkWatcherName, parameters, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -608,7 +608,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -744,7 +744,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -893,7 +893,7 @@ function _getTopology(resourceGroupName, networkWatcherName, parameters, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1694,6 +1694,23 @@ function _getFlowLogStatus(resourceGroupName, networkWatcherName, parameters, op * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -1996,7 +2013,7 @@ function _beginDeleteMethod(resourceGroupName, networkWatcherName, options, call if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2154,7 +2171,7 @@ function _beginVerifyIPFlow(resourceGroupName, networkWatcherName, parameters, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2345,7 +2362,7 @@ function _beginGetNextHop(resourceGroupName, networkWatcherName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2528,7 +2545,7 @@ function _beginGetVMSecurityRules(resourceGroupName, networkWatcherName, paramet if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2717,7 +2734,7 @@ function _beginGetTroubleshooting(resourceGroupName, networkWatcherName, paramet if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2900,7 +2917,7 @@ function _beginGetTroubleshootingResult(resourceGroupName, networkWatcherName, p if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3097,7 +3114,7 @@ function _beginSetFlowLogConfiguration(resourceGroupName, networkWatcherName, pa if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3281,7 +3298,7 @@ function _beginGetFlowLogStatus(resourceGroupName, networkWatcherName, parameter if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3455,6 +3472,23 @@ function _beginGetFlowLogStatus(resourceGroupName, networkWatcherName, parameter * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -3484,7 +3518,7 @@ function _beginCheckConnectivity(resourceGroupName, networkWatcherName, paramete if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3687,7 +3721,7 @@ function _beginGetAzureReachabilityReport(resourceGroupName, networkWatcherName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3879,7 +3913,7 @@ function _beginListAvailableProviders(resourceGroupName, networkWatcherName, par if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -5538,6 +5572,23 @@ class NetworkWatchers { * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5595,6 +5646,23 @@ class NetworkWatchers { * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6806,6 +6874,23 @@ class NetworkWatchers { * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -6863,6 +6948,23 @@ class NetworkWatchers { * @param {number} [parameters.destination.port] Port on which check * connectivity will be performed. * + * @param {string} [parameters.protocol] Network protocol. Possible values + * include: 'Tcp', 'Http', 'Https', 'Icmp' + * + * @param {object} [parameters.protocolConfiguration] + * + * @param {object} [parameters.protocolConfiguration.hTTPConfiguration] + * + * @param {string} [parameters.protocolConfiguration.hTTPConfiguration.method] + * HTTP method. Possible values include: 'Get' + * + * @param {array} [parameters.protocolConfiguration.hTTPConfiguration.headers] + * List of HTTP headers. + * + * @param {array} + * [parameters.protocolConfiguration.hTTPConfiguration.validStatusCodes] Valid + * status codes. + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the diff --git a/lib/services/networkManagement2/lib/operations/operations.js b/lib/services/networkManagement2/lib/operations/operations.js index 40367942fc..63798f7219 100644 --- a/lib/services/networkManagement2/lib/operations/operations.js +++ b/lib/services/networkManagement2/lib/operations/operations.js @@ -45,7 +45,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/packetCaptures.js b/lib/services/networkManagement2/lib/operations/packetCaptures.js index e2f6d0ddd7..3a0f8d1b02 100644 --- a/lib/services/networkManagement2/lib/operations/packetCaptures.js +++ b/lib/services/networkManagement2/lib/operations/packetCaptures.js @@ -163,7 +163,7 @@ function _get(resourceGroupName, networkWatcherName, packetCaptureName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -523,7 +523,7 @@ function _list(resourceGroupName, networkWatcherName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -700,7 +700,7 @@ function _beginCreate(resourceGroupName, networkWatcherName, packetCaptureName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -865,7 +865,7 @@ function _beginDeleteMethod(resourceGroupName, networkWatcherName, packetCapture if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -927,7 +927,7 @@ function _beginDeleteMethod(resourceGroupName, networkWatcherName, packetCapture return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202) { + if (statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -996,7 +996,7 @@ function _beginStop(resourceGroupName, networkWatcherName, packetCaptureName, op if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1130,7 +1130,7 @@ function _beginGetStatus(resourceGroupName, networkWatcherName, packetCaptureNam if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/publicIPAddresses.js b/lib/services/networkManagement2/lib/operations/publicIPAddresses.js index 92c013925a..8887e23030 100644 --- a/lib/services/networkManagement2/lib/operations/publicIPAddresses.js +++ b/lib/services/networkManagement2/lib/operations/publicIPAddresses.js @@ -115,7 +115,7 @@ function _get(resourceGroupName, publicIpAddressName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -272,6 +272,9 @@ function _get(resourceGroupName, publicIpAddressName, options, callback) { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -482,7 +485,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -616,7 +619,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -758,7 +761,7 @@ function _listVirtualMachineScaleSetPublicIPAddresses(resourceGroupName, virtual if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -910,7 +913,7 @@ function _listVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName, virtu if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1077,7 +1080,7 @@ function _getVirtualMachineScaleSetPublicIPAddress(resourceGroupName, virtualMac throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-03-30'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1241,7 +1244,7 @@ function _beginDeleteMethod(resourceGroupName, publicIpAddressName, options, cal if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1299,7 +1302,7 @@ function _beginDeleteMethod(resourceGroupName, publicIpAddressName, options, cal return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1374,6 +1377,9 @@ function _beginDeleteMethod(resourceGroupName, publicIpAddressName, options, cal * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -1427,7 +1433,7 @@ function _beginCreateOrUpdate(resourceGroupName, publicIpAddressName, parameters if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1502,7 +1508,7 @@ function _beginCreateOrUpdate(resourceGroupName, publicIpAddressName, parameters return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1531,7 +1537,7 @@ function _beginCreateOrUpdate(resourceGroupName, publicIpAddressName, parameters let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1548,7 +1554,7 @@ function _beginCreateOrUpdate(resourceGroupName, publicIpAddressName, parameters } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1609,7 +1615,7 @@ function _beginUpdateTags(resourceGroupName, publicIpAddressName, parameters, op if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2491,6 +2497,9 @@ class PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -2583,6 +2592,9 @@ class PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -3342,6 +3354,9 @@ class PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * @@ -3434,6 +3449,9 @@ class PublicIPAddresses { * record is created pointing from the IP address in the in-addr.arpa domain to * the reverse FQDN. * + * @param {array} [parameters.ipTags] The list of tags associated with the + * public IP address. + * * @param {string} [parameters.ipAddress] The IP address associated with the * public IP address resource. * diff --git a/lib/services/networkManagement2/lib/operations/routeFilterRules.js b/lib/services/networkManagement2/lib/operations/routeFilterRules.js index 880fefc62f..7b86de829c 100644 --- a/lib/services/networkManagement2/lib/operations/routeFilterRules.js +++ b/lib/services/networkManagement2/lib/operations/routeFilterRules.js @@ -116,7 +116,7 @@ function _get(resourceGroupName, routeFilterName, ruleName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -254,8 +254,6 @@ function _get(resourceGroupName, routeFilterName, ruleName, options, callback) { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -348,8 +346,6 @@ function _createOrUpdate(resourceGroupName, routeFilterName, ruleName, routeFilt * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -458,7 +454,7 @@ function _listByRouteFilter(resourceGroupName, routeFilterName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -602,7 +598,7 @@ function _beginDeleteMethod(resourceGroupName, routeFilterName, ruleName, option if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -664,7 +660,7 @@ function _beginDeleteMethod(resourceGroupName, routeFilterName, ruleName, option return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -722,8 +718,6 @@ function _beginDeleteMethod(resourceGroupName, routeFilterName, ruleName, option * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -758,7 +752,7 @@ function _beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, rout { routeFilterRuleParameters = {}; } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -923,8 +917,6 @@ function _beginCreateOrUpdate(resourceGroupName, routeFilterName, ruleName, rout * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -959,7 +951,7 @@ function _beginUpdate(resourceGroupName, routeFilterName, ruleName, routeFilterR { routeFilterRuleParameters = {}; } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1439,8 +1431,6 @@ class RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -1493,8 +1483,6 @@ class RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -1563,8 +1551,6 @@ class RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -1611,8 +1597,6 @@ class RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -1863,8 +1847,6 @@ class RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -1917,8 +1899,6 @@ class RouteFilterRules { * * @param {string} [routeFilterRuleParameters.location] Resource location. * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -1987,8 +1967,6 @@ class RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. @@ -2035,8 +2013,6 @@ class RouteFilterRules { * @param {array} routeFilterRuleParameters.communities The collection for bgp * community values to filter on. e.g. ['12076:5010','12076:5020'] * - * @param {object} [routeFilterRuleParameters.tags] Resource tags. - * * @param {string} [routeFilterRuleParameters.id] Resource ID. * * @param {object} [options] Optional Parameters. diff --git a/lib/services/networkManagement2/lib/operations/routeFilters.js b/lib/services/networkManagement2/lib/operations/routeFilters.js index 091ea9bf51..7cfe19234f 100644 --- a/lib/services/networkManagement2/lib/operations/routeFilters.js +++ b/lib/services/networkManagement2/lib/operations/routeFilters.js @@ -116,7 +116,7 @@ function _get(resourceGroupName, routeFilterName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -447,7 +447,7 @@ function _listByResourceGroup(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -582,7 +582,7 @@ function _list(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -716,7 +716,7 @@ function _beginDeleteMethod(resourceGroupName, routeFilterName, options, callbac if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -774,7 +774,7 @@ function _beginDeleteMethod(resourceGroupName, routeFilterName, options, callbac return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -857,7 +857,7 @@ function _beginCreateOrUpdate(resourceGroupName, routeFilterName, routeFilterPar if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1047,7 +1047,7 @@ function _beginUpdate(resourceGroupName, routeFilterName, routeFilterParameters, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/routeTables.js b/lib/services/networkManagement2/lib/operations/routeTables.js index 85b75bf87e..87a83020b2 100644 --- a/lib/services/networkManagement2/lib/operations/routeTables.js +++ b/lib/services/networkManagement2/lib/operations/routeTables.js @@ -115,7 +115,7 @@ function _get(resourceGroupName, routeTableName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -444,7 +444,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -579,7 +579,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -713,7 +713,7 @@ function _beginDeleteMethod(resourceGroupName, routeTableName, options, callback if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -771,7 +771,7 @@ function _beginDeleteMethod(resourceGroupName, routeTableName, options, callback return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 200 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -861,7 +861,7 @@ function _beginCreateOrUpdate(resourceGroupName, routeTableName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1042,7 +1042,7 @@ function _beginUpdateTags(resourceGroupName, routeTableName, parameters, options if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/routes.js b/lib/services/networkManagement2/lib/operations/routes.js index 0642dfa622..0c305dfacb 100644 --- a/lib/services/networkManagement2/lib/operations/routes.js +++ b/lib/services/networkManagement2/lib/operations/routes.js @@ -116,7 +116,7 @@ function _get(resourceGroupName, routeTableName, routeName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -371,7 +371,7 @@ function _list(resourceGroupName, routeTableName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -515,7 +515,7 @@ function _beginDeleteMethod(resourceGroupName, routeTableName, routeName, option if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -577,7 +577,7 @@ function _beginDeleteMethod(resourceGroupName, routeTableName, routeName, option return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200 && statusCode !== 204) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -675,7 +675,7 @@ function _beginCreateOrUpdate(resourceGroupName, routeTableName, routeName, rout if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/securityRules.js b/lib/services/networkManagement2/lib/operations/securityRules.js index 33ee058884..618bd59702 100644 --- a/lib/services/networkManagement2/lib/operations/securityRules.js +++ b/lib/services/networkManagement2/lib/operations/securityRules.js @@ -118,7 +118,7 @@ function _get(resourceGroupName, networkSecurityGroupName, securityRuleName, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -422,7 +422,7 @@ function _list(resourceGroupName, networkSecurityGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -567,7 +567,7 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, securit if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -629,7 +629,7 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, securit return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -774,7 +774,7 @@ function _beginCreateOrUpdate(resourceGroupName, networkSecurityGroupName, secur if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/subnets.js b/lib/services/networkManagement2/lib/operations/subnets.js index d733d7cb00..e8dbbc4c73 100644 --- a/lib/services/networkManagement2/lib/operations/subnets.js +++ b/lib/services/networkManagement2/lib/operations/subnets.js @@ -119,7 +119,7 @@ function _get(resourceGroupName, virtualNetworkName, subnetName, options, callba throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -425,7 +425,7 @@ function _list(resourceGroupName, virtualNetworkName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -569,7 +569,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, subnetName, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -631,7 +631,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, subnetName, o return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -774,7 +774,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualNetworkName, subnetName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/usages.js b/lib/services/networkManagement2/lib/operations/usages.js index 2302f2532e..4bcc7c29c5 100644 --- a/lib/services/networkManagement2/lib/operations/usages.js +++ b/lib/services/networkManagement2/lib/operations/usages.js @@ -47,7 +47,7 @@ function _list(location, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (location === null || location === undefined || typeof location.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js b/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js index 1c5c05c1e4..571577bf39 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworkGatewayConnections.js @@ -93,6 +93,10 @@ const WebResource = msRest.WebResource; * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -298,7 +302,7 @@ function _get(resourceGroupName, virtualNetworkGatewayConnectionName, options, c if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -682,7 +686,7 @@ function _getSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, o if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -825,7 +829,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1097,6 +1101,10 @@ function _resetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionName, * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -1223,7 +1231,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayConnection if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1400,7 +1408,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkGatewayConnectionNa if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1533,7 +1541,7 @@ function _beginUpdateTags(resourceGroupName, virtualNetworkGatewayConnectionName if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1704,7 +1712,7 @@ function _beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionNa if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1779,7 +1787,7 @@ function _beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionNa return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 201 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 201) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1808,7 +1816,7 @@ function _beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionNa let result = null; if (responseBody === '') responseBody = null; // Deserialize Response - if (statusCode === 201) { + if (statusCode === 200) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1825,7 +1833,7 @@ function _beginSetSharedKey(resourceGroupName, virtualNetworkGatewayConnectionNa } } // Deserialize Response - if (statusCode === 200) { + if (statusCode === 201) { let parsedResponse = null; try { parsedResponse = JSON.parse(responseBody); @@ -1893,7 +1901,7 @@ function _beginResetSharedKey(resourceGroupName, virtualNetworkGatewayConnection if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2249,6 +2257,10 @@ class VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -2449,6 +2461,10 @@ class VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -3341,6 +3357,10 @@ class VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for @@ -3541,6 +3561,10 @@ class VirtualNetworkGatewayConnections { * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} + * [parameters.virtualNetworkGateway2.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} * [parameters.virtualNetworkGateway2.vpnClientConfiguration.radiusServerAddress] * The radius server address property of the VirtualNetworkGateway resource for diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js b/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js index d02073f9ca..c70e53732a 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworkGateways.js @@ -86,6 +86,9 @@ const WebResource = msRest.WebResource; * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -223,7 +226,7 @@ function _get(resourceGroupName, virtualNetworkGatewayName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -513,7 +516,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -654,7 +657,7 @@ function _listConnections(resourceGroupName, virtualNetworkGatewayName, options, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1259,7 +1262,7 @@ function _supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, opti if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1537,6 +1540,205 @@ function _getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer }); } + +/** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VpnClientIPsecParameters']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + + +/** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + + if (!callback) { + throw new Error('callback cannot be null.'); + } + + // Send request + this.beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, (err, parsedResult, httpRequest, response) => { + if (err) return callback(err); + + let initialResult = new msRest.HttpOperationResponse(); + initialResult.request = httpRequest; + initialResult.response = response; + initialResult.body = response.body; + client.getLongRunningOperationResult(initialResult, options, (err, pollingResult) => { + if (err) return callback(err); + + // Create Result + let result = null; + + httpRequest = pollingResult.request; + response = pollingResult.response; + let responseBody = pollingResult.body; + if (responseBody === '') responseBody = null; + + // Deserialize Response + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VpnClientIPsecParameters']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + + return callback(null, result, httpRequest, response); + }); + }); +} + /** * Gets a xml format representation for vpn device configuration script. * @@ -1583,7 +1785,7 @@ function _vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayC if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1785,6 +1987,9 @@ function _vpnDeviceConfigurationScript(resourceGroupName, virtualNetworkGatewayC * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -1844,7 +2049,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualNetworkGatewayName, para if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2021,7 +2226,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkGatewayName, option if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2079,7 +2284,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkGatewayName, option return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 204 && statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2153,7 +2358,7 @@ function _beginUpdateTags(resourceGroupName, virtualNetworkGatewayName, paramete if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2319,7 +2524,7 @@ function _beginReset(resourceGroupName, virtualNetworkGatewayName, options, call throw new Error('callback cannot be null.'); } let gatewayVip = (options && options.gatewayVip !== undefined) ? options.gatewayVip : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2383,7 +2588,7 @@ function _beginReset(resourceGroupName, virtualNetworkGatewayName, options, call return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -2489,7 +2694,7 @@ function _beginGeneratevpnclientpackage(resourceGroupName, virtualNetworkGateway if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2676,7 +2881,7 @@ function _beginGenerateVpnProfile(resourceGroupName, virtualNetworkGatewayName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2844,7 +3049,7 @@ function _beginGetVpnProfilePackageUrl(resourceGroupName, virtualNetworkGatewayN if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2999,7 +3204,7 @@ function _beginGetBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, op throw new Error('callback cannot be null.'); } let peer = (options && options.peer !== undefined) ? options.peer : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3151,7 +3356,7 @@ function _beginGetLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, op if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3299,7 +3504,7 @@ function _beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -3412,10 +3617,50 @@ function _beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, } /** - * Gets all virtual network gateways by resource group. + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' * * @param {object} [options] Optional Parameters. * @@ -3429,14 +3674,14 @@ function _beginGetAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkGatewayListResult} for more + * See {@link VpnClientIPsecParameters} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listNext(nextPageLink, options, callback) { +function _beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3446,10 +3691,20 @@ function _listNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2018-02-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualNetworkGatewayName === null || virtualNetworkGatewayName === undefined || typeof virtualNetworkGatewayName.valueOf() !== 'string') { + throw new Error('virtualNetworkGatewayName cannot be null or undefined and it must be of type string.'); + } + if (vpnclientIpsecParams === null || vpnclientIpsecParams === undefined) { + throw new Error('vpnclientIpsecParams cannot be null or undefined.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -3459,12 +3714,20 @@ function _listNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/setvpnclientipsecparameters'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualNetworkGatewayName}', encodeURIComponent(virtualNetworkGatewayName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3482,14 +3745,28 @@ function _listNext(nextPageLink, options, callback) { } } } - httpRequest.body = null; + // Serialize Request + let requestContent = null; + let requestModel = null; + try { + if (vpnclientIpsecParams !== null && vpnclientIpsecParams !== undefined) { + let requestModelMapper = new client.models['VpnClientIPsecParameters']().mapper(); + requestModel = client.serialize(requestModelMapper, vpnclientIpsecParams, 'vpnclientIpsecParams'); + requestContent = JSON.stringify(requestModel); + } + } catch (error) { + let serializationError = new Error(`Error "${error.message}" occurred in serializing the ` + + `payload - ${JSON.stringify(vpnclientIpsecParams, null, 2)}.`); + return callback(serializationError); + } + httpRequest.body = requestContent; // Send Request return client.pipeline(httpRequest, (err, response, responseBody) => { if (err) { return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -3524,7 +3801,7 @@ function _listNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VirtualNetworkGatewayListResult']().mapper(); + let resultMapper = new client.models['VpnClientIPsecParameters']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3540,10 +3817,13 @@ function _listNext(nextPageLink, options, callback) { } /** - * Gets all the connections in a virtual network gateway. + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. * - * @param {string} nextPageLink The NextLink from the previous successful call - * to List operation. + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. * * @param {object} [options] Optional Parameters. * @@ -3557,14 +3837,14 @@ function _listNext(nextPageLink, options, callback) { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link VirtualNetworkGatewayListConnectionsResult} - * for more information. + * See {@link VpnClientIPsecParameters} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ -function _listConnectionsNext(nextPageLink, options, callback) { +function _beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, callback) { /* jshint validthis: true */ let client = this.client; if(!callback && typeof options === 'function') { @@ -3574,10 +3854,17 @@ function _listConnectionsNext(nextPageLink, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } + let apiVersion = '2018-02-01'; // Validate try { - if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { - throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { + throw new Error('resourceGroupName cannot be null or undefined and it must be of type string.'); + } + if (virtualNetworkGatewayName === null || virtualNetworkGatewayName === undefined || typeof virtualNetworkGatewayName.valueOf() !== 'string') { + throw new Error('virtualNetworkGatewayName cannot be null or undefined and it must be of type string.'); + } + if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { + throw new Error('this.client.subscriptionId cannot be null or undefined and it must be of type string.'); } if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { throw new Error('this.client.acceptLanguage must be of type string.'); @@ -3587,12 +3874,20 @@ function _listConnectionsNext(nextPageLink, options, callback) { } // Construct URL - let requestUrl = '{nextLink}'; - requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + let baseUrl = this.client.baseUri; + let requestUrl = baseUrl + (baseUrl.endsWith('/') ? '' : '/') + 'subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworkGateways/{virtualNetworkGatewayName}/getvpnclientipsecparameters'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{virtualNetworkGatewayName}', encodeURIComponent(virtualNetworkGatewayName)); + requestUrl = requestUrl.replace('{subscriptionId}', encodeURIComponent(this.client.subscriptionId)); + let queryParameters = []; + queryParameters.push('api-version=' + encodeURIComponent(apiVersion)); + if (queryParameters.length > 0) { + requestUrl += '?' + queryParameters.join('&'); + } // Create HTTP transport objects let httpRequest = new WebResource(); - httpRequest.method = 'GET'; + httpRequest.method = 'POST'; httpRequest.url = requestUrl; httpRequest.headers = {}; // Set Headers @@ -3652,7 +3947,7 @@ function _listConnectionsNext(nextPageLink, options, callback) { parsedResponse = JSON.parse(responseBody); result = JSON.parse(responseBody); if (parsedResponse !== null && parsedResponse !== undefined) { - let resultMapper = new client.models['VirtualNetworkGatewayListConnectionsResult']().mapper(); + let resultMapper = new client.models['VpnClientIPsecParameters']().mapper(); result = client.deserialize(resultMapper, parsedResponse, 'result'); } } catch (error) { @@ -3667,12 +3962,268 @@ function _listConnectionsNext(nextPageLink, options, callback) { }); } -/** Class representing a VirtualNetworkGateways. */ -class VirtualNetworkGateways { - /** - * Create a VirtualNetworkGateways. - * @param {NetworkManagementClient} client Reference to the service client. - */ +/** + * Gets all virtual network gateways by resource group. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkGatewayListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualNetworkGatewayListResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** + * Gets all the connections in a virtual network gateway. + * + * @param {string} nextPageLink The NextLink from the previous successful call + * to List operation. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} callback - The callback. + * + * @returns {function} callback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VirtualNetworkGatewayListConnectionsResult} + * for more information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ +function _listConnectionsNext(nextPageLink, options, callback) { + /* jshint validthis: true */ + let client = this.client; + if(!callback && typeof options === 'function') { + callback = options; + options = null; + } + if (!callback) { + throw new Error('callback cannot be null.'); + } + // Validate + try { + if (nextPageLink === null || nextPageLink === undefined || typeof nextPageLink.valueOf() !== 'string') { + throw new Error('nextPageLink cannot be null or undefined and it must be of type string.'); + } + if (this.client.acceptLanguage !== null && this.client.acceptLanguage !== undefined && typeof this.client.acceptLanguage.valueOf() !== 'string') { + throw new Error('this.client.acceptLanguage must be of type string.'); + } + } catch (error) { + return callback(error); + } + + // Construct URL + let requestUrl = '{nextLink}'; + requestUrl = requestUrl.replace('{nextLink}', nextPageLink); + + // Create HTTP transport objects + let httpRequest = new WebResource(); + httpRequest.method = 'GET'; + httpRequest.url = requestUrl; + httpRequest.headers = {}; + // Set Headers + httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8'; + if (this.client.generateClientRequestId) { + httpRequest.headers['x-ms-client-request-id'] = msRestAzure.generateUuid(); + } + if (this.client.acceptLanguage !== undefined && this.client.acceptLanguage !== null) { + httpRequest.headers['accept-language'] = this.client.acceptLanguage; + } + if(options) { + for(let headerName in options['customHeaders']) { + if (options['customHeaders'].hasOwnProperty(headerName)) { + httpRequest.headers[headerName] = options['customHeaders'][headerName]; + } + } + } + httpRequest.body = null; + // Send Request + return client.pipeline(httpRequest, (err, response, responseBody) => { + if (err) { + return callback(err); + } + let statusCode = response.statusCode; + if (statusCode !== 200) { + let error = new Error(responseBody); + error.statusCode = response.statusCode; + error.request = msRest.stripRequest(httpRequest); + error.response = msRest.stripResponse(response); + if (responseBody === '') responseBody = null; + let parsedErrorResponse; + try { + parsedErrorResponse = JSON.parse(responseBody); + if (parsedErrorResponse) { + if (parsedErrorResponse.error) parsedErrorResponse = parsedErrorResponse.error; + if (parsedErrorResponse.code) error.code = parsedErrorResponse.code; + if (parsedErrorResponse.message) error.message = parsedErrorResponse.message; + } + if (parsedErrorResponse !== null && parsedErrorResponse !== undefined) { + let resultMapper = new client.models['CloudError']().mapper(); + error.body = client.deserialize(resultMapper, parsedErrorResponse, 'error.body'); + } + } catch (defaultError) { + error.message = `Error "${defaultError.message}" occurred in deserializing the responseBody ` + + `- "${responseBody}" for the default response.`; + return callback(error); + } + return callback(error); + } + // Create Result + let result = null; + if (responseBody === '') responseBody = null; + // Deserialize Response + if (statusCode === 200) { + let parsedResponse = null; + try { + parsedResponse = JSON.parse(responseBody); + result = JSON.parse(responseBody); + if (parsedResponse !== null && parsedResponse !== undefined) { + let resultMapper = new client.models['VirtualNetworkGatewayListConnectionsResult']().mapper(); + result = client.deserialize(resultMapper, parsedResponse, 'result'); + } + } catch (error) { + let deserializationError = new Error(`Error ${error} occurred in deserializing the responseBody - ${responseBody}`); + deserializationError.request = msRest.stripRequest(httpRequest); + deserializationError.response = msRest.stripResponse(response); + return callback(deserializationError); + } + } + + return callback(null, result, httpRequest, response); + }); +} + +/** Class representing a VirtualNetworkGateways. */ +class VirtualNetworkGateways { + /** + * Create a VirtualNetworkGateways. + * @param {NetworkManagementClient} client Reference to the service client. + */ constructor(client) { this.client = client; this._createOrUpdate = _createOrUpdate; @@ -3689,6 +4240,8 @@ class VirtualNetworkGateways { this._supportedVpnDevices = _supportedVpnDevices; this._getLearnedRoutes = _getLearnedRoutes; this._getAdvertisedRoutes = _getAdvertisedRoutes; + this._setVpnclientIpsecParameters = _setVpnclientIpsecParameters; + this._getVpnclientIpsecParameters = _getVpnclientIpsecParameters; this._vpnDeviceConfigurationScript = _vpnDeviceConfigurationScript; this._beginCreateOrUpdate = _beginCreateOrUpdate; this._beginDeleteMethod = _beginDeleteMethod; @@ -3700,6 +4253,8 @@ class VirtualNetworkGateways { this._beginGetBgpPeerStatus = _beginGetBgpPeerStatus; this._beginGetLearnedRoutes = _beginGetLearnedRoutes; this._beginGetAdvertisedRoutes = _beginGetAdvertisedRoutes; + this._beginSetVpnclientIpsecParameters = _beginSetVpnclientIpsecParameters; + this._beginGetVpnclientIpsecParameters = _beginGetVpnclientIpsecParameters; this._listNext = _listNext; this._listConnectionsNext = _listConnectionsNext; } @@ -3775,6 +4330,9 @@ class VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -3902,6 +4460,9 @@ class VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -4954,25 +5515,206 @@ class VirtualNetworkGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + self._getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + } + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + supportedVpnDevicesWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * Gets a xml format representation for supported vpn devices. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {String} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {string} [result] - The deserialized result object if an error did not occur. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + } + } + + /** + * This operation retrieves a list of routes the virtual network gateway has + * learned, including routes learned from BGP peers. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + getLearnedRoutesWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * This operation retrieves a list of routes the virtual network gateway has + * learned, including routes learned from BGP peers. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {GatewayRouteListResult} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayRouteListResult} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getBgpPeerStatus(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + return self._getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); } } /** - * Gets a xml format representation for supported vpn devices. + * This operation retrieves a list of routes the virtual network gateway is + * advertising to the specified peer. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} virtualNetworkGatewayName The name of the virtual network * gateway. * + * @param {string} peer The IP address of the peer + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -4980,15 +5722,15 @@ class VirtualNetworkGateways { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - supportedVpnDevicesWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + getAdvertisedRoutesWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, peer, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + self._getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -4999,13 +5741,16 @@ class VirtualNetworkGateways { } /** - * Gets a xml format representation for supported vpn devices. + * This operation retrieves a list of routes the virtual network gateway is + * advertising to the specified peer. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} virtualNetworkGatewayName The name of the virtual network * gateway. * + * @param {string} peer The IP address of the peer + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5018,7 +5763,7 @@ class VirtualNetworkGateways { * * {Promise} A promise is returned * - * @resolve {String} - The deserialized result object. + * @resolve {GatewayRouteListResult} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5026,13 +5771,15 @@ class VirtualNetworkGateways { * * {Error} err - The Error object if an error occurred, null otherwise. * - * {string} [result] - The deserialized result object if an error did not occur. + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link GatewayRouteListResult} for more + * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5041,26 +5788,63 @@ class VirtualNetworkGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + self._getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._supportedVpnDevices(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + return self._getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, optionalCallback); } } /** - * This operation retrieves a list of routes the virtual network gateway has - * learned, including routes learned from BGP peers. + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} virtualNetworkGatewayName The name of the virtual network * gateway. * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5068,15 +5852,15 @@ class VirtualNetworkGateways { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getLearnedRoutesWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + setVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + self._setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5087,14 +5871,51 @@ class VirtualNetworkGateways { } /** - * This operation retrieves a list of routes the virtual network gateway has - * learned, including routes learned from BGP peers. + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. * * @param {string} resourceGroupName The name of the resource group. * * @param {string} virtualNetworkGatewayName The name of the virtual network * gateway. * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * * @param {object} [options] Optional Parameters. * * @param {object} [options.customHeaders] Headers that will be added to the @@ -5107,7 +5928,7 @@ class VirtualNetworkGateways { * * {Promise} A promise is returned * - * @resolve {GatewayRouteListResult} - The deserialized result object. + * @resolve {VpnClientIPsecParameters} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5116,14 +5937,14 @@ class VirtualNetworkGateways { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link GatewayRouteListResult} for more + * See {@link VpnClientIPsecParameters} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5132,27 +5953,25 @@ class VirtualNetworkGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + self._setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getLearnedRoutes(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + return self._setVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, optionalCallback); } } /** - * This operation retrieves a list of routes the virtual network gateway is - * advertising to the specified peer. + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} virtualNetworkGatewayName The name of the virtual network - * gateway. - * - * @param {string} peer The IP address of the peer + * @param {string} virtualNetworkGatewayName The virtual network gateway name. * * @param {object} [options] Optional Parameters. * @@ -5161,15 +5980,15 @@ class VirtualNetworkGateways { * * @returns {Promise} A promise is returned * - * @resolve {HttpOperationResponse} - The deserialized result object. + * @resolve {HttpOperationResponse} - The deserialized result object. * * @reject {Error} - The error object. */ - getAdvertisedRoutesWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, peer, options) { + getVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { let client = this.client; let self = this; return new Promise((resolve, reject) => { - self._getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, (err, result, request, response) => { + self._getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { let httpOperationResponse = new msRest.HttpOperationResponse(request, response); httpOperationResponse.body = result; if (err) { reject(err); } @@ -5180,15 +5999,13 @@ class VirtualNetworkGateways { } /** - * This operation retrieves a list of routes the virtual network gateway is - * advertising to the specified peer. + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} virtualNetworkGatewayName The name of the virtual network - * gateway. - * - * @param {string} peer The IP address of the peer + * @param {string} virtualNetworkGatewayName The virtual network gateway name. * * @param {object} [options] Optional Parameters. * @@ -5202,7 +6019,7 @@ class VirtualNetworkGateways { * * {Promise} A promise is returned * - * @resolve {GatewayRouteListResult} - The deserialized result object. + * @resolve {VpnClientIPsecParameters} - The deserialized result object. * * @reject {Error} - The error object. * @@ -5211,14 +6028,14 @@ class VirtualNetworkGateways { * {Error} err - The Error object if an error occurred, null otherwise. * * {object} [result] - The deserialized result object if an error did not occur. - * See {@link GatewayRouteListResult} for more + * See {@link VpnClientIPsecParameters} for more * information. * * {object} [request] - The HTTP Request object if an error did not occur. * * {stream} [response] - The HTTP Response stream if an error did not occur. */ - getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, optionalCallback) { + getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { let client = this.client; let self = this; if (!optionalCallback && typeof options === 'function') { @@ -5227,14 +6044,14 @@ class VirtualNetworkGateways { } if (!optionalCallback) { return new Promise((resolve, reject) => { - self._getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, (err, result, request, response) => { + self._getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { if (err) { reject(err); } else { resolve(result); } return; }); }); } else { - return self._getAdvertisedRoutes(resourceGroupName, virtualNetworkGatewayName, peer, options, optionalCallback); + return self._getVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); } } @@ -5418,6 +6235,9 @@ class VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -5545,6 +6365,9 @@ class VirtualNetworkGateways { * @param {array} [parameters.vpnClientConfiguration.vpnClientProtocols] * VpnClientProtocols for Virtual network gateway. * + * @param {array} [parameters.vpnClientConfiguration.vpnClientIpsecPolicies] + * VpnClientIpsecPolicies for virtual network gateway P2S client. + * * @param {string} [parameters.vpnClientConfiguration.radiusServerAddress] The * radius server address property of the VirtualNetworkGateway resource for vpn * client connection. @@ -6534,6 +7357,262 @@ class VirtualNetworkGateways { } } + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginSetVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The Set VpnclientIpsecParameters operation sets the vpnclient ipsec policy + * for P2S client of virtual network gateway in the specified resource group + * through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The name of the virtual network + * gateway. + * + * @param {object} vpnclientIpsecParams Parameters supplied to the Begin Set + * vpnclient ipsec parameters of Virtual Network Gateway P2S client operation + * through Network resource provider. + * + * @param {number} vpnclientIpsecParams.saLifeTimeSeconds The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) lifetime in seconds for + * P2S client. + * + * @param {number} vpnclientIpsecParams.saDataSizeKilobytes The IPSec Security + * Association (also called Quick Mode or Phase 2 SA) payload size in KB for + * P2S client.. + * + * @param {string} vpnclientIpsecParams.ipsecEncryption The IPSec encryption + * algorithm (IKE phase 1). Possible values include: 'None', 'DES', 'DES3', + * 'AES128', 'AES192', 'AES256', 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ipsecIntegrity The IPSec integrity + * algorithm (IKE phase 1). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'GCMAES128', 'GCMAES192', 'GCMAES256' + * + * @param {string} vpnclientIpsecParams.ikeEncryption The IKE encryption + * algorithm (IKE phase 2). Possible values include: 'DES', 'DES3', 'AES128', + * 'AES192', 'AES256', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.ikeIntegrity The IKE integrity + * algorithm (IKE phase 2). Possible values include: 'MD5', 'SHA1', 'SHA256', + * 'SHA384', 'GCMAES256', 'GCMAES128' + * + * @param {string} vpnclientIpsecParams.dhGroup The DH Groups used in IKE Phase + * 1 for initial SA. Possible values include: 'None', 'DHGroup1', 'DHGroup2', + * 'DHGroup14', 'DHGroup2048', 'ECP256', 'ECP384', 'DHGroup24' + * + * @param {string} vpnclientIpsecParams.pfsGroup The Pfs Groups used in IKE + * Phase 2 for new child SA. Possible values include: 'None', 'PFS1', 'PFS2', + * 'PFS2048', 'ECP256', 'ECP384', 'PFS24', 'PFS14', 'PFSMM' + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VpnClientIPsecParameters} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginSetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, vpnclientIpsecParams, options, optionalCallback); + } + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @returns {Promise} A promise is returned + * + * @resolve {HttpOperationResponse} - The deserialized result object. + * + * @reject {Error} - The error object. + */ + beginGetVpnclientIpsecParametersWithHttpOperationResponse(resourceGroupName, virtualNetworkGatewayName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + let httpOperationResponse = new msRest.HttpOperationResponse(request, response); + httpOperationResponse.body = result; + if (err) { reject(err); } + else { resolve(httpOperationResponse); } + return; + }); + }); + } + + /** + * The Get VpnclientIpsecParameters operation retrieves information about the + * vpnclient ipsec policy for P2S client of virtual network gateway in the + * specified resource group through Network resource provider. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} virtualNetworkGatewayName The virtual network gateway name. + * + * @param {object} [options] Optional Parameters. + * + * @param {object} [options.customHeaders] Headers that will be added to the + * request + * + * @param {function} [optionalCallback] - The optional callback. + * + * @returns {function|Promise} If a callback was passed as the last parameter + * then it returns the callback else returns a Promise. + * + * {Promise} A promise is returned + * + * @resolve {VpnClientIPsecParameters} - The deserialized result object. + * + * @reject {Error} - The error object. + * + * {function} optionalCallback(err, result, request, response) + * + * {Error} err - The Error object if an error occurred, null otherwise. + * + * {object} [result] - The deserialized result object if an error did not occur. + * See {@link VpnClientIPsecParameters} for more + * information. + * + * {object} [request] - The HTTP Request object if an error did not occur. + * + * {stream} [response] - The HTTP Response stream if an error did not occur. + */ + beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback) { + let client = this.client; + let self = this; + if (!optionalCallback && typeof options === 'function') { + optionalCallback = options; + options = null; + } + if (!optionalCallback) { + return new Promise((resolve, reject) => { + self._beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginGetVpnclientIpsecParameters(resourceGroupName, virtualNetworkGatewayName, options, optionalCallback); + } + } + /** * Gets all virtual network gateways by resource group. * diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworkPeerings.js b/lib/services/networkManagement2/lib/operations/virtualNetworkPeerings.js index 72e4d63ac7..aef2006b54 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworkPeerings.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworkPeerings.js @@ -118,7 +118,7 @@ function _get(resourceGroupName, virtualNetworkName, virtualNetworkPeeringName, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -401,7 +401,7 @@ function _list(resourceGroupName, virtualNetworkName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -546,7 +546,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, virtualNetwor if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -608,7 +608,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, virtualNetwor return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 200 && statusCode !== 204 && statusCode !== 202) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -733,7 +733,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualNetworkName, virtualNetw if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/virtualNetworks.js b/lib/services/networkManagement2/lib/operations/virtualNetworks.js index 8d653362d9..8815559ff7 100644 --- a/lib/services/networkManagement2/lib/operations/virtualNetworks.js +++ b/lib/services/networkManagement2/lib/operations/virtualNetworks.js @@ -115,7 +115,7 @@ function _get(resourceGroupName, virtualNetworkName, options, callback) { throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -265,10 +265,16 @@ function _get(resourceGroupName, virtualNetworkName, options, callback) { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. + * + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -464,7 +470,7 @@ function _listAll(options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (this.client.subscriptionId === null || this.client.subscriptionId === undefined || typeof this.client.subscriptionId.valueOf() !== 'string') { @@ -598,7 +604,7 @@ function _list(resourceGroupName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -741,7 +747,7 @@ function _checkIPAddressAvailability(resourceGroupName, virtualNetworkName, opti throw new Error('callback cannot be null.'); } let ipAddress = (options && options.ipAddress !== undefined) ? options.ipAddress : undefined; - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (ipAddress !== null && ipAddress !== undefined && typeof ipAddress.valueOf() !== 'string') { @@ -891,7 +897,7 @@ function _listUsage(resourceGroupName, virtualNetworkName, options, callback) { if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1033,7 +1039,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, options, call if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1091,7 +1097,7 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, options, call return callback(err); } let statusCode = response.statusCode; - if (statusCode !== 202 && statusCode !== 204 && statusCode !== 200) { + if (statusCode !== 200 && statusCode !== 202 && statusCode !== 204) { let error = new Error(responseBody); error.statusCode = response.statusCode; error.request = msRest.stripRequest(httpRequest); @@ -1159,10 +1165,16 @@ function _beginDeleteMethod(resourceGroupName, virtualNetworkName, options, call * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. + * + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. + * + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -1201,7 +1213,7 @@ function _beginCreateOrUpdate(resourceGroupName, virtualNetworkName, parameters, if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1383,7 +1395,7 @@ function _beginUpdateTags(resourceGroupName, virtualNetworkName, parameters, opt if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2017-10-01'; + let apiVersion = '2018-02-01'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -2126,10 +2138,16 @@ class VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. + * + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -2200,10 +2218,16 @@ class VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. + * + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -2817,10 +2841,16 @@ class VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. + * + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. + * + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. @@ -2891,10 +2921,16 @@ class VirtualNetworks { * 'Failed'. * * @param {boolean} [parameters.enableDdosProtection] Indicates if DDoS - * protection is enabled for all the protected resources in a Virtual Network. + * protection is enabled for all the protected resources in the virtual + * network. It requires a DDoS protection plan associated with the resource. + * + * @param {boolean} [parameters.enableVmProtection] Indicates if VM protection + * is enabled for all the subnets in the virtual network. + * + * @param {object} [parameters.ddosProtectionPlan] The DDoS protection plan + * associated with the virtual network. * - * @param {boolean} [parameters.enableVmProtection] Indicates if Vm protection - * is enabled for all the subnets in a Virtual Network. + * @param {string} [parameters.ddosProtectionPlan.id] Resource ID. * * @param {string} [parameters.etag] Gets a unique read-only string that * changes whenever the resource is updated. diff --git a/lib/services/networkManagement2/package.json b/lib/services/networkManagement2/package.json index 18c19de6ec..347bc2ed7b 100644 --- a/lib/services/networkManagement2/package.json +++ b/lib/services/networkManagement2/package.json @@ -1,37 +1,22 @@ { "name": "azure-arm-network", "author": "Microsoft Corporation", - "contributors": [ - "Siegemund, Frank ", - "Rajendran, Deepak ", - "Choubey, Ankur " - ], - "version": "5.1.0", - "description": "Microsoft Azure Network Resource Provider Management Client Library for node", - "tags": [ - "azure", - "sdk" - ], - "keywords": [ - "node", - "azure" - ], - "main": "./lib/networkManagementClient.js", - "types": "./lib/networkManagementClient.d.ts", - "license": "MIT", + "description": "NetworkManagementClient Library with typescript type definitions for node", + "version": "5.2.0", "dependencies": { - "ms-rest" : "^2.2.2", - "ms-rest-azure" : "^2.3.3" + "ms-rest": "^2.3.3", + "ms-rest-azure": "^2.5.5" }, - "homepage": "http://github.com/Azure/azure-sdk-for-node", + "keywords": [ "node", "azure" ], + "license": "MIT", + "main": "./lib/networkManagementClient.js", + "types": "./lib/networkManagementClient.d.ts", + "homepage": "http://github.com/azure/azure-sdk-for-node", "repository": { "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-node.git" + "url": "https://github.com/azure/azure-sdk-for-node.git" }, "bugs": { "url": "http://github.com/Azure/azure-sdk-for-node/issues" - }, - "scripts": { - "test": "npm -s run-script jshint" } } From b0291b20e4d801218233949ed6099b57cce02737 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Mon, 2 Apr 2018 21:20:52 +0000 Subject: [PATCH 2/2] Generated from 73c74aeee09b81dbe99d66c083439dc4ce62cf9d fix versions in other files --- .../lib/operations/networkInterfaces.js | 10 +++++----- .../lib/operations/publicIPAddresses.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/services/networkManagement2/lib/operations/networkInterfaces.js b/lib/services/networkManagement2/lib/operations/networkInterfaces.js index 470904d1a1..5187331ae1 100644 --- a/lib/services/networkManagement2/lib/operations/networkInterfaces.js +++ b/lib/services/networkManagement2/lib/operations/networkInterfaces.js @@ -949,7 +949,7 @@ function _listVirtualMachineScaleSetVMNetworkInterfaces(resourceGroupName, virtu if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1098,7 +1098,7 @@ function _listVirtualMachineScaleSetNetworkInterfaces(resourceGroupName, virtual if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1249,7 +1249,7 @@ function _getVirtualMachineScaleSetNetworkInterface(resourceGroupName, virtualMa throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1416,7 +1416,7 @@ function _listVirtualMachineScaleSetIpConfigurations(resourceGroupName, virtualM throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1585,7 +1585,7 @@ function _getVirtualMachineScaleSetIpConfiguration(resourceGroupName, virtualMac throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { diff --git a/lib/services/networkManagement2/lib/operations/publicIPAddresses.js b/lib/services/networkManagement2/lib/operations/publicIPAddresses.js index 8887e23030..4c68681afe 100644 --- a/lib/services/networkManagement2/lib/operations/publicIPAddresses.js +++ b/lib/services/networkManagement2/lib/operations/publicIPAddresses.js @@ -761,7 +761,7 @@ function _listVirtualMachineScaleSetPublicIPAddresses(resourceGroupName, virtual if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -913,7 +913,7 @@ function _listVirtualMachineScaleSetVMPublicIPAddresses(resourceGroupName, virtu if (!callback) { throw new Error('callback cannot be null.'); } - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') { @@ -1080,7 +1080,7 @@ function _getVirtualMachineScaleSetPublicIPAddress(resourceGroupName, virtualMac throw new Error('callback cannot be null.'); } let expand = (options && options.expand !== undefined) ? options.expand : undefined; - let apiVersion = '2018-02-01'; + let apiVersion = '2017-03-30'; // Validate try { if (resourceGroupName === null || resourceGroupName === undefined || typeof resourceGroupName.valueOf() !== 'string') {