Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
[AutoPR network/resource-manager] Fix errors with ddosCustomPolicy.js…
Browse files Browse the repository at this point in the history
…on (#4525)

* Generated from f786e806eeb7e1217a996e89ba30fb7f230a4b8b

Add ddosCustomPolicy.json to readme.md and fix spec errors

* Generated from dbd13ad4dd6a402b16ce899c7c6915e147405b65

Add ddosCustomPolicy.json to readme.md and fix spec errors
  • Loading branch information
AutorestCI authored Jan 9, 2019
1 parent 92be5b0 commit 770378d
Show file tree
Hide file tree
Showing 9 changed files with 2,357 additions and 0 deletions.
160 changes: 160 additions & 0 deletions lib/services/networkManagement2/lib/models/ddosCustomPolicy.js
Original file line number Diff line number Diff line change
@@ -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;
57 changes: 57 additions & 0 deletions lib/services/networkManagement2/lib/models/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2699,6 +2699,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.
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/services/networkManagement2/lib/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading

0 comments on commit 770378d

Please sign in to comment.