From 9e9a982a6af6d4bc132b52ec0a68d4a39656d4bf Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 20 Mar 2019 21:23:12 +0000 Subject: [PATCH] Generated from 9fd71475d1ca8b5b81272ae299559e9028efa531 Fix parameter order and enum names for SDK generation --- packages/@azure/arm-frontdoor/LICENSE.txt | 42 +- packages/@azure/arm-frontdoor/README.md | 195 ++++---- .../lib/frontDoorManagementClient.ts | 6 +- .../lib/frontDoorManagementClientContext.ts | 2 +- .../lib/models/backendPoolsMappers.ts | 17 +- .../lib/models/endpointsMappers.ts | 1 - .../lib/models/frontDoorsMappers.ts | 17 +- .../lib/models/frontendEndpointsMappers.ts | 17 +- .../lib/models/healthProbeSettingsMappers.ts | 17 +- .../@azure/arm-frontdoor/lib/models/index.ts | 471 +++++++++++++----- .../models/loadBalancingSettingsMappers.ts | 17 +- .../lib/models/managedRuleSetsMappers.ts | 42 ++ .../arm-frontdoor/lib/models/mappers.ts | 328 +++++++++--- .../arm-frontdoor/lib/models/parameters.ts | 26 +- .../lib/models/policiesMappers.ts | 19 +- .../lib/models/routingRulesMappers.ts | 17 +- .../lib/operations/backendPools.ts | 16 +- .../arm-frontdoor/lib/operations/endpoints.ts | 4 +- .../lib/operations/frontDoors.ts | 22 +- .../lib/operations/frontendEndpoints.ts | 34 +- .../lib/operations/healthProbeSettings.ts | 16 +- .../arm-frontdoor/lib/operations/index.ts | 1 + .../lib/operations/loadBalancingSettings.ts | 16 +- .../lib/operations/managedRuleSets.ts | 126 +++++ .../arm-frontdoor/lib/operations/policies.ts | 130 ++--- .../lib/operations/routingRules.ts | 16 +- packages/@azure/arm-frontdoor/package.json | 8 +- .../@azure/arm-frontdoor/rollup.config.js | 22 +- 28 files changed, 1113 insertions(+), 532 deletions(-) create mode 100644 packages/@azure/arm-frontdoor/lib/models/managedRuleSetsMappers.ts create mode 100644 packages/@azure/arm-frontdoor/lib/operations/managedRuleSets.ts diff --git a/packages/@azure/arm-frontdoor/LICENSE.txt b/packages/@azure/arm-frontdoor/LICENSE.txt index a70e8cf66038..8f3d856145c5 100644 --- a/packages/@azure/arm-frontdoor/LICENSE.txt +++ b/packages/@azure/arm-frontdoor/LICENSE.txt @@ -1,21 +1,21 @@ -The MIT License (MIT) - -Copyright (c) 2018 Microsoft - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +The MIT License (MIT) + +Copyright (c) 2019 Microsoft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/@azure/arm-frontdoor/README.md b/packages/@azure/arm-frontdoor/README.md index 53db07688fc0..29d1a8f4d60a 100644 --- a/packages/@azure/arm-frontdoor/README.md +++ b/packages/@azure/arm-frontdoor/README.md @@ -1,99 +1,96 @@ -## Azure FrontDoorManagementClient SDK for JavaScript - -This package contains an isomorphic SDK for FrontDoorManagementClient. - -### Currently supported environments - -- Node.js version 6.x.x or higher -- Browser JavaScript - -### How to Install - -``` -npm install @azure/arm-frontdoor -``` - -### How to use - -#### nodejs - Authentication, client creation and list frontDoors as an example written in TypeScript. - -##### Install @azure/ms-rest-nodeauth - -``` -npm install @azure/ms-rest-nodeauth -``` - -##### Sample code - -```ts -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { FrontDoorManagementClient, FrontDoorManagementModels, FrontDoorManagementMappers } from "@azure/arm-frontdoor"; -const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; - -msRestNodeAuth.interactiveLogin().then((creds) => { - const client = new FrontDoorManagementClient(creds, subscriptionId); - client.frontDoors.list().then((result) => { - console.log("The result is:"); - console.log(result); - }); -}).catch((err) => { - console.error(err); -}); -``` - -#### browser - Authentication, client creation and list frontDoors as an example written in JavaScript. - -##### Install @azure/ms-rest-browserauth - -``` -npm install @azure/ms-rest-browserauth -``` - -##### Sample code - -See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. - -- index.html -```html - - - - @azure/arm-frontdoor sample - - - - - - - - -``` - -## Related projects - -- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) - - -![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fpackages%2F%40azure%2Farm-frontdoor%2FREADME.png) +## Azure FrontDoorManagementClient SDK for JavaScript + +This package contains an isomorphic SDK for FrontDoorManagementClient. + +### Currently supported environments + +- Node.js version 6.x.x or higher +- Browser JavaScript + +### How to Install + +```bash +npm install @azure/arm-frontdoor +``` + +### How to use + +#### nodejs - Authentication, client creation and list frontDoors as an example written in TypeScript. + +##### Install @azure/ms-rest-nodeauth + +```bash +npm install @azure/ms-rest-nodeauth +``` + +##### Sample code + +```typescript +import * as msRest from "@azure/ms-rest-js"; +import * as msRestAzure from "@azure/ms-rest-azure-js"; +import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; +import { FrontDoorManagementClient, FrontDoorManagementModels, FrontDoorManagementMappers } from "@azure/arm-frontdoor"; +const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; + +msRestNodeAuth.interactiveLogin().then((creds) => { + const client = new FrontDoorManagementClient(creds, subscriptionId); + client.frontDoors.list().then((result) => { + console.log("The result is:"); + console.log(result); + }); +}).catch((err) => { + console.error(err); +}); +``` + +#### browser - Authentication, client creation and list frontDoors as an example written in JavaScript. + +##### Install @azure/ms-rest-browserauth + +```bash +npm install @azure/ms-rest-browserauth +``` + +##### Sample code + +See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser. + +- index.html +```html + + + + @azure/arm-frontdoor sample + + + + + + + + +``` + +## Related projects + +- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js) diff --git a/packages/@azure/arm-frontdoor/lib/frontDoorManagementClient.ts b/packages/@azure/arm-frontdoor/lib/frontDoorManagementClient.ts index 940960200152..9a5fe29bc516 100644 --- a/packages/@azure/arm-frontdoor/lib/frontDoorManagementClient.ts +++ b/packages/@azure/arm-frontdoor/lib/frontDoorManagementClient.ts @@ -26,6 +26,7 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { frontendEndpoints: operations.FrontendEndpoints; endpoints: operations.Endpoints; policies: operations.Policies; + managedRuleSets: operations.ManagedRuleSets; /** * Initializes a new instance of the FrontDoorManagementClient class. @@ -44,6 +45,7 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { this.frontendEndpoints = new operations.FrontendEndpoints(this); this.endpoints = new operations.Endpoints(this); this.policies = new operations.Policies(this); + this.managedRuleSets = new operations.ManagedRuleSets(this); } /** @@ -109,7 +111,7 @@ const checkFrontDoorNameAvailabilityOperationSpec: msRest.OperationSpec = { httpMethod: "POST", path: "providers/Microsoft.Network/checkFrontDoorNameAvailability", queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -139,7 +141,7 @@ const checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec: msRest.Operat Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/frontDoorManagementClientContext.ts b/packages/@azure/arm-frontdoor/lib/frontDoorManagementClientContext.ts index ef6ce3d84bc5..6b51eaaaf587 100644 --- a/packages/@azure/arm-frontdoor/lib/frontDoorManagementClientContext.ts +++ b/packages/@azure/arm-frontdoor/lib/frontDoorManagementClientContext.ts @@ -13,7 +13,7 @@ import * as msRest from "@azure/ms-rest-js"; import * as msRestAzure from "@azure/ms-rest-azure-js"; const packageName = "@azure/arm-frontdoor"; -const packageVersion = "0.1.0"; +const packageVersion = "3.1.0"; export class FrontDoorManagementClientContext extends msRestAzure.AzureServiceClient { credentials: msRest.ServiceClientCredentials; diff --git a/packages/@azure/arm-frontdoor/lib/models/backendPoolsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/backendPoolsMappers.ts index 22712c374057..dd8a969f9878 100644 --- a/packages/@azure/arm-frontdoor/lib/models/backendPoolsMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/backendPoolsMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, BackendPoolListResult, BackendPool, SubResource, @@ -25,15 +24,19 @@ export { CustomHttpsConfiguration, KeyVaultCertificateSourceParametersVault, Resource, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicy, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition, FrontDoor } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/endpointsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/endpointsMappers.ts index 18eb96ab15e1..d4571be2b756 100644 --- a/packages/@azure/arm-frontdoor/lib/models/endpointsMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/endpointsMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, PurgeParameters, ErrorResponse } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/frontDoorsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/frontDoorsMappers.ts index a0caa7d9a919..b3768ff46ec4 100644 --- a/packages/@azure/arm-frontdoor/lib/models/frontDoorsMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/frontDoorsMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, FrontDoorListResult, FrontDoor, Resource, @@ -28,14 +27,18 @@ export { ErrorResponse, ValidateCustomDomainInput, ValidateCustomDomainOutput, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicy, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/frontendEndpointsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/frontendEndpointsMappers.ts index 65eaef6398ca..40adab81b98a 100644 --- a/packages/@azure/arm-frontdoor/lib/models/frontendEndpointsMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/frontendEndpointsMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, FrontendEndpointsListResult, FrontendEndpoint, SubResource, @@ -25,15 +24,19 @@ export { BackendPool, Backend, Resource, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicy, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition, FrontDoor } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/healthProbeSettingsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/healthProbeSettingsMappers.ts index 9bc03c272291..ad6f14be00ba 100644 --- a/packages/@azure/arm-frontdoor/lib/models/healthProbeSettingsMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/healthProbeSettingsMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, HealthProbeSettingsListResult, HealthProbeSettingsModel, SubResource, @@ -25,15 +24,19 @@ export { CustomHttpsConfiguration, KeyVaultCertificateSourceParametersVault, Resource, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicy, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition, FrontDoor } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/index.ts b/packages/@azure/arm-frontdoor/lib/models/index.ts index a85d00052dbd..132a8258a10c 100644 --- a/packages/@azure/arm-frontdoor/lib/models/index.ts +++ b/packages/@azure/arm-frontdoor/lib/models/index.ts @@ -787,7 +787,7 @@ export interface ValidateCustomDomainOutput { /** * @interface * An interface representing ErrorResponse. - * Error reponse indicates Front Door service is not able to process the + * Error response indicates Front Door service is not able to process the * incoming request. The reason is provided in the error message. * */ @@ -943,57 +943,78 @@ export interface TagsObject { /** * @interface * An interface representing PolicySettings. - * Defines contents of a web application firewall global configuration + * Defines top-level WebApplicationFirewallPolicy configuration settings. * */ export interface PolicySettings { /** - * @member {EnabledState} [enabledState] describes if the policy is in - * enabled state or disabled state. Possible values include: 'Disabled', - * 'Enabled' + * @member {PolicyEnabledState} [enabledState] Describes if the policy is in + * enabled or disabled state. Defaults to Enabled if not specified. Possible + * values include: 'Disabled', 'Enabled' */ - enabledState?: EnabledState; + enabledState?: PolicyEnabledState; /** - * @member {Mode} [mode] Describes if it is in detection mode or prevention - * mode at policy level. Possible values include: 'Prevention', 'Detection' + * @member {PolicyMode} [mode] Describes if it is in detection mode or + * prevention mode at policy level. Possible values include: 'Prevention', + * 'Detection' */ - mode?: Mode; + mode?: PolicyMode; + /** + * @member {string} [redirectUrl] If action type is redirect, this field + * represents redirect URL for the client. + */ + redirectUrl?: string; + /** + * @member {number} [customBlockResponseStatusCode] If the action type is + * block, customer can override the response status code. + */ + customBlockResponseStatusCode?: number; + /** + * @member {string} [customBlockResponseBody] If the action type is block, + * customer can override the response body. The body must be specified in + * base64 encoding. + */ + customBlockResponseBody?: string; } /** * @interface - * An interface representing MatchCondition1. - * Define match conditions + * An interface representing MatchCondition. + * Define a match condition. * */ -export interface MatchCondition1 { +export interface MatchCondition { /** - * @member {MatchCondition} matchVariable Match Variable. Possible values - * include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', - * 'RequestUri', 'RequestHeader', 'RequestBody' + * @member {MatchVariable} matchVariable Match variable to compare against. + * Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', + * 'PostArgs', 'RequestUri', 'RequestHeader', 'RequestBody', 'Cookies' */ - matchVariable: MatchCondition; + matchVariable: MatchVariable; /** - * @member {string} [selector] Name of selector in RequestHeader or - * RequestBody to be matched + * @member {string} [selector] Selector can used to match against a specific + * key from QueryString, PostArgs, RequestHeader or Cookies. */ selector?: string; /** * @member {Operator} operator Describes operator to be matched. Possible * values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', * 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', - * 'BeginsWith', 'EndsWith' + * 'BeginsWith', 'EndsWith', 'RegEx' */ operator: Operator; /** - * @member {boolean} [negateCondition] Describes if this is negate condition - * or not + * @member {boolean} [negateCondition] Describes if the result of this + * condition should be negated. */ negateCondition?: boolean; /** - * @member {string[]} matchValue Match value + * @member {string[]} matchValue List of possible match values. */ matchValue: string[]; + /** + * @member {TransformType[]} [transforms] List of transforms. + */ + transforms?: TransformType[]; } /** @@ -1004,22 +1025,20 @@ export interface MatchCondition1 { */ export interface CustomRule { /** - * @member {string} [name] Gets name of the resource that is unique within a - * policy. This name can be used to access the resource. + * @member {string} [name] Describes the name of the rule. */ name?: string; - /** - * @member {string} [etag] Gets a unique read-only string that changes - * whenever the resource is updated. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** - */ - readonly etag?: string; /** * @member {number} priority Describes priority of the rule. Rules with a - * lower value will be evaluated before rules with a higher value + * lower value will be evaluated before rules with a higher value. */ priority: number; + /** + * @member {CustomRuleEnabledState} [enabledState] Describes if the custom + * rule is in enabled or disabled state. Defaults to Enabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: CustomRuleEnabledState; /** * @member {RuleType} ruleType Describes type of rule. Possible values * include: 'MatchRule', 'RateLimitRule' @@ -1027,35 +1046,31 @@ export interface CustomRule { ruleType: RuleType; /** * @member {number} [rateLimitDurationInMinutes] Defines rate limit duration. - * Default - 1 minute + * Default is 1 minute. */ rateLimitDurationInMinutes?: number; /** - * @member {number} [rateLimitThreshold] Defines rate limit thresold + * @member {number} [rateLimitThreshold] Defines rate limit threshold. */ rateLimitThreshold?: number; /** - * @member {MatchCondition1[]} matchConditions List of match conditions - */ - matchConditions: MatchCondition1[]; - /** - * @member {Action} action Type of Actions. Possible values include: 'Allow', - * 'Block', 'Log' + * @member {MatchCondition[]} matchConditions List of match conditions. */ - action: Action; + matchConditions: MatchCondition[]; /** - * @member {Transform[]} [transforms] List of transforms + * @member {ActionType} action Describes what action to be applied when rule + * matches. Possible values include: 'Allow', 'Block', 'Log', 'Redirect' */ - transforms?: Transform[]; + action: ActionType; } /** * @interface - * An interface representing CustomRules. + * An interface representing CustomRuleList. * Defines contents of custom rules * */ -export interface CustomRules { +export interface CustomRuleList { /** * @member {CustomRule[]} [rules] List of rules */ @@ -1063,82 +1078,142 @@ export interface CustomRules { } /** - * Contains the possible cases for ManagedRuleSet. + * @interface + * An interface representing ManagedRuleOverride. + * Defines a managed rule group override setting. + * + */ +export interface ManagedRuleOverride { + /** + * @member {string} ruleId Identifier for the managed rule. + */ + ruleId: string; + /** + * @member {ManagedRuleEnabledState} [enabledState] Describes if the managed + * rule is in enabled or disabled state. Defaults to Disabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: ManagedRuleEnabledState; + /** + * @member {ActionType} [action] Describes the override action to be applied + * when rule matches. Possible values include: 'Allow', 'Block', 'Log', + * 'Redirect' + */ + action?: ActionType; +} + +/** + * @interface + * An interface representing ManagedRuleGroupOverride. + * Defines a managed rule group override setting. + * */ -export type ManagedRuleSetUnion = ManagedRuleSet | AzureManagedRuleSet; +export interface ManagedRuleGroupOverride { + /** + * @member {string} ruleGroupName Describes the managed rule group to + * override. + */ + ruleGroupName: string; + /** + * @member {ManagedRuleOverride[]} [rules] List of rules that will be + * disabled. If none specified, all rules in the group will be disabled. + */ + rules?: ManagedRuleOverride[]; +} /** * @interface * An interface representing ManagedRuleSet. - * Base class for all types of ManagedRuleSet. + * Defines a managed rule set. * */ export interface ManagedRuleSet { /** - * @member {string} ruleSetType Polymorphic Discriminator + * @member {string} ruleSetType Defines the rule set type to use. */ - ruleSetType: "Unknown"; + ruleSetType: string; /** - * @member {number} [priority] Describes priority of the rule + * @member {string} ruleSetVersion Defines the version of the rule set to + * use. */ - priority?: number; + ruleSetVersion: string; /** - * @member {number} [version] defines version of the ruleset + * @member {ManagedRuleGroupOverride[]} [ruleGroupOverrides] Defines the rule + * group overrides to apply to the rule set. */ - version?: number; + ruleGroupOverrides?: ManagedRuleGroupOverride[]; } /** * @interface - * An interface representing ManagedRuleSets. - * Defines ManagedRuleSets - array of managedRuleSet + * An interface representing ManagedRuleSetList. + * Defines the list of managed rule sets for the policy. * */ -export interface ManagedRuleSets { +export interface ManagedRuleSetList { /** - * @member {ManagedRuleSetUnion[]} [ruleSets] List of rules + * @member {ManagedRuleSet[]} [managedRuleSets] List of rule sets. */ - ruleSets?: ManagedRuleSetUnion[]; + managedRuleSets?: ManagedRuleSet[]; } /** * @interface - * An interface representing WebApplicationFirewallPolicy1. + * An interface representing FrontendEndpointLink. + * Defines the Resource ID for a Frontend Endpoint. + * + */ +export interface FrontendEndpointLink { + /** + * @member {string} [id] Resource ID. + */ + id?: string; +} + +/** + * @interface + * An interface representing WebApplicationFirewallPolicy. * Defines web application firewall policy. * * @extends Resource */ -export interface WebApplicationFirewallPolicy1 extends Resource { +export interface WebApplicationFirewallPolicy extends Resource { /** - * @member {PolicySettings} [policySettings] Describes policySettings for - * policy + * @member {PolicySettings} [policySettings] Describes settings for the + * policy. */ policySettings?: PolicySettings; /** - * @member {CustomRules} [customRules] Describes custom rules inside the - * policy + * @member {CustomRuleList} [customRules] Describes custom rules inside the + * policy. + */ + customRules?: CustomRuleList; + /** + * @member {ManagedRuleSetList} [managedRules] Describes managed rules inside + * the policy. */ - customRules?: CustomRules; + managedRules?: ManagedRuleSetList; /** - * @member {ManagedRuleSets} [managedRules] Describes managed rules inside - * the policy + * @member {FrontendEndpointLink[]} [frontendEndpointLinks] Describes + * Frontend Endpoints associated with this Web Application Firewall policy. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - managedRules?: ManagedRuleSets; + readonly frontendEndpointLinks?: FrontendEndpointLink[]; /** - * @member {string} [provisioningState] Provisioning state of the - * WebApplicationFirewallPolicy. + * @member {string} [provisioningState] Provisioning state of the policy. * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ readonly provisioningState?: string; /** - * @member {WebApplicationFirewallPolicy} [resourceState] Resource status of - * the policy. Possible values include: 'Creating', 'Enabling', 'Enabled', + * @member {PolicyResourceState} [resourceState] Resource status of the + * policy. Possible values include: 'Creating', 'Enabling', 'Enabled', * 'Disabling', 'Disabled', 'Deleting' * **NOTE: This property will not be serialized. It can only be populated by * the server.** */ - readonly resourceState?: WebApplicationFirewallPolicy; + readonly resourceState?: PolicyResourceState; /** * @member {string} [etag] Gets a unique read-only string that changes * whenever the resource is updated. @@ -1148,47 +1223,88 @@ export interface WebApplicationFirewallPolicy1 extends Resource { /** * @interface - * An interface representing AzureManagedOverrideRuleGroup. - * Defines contents of a web application rule + * An interface representing ManagedRuleDefinition. + * Describes a managed rule definition. * */ -export interface AzureManagedOverrideRuleGroup { +export interface ManagedRuleDefinition { /** - * @member {RuleGroupOverride} ruleGroupOverride Describes overrideruleGroup. - * Possible values include: 'SqlInjection', 'XSS' + * @member {string} [ruleId] Identifier for the managed rule. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - ruleGroupOverride: RuleGroupOverride; + readonly ruleId?: string; /** - * @member {Action} action Type of Actions. Possible values include: 'Allow', - * 'Block', 'Log' + * @member {string} [description] Describes the functionality of the managed + * rule. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - action: Action; + readonly description?: string; } /** * @interface - * An interface representing AzureManagedRuleSet. - * Describes azure managed provider. + * An interface representing ManagedRuleGroupDefinition. + * Describes a managed rule group. * */ -export interface AzureManagedRuleSet { +export interface ManagedRuleGroupDefinition { /** - * @member {string} ruleSetType Polymorphic Discriminator + * @member {string} [ruleGroupName] Name of the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - ruleSetType: "AzureManagedRuleSet"; + readonly ruleGroupName?: string; /** - * @member {number} [priority] Describes priority of the rule + * @member {string} [description] Description of the managed rule group. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - priority?: number; + readonly description?: string; + /** + * @member {ManagedRuleDefinition[]} [rules] List of rules within the managed + * rule group. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly rules?: ManagedRuleDefinition[]; +} + +/** + * @interface + * An interface representing ManagedRuleSetDefinition. + * Describes the a managed rule set definition. + * + * @extends Resource + */ +export interface ManagedRuleSetDefinition extends Resource { + /** + * @member {string} [provisioningState] Provisioning state of the managed + * rule set. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly provisioningState?: string; + /** + * @member {string} [ruleSetType] Type of the managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** + */ + readonly ruleSetType?: string; /** - * @member {number} [version] defines version of the ruleset + * @member {string} [ruleSetVersion] Version of the managed rule set type. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - version?: number; + readonly ruleSetVersion?: string; /** - * @member {AzureManagedOverrideRuleGroup[]} [ruleGroupOverrides] List of - * azure managed provider override configuration (optional) + * @member {ManagedRuleGroupDefinition[]} [ruleGroups] Rule groups of the + * managed rule set. + * **NOTE: This property will not be serialized. It can only be populated by + * the server.** */ - ruleGroupOverrides?: AzureManagedOverrideRuleGroup[]; + readonly ruleGroups?: ManagedRuleGroupDefinition[]; } /** @@ -1208,7 +1324,7 @@ export interface FrontDoorManagementClientOptions extends AzureServiceClientOpti * @interface * An interface representing the FrontDoorListResult. * Result of the request to list Front Doors. It contains a list of Front Door - * objects and a URL link to get the the next set of results. + * objects and a URL link to get the next set of results. * * @extends Array */ @@ -1224,7 +1340,7 @@ export interface FrontDoorListResult extends Array { * @interface * An interface representing the RoutingRuleListResult. * Result of the request to list Routing Rules. It contains a list of Routing - * Rule objects and a URL link to get the the next set of results. + * Rule objects and a URL link to get the next set of results. * * @extends Array */ @@ -1240,8 +1356,7 @@ export interface RoutingRuleListResult extends Array { * @interface * An interface representing the HealthProbeSettingsListResult. * Result of the request to list HealthProbeSettings. It contains a list of - * HealthProbeSettings objects and a URL link to get the the next set of - * results. + * HealthProbeSettings objects and a URL link to get the next set of results. * * @extends Array */ @@ -1257,7 +1372,7 @@ export interface HealthProbeSettingsListResult extends Array @@ -1274,7 +1389,7 @@ export interface LoadBalancingSettingsListResult extends Array */ @@ -1290,7 +1405,7 @@ export interface BackendPoolListResult extends Array { * @interface * An interface representing the FrontendEndpointsListResult. * Result of the request to list frontend endpoints. It contains a list of - * Frontend endpoint objects and a URL link to get the the next set of results. + * Frontend endpoint objects and a URL link to get the next set of results. * * @extends Array */ @@ -1304,14 +1419,14 @@ export interface FrontendEndpointsListResult extends Array { /** * @interface - * An interface representing the WebApplicationFirewallPolicyListResult. - * Result of the request to list WebApplicationFirewallPolicies. It contains a - * list of WebApplicationFirewallPolicy objects and a URL link to get the the - * next set of results. + * An interface representing the WebApplicationFirewallPolicyList. + * Defines a list of WebApplicationFirewallPolicies. It contains a list of + * WebApplicationFirewallPolicy objects and a URL link to get the the next set + * of results. * - * @extends Array + * @extends Array */ -export interface WebApplicationFirewallPolicyListResult extends Array { +export interface WebApplicationFirewallPolicyList extends Array { /** * @member {string} [nextLink] URL to get the next set of * WebApplicationFirewallPolicy objects if there are any. @@ -1319,6 +1434,21 @@ export interface WebApplicationFirewallPolicyListResult extends Array + */ +export interface ManagedRuleSetDefinitionList extends Array { + /** + * @member {string} [nextLink] URL to retrieve next set of managed rule set + * definitions. + */ + nextLink?: string; +} + /** * Defines values for FrontDoorResourceState. * Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' @@ -1445,20 +1575,28 @@ export type Availability = 'Available' | 'Unavailable'; export type NetworkOperationStatus = 'InProgress' | 'Succeeded' | 'Failed'; /** - * Defines values for EnabledState. + * Defines values for PolicyEnabledState. * Possible values include: 'Disabled', 'Enabled' * @readonly * @enum {string} */ -export type EnabledState = 'Disabled' | 'Enabled'; +export type PolicyEnabledState = 'Disabled' | 'Enabled'; /** - * Defines values for Mode. + * Defines values for PolicyMode. * Possible values include: 'Prevention', 'Detection' * @readonly * @enum {string} */ -export type Mode = 'Prevention' | 'Detection'; +export type PolicyMode = 'Prevention' | 'Detection'; + +/** + * Defines values for CustomRuleEnabledState. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type CustomRuleEnabledState = 'Disabled' | 'Enabled'; /** * Defines values for RuleType. @@ -1469,55 +1607,55 @@ export type Mode = 'Prevention' | 'Detection'; export type RuleType = 'MatchRule' | 'RateLimitRule'; /** - * Defines values for MatchCondition. + * Defines values for MatchVariable. * Possible values include: 'RemoteAddr', 'RequestMethod', 'QueryString', 'PostArgs', 'RequestUri', - * 'RequestHeader', 'RequestBody' + * 'RequestHeader', 'RequestBody', 'Cookies' * @readonly * @enum {string} */ -export type MatchCondition = 'RemoteAddr' | 'RequestMethod' | 'QueryString' | 'PostArgs' | 'RequestUri' | 'RequestHeader' | 'RequestBody'; +export type MatchVariable = 'RemoteAddr' | 'RequestMethod' | 'QueryString' | 'PostArgs' | 'RequestUri' | 'RequestHeader' | 'RequestBody' | 'Cookies'; /** * Defines values for Operator. * Possible values include: 'Any', 'IPMatch', 'GeoMatch', 'Equal', 'Contains', 'LessThan', - * 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith' + * 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', 'BeginsWith', 'EndsWith', 'RegEx' * @readonly * @enum {string} */ -export type Operator = 'Any' | 'IPMatch' | 'GeoMatch' | 'Equal' | 'Contains' | 'LessThan' | 'GreaterThan' | 'LessThanOrEqual' | 'GreaterThanOrEqual' | 'BeginsWith' | 'EndsWith'; +export type Operator = 'Any' | 'IPMatch' | 'GeoMatch' | 'Equal' | 'Contains' | 'LessThan' | 'GreaterThan' | 'LessThanOrEqual' | 'GreaterThanOrEqual' | 'BeginsWith' | 'EndsWith' | 'RegEx'; /** - * Defines values for Action. - * Possible values include: 'Allow', 'Block', 'Log' + * Defines values for TransformType. + * Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', + * 'RemoveNulls' * @readonly * @enum {string} */ -export type Action = 'Allow' | 'Block' | 'Log'; +export type TransformType = 'Lowercase' | 'Uppercase' | 'Trim' | 'UrlDecode' | 'UrlEncode' | 'RemoveNulls'; /** - * Defines values for Transform. - * Possible values include: 'Lowercase', 'Uppercase', 'Trim', 'UrlDecode', 'UrlEncode', - * 'RemoveNulls', 'HtmlEntityDecode' + * Defines values for ActionType. + * Possible values include: 'Allow', 'Block', 'Log', 'Redirect' * @readonly * @enum {string} */ -export type Transform = 'Lowercase' | 'Uppercase' | 'Trim' | 'UrlDecode' | 'UrlEncode' | 'RemoveNulls' | 'HtmlEntityDecode'; +export type ActionType = 'Allow' | 'Block' | 'Log' | 'Redirect'; /** - * Defines values for WebApplicationFirewallPolicy. - * Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' + * Defines values for ManagedRuleEnabledState. + * Possible values include: 'Disabled', 'Enabled' * @readonly * @enum {string} */ -export type WebApplicationFirewallPolicy = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; +export type ManagedRuleEnabledState = 'Disabled' | 'Enabled'; /** - * Defines values for RuleGroupOverride. - * Possible values include: 'SqlInjection', 'XSS' + * Defines values for PolicyResourceState. + * Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Deleting' * @readonly * @enum {string} */ -export type RuleGroupOverride = 'SqlInjection' | 'XSS'; +export type PolicyResourceState = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; /** * Contains response data for the checkFrontDoorNameAvailability operation. @@ -2187,7 +2325,7 @@ export type FrontendEndpointsListByFrontDoorNextResponse = FrontendEndpointsList /** * Contains response data for the list operation. */ -export type PoliciesListResponse = WebApplicationFirewallPolicyListResult & { +export type PoliciesListResponse = WebApplicationFirewallPolicyList & { /** * The underlying HTTP response. */ @@ -2199,14 +2337,14 @@ export type PoliciesListResponse = WebApplicationFirewallPolicyListResult & { /** * The response body as parsed JSON or XML */ - parsedBody: WebApplicationFirewallPolicyListResult; + parsedBody: WebApplicationFirewallPolicyList; }; }; /** * Contains response data for the get operation. */ -export type PoliciesGetResponse = WebApplicationFirewallPolicy1 & { +export type PoliciesGetResponse = WebApplicationFirewallPolicy & { /** * The underlying HTTP response. */ @@ -2218,14 +2356,71 @@ export type PoliciesGetResponse = WebApplicationFirewallPolicy1 & { /** * The response body as parsed JSON or XML */ - parsedBody: WebApplicationFirewallPolicy1; + parsedBody: WebApplicationFirewallPolicy; }; }; /** * Contains response data for the createOrUpdate operation. */ -export type PoliciesCreateOrUpdateResponse = WebApplicationFirewallPolicy1 & { +export type PoliciesCreateOrUpdateResponse = WebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the beginCreateOrUpdate operation. + */ +export type PoliciesBeginCreateOrUpdateResponse = WebApplicationFirewallPolicy & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebApplicationFirewallPolicy; + }; +}; + +/** + * Contains response data for the listNext operation. + */ +export type PoliciesListNextResponse = WebApplicationFirewallPolicyList & { + /** + * The underlying HTTP response. + */ + _response: msRest.HttpResponse & { + /** + * The response body as text (string format) + */ + bodyAsText: string; + /** + * The response body as parsed JSON or XML + */ + parsedBody: WebApplicationFirewallPolicyList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagedRuleSetsListResponse = ManagedRuleSetDefinitionList & { /** * The underlying HTTP response. */ @@ -2237,14 +2432,14 @@ export type PoliciesCreateOrUpdateResponse = WebApplicationFirewallPolicy1 & { /** * The response body as parsed JSON or XML */ - parsedBody: WebApplicationFirewallPolicy1; + parsedBody: ManagedRuleSetDefinitionList; }; }; /** * Contains response data for the listNext operation. */ -export type PoliciesListNextResponse = WebApplicationFirewallPolicyListResult & { +export type ManagedRuleSetsListNextResponse = ManagedRuleSetDefinitionList & { /** * The underlying HTTP response. */ @@ -2256,6 +2451,6 @@ export type PoliciesListNextResponse = WebApplicationFirewallPolicyListResult & /** * The response body as parsed JSON or XML */ - parsedBody: WebApplicationFirewallPolicyListResult; + parsedBody: ManagedRuleSetDefinitionList; }; }; diff --git a/packages/@azure/arm-frontdoor/lib/models/loadBalancingSettingsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/loadBalancingSettingsMappers.ts index 1c135e9f2b7f..d4e2042f1808 100644 --- a/packages/@azure/arm-frontdoor/lib/models/loadBalancingSettingsMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/loadBalancingSettingsMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, LoadBalancingSettingsListResult, LoadBalancingSettingsModel, SubResource, @@ -25,15 +24,19 @@ export { CustomHttpsConfiguration, KeyVaultCertificateSourceParametersVault, Resource, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicy, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition, FrontDoor } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/managedRuleSetsMappers.ts b/packages/@azure/arm-frontdoor/lib/models/managedRuleSetsMappers.ts new file mode 100644 index 000000000000..ce520f386d0c --- /dev/null +++ b/packages/@azure/arm-frontdoor/lib/models/managedRuleSetsMappers.ts @@ -0,0 +1,42 @@ +/* + * 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. + */ + +export { + ManagedRuleSetDefinitionList, + ManagedRuleSetDefinition, + Resource, + BaseResource, + ManagedRuleGroupDefinition, + ManagedRuleDefinition, + ErrorResponse, + FrontDoor, + RoutingRule, + SubResource, + CacheConfiguration, + LoadBalancingSettingsModel, + HealthProbeSettingsModel, + BackendPool, + Backend, + FrontendEndpoint, + FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, + CustomHttpsConfiguration, + KeyVaultCertificateSourceParametersVault, + WebApplicationFirewallPolicy, + PolicySettings, + CustomRuleList, + CustomRule, + MatchCondition, + ManagedRuleSetList, + ManagedRuleSet, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink +} from "../models/mappers"; + diff --git a/packages/@azure/arm-frontdoor/lib/models/mappers.ts b/packages/@azure/arm-frontdoor/lib/models/mappers.ts index bf3f8f9f934e..564a80d93eab 100644 --- a/packages/@azure/arm-frontdoor/lib/models/mappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/mappers.ts @@ -1232,7 +1232,7 @@ export const TagsObject: msRest.CompositeMapper = { }; export const PolicySettings: msRest.CompositeMapper = { - serializedName: "policySettings", + serializedName: "PolicySettings", type: { name: "Composite", className: "PolicySettings", @@ -1248,16 +1248,37 @@ export const PolicySettings: msRest.CompositeMapper = { type: { name: "String" } + }, + redirectUrl: { + serializedName: "redirectUrl", + type: { + name: "String" + } + }, + customBlockResponseStatusCode: { + serializedName: "customBlockResponseStatusCode", + type: { + name: "Number" + } + }, + customBlockResponseBody: { + serializedName: "customBlockResponseBody", + constraints: { + Pattern: /^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{4})$/ + }, + type: { + name: "String" + } } } } }; -export const MatchCondition1: msRest.CompositeMapper = { +export const MatchCondition: msRest.CompositeMapper = { serializedName: "MatchCondition", type: { name: "Composite", - className: "MatchCondition1", + className: "MatchCondition", modelProperties: { matchVariable: { required: true, @@ -1296,6 +1317,17 @@ export const MatchCondition1: msRest.CompositeMapper = { } } } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1316,13 +1348,6 @@ export const CustomRule: msRest.CompositeMapper = { name: "String" } }, - etag: { - readOnly: true, - serializedName: "etag", - type: { - name: "String" - } - }, priority: { required: true, serializedName: "priority", @@ -1330,6 +1355,12 @@ export const CustomRule: msRest.CompositeMapper = { name: "Number" } }, + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, ruleType: { required: true, serializedName: "ruleType", @@ -1357,7 +1388,7 @@ export const CustomRule: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "MatchCondition1" + className: "MatchCondition" } } } @@ -1368,14 +1399,25 @@ export const CustomRule: msRest.CompositeMapper = { type: { name: "String" } - }, - transforms: { - serializedName: "transforms", + } + } + } +}; + +export const CustomRuleList: msRest.CompositeMapper = { + serializedName: "CustomRuleList", + type: { + name: "Composite", + className: "CustomRuleList", + modelProperties: { + rules: { + serializedName: "rules", type: { name: "Sequence", element: { type: { - name: "String" + name: "Composite", + className: "CustomRule" } } } @@ -1384,12 +1426,48 @@ export const CustomRule: msRest.CompositeMapper = { } }; -export const CustomRules: msRest.CompositeMapper = { - serializedName: "CustomRules", +export const ManagedRuleOverride: msRest.CompositeMapper = { + serializedName: "ManagedRuleOverride", + type: { + name: "Composite", + className: "ManagedRuleOverride", + modelProperties: { + ruleId: { + required: true, + serializedName: "ruleId", + type: { + name: "String" + } + }, + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, + action: { + serializedName: "action", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedRuleGroupOverride: msRest.CompositeMapper = { + serializedName: "ManagedRuleGroupOverride", type: { name: "Composite", - className: "CustomRules", + className: "ManagedRuleGroupOverride", modelProperties: { + ruleGroupName: { + required: true, + serializedName: "ruleGroupName", + type: { + name: "String" + } + }, rules: { serializedName: "rules", type: { @@ -1397,7 +1475,7 @@ export const CustomRules: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "CustomRule" + className: "ManagedRuleOverride" } } } @@ -1407,47 +1485,49 @@ export const CustomRules: msRest.CompositeMapper = { }; export const ManagedRuleSet: msRest.CompositeMapper = { - serializedName: "Unknown", + serializedName: "ManagedRuleSet", type: { name: "Composite", - polymorphicDiscriminator: { - serializedName: "ruleSetType", - clientName: "ruleSetType" - }, - uberParent: "ManagedRuleSet", className: "ManagedRuleSet", modelProperties: { - priority: { - serializedName: "priority", + ruleSetType: { + required: true, + serializedName: "ruleSetType", type: { - name: "Number" + name: "String" } }, - version: { - serializedName: "version", + ruleSetVersion: { + required: true, + serializedName: "ruleSetVersion", type: { - name: "Number" + name: "String" } }, - ruleSetType: { - required: true, - serializedName: "ruleSetType", + ruleGroupOverrides: { + serializedName: "ruleGroupOverrides", type: { - name: "String" + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleGroupOverride" + } + } } } } } }; -export const ManagedRuleSets: msRest.CompositeMapper = { - serializedName: "ManagedRuleSets", +export const ManagedRuleSetList: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetList", type: { name: "Composite", - className: "ManagedRuleSets", + className: "ManagedRuleSetList", modelProperties: { - ruleSets: { - serializedName: "ruleSets", + managedRuleSets: { + serializedName: "managedRuleSets", type: { name: "Sequence", element: { @@ -1462,11 +1542,27 @@ export const ManagedRuleSets: msRest.CompositeMapper = { } }; -export const WebApplicationFirewallPolicy1: msRest.CompositeMapper = { +export const FrontendEndpointLink: msRest.CompositeMapper = { + serializedName: "FrontendEndpointLink", + type: { + name: "Composite", + className: "FrontendEndpointLink", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const WebApplicationFirewallPolicy: msRest.CompositeMapper = { serializedName: "WebApplicationFirewallPolicy", type: { name: "Composite", - className: "WebApplicationFirewallPolicy1", + className: "WebApplicationFirewallPolicy", modelProperties: { ...Resource.type.modelProperties, policySettings: { @@ -1480,14 +1576,27 @@ export const WebApplicationFirewallPolicy1: msRest.CompositeMapper = { serializedName: "properties.customRules", type: { name: "Composite", - className: "CustomRules" + className: "CustomRuleList" } }, managedRules: { serializedName: "properties.managedRules", type: { name: "Composite", - className: "ManagedRuleSets" + className: "ManagedRuleSetList" + } + }, + frontendEndpointLinks: { + readOnly: true, + serializedName: "properties.frontendEndpointLinks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "FrontendEndpointLink" + } + } } }, provisioningState: { @@ -1514,22 +1623,22 @@ export const WebApplicationFirewallPolicy1: msRest.CompositeMapper = { } }; -export const AzureManagedOverrideRuleGroup: msRest.CompositeMapper = { - serializedName: "AzureManagedOverrideRuleGroup", +export const ManagedRuleDefinition: msRest.CompositeMapper = { + serializedName: "ManagedRuleDefinition", type: { name: "Composite", - className: "AzureManagedOverrideRuleGroup", + className: "ManagedRuleDefinition", modelProperties: { - ruleGroupOverride: { - required: true, - serializedName: "ruleGroupOverride", + ruleId: { + readOnly: true, + serializedName: "ruleId", type: { name: "String" } }, - action: { - required: true, - serializedName: "action", + description: { + readOnly: true, + serializedName: "description", type: { name: "String" } @@ -1538,23 +1647,80 @@ export const AzureManagedOverrideRuleGroup: msRest.CompositeMapper = { } }; -export const AzureManagedRuleSet: msRest.CompositeMapper = { - serializedName: "AzureManagedRuleSet", +export const ManagedRuleGroupDefinition: msRest.CompositeMapper = { + serializedName: "ManagedRuleGroupDefinition", type: { name: "Composite", - polymorphicDiscriminator: ManagedRuleSet.type.polymorphicDiscriminator, - uberParent: "ManagedRuleSet", - className: "AzureManagedRuleSet", + className: "ManagedRuleGroupDefinition", modelProperties: { - ...ManagedRuleSet.type.modelProperties, - ruleGroupOverrides: { - serializedName: "ruleGroupOverrides", + ruleGroupName: { + readOnly: true, + serializedName: "ruleGroupName", + type: { + name: "String" + } + }, + description: { + readOnly: true, + serializedName: "description", + type: { + name: "String" + } + }, + rules: { + readOnly: true, + serializedName: "rules", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleDefinition" + } + } + } + } + } + } +}; + +export const ManagedRuleSetDefinition: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetDefinition", + type: { + name: "Composite", + className: "ManagedRuleSetDefinition", + modelProperties: { + ...Resource.type.modelProperties, + provisioningState: { + readOnly: true, + serializedName: "properties.provisioningState", + type: { + name: "String" + } + }, + ruleSetType: { + readOnly: true, + serializedName: "properties.ruleSetType", + type: { + name: "String" + } + }, + ruleSetVersion: { + readOnly: true, + serializedName: "properties.ruleSetVersion", + type: { + name: "String" + } + }, + ruleGroups: { + readOnly: true, + serializedName: "properties.ruleGroups", type: { name: "Sequence", element: { type: { name: "Composite", - className: "AzureManagedOverrideRuleGroup" + className: "ManagedRuleGroupDefinition" } } } @@ -1737,11 +1903,11 @@ export const FrontendEndpointsListResult: msRest.CompositeMapper = { } }; -export const WebApplicationFirewallPolicyListResult: msRest.CompositeMapper = { - serializedName: "WebApplicationFirewallPolicyListResult", +export const WebApplicationFirewallPolicyList: msRest.CompositeMapper = { + serializedName: "WebApplicationFirewallPolicyList", type: { name: "Composite", - className: "WebApplicationFirewallPolicyListResult", + className: "WebApplicationFirewallPolicyList", modelProperties: { value: { readOnly: true, @@ -1751,7 +1917,7 @@ export const WebApplicationFirewallPolicyListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "WebApplicationFirewallPolicy1" + className: "WebApplicationFirewallPolicy" } } } @@ -1766,7 +1932,31 @@ export const WebApplicationFirewallPolicyListResult: msRest.CompositeMapper = { } }; -export const discriminators = { - 'Unknown' : ManagedRuleSet, - 'ManagedRuleSet.AzureManagedRuleSet' : AzureManagedRuleSet +export const ManagedRuleSetDefinitionList: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetDefinitionList", + type: { + name: "Composite", + className: "ManagedRuleSetDefinitionList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "ManagedRuleSetDefinition" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } }; diff --git a/packages/@azure/arm-frontdoor/lib/models/parameters.ts b/packages/@azure/arm-frontdoor/lib/models/parameters.ts index 4659c84bda06..1ec1933fc5b1 100644 --- a/packages/@azure/arm-frontdoor/lib/models/parameters.ts +++ b/packages/@azure/arm-frontdoor/lib/models/parameters.ts @@ -20,7 +20,7 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, @@ -32,6 +32,18 @@ export const apiVersion: msRest.OperationQueryParameter = { } } }; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-03-01', + type: { + name: "String" + } + } +}; export const backendPoolName: msRest.OperationURLParameter = { parameterPath: "backendPoolName", mapper: { @@ -131,7 +143,7 @@ export const policyName: msRest.OperationURLParameter = { } } }; -export const resourceGroupName0: msRest.OperationURLParameter = { +export const resourceGroupName: msRest.OperationURLParameter = { parameterPath: "resourceGroupName", mapper: { required: true, @@ -146,16 +158,6 @@ export const resourceGroupName0: msRest.OperationURLParameter = { } } }; -export const resourceGroupName1: msRest.OperationURLParameter = { - parameterPath: "resourceGroupName", - mapper: { - required: true, - serializedName: "resourceGroupName", - type: { - name: "String" - } - } -}; export const routingRuleName: msRest.OperationURLParameter = { parameterPath: "routingRuleName", mapper: { diff --git a/packages/@azure/arm-frontdoor/lib/models/policiesMappers.ts b/packages/@azure/arm-frontdoor/lib/models/policiesMappers.ts index 2d2008c70b60..95f9d7dd9ec3 100644 --- a/packages/@azure/arm-frontdoor/lib/models/policiesMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/policiesMappers.ts @@ -9,17 +9,19 @@ */ export { - discriminators, - WebApplicationFirewallPolicyListResult, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicyList, + WebApplicationFirewallPolicy, Resource, BaseResource, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, ErrorResponse, CloudError, FrontDoor, @@ -34,7 +36,8 @@ export { FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, CustomHttpsConfiguration, KeyVaultCertificateSourceParametersVault, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/models/routingRulesMappers.ts b/packages/@azure/arm-frontdoor/lib/models/routingRulesMappers.ts index ec5458c08756..0f6a5706bd59 100644 --- a/packages/@azure/arm-frontdoor/lib/models/routingRulesMappers.ts +++ b/packages/@azure/arm-frontdoor/lib/models/routingRulesMappers.ts @@ -9,7 +9,6 @@ */ export { - discriminators, RoutingRuleListResult, RoutingRule, SubResource, @@ -25,15 +24,19 @@ export { CustomHttpsConfiguration, KeyVaultCertificateSourceParametersVault, Resource, - WebApplicationFirewallPolicy1, + WebApplicationFirewallPolicy, PolicySettings, - CustomRules, + CustomRuleList, CustomRule, - MatchCondition1, - ManagedRuleSets, + MatchCondition, + ManagedRuleSetList, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, + ManagedRuleGroupOverride, + ManagedRuleOverride, + FrontendEndpointLink, + ManagedRuleSetDefinition, + ManagedRuleGroupDefinition, + ManagedRuleDefinition, FrontDoor } from "../models/mappers"; diff --git a/packages/@azure/arm-frontdoor/lib/operations/backendPools.ts b/packages/@azure/arm-frontdoor/lib/operations/backendPools.ts index 93c510c9c385..ecd3e403bb94 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/backendPools.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/backendPools.ts @@ -200,11 +200,11 @@ const listByFrontDoorOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -225,12 +225,12 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools/{backendPoolName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.backendPoolName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -251,12 +251,12 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools/{backendPoolName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.backendPoolName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -290,12 +290,12 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/backendPools/{backendPoolName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.backendPoolName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/operations/endpoints.ts b/packages/@azure/arm-frontdoor/lib/operations/endpoints.ts index 8813aec41332..3a1978429a63 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/endpoints.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/endpoints.ts @@ -72,11 +72,11 @@ const beginPurgeContentOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/purge", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/operations/frontDoors.ts b/packages/@azure/arm-frontdoor/lib/operations/frontDoors.ts index 09cbbdc01f4a..431c22010528 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/frontDoors.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/frontDoors.ts @@ -279,7 +279,7 @@ const listOperationSpec: msRest.OperationSpec = { Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -300,10 +300,10 @@ const listByResourceGroupOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0 + Parameters.resourceGroupName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -324,11 +324,11 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -349,11 +349,11 @@ const validateCustomDomainOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/validateCustomDomain", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -381,11 +381,11 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -419,11 +419,11 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/operations/frontendEndpoints.ts b/packages/@azure/arm-frontdoor/lib/operations/frontendEndpoints.ts index 4c175ea66604..d3c804a5ca5f 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/frontendEndpoints.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/frontendEndpoints.ts @@ -269,11 +269,11 @@ const listByFrontDoorOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -291,15 +291,15 @@ const listByFrontDoorOperationSpec: msRest.OperationSpec = { const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provider/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.frontendEndpointName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -317,15 +317,15 @@ const getOperationSpec: msRest.OperationSpec = { const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provider/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.frontendEndpointName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -356,15 +356,15 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provider/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.frontendEndpointName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -381,15 +381,15 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { const beginEnableHttpsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provider/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.frontendEndpointName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -413,15 +413,15 @@ const beginEnableHttpsOperationSpec: msRest.OperationSpec = { const beginDisableHttpsOperationSpec: msRest.OperationSpec = { httpMethod: "POST", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/provider/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.frontendEndpointName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/operations/healthProbeSettings.ts b/packages/@azure/arm-frontdoor/lib/operations/healthProbeSettings.ts index 4707ef0a6bb5..b8fe394f648c 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/healthProbeSettings.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/healthProbeSettings.ts @@ -209,11 +209,11 @@ const listByFrontDoorOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -234,12 +234,12 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings/{healthProbeSettingsName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.healthProbeSettingsName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -260,12 +260,12 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings/{healthProbeSettingsName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.healthProbeSettingsName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -299,12 +299,12 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/healthProbeSettings/{healthProbeSettingsName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.healthProbeSettingsName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/operations/index.ts b/packages/@azure/arm-frontdoor/lib/operations/index.ts index e5a78429eb54..d95c0f0425f1 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/index.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/index.ts @@ -16,3 +16,4 @@ export * from "./backendPools"; export * from "./frontendEndpoints"; export * from "./endpoints"; export * from "./policies"; +export * from "./managedRuleSets"; diff --git a/packages/@azure/arm-frontdoor/lib/operations/loadBalancingSettings.ts b/packages/@azure/arm-frontdoor/lib/operations/loadBalancingSettings.ts index 58afe67b9afc..012071cdbe5b 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/loadBalancingSettings.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/loadBalancingSettings.ts @@ -211,11 +211,11 @@ const listByFrontDoorOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -236,12 +236,12 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings/{loadBalancingSettingsName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.loadBalancingSettingsName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -262,12 +262,12 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings/{loadBalancingSettingsName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.loadBalancingSettingsName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -301,12 +301,12 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/loadBalancingSettings/{loadBalancingSettingsName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.loadBalancingSettingsName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/lib/operations/managedRuleSets.ts b/packages/@azure/arm-frontdoor/lib/operations/managedRuleSets.ts new file mode 100644 index 000000000000..9e6607069fb0 --- /dev/null +++ b/packages/@azure/arm-frontdoor/lib/operations/managedRuleSets.ts @@ -0,0 +1,126 @@ +/* + * 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. + */ + +import * as msRest from "@azure/ms-rest-js"; +import * as Models from "../models"; +import * as Mappers from "../models/managedRuleSetsMappers"; +import * as Parameters from "../models/parameters"; +import { FrontDoorManagementClientContext } from "../frontDoorManagementClientContext"; + +/** Class representing a ManagedRuleSets. */ +export class ManagedRuleSets { + private readonly client: FrontDoorManagementClientContext; + + /** + * Create a ManagedRuleSets. + * @param {FrontDoorManagementClientContext} client Reference to the service client. + */ + constructor(client: FrontDoorManagementClientContext) { + this.client = client; + } + + /** + * Lists all available managed rule sets. + * @param [options] The optional parameters + * @returns Promise + */ + list(options?: msRest.RequestOptionsBase): Promise; + /** + * @param callback The callback + */ + list(callback: msRest.ServiceCallback): void; + /** + * @param options The optional parameters + * @param callback The callback + */ + list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + options + }, + listOperationSpec, + callback) as Promise; + } + + /** + * Lists all available managed rule sets. + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param [options] The optional parameters + * @returns Promise + */ + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param callback The callback + */ + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + /** + * @param nextPageLink The NextLink from the previous successful call to List operation. + * @param options The optional parameters + * @param callback The callback + */ + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + nextPageLink, + options + }, + listNextOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const listOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedRuleSetDefinitionList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; + +const listNextOperationSpec: msRest.OperationSpec = { + httpMethod: "GET", + baseUrl: "https://management.azure.com", + path: "{nextLink}", + urlParameters: [ + Parameters.nextPageLink + ], + headerParameters: [ + Parameters.acceptLanguage + ], + responses: { + 200: { + bodyMapper: Mappers.ManagedRuleSetDefinitionList + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/packages/@azure/arm-frontdoor/lib/operations/policies.ts b/packages/@azure/arm-frontdoor/lib/operations/policies.ts index de6db51d7dd9..2e2fbca0c7d7 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/policies.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/policies.ts @@ -29,23 +29,23 @@ export class Policies { /** * Lists all of the protection policies within a resource group. - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param [options] The optional parameters * @returns Promise */ list(resourceGroupName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param callback The callback */ - list(resourceGroupName: string, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. * @param options The optional parameters * @param callback The callback */ - list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + list(resourceGroupName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + list(resourceGroupName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -57,26 +57,26 @@ export class Policies { /** * Retrieve protection policy with specified name within a resource group. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. * @param [options] The optional parameters * @returns Promise */ get(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise; /** - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. * @param callback The callback */ - get(resourceGroupName: string, policyName: string, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, policyName: string, callback: msRest.ServiceCallback): void; /** - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. * @param options The optional parameters * @param callback The callback */ - get(resourceGroupName: string, policyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - get(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + get(resourceGroupName: string, policyName: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + get(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { resourceGroupName, @@ -88,57 +88,54 @@ export class Policies { } /** - * Creates or update policy with specified ruleset name within a resource group. - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. + * Create or update policy with specified ruleset name within a resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. * @param [options] The optional parameters * @returns Promise */ - createOrUpdate(resourceGroupName: string, policyName: string, parameters: Models.WebApplicationFirewallPolicy1, options?: msRest.RequestOptionsBase): Promise; + createOrUpdate(resourceGroupName: string, policyName: string, parameters: Models.WebApplicationFirewallPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.beginCreateOrUpdate(resourceGroupName,policyName,parameters,options) + .then(lroPoller => lroPoller.pollUntilFinished()) as Promise; + } + /** - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. - * @param parameters Policy to be created. - * @param callback The callback + * Deletes Policy + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, policyName: string, parameters: Models.WebApplicationFirewallPolicy1, callback: msRest.ServiceCallback): void; + deleteMethod(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise { + return this.beginDeleteMethod(resourceGroupName,policyName,options) + .then(lroPoller => lroPoller.pollUntilFinished()); + } + /** - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. + * Create or update policy with specified ruleset name within a resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. * @param parameters Policy to be created. - * @param options The optional parameters - * @param callback The callback + * @param [options] The optional parameters + * @returns Promise */ - createOrUpdate(resourceGroupName: string, policyName: string, parameters: Models.WebApplicationFirewallPolicy1, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - createOrUpdate(resourceGroupName: string, policyName: string, parameters: Models.WebApplicationFirewallPolicy1, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.client.sendOperationRequest( + beginCreateOrUpdate(resourceGroupName: string, policyName: string, parameters: Models.WebApplicationFirewallPolicy, options?: msRest.RequestOptionsBase): Promise { + return this.client.sendLRORequest( { resourceGroupName, policyName, parameters, options }, - createOrUpdateOperationSpec, - callback) as Promise; - } - - /** - * Deletes Policy - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. - * @param [options] The optional parameters - * @returns Promise - */ - deleteMethod(resourceGroupName: string, policyName: string, options?: msRest.RequestOptionsBase): Promise { - return this.beginDeleteMethod(resourceGroupName,policyName,options) - .then(lroPoller => lroPoller.pollUntilFinished()); + beginCreateOrUpdateOperationSpec, + options); } /** * Deletes Policy - * @param resourceGroupName The name of the resource group. - * @param policyName The name of the resource group. + * @param resourceGroupName Name of the Resource group within the Azure subscription. + * @param policyName The name of the Web Application Firewall Policy. * @param [options] The optional parameters * @returns Promise */ @@ -164,14 +161,14 @@ export class Policies { * @param nextPageLink The NextLink from the previous successful call to List operation. * @param callback The callback */ - listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, callback: msRest.ServiceCallback): void; /** * @param nextPageLink The NextLink from the previous successful call to List operation. * @param options The optional parameters * @param callback The callback */ - listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { return this.client.sendOperationRequest( { nextPageLink, @@ -188,18 +185,18 @@ const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies", urlParameters: [ - Parameters.resourceGroupName1, + Parameters.resourceGroupName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicyListResult + bodyMapper: Mappers.WebApplicationFirewallPolicyList }, default: { bodyMapper: Mappers.ErrorResponse @@ -212,19 +209,19 @@ const getOperationSpec: msRest.OperationSpec = { httpMethod: "GET", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName1, + Parameters.resourceGroupName, Parameters.policyName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage ], responses: { 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicy1 + bodyMapper: Mappers.WebApplicationFirewallPolicy }, default: { bodyMapper: Mappers.ErrorResponse @@ -233,16 +230,16 @@ const getOperationSpec: msRest.OperationSpec = { serializer }; -const createOrUpdateOperationSpec: msRest.OperationSpec = { +const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { httpMethod: "PUT", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName1, + Parameters.resourceGroupName, Parameters.policyName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -250,16 +247,19 @@ const createOrUpdateOperationSpec: msRest.OperationSpec = { requestBody: { parameterPath: "parameters", mapper: { - ...Mappers.WebApplicationFirewallPolicy1, + ...Mappers.WebApplicationFirewallPolicy, required: true } }, responses: { 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicy1 + bodyMapper: Mappers.WebApplicationFirewallPolicy }, 201: { - bodyMapper: Mappers.WebApplicationFirewallPolicy1 + bodyMapper: Mappers.WebApplicationFirewallPolicy + }, + 202: { + bodyMapper: Mappers.WebApplicationFirewallPolicy }, default: { bodyMapper: Mappers.ErrorResponse @@ -272,12 +272,12 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { httpMethod: "DELETE", path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}", urlParameters: [ - Parameters.resourceGroupName1, + Parameters.resourceGroupName, Parameters.policyName, Parameters.subscriptionId ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion1 ], headerParameters: [ Parameters.acceptLanguage @@ -305,7 +305,7 @@ const listNextOperationSpec: msRest.OperationSpec = { ], responses: { 200: { - bodyMapper: Mappers.WebApplicationFirewallPolicyListResult + bodyMapper: Mappers.WebApplicationFirewallPolicyList }, default: { bodyMapper: Mappers.ErrorResponse diff --git a/packages/@azure/arm-frontdoor/lib/operations/routingRules.ts b/packages/@azure/arm-frontdoor/lib/operations/routingRules.ts index 30a70a8b7ce6..a2078ce78e2e 100644 --- a/packages/@azure/arm-frontdoor/lib/operations/routingRules.ts +++ b/packages/@azure/arm-frontdoor/lib/operations/routingRules.ts @@ -200,11 +200,11 @@ const listByFrontDoorOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -225,12 +225,12 @@ const getOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules/{routingRuleName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.routingRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -251,12 +251,12 @@ const beginCreateOrUpdateOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules/{routingRuleName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.routingRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage @@ -290,12 +290,12 @@ const beginDeleteMethodOperationSpec: msRest.OperationSpec = { path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/routingRules/{routingRuleName}", urlParameters: [ Parameters.subscriptionId, - Parameters.resourceGroupName0, + Parameters.resourceGroupName, Parameters.frontDoorName, Parameters.routingRuleName ], queryParameters: [ - Parameters.apiVersion + Parameters.apiVersion0 ], headerParameters: [ Parameters.acceptLanguage diff --git a/packages/@azure/arm-frontdoor/package.json b/packages/@azure/arm-frontdoor/package.json index 0b73d167d1e7..aa93e82cee70 100644 --- a/packages/@azure/arm-frontdoor/package.json +++ b/packages/@azure/arm-frontdoor/package.json @@ -4,8 +4,8 @@ "description": "FrontDoorManagementClient Library with typescript type definitions for node.js and browser.", "version": "3.1.0", "dependencies": { - "@azure/ms-rest-azure-js": "^1.1.0", - "@azure/ms-rest-js": "^1.1.0", + "@azure/ms-rest-azure-js": "^1.2.0", + "@azure/ms-rest-js": "^1.2.0", "tslib": "^1.9.3" }, "keywords": [ @@ -23,6 +23,7 @@ "typescript": "^3.1.1", "rollup": "^0.66.2", "rollup-plugin-node-resolve": "^3.4.0", + "rollup-plugin-sourcemaps": "^0.4.2", "uglify-js": "^3.4.9" }, "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/packages/@azure/arm-frontdoor", @@ -51,6 +52,5 @@ "minify": "uglifyjs -c -m --comments --source-map \"content='./dist/arm-frontdoor.js.map'\" -o ./dist/arm-frontdoor.min.js ./dist/arm-frontdoor.js", "prepack": "npm install && npm run build" }, - "sideEffects": false, - "authPublish": true + "sideEffects": false } diff --git a/packages/@azure/arm-frontdoor/rollup.config.js b/packages/@azure/arm-frontdoor/rollup.config.js index a59cc6f58c72..b29ebeda2944 100644 --- a/packages/@azure/arm-frontdoor/rollup.config.js +++ b/packages/@azure/arm-frontdoor/rollup.config.js @@ -1,10 +1,16 @@ +import rollup from "rollup"; import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; + /** - * @type {import('rollup').RollupFileOptions} + * @type {rollup.RollupFileOptions} */ const config = { - input: './esm/frontDoorManagementClient.js', - external: ["@azure/ms-rest-js", "@azure/ms-rest-azure-js"], + input: "./esm/frontDoorManagementClient.js", + external: [ + "@azure/ms-rest-js", + "@azure/ms-rest-azure-js" + ], output: { file: "./dist/arm-frontdoor.js", format: "umd", @@ -16,16 +22,16 @@ const config = { }, banner: `/* * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * 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. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. */` }, plugins: [ - nodeResolve({ module: true }) + nodeResolve({ module: true }), + sourcemaps() ] }; + export default config;