diff --git a/lib/services/networkManagement2/lib/models/applicationGateway.js b/lib/services/networkManagement2/lib/models/applicationGateway.js index 13f5cef0cd..c3f3ee1bea 100644 --- a/lib/services/networkManagement2/lib/models/applicationGateway.js +++ b/lib/services/networkManagement2/lib/models/applicationGateway.js @@ -89,13 +89,13 @@ class ApplicationGateway extends models['Resource'] { * @property {boolean} [webApplicationFirewallConfiguration.requestBodyCheck] * Whether allow WAF to check request Body. * @property {number} - * [webApplicationFirewallConfiguration.maxRequestBodySize] Maxium request + * [webApplicationFirewallConfiguration.maxRequestBodySize] Maximum request * body size for WAF. * @property {number} - * [webApplicationFirewallConfiguration.maxRequestBodySizeInKb] Maxium + * [webApplicationFirewallConfiguration.maxRequestBodySizeInKb] Maximum * request body size in Kb for WAF. * @property {number} - * [webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium file + * [webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum file * upload size in Mb for WAF. * @property {array} [webApplicationFirewallConfiguration.exclusions] The * exclusion list. diff --git a/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js b/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js index a2af0c022d..ec8585c842 100644 --- a/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js +++ b/lib/services/networkManagement2/lib/models/applicationGatewayWebApplicationFirewallConfiguration.js @@ -27,11 +27,11 @@ class ApplicationGatewayWebApplicationFirewallConfiguration { * @property {array} [disabledRuleGroups] The disabled rule groups. * @property {boolean} [requestBodyCheck] Whether allow WAF to check request * Body. - * @property {number} [maxRequestBodySize] Maxium request body size for WAF. - * @property {number} [maxRequestBodySizeInKb] Maxium request body size in Kb + * @property {number} [maxRequestBodySize] Maximum request body size for WAF. + * @property {number} [maxRequestBodySizeInKb] Maximum request body size in + * Kb for WAF. + * @property {number} [fileUploadLimitInMb] Maximum file upload size in Mb * for WAF. - * @property {number} [fileUploadLimitInMb] Maxium file upload size in Mb for - * WAF. * @property {array} [exclusions] The exclusion list. */ constructor() { diff --git a/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js b/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js index 5bc4876daf..3221bb1498 100644 --- a/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js +++ b/lib/services/networkManagement2/lib/models/connectionMonitorQueryResult.js @@ -11,7 +11,7 @@ 'use strict'; /** - * List of connection states snaphots. + * List of connection states snapshots. * */ class ConnectionMonitorQueryResult { diff --git a/lib/services/networkManagement2/lib/models/containerNetworkInterface.js b/lib/services/networkManagement2/lib/models/containerNetworkInterface.js index 8daec95b31..713badcaa8 100644 --- a/lib/services/networkManagement2/lib/models/containerNetworkInterface.js +++ b/lib/services/networkManagement2/lib/models/containerNetworkInterface.js @@ -39,7 +39,7 @@ class ContainerNetworkInterface extends models['SubResource'] { * Resource type. * @property {string} [containerNetworkInterfaceConfiguration.etag] A unique * read-only string that changes whenever the resource is updated. - * @property {object} [container] Reference to the conatinaer to which this + * @property {object} [container] Reference to the container to which this * container network interface is attached. * @property {array} [ipConfigurations] Reference to the ip configuration on * this container nic. diff --git a/lib/services/networkManagement2/lib/models/containerNetworkInterfaceConfiguration.js b/lib/services/networkManagement2/lib/models/containerNetworkInterfaceConfiguration.js index 701851a1da..ca44a96d58 100644 --- a/lib/services/networkManagement2/lib/models/containerNetworkInterfaceConfiguration.js +++ b/lib/services/networkManagement2/lib/models/containerNetworkInterfaceConfiguration.js @@ -13,7 +13,7 @@ const models = require('./index'); /** - * Container network interface configruation child resource. + * Container network interface configuration child resource. * * @extends models['SubResource'] */ diff --git a/lib/services/networkManagement2/lib/models/ddosCustomPolicy.js b/lib/services/networkManagement2/lib/models/ddosCustomPolicy.js new file mode 100644 index 0000000000..a8d95e7e77 --- /dev/null +++ b/lib/services/networkManagement2/lib/models/ddosCustomPolicy.js @@ -0,0 +1,160 @@ +/* + * 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 custom policy in a resource group. + * + * @extends models['Resource'] + */ +class DdosCustomPolicy extends models['Resource'] { + /** + * Create a DdosCustomPolicy. + * @property {string} [resourceGuid] The resource GUID property of the DDoS + * custom policy resource. It uniquely identifies the resource, even if the + * user changes its name or migrate the resource across subscriptions or + * resource groups. + * @property {string} [provisioningState] The provisioning state of the DDoS + * custom policy resource. Possible values are: 'Succeeded', 'Updating', + * 'Deleting', and 'Failed'. + * @property {array} [publicIPAddresses] The list of public IPs associated + * with the DDoS custom policy resource. This list is read-only. + * @property {array} [protocolCustomSettings] The protocol-specific DDoS + * policy customization parameters. + * @property {string} [etag] A unique read-only string that changes whenever + * the resource is updated. + */ + constructor() { + super(); + } + + /** + * Defines the metadata of DdosCustomPolicy + * + * @returns {object} metadata of DdosCustomPolicy + * + */ + mapper() { + return { + required: false, + serializedName: 'DdosCustomPolicy', + type: { + name: 'Composite', + className: 'DdosCustomPolicy', + 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' + } + }, + publicIPAddresses: { + required: false, + readOnly: true, + serializedName: 'properties.publicIPAddresses', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'SubResourceElementType', + type: { + name: 'Composite', + className: 'SubResource' + } + } + } + }, + protocolCustomSettings: { + required: false, + serializedName: 'properties.protocolCustomSettings', + type: { + name: 'Sequence', + element: { + required: false, + serializedName: 'ProtocolCustomSettingsFormatElementType', + type: { + name: 'Composite', + className: 'ProtocolCustomSettingsFormat' + } + } + } + }, + etag: { + required: false, + readOnly: true, + serializedName: 'etag', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = DdosCustomPolicy; diff --git a/lib/services/networkManagement2/lib/models/effectiveNetworkSecurityRule.js b/lib/services/networkManagement2/lib/models/effectiveNetworkSecurityRule.js index 7e443c4728..36951b7787 100644 --- a/lib/services/networkManagement2/lib/models/effectiveNetworkSecurityRule.js +++ b/lib/services/networkManagement2/lib/models/effectiveNetworkSecurityRule.js @@ -26,20 +26,20 @@ class EffectiveNetworkSecurityRule { * @property {string} [destinationPortRange] The destination port or range. * @property {array} [sourcePortRanges] The source port ranges. Expected * values include a single integer between 0 and 65535, a range using '-' as - * seperator (e.g. 100-400), or an asterix (*) + * separator (e.g. 100-400), or an asterisk (*) * @property {array} [destinationPortRanges] The destination port ranges. * Expected values include a single integer between 0 and 65535, a range - * using '-' as seperator (e.g. 100-400), or an asterix (*) + * using '-' as separator (e.g. 100-400), or an asterisk (*) * @property {string} [sourceAddressPrefix] The source address prefix. * @property {string} [destinationAddressPrefix] The destination address * prefix. * @property {array} [sourceAddressPrefixes] The source address prefixes. * Expected values include CIDR IP ranges, Default Tags (VirtualNetwork, - * AureLoadBalancer, Internet), System Tags, and the asterix (*). + * AzureLoadBalancer, Internet), System Tags, and the asterisk (*). * @property {array} [destinationAddressPrefixes] The destination address * prefixes. Expected values include CIDR IP ranges, Default Tags - * (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix - * (*). + * (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the + * asterisk (*). * @property {array} [expandedSourceAddressPrefix] The expanded source * address prefix. * @property {array} [expandedDestinationAddressPrefix] Expanded destination diff --git a/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js b/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js index f938b80f46..6d2110b174 100644 --- a/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js +++ b/lib/services/networkManagement2/lib/models/expressRouteCircuitConnection.js @@ -33,7 +33,7 @@ class ExpressRouteCircuitConnection extends models['SubResource'] { * Connection State. Possible values are: 'Connected' and 'Disconnected'. * Possible values include: 'Connected', 'Connecting', 'Disconnected' * @property {string} [provisioningState] Provisioning state of the circuit - * connection resource. Possible values are: 'Succeded', 'Updating', + * connection resource. Possible values are: 'Succeeded', 'Updating', * 'Deleting', and 'Failed'. * @property {string} [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/models/expressRouteCircuitPeering.js b/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js index 081bc30051..3c02f9ef76 100644 --- a/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js +++ b/lib/services/networkManagement2/lib/models/expressRouteCircuitPeering.js @@ -38,7 +38,7 @@ class ExpressRouteCircuitPeering extends models['SubResource'] { * @property {array} [microsoftPeeringConfig.advertisedPublicPrefixes] The * reference of AdvertisedPublicPrefixes. * @property {array} [microsoftPeeringConfig.advertisedCommunities] The - * communities of bgp peering. Spepcified for microsoft peering + * communities of bgp peering. Specified for microsoft peering * @property {string} [microsoftPeeringConfig.advertisedPublicPrefixesState] * AdvertisedPublicPrefixState of the Peering resource. Possible values are * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. @@ -84,7 +84,7 @@ class ExpressRouteCircuitPeering extends models['SubResource'] { * reference of AdvertisedPublicPrefixes. * @property {array} * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] The - * communities of bgp peering. Spepcified for microsoft peering + * communities of bgp peering. Specified for microsoft peering * @property {string} * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] * AdvertisedPublicPrefixState of the Peering resource. Possible values are diff --git a/lib/services/networkManagement2/lib/models/expressRouteCircuitPeeringConfig.js b/lib/services/networkManagement2/lib/models/expressRouteCircuitPeeringConfig.js index d8b599509d..b298d147ae 100644 --- a/lib/services/networkManagement2/lib/models/expressRouteCircuitPeeringConfig.js +++ b/lib/services/networkManagement2/lib/models/expressRouteCircuitPeeringConfig.js @@ -20,7 +20,7 @@ class ExpressRouteCircuitPeeringConfig { * @property {array} [advertisedPublicPrefixes] The reference of * AdvertisedPublicPrefixes. * @property {array} [advertisedCommunities] The communities of bgp peering. - * Spepcified for microsoft peering + * Specified for microsoft peering * @property {string} [advertisedPublicPrefixesState] * AdvertisedPublicPrefixState of the Peering resource. Possible values are * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. diff --git a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js index 7160299e30..fe66bdc67e 100644 --- a/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js +++ b/lib/services/networkManagement2/lib/models/expressRouteCrossConnectionPeering.js @@ -38,7 +38,7 @@ class ExpressRouteCrossConnectionPeering extends models['SubResource'] { * @property {array} [microsoftPeeringConfig.advertisedPublicPrefixes] The * reference of AdvertisedPublicPrefixes. * @property {array} [microsoftPeeringConfig.advertisedCommunities] The - * communities of bgp peering. Spepcified for microsoft peering + * communities of bgp peering. Specified for microsoft peering * @property {string} [microsoftPeeringConfig.advertisedPublicPrefixesState] * AdvertisedPublicPrefixState of the Peering resource. Possible values are * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. @@ -68,7 +68,7 @@ class ExpressRouteCrossConnectionPeering extends models['SubResource'] { * reference of AdvertisedPublicPrefixes. * @property {array} * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] The - * communities of bgp peering. Spepcified for microsoft peering + * communities of bgp peering. Specified for microsoft peering * @property {string} * [ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] * AdvertisedPublicPrefixState of the Peering resource. Possible values are diff --git a/lib/services/networkManagement2/lib/models/expressRoutePort.js b/lib/services/networkManagement2/lib/models/expressRoutePort.js index 825da5b272..06afeac1b0 100644 --- a/lib/services/networkManagement2/lib/models/expressRoutePort.js +++ b/lib/services/networkManagement2/lib/models/expressRoutePort.js @@ -31,7 +31,7 @@ class ExpressRoutePort extends models['Resource'] { * pair(s) * @property {string} [encapsulation] Encapsulation method on physical ports. * Possible values include: 'Dot1Q', 'QinQ' - * @property {string} [etherType] Ethertype of the physical port. + * @property {string} [etherType] Ether type of the physical port. * @property {string} [allocationDate] Date of the physical port allocation * to be used in Letter of Authorization. * @property {array} [links] ExpressRouteLink Sub-Resources. The set of diff --git a/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js b/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js index 8099172bba..d60031e028 100644 --- a/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js +++ b/lib/services/networkManagement2/lib/models/iPConfigurationProfile.js @@ -21,7 +21,7 @@ class IPConfigurationProfile extends models['SubResource'] { /** * Create a IPConfigurationProfile. * @property {object} [subnet] The reference of the subnet resource to create - * a contatainer network interface ip configruation. + * a container network interface ip configuration. * @property {string} [subnet.addressPrefix] The address prefix for the * subnet. * @property {array} [subnet.addressPrefixes] List of address prefixes for diff --git a/lib/services/networkManagement2/lib/models/index.d.ts b/lib/services/networkManagement2/lib/models/index.d.ts index 30b736b698..834d833749 100644 --- a/lib/services/networkManagement2/lib/models/index.d.ts +++ b/lib/services/networkManagement2/lib/models/index.d.ts @@ -114,17 +114,17 @@ export interface SecurityRule extends SubResource { */ protocol: string; /** - * The source port or range. Integer or range between 0 and 65535. Asterix '*' can also be used + * The source port or range. Integer or range between 0 and 65535. Asterisks '*' can also be used * to match all ports. */ sourcePortRange?: string; /** - * The destination port or range. Integer or range between 0 and 65535. Asterix '*' can also be + * The destination port or range. Integer or range between 0 and 65535. Asterisks '*' can also be * used to match all ports. */ destinationPortRange?: string; /** - * The CIDR or source IP range. Asterix '*' can also be used to match all source IPs. Default + * The CIDR or source IP range. Asterisks '*' 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. */ @@ -138,8 +138,8 @@ export interface SecurityRule extends SubResource { */ sourceApplicationSecurityGroups?: ApplicationSecurityGroup[]; /** - * 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 + * The destination address prefix. CIDR or destination IP range. Asterisks '*' can also be used + * to match all source IPs. Default tags such as 'VirtualNetwork', 'AzureLoadBalancer' and * 'Internet' can also be used. */ destinationAddressPrefix?: string; @@ -172,7 +172,7 @@ export interface SecurityRule extends SubResource { priority?: number; /** * 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: + * outgoing traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values include: * 'Inbound', 'Outbound' */ direction: string; @@ -680,8 +680,7 @@ export interface IPConfiguration extends SubResource { */ export interface IPConfigurationProfile extends SubResource { /** - * The reference of the subnet resource to create a contatainer network interface ip - * configruation. + * The reference of the subnet resource to create a container network interface ip configuration. */ subnet?: Subnet; /** @@ -2010,15 +2009,15 @@ export interface ApplicationGatewayWebApplicationFirewallConfiguration { */ requestBodyCheck?: boolean; /** - * Maxium request body size for WAF. + * Maximum request body size for WAF. */ maxRequestBodySize?: number; /** - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. */ maxRequestBodySizeInKb?: number; /** - * Maxium file upload size in Mb for WAF. + * Maximum file upload size in Mb for WAF. */ fileUploadLimitInMb?: number; /** @@ -2699,6 +2698,63 @@ export interface DnsNameAvailabilityResult { available?: boolean; } +/** + * DDoS custom policy properties. +*/ +export interface ProtocolCustomSettingsFormat { + /** + * The protocol for which the DDoS protection policy is being customized. Possible values + * include: 'Tcp', 'Udp', 'Syn' + */ + protocol?: string; + /** + * The customized DDoS protection trigger rate. + */ + triggerRateOverride?: string; + /** + * The customized DDoS protection source rate. + */ + sourceRateOverride?: string; + /** + * The customized DDoS protection trigger rate sensitivity degrees. High: Trigger rate set with + * most sensitivity w.r.t. normal traffic. Default: Trigger rate set with moderate sensitivity + * w.r.t. normal traffic. Low: Trigger rate set with less sensitivity w.r.t. normal traffic. + * Relaxed: Trigger rate set with least sensitivity w.r.t. normal traffic. Possible values + * include: 'Relaxed', 'Low', 'Default', 'High' + */ + triggerSensitivityOverride?: string; +} + +/** + * A DDoS custom policy in a resource group. +*/ +export interface DdosCustomPolicy extends Resource { + /** + * The resource GUID property of the DDoS custom policy resource. It uniquely identifies the + * resource, even if the user changes its name or migrate the resource across subscriptions or + * resource groups. + */ + readonly resourceGuid?: string; + /** + * The provisioning state of the DDoS custom policy resource. Possible values are: 'Succeeded', + * 'Updating', 'Deleting', and 'Failed'. + */ + readonly provisioningState?: string; + /** + * The list of public IPs associated with the DDoS custom policy resource. This list is + * read-only. + */ + readonly publicIPAddresses?: SubResource[]; + /** + * The protocol-specific DDoS policy customization parameters. + */ + protocolCustomSettings?: ProtocolCustomSettingsFormat[]; + /** + * A unique read-only string that changes whenever the resource is updated. + */ + readonly etag?: string; +} + /** * A DDoS protection plan in a resource group. */ @@ -2797,7 +2853,7 @@ export interface ExpressRouteCircuitPeeringConfig { */ advertisedPublicPrefixes?: string[]; /** - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering */ advertisedCommunities?: string[]; /** @@ -2912,7 +2968,7 @@ export interface ExpressRouteCircuitConnection extends SubResource { */ readonly circuitConnectionStatus?: string; /** - * Provisioning state of the circuit connection resource. Possible values are: 'Succeded', + * Provisioning state of the circuit connection resource. Possible values are: 'Succeeded', * 'Updating', 'Deleting', and 'Failed'. */ readonly provisioningState?: string; @@ -3736,7 +3792,7 @@ export interface ExpressRoutePort extends Resource { */ encapsulation?: string; /** - * Ethertype of the physical port. + * Ether type of the physical port. */ readonly etherType?: string; /** @@ -4125,12 +4181,12 @@ export interface EffectiveNetworkSecurityRule { destinationPortRange?: string; /** * The source port ranges. Expected values include a single integer between 0 and 65535, a range - * using '-' as seperator (e.g. 100-400), or an asterix (*) + * using '-' as separator (e.g. 100-400), or an asterisk (*) */ sourcePortRanges?: string[]; /** * The destination port ranges. Expected values include a single integer between 0 and 65535, a - * range using '-' as seperator (e.g. 100-400), or an asterix (*) + * range using '-' as separator (e.g. 100-400), or an asterisk (*) */ destinationPortRanges?: string[]; /** @@ -4143,12 +4199,12 @@ export interface EffectiveNetworkSecurityRule { destinationAddressPrefix?: string; /** * The source address prefixes. Expected values include CIDR IP ranges, Default Tags - * (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). + * (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). */ sourceAddressPrefixes?: string[]; /** * The destination address prefixes. Expected values include CIDR IP ranges, Default Tags - * (VirtualNetwork, AureLoadBalancer, Internet), System Tags, and the asterix (*). + * (VirtualNetwork, AzureLoadBalancer, Internet), System Tags, and the asterisk (*). */ destinationAddressPrefixes?: string[]; /** @@ -4260,7 +4316,7 @@ export interface EffectiveRouteListResult { } /** - * Container network interface configruation child resource. + * Container network interface configuration child resource. */ export interface ContainerNetworkInterfaceConfiguration extends SubResource { /** @@ -4328,7 +4384,7 @@ export interface ContainerNetworkInterface extends SubResource { */ containerNetworkInterfaceConfiguration?: ContainerNetworkInterfaceConfiguration; /** - * Reference to the conatinaer to which this container network interface is attached. + * Reference to the container to which this container network interface is attached. */ container?: Container; /** @@ -5535,7 +5591,7 @@ export interface ConnectionStateSnapshot { } /** - * List of connection states snaphots. + * List of connection states snapshots. */ export interface ConnectionMonitorQueryResult { /** @@ -5570,7 +5626,7 @@ export interface NetworkConfigurationDiagnosticProfile { */ destination: string; /** - * Traffice destination port. Accepted values are '*', port (for example, 3389) and port range + * Traffic destination port. Accepted values are '*', port (for example, 3389) and port range * (for example, 80-100). */ destinationPort: string; @@ -7106,8 +7162,8 @@ export interface P2SVpnServerConfiguration extends SubResource { */ radiusServerAddress?: string; /** - * The radius secret property of the P2SVpnServerConfiguration resource for for point to site - * client connection. + * The radius secret property of the P2SVpnServerConfiguration resource for point to site client + * connection. */ radiusServerSecret?: string; /** @@ -7537,7 +7593,7 @@ export interface P2SVpnGateway extends Resource { */ vpnClientAddressPool?: AddressSpace; /** - * All P2S vpnclients' connection health status. + * All P2S VPN clients' connection health status. */ readonly vpnClientConnectionHealth?: VpnClientConnectionHealth; /** diff --git a/lib/services/networkManagement2/lib/models/index.js b/lib/services/networkManagement2/lib/models/index.js index 14fb9da4e0..04cff88c29 100644 --- a/lib/services/networkManagement2/lib/models/index.js +++ b/lib/services/networkManagement2/lib/models/index.js @@ -110,6 +110,8 @@ exports.AzureFirewallNetworkRuleCollection = require('./azureFirewallNetworkRule exports.AzureFirewall = require('./azureFirewall'); exports.AzureFirewallFqdnTag = require('./azureFirewallFqdnTag'); exports.DnsNameAvailabilityResult = require('./dnsNameAvailabilityResult'); +exports.ProtocolCustomSettingsFormat = require('./protocolCustomSettingsFormat'); +exports.DdosCustomPolicy = require('./ddosCustomPolicy'); exports.DdosProtectionPlan = require('./ddosProtectionPlan'); exports.EndpointServiceResult = require('./endpointServiceResult'); exports.ExpressRouteCircuitAuthorization = require('./expressRouteCircuitAuthorization'); diff --git a/lib/services/networkManagement2/lib/models/ipv6ExpressRouteCircuitPeeringConfig.js b/lib/services/networkManagement2/lib/models/ipv6ExpressRouteCircuitPeeringConfig.js index 8963d27f2e..fbf83a896f 100644 --- a/lib/services/networkManagement2/lib/models/ipv6ExpressRouteCircuitPeeringConfig.js +++ b/lib/services/networkManagement2/lib/models/ipv6ExpressRouteCircuitPeeringConfig.js @@ -25,7 +25,7 @@ class Ipv6ExpressRouteCircuitPeeringConfig { * @property {array} [microsoftPeeringConfig.advertisedPublicPrefixes] The * reference of AdvertisedPublicPrefixes. * @property {array} [microsoftPeeringConfig.advertisedCommunities] The - * communities of bgp peering. Spepcified for microsoft peering + * communities of bgp peering. Specified for microsoft peering * @property {string} [microsoftPeeringConfig.advertisedPublicPrefixesState] * AdvertisedPublicPrefixState of the Peering resource. Possible values are * 'NotConfigured', 'Configuring', 'Configured', and 'ValidationNeeded'. diff --git a/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticProfile.js b/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticProfile.js index 18b0e42a73..2442663842 100644 --- a/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticProfile.js +++ b/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticProfile.js @@ -26,7 +26,7 @@ class NetworkConfigurationDiagnosticProfile { * Address/CIDR, Service Tag. * @property {string} destination Traffic destination. Accepted values are: * '*', IP Address/CIDR, Service Tag. - * @property {string} destinationPort Traffice destination port. Accepted + * @property {string} destinationPort Traffic destination port. Accepted * values are '*', port (for example, 3389) and port range (for example, * 80-100). */ diff --git a/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticResult.js b/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticResult.js index 0f92eccfff..dd2f605ce9 100644 --- a/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticResult.js +++ b/lib/services/networkManagement2/lib/models/networkConfigurationDiagnosticResult.js @@ -28,7 +28,7 @@ class NetworkConfigurationDiagnosticResult { * '*', IP Address/CIDR, Service Tag. * @property {string} [profile.destination] Traffic destination. Accepted * values are: '*', IP Address/CIDR, Service Tag. - * @property {string} [profile.destinationPort] Traffice destination port. + * @property {string} [profile.destinationPort] Traffic destination port. * Accepted values are '*', port (for example, 3389) and port range (for * example, 80-100). * @property {object} [networkSecurityGroupResult] diff --git a/lib/services/networkManagement2/lib/models/p2SVpnGateway.js b/lib/services/networkManagement2/lib/models/p2SVpnGateway.js index 52c0a8e4aa..8e04614fec 100644 --- a/lib/services/networkManagement2/lib/models/p2SVpnGateway.js +++ b/lib/services/networkManagement2/lib/models/p2SVpnGateway.js @@ -35,7 +35,7 @@ class P2SVpnGateway extends models['Resource'] { * space resource which represents Address space for P2S VpnClient. * @property {array} [vpnClientAddressPool.addressPrefixes] A list of address * blocks reserved for this virtual network in CIDR notation. - * @property {object} [vpnClientConnectionHealth] All P2S vpnclients' + * @property {object} [vpnClientConnectionHealth] All P2S VPN clients' * connection health status. * @property {number} * [vpnClientConnectionHealth.totalIngressBytesTransferred] Total of the diff --git a/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js b/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js index 0ae7cb2040..42e452c175 100644 --- a/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js +++ b/lib/services/networkManagement2/lib/models/p2SVpnServerConfiguration.js @@ -40,8 +40,7 @@ class P2SVpnServerConfiguration extends models['SubResource'] { * property of the P2SVpnServerConfiguration resource for point to site * client connection. * @property {string} [radiusServerSecret] The radius secret property of the - * P2SVpnServerConfiguration resource for for point to site client - * connection. + * P2SVpnServerConfiguration resource for point to site client connection. * @property {string} [provisioningState] The provisioning state of the * P2SVpnServerConfiguration resource. Possible values are: 'Updating', * 'Deleting', and 'Failed'. diff --git a/lib/services/networkManagement2/lib/models/protocolCustomSettingsFormat.js b/lib/services/networkManagement2/lib/models/protocolCustomSettingsFormat.js new file mode 100644 index 0000000000..3091e1c98a --- /dev/null +++ b/lib/services/networkManagement2/lib/models/protocolCustomSettingsFormat.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'; + +/** + * DDoS custom policy properties. + * + */ +class ProtocolCustomSettingsFormat { + /** + * Create a ProtocolCustomSettingsFormat. + * @property {string} [protocol] The protocol for which the DDoS protection + * policy is being customized. Possible values include: 'Tcp', 'Udp', 'Syn' + * @property {string} [triggerRateOverride] The customized DDoS protection + * trigger rate. + * @property {string} [sourceRateOverride] The customized DDoS protection + * source rate. + * @property {string} [triggerSensitivityOverride] The customized DDoS + * protection trigger rate sensitivity degrees. High: Trigger rate set with + * most sensitivity w.r.t. normal traffic. Default: Trigger rate set with + * moderate sensitivity w.r.t. normal traffic. Low: Trigger rate set with + * less sensitivity w.r.t. normal traffic. Relaxed: Trigger rate set with + * least sensitivity w.r.t. normal traffic. Possible values include: + * 'Relaxed', 'Low', 'Default', 'High' + */ + constructor() { + } + + /** + * Defines the metadata of ProtocolCustomSettingsFormat + * + * @returns {object} metadata of ProtocolCustomSettingsFormat + * + */ + mapper() { + return { + required: false, + serializedName: 'ProtocolCustomSettingsFormat', + type: { + name: 'Composite', + className: 'ProtocolCustomSettingsFormat', + modelProperties: { + protocol: { + required: false, + serializedName: 'protocol', + type: { + name: 'String' + } + }, + triggerRateOverride: { + required: false, + serializedName: 'triggerRateOverride', + type: { + name: 'String' + } + }, + sourceRateOverride: { + required: false, + serializedName: 'sourceRateOverride', + type: { + name: 'String' + } + }, + triggerSensitivityOverride: { + required: false, + serializedName: 'triggerSensitivityOverride', + type: { + name: 'String' + } + } + } + } + }; + } +} + +module.exports = ProtocolCustomSettingsFormat; diff --git a/lib/services/networkManagement2/lib/models/securityRule.js b/lib/services/networkManagement2/lib/models/securityRule.js index a40f02a127..bbee914e68 100644 --- a/lib/services/networkManagement2/lib/models/securityRule.js +++ b/lib/services/networkManagement2/lib/models/securityRule.js @@ -26,20 +26,21 @@ class SecurityRule extends models['SubResource'] { * Possible values are 'Tcp', 'Udp', and '*'. Possible values include: 'Tcp', * 'Udp', '*' * @property {string} [sourcePortRange] The source port or range. Integer or - * range between 0 and 65535. Asterix '*' can also be used to match all + * range between 0 and 65535. Asterisks '*' can also be used to match all * ports. * @property {string} [destinationPortRange] The destination port or range. - * Integer or range between 0 and 65535. Asterix '*' can also be used to + * Integer or range between 0 and 65535. Asterisks '*' can also be used to * match all ports. * @property {string} [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. + * Asterisks '*' 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. * @property {array} [sourceAddressPrefixes] The CIDR or source IP ranges. * @property {array} [sourceApplicationSecurityGroups] The application * security group specified as source. * @property {string} [destinationAddressPrefix] The destination address - * prefix. CIDR or destination IP range. Asterix '*' can also be used to + * prefix. CIDR or destination IP range. Asterisks '*' can also be used to * match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @property {array} [destinationAddressPrefixes] The destination address @@ -56,7 +57,7 @@ class SecurityRule extends models['SubResource'] { * the collection. The lower the priority number, the higher the priority of * the rule. * @property {string} direction The direction of the rule. The direction - * specifies if rule will be evaluated on incoming or outcoming traffic. + * specifies if rule will be evaluated on incoming or outgoing traffic. * Possible values are: 'Inbound' and 'Outbound'. Possible values include: * 'Inbound', 'Outbound' * @property {string} [provisioningState] The provisioning state of the diff --git a/lib/services/networkManagement2/lib/networkManagementClient.d.ts b/lib/services/networkManagement2/lib/networkManagementClient.d.ts index 9753f42d8a..6a549fc30e 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.d.ts +++ b/lib/services/networkManagement2/lib/networkManagementClient.d.ts @@ -60,6 +60,7 @@ export default class NetworkManagementClient extends AzureServiceClient { availableResourceGroupDelegations: operations.AvailableResourceGroupDelegations; azureFirewalls: operations.AzureFirewalls; azureFirewallFqdnTags: operations.AzureFirewallFqdnTags; + ddosCustomPolicies: operations.DdosCustomPolicies; ddosProtectionPlans: operations.DdosProtectionPlans; availableEndpointServices: operations.AvailableEndpointServices; expressRouteCircuitAuthorizations: operations.ExpressRouteCircuitAuthorizations; diff --git a/lib/services/networkManagement2/lib/networkManagementClient.js b/lib/services/networkManagement2/lib/networkManagementClient.js index d29c61bf16..7804a305b4 100644 --- a/lib/services/networkManagement2/lib/networkManagementClient.js +++ b/lib/services/networkManagement2/lib/networkManagementClient.js @@ -370,6 +370,7 @@ class NetworkManagementClient extends ServiceClient { this.availableResourceGroupDelegations = new operations.AvailableResourceGroupDelegations(this); this.azureFirewalls = new operations.AzureFirewalls(this); this.azureFirewallFqdnTags = new operations.AzureFirewallFqdnTags(this); + this.ddosCustomPolicies = new operations.DdosCustomPolicies(this); this.ddosProtectionPlans = new operations.DdosProtectionPlans(this); this.availableEndpointServices = new operations.AvailableEndpointServices(this); this.expressRouteCircuitAuthorizations = new operations.ExpressRouteCircuitAuthorizations(this); diff --git a/lib/services/networkManagement2/lib/operations/applicationGateways.js b/lib/services/networkManagement2/lib/operations/applicationGateways.js index cbe7e2a8cb..3b3b71bb60 100644 --- a/lib/services/networkManagement2/lib/operations/applicationGateways.js +++ b/lib/services/networkManagement2/lib/operations/applicationGateways.js @@ -332,15 +332,15 @@ function _get(resourceGroupName, applicationGatewayName, options, callback) { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -2200,15 +2200,15 @@ function _beginDeleteMethod(resourceGroupName, applicationGatewayName, options, * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -3704,15 +3704,15 @@ class ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -3902,15 +3902,15 @@ class ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -5292,15 +5292,15 @@ class ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -5490,15 +5490,15 @@ class ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] diff --git a/lib/services/networkManagement2/lib/operations/ddosCustomPolicies.js b/lib/services/networkManagement2/lib/operations/ddosCustomPolicies.js new file mode 100644 index 0000000000..bda75d7026 --- /dev/null +++ b/lib/services/networkManagement2/lib/operations/ddosCustomPolicies.js @@ -0,0 +1,1562 @@ +/* + * 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, 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, ddosCustomPolicyName, 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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-11-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 (ddosCustomPolicyName === null || ddosCustomPolicyName === undefined || typeof ddosCustomPolicyName.valueOf() !== 'string') { + throw new Error('ddosCustomPolicyName 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/ddosCustomPolicies/{ddosCustomPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosCustomPolicyName}', encodeURIComponent(ddosCustomPolicyName)); + 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['DdosCustomPolicy']().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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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, ddosCustomPolicyName, 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['DdosCustomPolicy']().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 a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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 {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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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.beginUpdateTags(resourceGroupName, ddosCustomPolicyName, 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['DdosCustomPolicy']().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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, 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-11-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 (ddosCustomPolicyName === null || ddosCustomPolicyName === undefined || typeof ddosCustomPolicyName.valueOf() !== 'string') { + throw new Error('ddosCustomPolicyName 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/ddosCustomPolicies/{ddosCustomPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosCustomPolicyName}', encodeURIComponent(ddosCustomPolicyName)); + 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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-11-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 (ddosCustomPolicyName === null || ddosCustomPolicyName === undefined || typeof ddosCustomPolicyName.valueOf() !== 'string') { + throw new Error('ddosCustomPolicyName 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/ddosCustomPolicies/{ddosCustomPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosCustomPolicyName}', encodeURIComponent(ddosCustomPolicyName)); + 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['DdosCustomPolicy']().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['DdosCustomPolicy']().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['DdosCustomPolicy']().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); + }); +} + +/** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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 {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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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-11-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 (ddosCustomPolicyName === null || ddosCustomPolicyName === undefined || typeof ddosCustomPolicyName.valueOf() !== 'string') { + throw new Error('ddosCustomPolicyName 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/ddosCustomPolicies/{ddosCustomPolicyName}'; + requestUrl = requestUrl.replace('{resourceGroupName}', encodeURIComponent(resourceGroupName)); + requestUrl = requestUrl.replace('{ddosCustomPolicyName}', encodeURIComponent(ddosCustomPolicyName)); + 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 (parameters !== null && parameters !== undefined) { + let requestModelMapper = new client.models['TagsObject']().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['DdosCustomPolicy']().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 DdosCustomPolicies. */ +class DdosCustomPolicies { + /** + * Create a DdosCustomPolicies. + * @param {NetworkManagementClient} client Reference to the service client. + */ + constructor(client) { + this.client = client; + this._deleteMethod = _deleteMethod; + this._get = _get; + this._createOrUpdate = _createOrUpdate; + this._updateTags = _updateTags; + this._beginDeleteMethod = _beginDeleteMethod; + this._beginCreateOrUpdate = _beginCreateOrUpdate; + this._beginUpdateTags = _beginUpdateTags; + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._deleteMethod(resourceGroupName, ddosCustomPolicyName, 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, 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, ddosCustomPolicyName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._deleteMethod(resourceGroupName, ddosCustomPolicyName, options, optionalCallback); + } + } + + /** + * Gets information about the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._get(resourceGroupName, ddosCustomPolicyName, 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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 {DdosCustomPolicy} - 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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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, ddosCustomPolicyName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._get(resourceGroupName, ddosCustomPolicyName, options, optionalCallback); + } + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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, ddosCustomPolicyName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._createOrUpdate(resourceGroupName, ddosCustomPolicyName, 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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 {DdosCustomPolicy} - 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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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, ddosCustomPolicyName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._createOrUpdate(resourceGroupName, ddosCustomPolicyName, parameters, options, optionalCallback); + } + } + + /** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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} - The error object. + */ + updateTagsWithHttpOperationResponse(resourceGroupName, ddosCustomPolicyName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._updateTags(resourceGroupName, ddosCustomPolicyName, 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 a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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 {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 {DdosCustomPolicy} - 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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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._updateTags(resourceGroupName, ddosCustomPolicyName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._updateTags(resourceGroupName, ddosCustomPolicyName, parameters, options, optionalCallback); + } + } + + /** + * Deletes the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginDeleteMethod(resourceGroupName, ddosCustomPolicyName, 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName, 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, ddosCustomPolicyName, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginDeleteMethod(resourceGroupName, ddosCustomPolicyName, options, optionalCallback); + } + } + + /** + * Creates or updates a DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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, ddosCustomPolicyName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginCreateOrUpdate(resourceGroupName, ddosCustomPolicyName, 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 custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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 {DdosCustomPolicy} - 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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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, ddosCustomPolicyName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginCreateOrUpdate(resourceGroupName, ddosCustomPolicyName, parameters, options, optionalCallback); + } + } + + /** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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} - The error object. + */ + beginUpdateTagsWithHttpOperationResponse(resourceGroupName, ddosCustomPolicyName, parameters, options) { + let client = this.client; + let self = this; + return new Promise((resolve, reject) => { + self._beginUpdateTags(resourceGroupName, ddosCustomPolicyName, 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 a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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 {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 {DdosCustomPolicy} - 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 DdosCustomPolicy} 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, ddosCustomPolicyName, 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._beginUpdateTags(resourceGroupName, ddosCustomPolicyName, parameters, options, (err, result, request, response) => { + if (err) { reject(err); } + else { resolve(result); } + return; + }); + }); + } else { + return self._beginUpdateTags(resourceGroupName, ddosCustomPolicyName, parameters, options, optionalCallback); + } + } + +} + +module.exports = DdosCustomPolicies; diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js b/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js index e435af4167..4afa5247bb 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteCircuitConnections.js @@ -256,7 +256,7 @@ function _get(resourceGroupName, circuitName, peeringName, connectionName, optio * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -659,7 +659,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, peeringName, connect * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -1222,7 +1222,7 @@ class ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -1289,7 +1289,7 @@ class ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -1569,7 +1569,7 @@ class ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -1636,7 +1636,7 @@ class ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js b/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js index d04c764460..0115ec4485 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteCircuitPeerings.js @@ -317,7 +317,7 @@ function _get(resourceGroupName, circuitName, peeringName, options, callback) { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -805,7 +805,7 @@ function _beginDeleteMethod(resourceGroupName, circuitName, peeringName, options * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1447,7 +1447,7 @@ class ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1614,7 +1614,7 @@ class ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1980,7 +1980,7 @@ class ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -2147,7 +2147,7 @@ class ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] diff --git a/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js b/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js index a66fac00cd..bded47b466 100644 --- a/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js +++ b/lib/services/networkManagement2/lib/operations/expressRouteCrossConnectionPeerings.js @@ -438,7 +438,7 @@ function _get(resourceGroupName, crossConnectionName, peeringName, options, call * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -751,7 +751,7 @@ function _beginDeleteMethod(resourceGroupName, crossConnectionName, peeringName, * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1454,7 +1454,7 @@ class ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1589,7 +1589,7 @@ class ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1838,7 +1838,7 @@ class ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -1973,7 +1973,7 @@ class ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] diff --git a/lib/services/networkManagement2/lib/operations/expressRoutePortsLocations.js b/lib/services/networkManagement2/lib/operations/expressRoutePortsLocations.js index 8df086050f..e8cc4affbc 100644 --- a/lib/services/networkManagement2/lib/operations/expressRoutePortsLocations.js +++ b/lib/services/networkManagement2/lib/operations/expressRoutePortsLocations.js @@ -17,7 +17,7 @@ const WebResource = msRest.WebResource; /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {object} [options] Optional Parameters. * @@ -291,7 +291,7 @@ function _get(locationName, options, callback) { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -434,7 +434,7 @@ class ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {object} [options] Optional Parameters. * @@ -464,7 +464,7 @@ class ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {object} [options] Optional Parameters. * @@ -604,7 +604,7 @@ class ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -637,7 +637,7 @@ class ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. diff --git a/lib/services/networkManagement2/lib/operations/index.d.ts b/lib/services/networkManagement2/lib/operations/index.d.ts index 0198f8b074..80f596f72a 100644 --- a/lib/services/networkManagement2/lib/operations/index.d.ts +++ b/lib/services/networkManagement2/lib/operations/index.d.ts @@ -249,15 +249,15 @@ export interface ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -435,15 +435,15 @@ export interface ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -1432,15 +1432,15 @@ export interface ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -1618,15 +1618,15 @@ export interface ApplicationGateways { * allow WAF to check request Body. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maxium + * [parameters.webApplicationFirewallConfiguration.maxRequestBodySize] Maximum * request body size for WAF. * * @param {number} * [parameters.webApplicationFirewallConfiguration.maxRequestBodySizeInKb] - * Maxium request body size in Kb for WAF. + * Maximum request body size in Kb for WAF. * * @param {number} - * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maxium + * [parameters.webApplicationFirewallConfiguration.fileUploadLimitInMb] Maximum * file upload size in Mb for WAF. * * @param {array} [parameters.webApplicationFirewallConfiguration.exclusions] @@ -3862,6 +3862,494 @@ export interface AzureFirewallFqdnTags { listAllNext(nextPageLink: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; } +/** + * @class + * DdosCustomPolicies + * __NOTE__: An instance of this class is automatically created for an + * instance of the NetworkManagementClient. + */ +export interface DdosCustomPolicies { + + + /** + * Deletes the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + deleteMethod(resourceGroupName: string, ddosCustomPolicyName: string, callback: ServiceCallback): void; + deleteMethod(resourceGroupName: string, ddosCustomPolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Gets information about the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Gets information about the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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 {DdosCustomPolicy} - 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. + * + * {DdosCustomPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DdosCustomPolicy} 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, ddosCustomPolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + get(resourceGroupName: string, ddosCustomPolicyName: string, callback: ServiceCallback): void; + get(resourceGroupName: string, ddosCustomPolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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 {DdosCustomPolicy} - 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. + * + * {DdosCustomPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DdosCustomPolicy} 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, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + createOrUpdate(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, callback: ServiceCallback): void; + createOrUpdate(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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, ddosCustomPolicyName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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 {DdosCustomPolicy} - 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. + * + * {DdosCustomPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DdosCustomPolicy} 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, ddosCustomPolicyName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + updateTags(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + updateTags(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Deletes the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Deletes the specified DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @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, ddosCustomPolicyName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginDeleteMethod(resourceGroupName: string, ddosCustomPolicyName: string, callback: ServiceCallback): void; + beginDeleteMethod(resourceGroupName: string, ddosCustomPolicyName: string, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Creates or updates a DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Creates or updates a DDoS custom policy. + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the create or update + * operation. + * + * @param {array} [parameters.protocolCustomSettings] The protocol-specific + * DDoS policy customization parameters. + * + * @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 {DdosCustomPolicy} - 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. + * + * {DdosCustomPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DdosCustomPolicy} 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, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginCreateOrUpdate(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, callback: ServiceCallback): void; + beginCreateOrUpdate(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.DdosCustomPolicy, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; + + + /** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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, ddosCustomPolicyName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; + + /** + * Update a DDoS custom policy tags + * + * @param {string} resourceGroupName The name of the resource group. + * + * @param {string} ddosCustomPolicyName The name of the DDoS custom policy. + * + * @param {object} parameters Parameters supplied to the update DDoS custom + * policy resource 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 {DdosCustomPolicy} - 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. + * + * {DdosCustomPolicy} [result] - The deserialized result object if an error did not occur. + * See {@link DdosCustomPolicy} 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, ddosCustomPolicyName: string, parameters: models.TagsObject, options?: { customHeaders? : { [headerName: string]: string; } }): Promise; + beginUpdateTags(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.TagsObject, callback: ServiceCallback): void; + beginUpdateTags(resourceGroupName: string, ddosCustomPolicyName: string, parameters: models.TagsObject, options: { customHeaders? : { [headerName: string]: string; } }, callback: ServiceCallback): void; +} + /** * @class * DdosProtectionPlans @@ -5288,7 +5776,7 @@ export interface ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -5443,7 +5931,7 @@ export interface ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -5740,7 +6228,7 @@ export interface ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -5895,7 +6383,7 @@ export interface ExpressRouteCircuitPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -6206,7 +6694,7 @@ export interface ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -6261,7 +6749,7 @@ export interface ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -6472,7 +6960,7 @@ export interface ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -6527,7 +7015,7 @@ export interface ExpressRouteCircuitConnections { * connection. * * @param {object} expressRouteCircuitConnectionParameters Parameters supplied - * to the create or update express route circuit circuit connection operation. + * to the create or update express route circuit connection operation. * * @param {object} * [expressRouteCircuitConnectionParameters.expressRouteCircuitPeering] @@ -9638,7 +10126,7 @@ export interface ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -9761,7 +10249,7 @@ export interface ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -9968,7 +10456,7 @@ export interface ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -10091,7 +10579,7 @@ export interface ExpressRouteCrossConnectionPeerings { * * @param {array} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedCommunities] - * The communities of bgp peering. Spepcified for microsoft peering + * The communities of bgp peering. Specified for microsoft peering * * @param {string} * [peeringParameters.ipv6PeeringConfig.microsoftPeeringConfig.advertisedPublicPrefixesState] @@ -11292,7 +11780,7 @@ export interface ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {object} [options] Optional Parameters. * @@ -11310,7 +11798,7 @@ export interface ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {object} [options] Optional Parameters. * @@ -11408,7 +11896,7 @@ export interface ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -11429,7 +11917,7 @@ export interface ExpressRoutePortsLocations { /** * Retrieves all ExpressRoutePort peering locations. Does not return available * bandwidths for each location. Available bandwidths can only be obtained when - * retriving a specific peering location. + * retrieving a specific peering location. * * @param {string} nextPageLink The NextLink from the previous successful call * to List operation. @@ -20127,7 +20615,7 @@ export interface NetworkProfiles { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkProfileName The name of the PublicIPPrefx. + * @param {string} networkProfileName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -20149,7 +20637,7 @@ export interface NetworkProfiles { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkProfileName The name of the PublicIPPrefx. + * @param {string} networkProfileName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -21514,15 +22002,15 @@ export interface SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -21534,7 +22022,7 @@ export interface SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -21560,7 +22048,7 @@ export interface SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -21611,15 +22099,15 @@ export interface SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -21631,7 +22119,7 @@ export interface SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -21657,7 +22145,7 @@ export interface SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -21853,15 +22341,15 @@ export interface SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -21873,7 +22361,7 @@ export interface SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -21899,7 +22387,7 @@ export interface SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -21950,15 +22438,15 @@ export interface SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -21970,7 +22458,7 @@ export interface SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -21996,7 +22484,7 @@ export interface SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -28241,7 +28729,7 @@ export interface PublicIPPrefixes { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publicIpPrefixName The name of the PublicIPPrefx. + * @param {string} publicIpPrefixName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -28263,7 +28751,7 @@ export interface PublicIPPrefixes { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publicIpPrefixName The name of the PublicIPPrefx. + * @param {string} publicIpPrefixName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -43884,7 +44372,7 @@ export interface VpnSites { /** - * Retrieves the details of a VPNsite. + * Retrieves the details of a VPN site. * * @param {string} resourceGroupName The resource group name of the VpnSite. * @@ -43904,7 +44392,7 @@ export interface VpnSites { getWithHttpOperationResponse(resourceGroupName: string, vpnSiteName: string, options?: { customHeaders? : { [headerName: string]: string; } }): Promise>; /** - * Retrieves the details of a VPNsite. + * Retrieves the details of a VPN site. * * @param {string} resourceGroupName The resource group name of the VpnSite. * @@ -47486,8 +47974,8 @@ export interface P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -47559,8 +48047,8 @@ export interface P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -47778,8 +48266,8 @@ export interface P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -47851,8 +48339,8 @@ export interface P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] diff --git a/lib/services/networkManagement2/lib/operations/index.js b/lib/services/networkManagement2/lib/operations/index.js index 75d648518a..694db4c1c5 100644 --- a/lib/services/networkManagement2/lib/operations/index.js +++ b/lib/services/networkManagement2/lib/operations/index.js @@ -20,6 +20,7 @@ exports.AvailableDelegations = require('./availableDelegations'); exports.AvailableResourceGroupDelegations = require('./availableResourceGroupDelegations'); exports.AzureFirewalls = require('./azureFirewalls'); exports.AzureFirewallFqdnTags = require('./azureFirewallFqdnTags'); +exports.DdosCustomPolicies = require('./ddosCustomPolicies'); exports.DdosProtectionPlans = require('./ddosProtectionPlans'); exports.AvailableEndpointServices = require('./availableEndpointServices'); exports.ExpressRouteCircuitAuthorizations = require('./expressRouteCircuitAuthorizations'); diff --git a/lib/services/networkManagement2/lib/operations/networkProfiles.js b/lib/services/networkManagement2/lib/operations/networkProfiles.js index bcf5381384..089428b0f8 100644 --- a/lib/services/networkManagement2/lib/operations/networkProfiles.js +++ b/lib/services/networkManagement2/lib/operations/networkProfiles.js @@ -144,7 +144,7 @@ function _deleteMethod(resourceGroupName, networkProfileName, options, callback) * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkProfileName The name of the PublicIPPrefx. + * @param {string} networkProfileName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -1285,7 +1285,7 @@ class NetworkProfiles { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkProfileName The name of the PublicIPPrefx. + * @param {string} networkProfileName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -1319,7 +1319,7 @@ class NetworkProfiles { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} networkProfileName The name of the PublicIPPrefx. + * @param {string} networkProfileName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js b/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js index bf9997b946..aa787a4050 100644 --- a/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js +++ b/lib/services/networkManagement2/lib/operations/p2sVpnServerConfigurations.js @@ -215,8 +215,8 @@ function _get(resourceGroupName, virtualWanName, p2SVpnServerConfigurationName, * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -558,8 +558,8 @@ function _listByVirtualWan(resourceGroupName, virtualWanName, options, callback) * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -1169,8 +1169,8 @@ class P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -1254,8 +1254,8 @@ class P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -1542,8 +1542,8 @@ class P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] @@ -1627,8 +1627,8 @@ class P2sVpnServerConfigurations { * for point to site client connection. * * @param {string} [p2SVpnServerConfigurationParameters.radiusServerSecret] The - * radius secret property of the P2SVpnServerConfiguration resource for for - * point to site client connection. + * radius secret property of the P2SVpnServerConfiguration resource for point + * to site client connection. * * @param {string} * [p2SVpnServerConfigurationParameters.p2SVpnServerConfigurationPropertiesEtag] diff --git a/lib/services/networkManagement2/lib/operations/publicIPPrefixes.js b/lib/services/networkManagement2/lib/operations/publicIPPrefixes.js index d90b347ff9..a7c9bb3865 100644 --- a/lib/services/networkManagement2/lib/operations/publicIPPrefixes.js +++ b/lib/services/networkManagement2/lib/operations/publicIPPrefixes.js @@ -82,7 +82,7 @@ function _deleteMethod(resourceGroupName, publicIpPrefixName, options, callback) * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publicIpPrefixName The name of the PublicIPPrefx. + * @param {string} publicIpPrefixName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -1578,7 +1578,7 @@ class PublicIPPrefixes { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publicIpPrefixName The name of the PublicIPPrefx. + * @param {string} publicIpPrefixName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * @@ -1612,7 +1612,7 @@ class PublicIPPrefixes { * * @param {string} resourceGroupName The name of the resource group. * - * @param {string} publicIpPrefixName The name of the PublicIPPrefx. + * @param {string} publicIpPrefixName The name of the PublicIPPrefix. * * @param {object} [options] Optional Parameters. * diff --git a/lib/services/networkManagement2/lib/operations/securityRules.js b/lib/services/networkManagement2/lib/operations/securityRules.js index 80cc77fbd3..16dc435cd5 100644 --- a/lib/services/networkManagement2/lib/operations/securityRules.js +++ b/lib/services/networkManagement2/lib/operations/securityRules.js @@ -252,15 +252,15 @@ function _get(resourceGroupName, networkSecurityGroupName, securityRuleName, opt * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -272,7 +272,7 @@ function _get(resourceGroupName, networkSecurityGroupName, securityRuleName, opt * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -298,7 +298,7 @@ function _get(resourceGroupName, networkSecurityGroupName, securityRuleName, opt * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -683,15 +683,15 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, securit * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -703,7 +703,7 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, securit * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -729,7 +729,7 @@ function _beginDeleteMethod(resourceGroupName, networkSecurityGroupName, securit * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -1269,15 +1269,15 @@ class SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -1289,7 +1289,7 @@ class SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -1315,7 +1315,7 @@ class SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -1378,15 +1378,15 @@ class SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -1398,7 +1398,7 @@ class SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -1424,7 +1424,7 @@ class SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -1689,15 +1689,15 @@ class SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -1709,7 +1709,7 @@ class SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -1735,7 +1735,7 @@ class SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * @@ -1798,15 +1798,15 @@ class SecurityRules { * 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. + * range. Integer or range between 0 and 65535. Asterisks '*' 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. + * destination port or range. Integer or range between 0 and 65535. Asterisks + * '*' 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. + * source IP range. Asterisks '*' 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. @@ -1818,7 +1818,7 @@ class SecurityRules { * application security group specified as source. * * @param {string} [securityRuleParameters.destinationAddressPrefix] The - * destination address prefix. CIDR or destination IP range. Asterix '*' can + * destination address prefix. CIDR or destination IP range. Asterisks '*' can * also be used to match all source IPs. Default tags such as 'VirtualNetwork', * 'AzureLoadBalancer' and 'Internet' can also be used. * @@ -1844,7 +1844,7 @@ class SecurityRules { * 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 + * The direction specifies if rule will be evaluated on incoming or outgoing * traffic. Possible values are: 'Inbound' and 'Outbound'. Possible values * include: 'Inbound', 'Outbound' * diff --git a/lib/services/networkManagement2/lib/operations/vpnSites.js b/lib/services/networkManagement2/lib/operations/vpnSites.js index ee50e00f17..fea817cb27 100644 --- a/lib/services/networkManagement2/lib/operations/vpnSites.js +++ b/lib/services/networkManagement2/lib/operations/vpnSites.js @@ -15,7 +15,7 @@ const msRestAzure = require('ms-rest-azure'); const WebResource = msRest.WebResource; /** - * Retrieves the details of a VPNsite. + * Retrieves the details of a VPN site. * * @param {string} resourceGroupName The resource group name of the VpnSite. * @@ -1527,7 +1527,7 @@ class VpnSites { } /** - * Retrieves the details of a VPNsite. + * Retrieves the details of a VPN site. * * @param {string} resourceGroupName The resource group name of the VpnSite. * @@ -1559,7 +1559,7 @@ class VpnSites { } /** - * Retrieves the details of a VPNsite. + * Retrieves the details of a VPN site. * * @param {string} resourceGroupName The resource group name of the VpnSite. *