diff --git a/sdk/frontdoor/arm-frontdoor/LICENSE.txt b/sdk/frontdoor/arm-frontdoor/LICENSE.txt index a70e8cf66038..b73b4a1293c3 100644 --- a/sdk/frontdoor/arm-frontdoor/LICENSE.txt +++ b/sdk/frontdoor/arm-frontdoor/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 Microsoft +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 diff --git a/sdk/frontdoor/arm-frontdoor/README.md b/sdk/frontdoor/arm-frontdoor/README.md index 4f89fb6dba9b..c5c54936393e 100644 --- a/sdk/frontdoor/arm-frontdoor/README.md +++ b/sdk/frontdoor/arm-frontdoor/README.md @@ -9,7 +9,7 @@ This package contains an isomorphic SDK for FrontDoorManagementClient. ### How to Install -``` +```bash npm install @azure/arm-frontdoor ``` @@ -19,13 +19,13 @@ npm install @azure/arm-frontdoor ##### Install @azure/ms-rest-nodeauth -``` +```bash npm install @azure/ms-rest-nodeauth ``` ##### Sample code -```ts +```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"; @@ -47,7 +47,7 @@ msRestNodeAuth.interactiveLogin().then((creds) => { ##### Install @azure/ms-rest-browserauth -``` +```bash npm install @azure/ms-rest-browserauth ``` @@ -94,6 +94,3 @@ See https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to ## 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/sdk/frontdoor/arm-frontdoor/README.png) diff --git a/sdk/frontdoor/arm-frontdoor/package.json b/sdk/frontdoor/arm-frontdoor/package.json index df11a78b3bb8..6a0396e8243c 100644 --- a/sdk/frontdoor/arm-frontdoor/package.json +++ b/sdk/frontdoor/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.3.2", + "@azure/ms-rest-js": "^1.8.1", "tslib": "^1.9.3" }, "keywords": [ @@ -23,9 +23,10 @@ "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/sdk/frontdoor/arm-frontdoor", + "homepage": "https://github.com/azure/azure-sdk-for-js", "repository": { "type": "git", "url": "https://github.com/azure/azure-sdk-for-js.git" @@ -43,6 +44,7 @@ "esm/**/*.d.ts", "esm/**/*.d.ts.map", "src/**/*.ts", + "README.md", "rollup.config.js", "tsconfig.json" ], @@ -52,5 +54,5 @@ "prepack": "npm install && npm run build" }, "sideEffects": false, - "authPublish": true + "autoPublish": true } diff --git a/sdk/frontdoor/arm-frontdoor/rollup.config.js b/sdk/frontdoor/arm-frontdoor/rollup.config.js index a59cc6f58c72..b29ebeda2944 100644 --- a/sdk/frontdoor/arm-frontdoor/rollup.config.js +++ b/sdk/frontdoor/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; diff --git a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts index 940960200152..9a5fe29bc516 100644 --- a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts index ef6ce3d84bc5..6b51eaaaf587 100644 --- a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/models/backendPoolsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/backendPoolsMappers.ts index 22712c374057..720b7f72bbd7 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/backendPoolsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/backendPoolsMappers.ts @@ -1,39 +1,44 @@ /* * 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. */ export { discriminators, - BackendPoolListResult, + Backend, BackendPool, - SubResource, + BackendPoolListResult, + BackendPoolsSettings, BaseResource, - Backend, - ErrorResponse, - RoutingRule, CacheConfiguration, - LoadBalancingSettingsModel, - HealthProbeSettingsModel, + CustomHttpsConfiguration, + CustomRule, + CustomRuleList, + ErrorResponse, + ForwardingConfiguration, + FrontDoor, FrontendEndpoint, + FrontendEndpointLink, FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, - CustomHttpsConfiguration, + HealthProbeSettingsModel, KeyVaultCertificateSourceParametersVault, - Resource, - WebApplicationFirewallPolicy1, - PolicySettings, - CustomRules, - CustomRule, - MatchCondition1, - ManagedRuleSets, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, - FrontDoor + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, + WebApplicationFirewallPolicy } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts index 18eb96ab15e1..71c1b3bfbe8c 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts @@ -1,16 +1,13 @@ /* * 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. */ export { discriminators, - PurgeParameters, - ErrorResponse + ErrorResponse, + PurgeParameters } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts index a0caa7d9a919..e9572cc1fce9 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts @@ -1,41 +1,46 @@ /* * 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. */ export { discriminators, - FrontDoorListResult, - FrontDoor, - Resource, + Backend, + BackendPool, + BackendPoolsSettings, BaseResource, - RoutingRule, - SubResource, CacheConfiguration, - LoadBalancingSettingsModel, - HealthProbeSettingsModel, - BackendPool, - Backend, + CustomHttpsConfiguration, + CustomRule, + CustomRuleList, + ErrorResponse, + ForwardingConfiguration, + FrontDoor, + FrontDoorListResult, FrontendEndpoint, + FrontendEndpointLink, FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, - CustomHttpsConfiguration, + HealthProbeSettingsModel, KeyVaultCertificateSourceParametersVault, - ErrorResponse, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, ValidateCustomDomainInput, ValidateCustomDomainOutput, - WebApplicationFirewallPolicy1, - PolicySettings, - CustomRules, - CustomRule, - MatchCondition1, - ManagedRuleSets, - ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup + WebApplicationFirewallPolicy } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts index 65eaef6398ca..9cf7e7e10f41 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts @@ -1,39 +1,44 @@ /* * 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. */ export { discriminators, - FrontendEndpointsListResult, - FrontendEndpoint, - SubResource, + Backend, + BackendPool, + BackendPoolsSettings, BaseResource, - FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, + CacheConfiguration, CustomHttpsConfiguration, - KeyVaultCertificateSourceParametersVault, + CustomRule, + CustomRuleList, ErrorResponse, - RoutingRule, - CacheConfiguration, - LoadBalancingSettingsModel, + ForwardingConfiguration, + FrontDoor, + FrontendEndpoint, + FrontendEndpointLink, + FrontendEndpointsListResult, + FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, HealthProbeSettingsModel, - BackendPool, - Backend, - Resource, - WebApplicationFirewallPolicy1, - PolicySettings, - CustomRules, - CustomRule, - MatchCondition1, - ManagedRuleSets, + KeyVaultCertificateSourceParametersVault, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, - FrontDoor + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, + WebApplicationFirewallPolicy } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/healthProbeSettingsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/healthProbeSettingsMappers.ts index 9bc03c272291..a0913470b593 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/healthProbeSettingsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/healthProbeSettingsMappers.ts @@ -1,39 +1,44 @@ /* * 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. */ export { discriminators, - HealthProbeSettingsListResult, - HealthProbeSettingsModel, - SubResource, + Backend, + BackendPool, + BackendPoolsSettings, BaseResource, - ErrorResponse, - RoutingRule, CacheConfiguration, - LoadBalancingSettingsModel, - BackendPool, - Backend, + CustomHttpsConfiguration, + CustomRule, + CustomRuleList, + ErrorResponse, + ForwardingConfiguration, + FrontDoor, FrontendEndpoint, + FrontendEndpointLink, FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, - CustomHttpsConfiguration, + HealthProbeSettingsListResult, + HealthProbeSettingsModel, KeyVaultCertificateSourceParametersVault, - Resource, - WebApplicationFirewallPolicy1, - PolicySettings, - CustomRules, - CustomRule, - MatchCondition1, - ManagedRuleSets, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, - FrontDoor + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, + WebApplicationFirewallPolicy } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/index.ts b/sdk/frontdoor/arm-frontdoor/src/models/index.ts index a85d00052dbd..96536e0be254 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/index.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/index.ts @@ -1,11 +1,9 @@ /* * 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. */ import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js"; @@ -13,1308 +11,1178 @@ import * as msRest from "@azure/ms-rest-js"; export { BaseResource, CloudError }; - /** - * @interface - * An interface representing Resource. * Common resource representation. - * - * @extends BaseResource */ export interface Resource extends BaseResource { /** - * @member {string} [id] Resource ID. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource ID. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** - * @member {string} [name] Resource name. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource name. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; /** - * @member {string} [location] Resource location. + * Resource location. */ location?: string; /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * Resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @interface - * An interface representing FrontDoor. - * Front Door represents a collection of backend endpoints to route traffic to - * along with rules that specify how traffic is sent there. - * - * @extends Resource + * Front Door represents a collection of backend endpoints to route traffic to along with rules + * that specify how traffic is sent there. */ export interface FrontDoor extends Resource { /** - * @member {string} [friendlyName] A friendly name for the frontDoor + * A friendly name for the frontDoor */ friendlyName?: string; /** - * @member {RoutingRule[]} [routingRules] Routing rules associated with this - * Front Door. + * Routing rules associated with this Front Door. */ routingRules?: RoutingRule[]; /** - * @member {LoadBalancingSettingsModel[]} [loadBalancingSettings] Load - * balancing settings associated with this Front Door instance. + * Load balancing settings associated with this Front Door instance. */ loadBalancingSettings?: LoadBalancingSettingsModel[]; /** - * @member {HealthProbeSettingsModel[]} [healthProbeSettings] Health probe - * settings associated with this Front Door instance. + * Health probe settings associated with this Front Door instance. */ healthProbeSettings?: HealthProbeSettingsModel[]; /** - * @member {BackendPool[]} [backendPools] Backend pools available to routing - * rules. + * Backend pools available to routing rules. */ backendPools?: BackendPool[]; /** - * @member {FrontendEndpoint[]} [frontendEndpoints] Frontend endpoints - * available to routing rules. + * Frontend endpoints available to routing rules. */ frontendEndpoints?: FrontendEndpoint[]; /** - * @member {FrontDoorEnabledState} [enabledState] Operational status of the - * Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. - * Possible values include: 'Enabled', 'Disabled' + * Settings for all backendPools + */ + backendPoolsSettings?: BackendPoolsSettings; + /** + * Operational status of the Front Door load balancer. Permitted values are 'Enabled' or + * 'Disabled'. Possible values include: 'Enabled', 'Disabled' */ enabledState?: FrontDoorEnabledState; /** - * @member {FrontDoorResourceState} [resourceState] Resource status of the - * Front Door. Possible values include: 'Creating', 'Enabling', 'Enabled', + * Resource status of the Front Door. Possible values include: 'Creating', 'Enabling', 'Enabled', * 'Disabling', 'Disabled', 'Deleting' */ resourceState?: FrontDoorResourceState; /** - * @member {string} [provisioningState] Provisioning state of the Front Door. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Provisioning state of the Front Door. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly provisioningState?: string; /** - * @member {string} [cname] The host that each frontendEndpoint must CNAME - * to. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The host that each frontendEndpoint must CNAME to. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly cname?: string; } /** - * @interface - * An interface representing SubResource. * Reference to another subresource. - * - * @extends BaseResource */ export interface SubResource extends BaseResource { /** - * @member {string} [id] Resource ID. + * Resource ID. */ id?: string; } /** - * @interface - * An interface representing RoutingRule. - * A routing rule represents a specification for traffic to treat and where to - * send it, along with health probe information. - * - * @extends SubResource + * A routing rule represents a specification for traffic to treat and where to send it, along with + * health probe information. */ export interface RoutingRule extends SubResource { /** - * @member {SubResource[]} [frontendEndpoints] Frontend endpoints associated - * with this rule + * Frontend endpoints associated with this rule */ frontendEndpoints?: SubResource[]; /** - * @member {FrontDoorProtocol[]} [acceptedProtocols] Protocol schemes to - * match for this rule + * Protocol schemes to match for this rule */ acceptedProtocols?: FrontDoorProtocol[]; /** - * @member {string[]} [patternsToMatch] The route patterns of the rule. + * The route patterns of the rule. */ patternsToMatch?: string[]; /** - * @member {string} [customForwardingPath] A custom path used to rewrite - * resource paths matched by this rule. Leave empty to use incoming path. - */ - customForwardingPath?: string; - /** - * @member {FrontDoorForwardingProtocol} [forwardingProtocol] Protocol this - * rule will use when forwarding traffic to backends. Possible values - * include: 'HttpOnly', 'HttpsOnly', 'MatchRequest' - */ - forwardingProtocol?: FrontDoorForwardingProtocol; - /** - * @member {CacheConfiguration} [cacheConfiguration] The caching - * configuration associated with this rule. - */ - cacheConfiguration?: CacheConfiguration; - /** - * @member {SubResource} [backendPool] A reference to the BackendPool which - * this rule routes to. + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled' */ - backendPool?: SubResource; + enabledState?: RoutingRuleEnabledState; /** - * @member {FrontDoorEnabledState} [enabledState] Whether to enable use of - * this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values - * include: 'Enabled', 'Disabled' + * A reference to the routing configuration. */ - enabledState?: FrontDoorEnabledState; + routeConfiguration?: RouteConfigurationUnion; /** - * @member {FrontDoorResourceState} [resourceState] Resource status. Possible - * values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', + * Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', * 'Disabled', 'Deleting' */ resourceState?: FrontDoorResourceState; /** - * @member {string} [name] Resource name. + * Resource name. */ name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing LoadBalancingSettingsModel. * Load balancing settings for a backend pool - * - * @extends SubResource */ export interface LoadBalancingSettingsModel extends SubResource { /** - * @member {number} [sampleSize] The number of samples to consider for load - * balancing decisions + * The number of samples to consider for load balancing decisions */ sampleSize?: number; /** - * @member {number} [successfulSamplesRequired] The number of samples within - * the sample period that must succeed + * The number of samples within the sample period that must succeed */ successfulSamplesRequired?: number; /** - * @member {number} [additionalLatencyMilliseconds] The additional latency in - * milliseconds for probes to fall into the lowest latency bucket + * The additional latency in milliseconds for probes to fall into the lowest latency bucket */ additionalLatencyMilliseconds?: number; /** - * @member {FrontDoorResourceState} [resourceState] Resource status. Possible - * values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', + * Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', * 'Disabled', 'Deleting' */ resourceState?: FrontDoorResourceState; /** - * @member {string} [name] Resource name. + * Resource name. */ name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing HealthProbeSettingsModel. * Load balancing settings for a backend pool - * - * @extends SubResource */ export interface HealthProbeSettingsModel extends SubResource { /** - * @member {string} [path] The path to use for the health probe. Default is / + * The path to use for the health probe. Default is / */ path?: string; /** - * @member {FrontDoorProtocol} [protocol] Protocol scheme to use for this - * probe. Possible values include: 'Http', 'Https' + * Protocol scheme to use for this probe. Possible values include: 'Http', 'Https' */ protocol?: FrontDoorProtocol; /** - * @member {number} [intervalInSeconds] The number of seconds between health - * probes. + * The number of seconds between health probes. */ intervalInSeconds?: number; /** - * @member {FrontDoorResourceState} [resourceState] Resource status. Possible - * values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', + * Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', * 'Disabled', 'Deleting' */ resourceState?: FrontDoorResourceState; /** - * @member {string} [name] Resource name. + * Resource name. */ name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing BackendPool. * A backend pool is a collection of backends that can be routed to. - * - * @extends SubResource */ export interface BackendPool extends SubResource { /** - * @member {Backend[]} [backends] The set of backends for this pool + * The set of backends for this pool */ backends?: Backend[]; /** - * @member {SubResource} [loadBalancingSettings] Load balancing settings for - * a backend pool + * Load balancing settings for a backend pool */ loadBalancingSettings?: SubResource; /** - * @member {SubResource} [healthProbeSettings] L7 health probe settings for a - * backend pool + * L7 health probe settings for a backend pool */ healthProbeSettings?: SubResource; /** - * @member {FrontDoorResourceState} [resourceState] Resource status. Possible - * values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', + * Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', * 'Disabled', 'Deleting' */ resourceState?: FrontDoorResourceState; /** - * @member {string} [name] Resource name. + * Resource name. */ name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing KeyVaultCertificateSourceParametersVault. * The Key Vault containing the SSL certificate - * */ export interface KeyVaultCertificateSourceParametersVault { /** - * @member {string} [id] Resource ID. + * Resource ID. */ id?: string; } /** - * @interface - * An interface representing CustomHttpsConfiguration. * Https settings for a domain - * */ export interface CustomHttpsConfiguration { /** - * @member {FrontDoorCertificateSource} [certificateSource] Defines the - * source of the SSL certificate. Possible values include: 'AzureKeyVault', + * Defines the source of the SSL certificate. Possible values include: 'AzureKeyVault', * 'FrontDoor' */ certificateSource?: FrontDoorCertificateSource; /** - * @member {FrontDoorTlsProtocolType} [protocolType] Defines the TLS - * extension protocol that is used for secure delivery. Possible values - * include: 'ServerNameIndication' + * Defines the TLS extension protocol that is used for secure delivery. Possible values include: + * 'ServerNameIndication' */ protocolType?: FrontDoorTlsProtocolType; /** - * @member {KeyVaultCertificateSourceParametersVault} [vault] The Key Vault - * containing the SSL certificate + * The Key Vault containing the SSL certificate */ vault?: KeyVaultCertificateSourceParametersVault; /** - * @member {string} [secretName] The name of the Key Vault secret - * representing the full certificate PFX + * The name of the Key Vault secret representing the full certificate PFX */ secretName?: string; /** - * @member {string} [secretVersion] The version of the Key Vault secret - * representing the full certificate PFX + * The version of the Key Vault secret representing the full certificate PFX */ secretVersion?: string; /** - * @member {FrontDoorCertificateType} [certificateType] Defines the type of - * the certificate used for secure connections to a frontendEndpoint. + * Defines the type of the certificate used for secure connections to a frontendEndpoint. * Possible values include: 'Dedicated' */ certificateType?: FrontDoorCertificateType; } /** - * @interface - * An interface representing FrontendEndpoint. * A frontend endpoint used for routing. - * - * @extends SubResource */ export interface FrontendEndpoint extends SubResource { /** - * @member {string} [hostName] The host name of the frontendEndpoint. Must be - * a domain name. + * The host name of the frontendEndpoint. Must be a domain name. */ hostName?: string; /** - * @member {SessionAffinityEnabledState} [sessionAffinityEnabledState] - * Whether to allow session affinity on this host. Valid options are - * 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + * Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + * Possible values include: 'Enabled', 'Disabled' */ sessionAffinityEnabledState?: SessionAffinityEnabledState; /** - * @member {number} [sessionAffinityTtlSeconds] UNUSED. This field will be - * ignored. The TTL to use in seconds for session affinity, if applicable. + * UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if + * applicable. */ sessionAffinityTtlSeconds?: number; /** - * @member {FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink} - * [webApplicationFirewallPolicyLink] Defines the Web Application Firewall - * policy for each host (if applicable) + * Defines the Web Application Firewall policy for each host (if applicable) */ webApplicationFirewallPolicyLink?: FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink; /** - * @member {FrontDoorResourceState} [resourceState] Resource status. Possible - * values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', + * Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', * 'Disabled', 'Deleting' */ resourceState?: FrontDoorResourceState; /** - * @member {CustomHttpsProvisioningState} [customHttpsProvisioningState] - * Provisioning status of Custom Https of the frontendEndpoint. Possible - * values include: 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Provisioning status of Custom Https of the frontendEndpoint. Possible values include: + * 'Enabling', 'Enabled', 'Disabling', 'Disabled', 'Failed' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly customHttpsProvisioningState?: CustomHttpsProvisioningState; /** - * @member {CustomHttpsProvisioningSubstate} - * [customHttpsProvisioningSubstate] Provisioning substate shows the progress - * of custom HTTPS enabling/disabling process step by step. Possible values - * include: 'SubmittingDomainControlValidationRequest', - * 'PendingDomainControlValidationREquestApproval', - * 'DomainControlValidationRequestApproved', - * 'DomainControlValidationRequestRejected', - * 'DomainControlValidationRequestTimedOut', 'IssuingCertificate', - * 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', + * Provisioning substate shows the progress of custom HTTPS enabling/disabling process step by + * step. Possible values include: 'SubmittingDomainControlValidationRequest', + * 'PendingDomainControlValidationREquestApproval', 'DomainControlValidationRequestApproved', + * 'DomainControlValidationRequestRejected', 'DomainControlValidationRequestTimedOut', + * 'IssuingCertificate', 'DeployingCertificate', 'CertificateDeployed', 'DeletingCertificate', * 'CertificateDeleted' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly customHttpsProvisioningSubstate?: CustomHttpsProvisioningSubstate; /** - * @member {CustomHttpsConfiguration} [customHttpsConfiguration] The - * configuration specifying how to enable HTTPS - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The configuration specifying how to enable HTTPS + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly customHttpsConfiguration?: CustomHttpsConfiguration; /** - * @member {string} [name] Resource name. + * Resource name. */ name?: string; /** - * @member {string} [type] Resource type. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Resource type. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: string; } /** - * @interface - * An interface representing FrontDoorUpdateParameters. + * Settings that apply to all backend pools. + */ +export interface BackendPoolsSettings { + /** + * Whether to enforce certificate name check on HTTPS requests to all backend pools. No effect on + * non-HTTPS requests. Possible values include: 'Enabled', 'Disabled'. Default value: 'Enabled'. + */ + enforceCertificateNameCheck?: EnforceCertificateNameCheckEnabledState; +} + +/** * The properties needed to update a Front Door - * */ export interface FrontDoorUpdateParameters { /** - * @member {string} [friendlyName] A friendly name for the frontDoor + * A friendly name for the frontDoor */ friendlyName?: string; /** - * @member {RoutingRule[]} [routingRules] Routing rules associated with this - * Front Door. + * Routing rules associated with this Front Door. */ routingRules?: RoutingRule[]; /** - * @member {LoadBalancingSettingsModel[]} [loadBalancingSettings] Load - * balancing settings associated with this Front Door instance. + * Load balancing settings associated with this Front Door instance. */ loadBalancingSettings?: LoadBalancingSettingsModel[]; /** - * @member {HealthProbeSettingsModel[]} [healthProbeSettings] Health probe - * settings associated with this Front Door instance. + * Health probe settings associated with this Front Door instance. */ healthProbeSettings?: HealthProbeSettingsModel[]; /** - * @member {BackendPool[]} [backendPools] Backend pools available to routing - * rules. + * Backend pools available to routing rules. */ backendPools?: BackendPool[]; /** - * @member {FrontendEndpoint[]} [frontendEndpoints] Frontend endpoints - * available to routing rules. + * Frontend endpoints available to routing rules. */ frontendEndpoints?: FrontendEndpoint[]; /** - * @member {FrontDoorEnabledState} [enabledState] Operational status of the - * Front Door load balancer. Permitted values are 'Enabled' or 'Disabled'. - * Possible values include: 'Enabled', 'Disabled' + * Settings for all backendPools + */ + backendPoolsSettings?: BackendPoolsSettings; + /** + * Operational status of the Front Door load balancer. Permitted values are 'Enabled' or + * 'Disabled'. Possible values include: 'Enabled', 'Disabled' */ enabledState?: FrontDoorEnabledState; } /** - * @interface - * An interface representing PurgeParameters. * Parameters required for content purge. - * */ export interface PurgeParameters { /** - * @member {string[]} contentPaths The path to the content to be purged. Can - * describe a file path or a wild card directory. + * The path to the content to be purged. Can describe a file path or a wild card directory. */ contentPaths: string[]; } /** - * @interface - * An interface representing CacheConfiguration. - * Caching settings for a caching-type route. To disable caching, do not - * provide a cacheConfiguration object. - * + * Contains the possible cases for RouteConfiguration. */ -export interface CacheConfiguration { - /** - * @member {FrontDoorQuery} [queryParameterStripDirective] Treatment of URL - * query terms when forming the cache key. Possible values include: - * 'StripNone', 'StripAll' - */ - queryParameterStripDirective?: FrontDoorQuery; +export type RouteConfigurationUnion = RouteConfiguration | ForwardingConfiguration | RedirectConfiguration; + +/** + * Base class for all types of Route. + */ +export interface RouteConfiguration { /** - * @member {DynamicCompressionEnabled} [dynamicCompression] Whether to use - * dynamic compression for cached content. Possible values include: - * 'Enabled', 'Disabled' + * Polymorphic Discriminator */ - dynamicCompression?: DynamicCompressionEnabled; + odatatype: "RouteConfiguration"; } /** - * @interface - * An interface representing RoutingRuleUpdateParameters. * Routing rules to apply to an endpoint - * */ export interface RoutingRuleUpdateParameters { /** - * @member {SubResource[]} [frontendEndpoints] Frontend endpoints associated - * with this rule + * Frontend endpoints associated with this rule */ frontendEndpoints?: SubResource[]; /** - * @member {FrontDoorProtocol[]} [acceptedProtocols] Protocol schemes to - * match for this rule + * Protocol schemes to match for this rule */ acceptedProtocols?: FrontDoorProtocol[]; /** - * @member {string[]} [patternsToMatch] The route patterns of the rule. + * The route patterns of the rule. */ patternsToMatch?: string[]; /** - * @member {string} [customForwardingPath] A custom path used to rewrite - * resource paths matched by this rule. Leave empty to use incoming path. + * Whether to enable use of this rule. Permitted values are 'Enabled' or 'Disabled'. Possible + * values include: 'Enabled', 'Disabled' + */ + enabledState?: RoutingRuleEnabledState; + /** + * A reference to the routing configuration. + */ + routeConfiguration?: RouteConfigurationUnion; +} + +/** + * Caching settings for a caching-type route. To disable caching, do not provide a + * cacheConfiguration object. + */ +export interface CacheConfiguration { + /** + * Treatment of URL query terms when forming the cache key. Possible values include: 'StripNone', + * 'StripAll' + */ + queryParameterStripDirective?: FrontDoorQuery; + /** + * Whether to use dynamic compression for cached content. Possible values include: 'Enabled', + * 'Disabled' + */ + dynamicCompression?: DynamicCompressionEnabled; +} + +/** + * Describes Forwarding Route. + */ +export interface ForwardingConfiguration { + /** + * Polymorphic Discriminator + */ + odatatype: "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration"; + /** + * A custom path used to rewrite resource paths matched by this rule. Leave empty to use incoming + * path. */ customForwardingPath?: string; /** - * @member {FrontDoorForwardingProtocol} [forwardingProtocol] Protocol this - * rule will use when forwarding traffic to backends. Possible values - * include: 'HttpOnly', 'HttpsOnly', 'MatchRequest' + * Protocol this rule will use when forwarding traffic to backends. Possible values include: + * 'HttpOnly', 'HttpsOnly', 'MatchRequest' */ forwardingProtocol?: FrontDoorForwardingProtocol; /** - * @member {CacheConfiguration} [cacheConfiguration] The caching - * configuration associated with this rule. + * The caching configuration associated with this rule. */ cacheConfiguration?: CacheConfiguration; /** - * @member {SubResource} [backendPool] A reference to the BackendPool which - * this rule routes to. + * A reference to the BackendPool which this rule routes to. */ backendPool?: SubResource; +} + +/** + * Describes Redirect Route. + */ +export interface RedirectConfiguration { /** - * @member {FrontDoorEnabledState} [enabledState] Whether to enable use of - * this rule. Permitted values are 'Enabled' or 'Disabled'. Possible values - * include: 'Enabled', 'Disabled' + * Polymorphic Discriminator */ - enabledState?: FrontDoorEnabledState; + odatatype: "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration"; + /** + * The redirect type the rule will use when redirecting traffic. Possible values include: + * 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + */ + redirectType?: FrontDoorRedirectType; + /** + * The protocol of the destination to where the traffic is redirected. Possible values include: + * 'HttpOnly', 'HttpsOnly', 'MatchRequest' + */ + redirectProtocol?: FrontDoorRedirectProtocol; + /** + * Host to redirect. Leave empty to use the incoming host as the destination host. + */ + customHost?: string; + /** + * The full path to redirect. Path cannot be empty and must start with /. Leave empty to use the + * incoming path as destination path. + */ + customPath?: string; + /** + * Fragment to add to the redirect URL. Fragment is the part of the URL that comes after #. Do + * not include the #. + */ + customFragment?: string; + /** + * The set of query strings to be placed in the redirect URL. Setting this value would replace + * any existing query string; leave empty to preserve the incoming query string. Query string + * must be in = format. The first ? and & will be added automatically so do not + * include them in the front, but do separate multiple query strings with &. + */ + customQueryString?: string; } /** - * @interface - * An interface representing Backend. * Backend address of a frontDoor load balancer. - * */ export interface Backend { /** - * @member {string} [address] Location of the backend (IP address or FQDN) + * Location of the backend (IP address or FQDN) */ address?: string; /** - * @member {number} [httpPort] The HTTP TCP port number. Must be between 1 - * and 65535. + * The HTTP TCP port number. Must be between 1 and 65535. */ httpPort?: number; /** - * @member {number} [httpsPort] The HTTPS TCP port number. Must be between 1 - * and 65535. + * The HTTPS TCP port number. Must be between 1 and 65535. */ httpsPort?: number; /** - * @member {FrontDoorEnabledState} [enabledState] Whether to enable use of - * this backend. Permitted values are 'Enabled' or 'Disabled'. Possible + * Whether to enable use of this backend. Permitted values are 'Enabled' or 'Disabled'. Possible * values include: 'Enabled', 'Disabled' */ - enabledState?: FrontDoorEnabledState; + enabledState?: BackendEnabledState; /** - * @member {number} [priority] Priority to use for load balancing. Higher - * priorities will not be used for load balancing if any lower priority - * backend is healthy. + * Priority to use for load balancing. Higher priorities will not be used for load balancing if + * any lower priority backend is healthy. */ priority?: number; /** - * @member {number} [weight] Weight of this endpoint for load balancing - * purposes. + * Weight of this endpoint for load balancing purposes. */ weight?: number; /** - * @member {string} [backendHostHeader] The value to use as the host header - * sent to the backend. If blank or unspecified, this defaults to the - * incoming host. + * The value to use as the host header sent to the backend. If blank or unspecified, this + * defaults to the incoming host. */ backendHostHeader?: string; } /** - * @interface - * An interface representing LoadBalancingSettingsUpdateParameters. * Round-Robin load balancing settings for a backend pool - * */ export interface LoadBalancingSettingsUpdateParameters { /** - * @member {number} [sampleSize] The number of samples to consider for load - * balancing decisions + * The number of samples to consider for load balancing decisions */ sampleSize?: number; /** - * @member {number} [successfulSamplesRequired] The number of samples within - * the sample period that must succeed + * The number of samples within the sample period that must succeed */ successfulSamplesRequired?: number; /** - * @member {number} [additionalLatencyMilliseconds] The additional latency in - * milliseconds for probes to fall into the lowest latency bucket + * The additional latency in milliseconds for probes to fall into the lowest latency bucket */ additionalLatencyMilliseconds?: number; } /** - * @interface - * An interface representing HealthProbeSettingsUpdateParameters. * L7 health probe settings for a backend pool - * */ export interface HealthProbeSettingsUpdateParameters { /** - * @member {string} [path] The path to use for the health probe. Default is / + * The path to use for the health probe. Default is / */ path?: string; /** - * @member {FrontDoorProtocol} [protocol] Protocol scheme to use for this - * probe. Possible values include: 'Http', 'Https' + * Protocol scheme to use for this probe. Possible values include: 'Http', 'Https' */ protocol?: FrontDoorProtocol; /** - * @member {number} [intervalInSeconds] The number of seconds between health - * probes. + * The number of seconds between health probes. */ intervalInSeconds?: number; } /** - * @interface - * An interface representing BackendPoolUpdateParameters. * A collection of backends that can be routed to. - * */ export interface BackendPoolUpdateParameters { /** - * @member {Backend[]} [backends] The set of backends for this pool + * The set of backends for this pool */ backends?: Backend[]; /** - * @member {SubResource} [loadBalancingSettings] Load balancing settings for - * a backend pool + * Load balancing settings for a backend pool */ loadBalancingSettings?: SubResource; /** - * @member {SubResource} [healthProbeSettings] L7 health probe settings for a - * backend pool + * L7 health probe settings for a backend pool */ healthProbeSettings?: SubResource; } /** - * @interface - * An interface representing FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink. * Defines the Web Application Firewall policy for each host (if applicable) - * */ export interface FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink { /** - * @member {string} [id] Resource ID. + * Resource ID. */ id?: string; } /** - * @interface - * An interface representing FrontendEndpointUpdateParameters. * Frontend endpoint used in routing rule - * */ export interface FrontendEndpointUpdateParameters { /** - * @member {string} [hostName] The host name of the frontendEndpoint. Must be - * a domain name. + * The host name of the frontendEndpoint. Must be a domain name. */ hostName?: string; /** - * @member {SessionAffinityEnabledState} [sessionAffinityEnabledState] - * Whether to allow session affinity on this host. Valid options are - * 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled' + * Whether to allow session affinity on this host. Valid options are 'Enabled' or 'Disabled'. + * Possible values include: 'Enabled', 'Disabled' */ sessionAffinityEnabledState?: SessionAffinityEnabledState; /** - * @member {number} [sessionAffinityTtlSeconds] UNUSED. This field will be - * ignored. The TTL to use in seconds for session affinity, if applicable. + * UNUSED. This field will be ignored. The TTL to use in seconds for session affinity, if + * applicable. */ sessionAffinityTtlSeconds?: number; /** - * @member {FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink} - * [webApplicationFirewallPolicyLink] Defines the Web Application Firewall - * policy for each host (if applicable) + * Defines the Web Application Firewall policy for each host (if applicable) */ webApplicationFirewallPolicyLink?: FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink; } /** - * @interface - * An interface representing ValidateCustomDomainInput. * Input of the custom domain to be validated for DNS mapping. - * */ export interface ValidateCustomDomainInput { /** - * @member {string} hostName The host name of the custom domain. Must be a - * domain name. + * The host name of the custom domain. Must be a domain name. */ hostName: string; } /** - * @interface - * An interface representing ValidateCustomDomainOutput. * Output of custom domain validation. - * */ export interface ValidateCustomDomainOutput { /** - * @member {boolean} [customDomainValidated] Indicates whether the custom - * domain is valid or not. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates whether the custom domain is valid or not. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly customDomainValidated?: boolean; /** - * @member {string} [reason] The reason why the custom domain is not valid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reason why the custom domain is not valid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: string; /** - * @member {string} [message] Error message describing why the custom domain - * is not valid. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error message describing why the custom domain is not valid. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing ErrorResponse. - * Error reponse indicates Front Door service is not able to process the - * incoming request. The reason is provided in the error message. - * + * Error response indicates Front Door service is not able to process the incoming request. The + * reason is provided in the error message. */ export interface ErrorResponse { /** - * @member {string} [code] Error code. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error code. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly code?: string; /** - * @member {string} [message] Error message indicating why the operation - * failed. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Error message indicating why the operation failed. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface - * An interface representing CheckNameAvailabilityInput. * Input of CheckNameAvailability API. - * */ export interface CheckNameAvailabilityInput { /** - * @member {string} name The resource name to validate. + * The resource name to validate. */ name: string; /** - * @member {ResourceType} type The type of the resource whose name is to be - * validated. Possible values include: 'Microsoft.Network/frontDoors', - * 'Microsoft.Network/frontDoors/frontendEndpoints' + * The type of the resource whose name is to be validated. Possible values include: + * 'Microsoft.Network/frontDoors', 'Microsoft.Network/frontDoors/frontendEndpoints' */ type: ResourceType; } /** - * @interface - * An interface representing CheckNameAvailabilityOutput. * Output of check name availability API. - * */ export interface CheckNameAvailabilityOutput { /** - * @member {Availability} [nameAvailability] Indicates whether the name is - * available. Possible values include: 'Available', 'Unavailable' - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * Indicates whether the name is available. Possible values include: 'Available', 'Unavailable' + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly nameAvailability?: Availability; /** - * @member {string} [reason] The reason why the name is not available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The reason why the name is not available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reason?: string; /** - * @member {string} [message] The detailed error message describing why the - * name is not available. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * The detailed error message describing why the name is not available. + * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly message?: string; } /** - * @interface * An interface representing ErrorDetails. */ export interface ErrorDetails { - /** - * @member {string} [code] - */ code?: string; - /** - * @member {string} [target] - */ target?: string; - /** - * @member {string} [message] - */ message?: string; } /** - * @interface * An interface representing ErrorModel. */ export interface ErrorModel { - /** - * @member {string} [code] - */ code?: string; - /** - * @member {string} [message] - */ message?: string; - /** - * @member {string} [target] - */ target?: string; - /** - * @member {ErrorDetails[]} [details] - */ details?: ErrorDetails[]; - /** - * @member {string} [innerError] - */ innerError?: string; } /** - * @interface - * An interface representing AzureAsyncOperationResult. - * The response body contains the status of the specified asynchronous - * operation, indicating whether it has succeeded, is in progress, or has - * failed. Note that this status is distinct from the HTTP status code returned - * for the Get Operation Status operation itself. If the asynchronous operation - * succeeded, the response body includes the HTTP status code for the - * successful request. If the asynchronous operation failed, the response body - * includes the HTTP status code for the failed request and error information - * regarding the failure. - * + * The response body contains the status of the specified asynchronous operation, indicating + * whether it has succeeded, is in progress, or has failed. Note that this status is distinct from + * the HTTP status code returned for the Get Operation Status operation itself. If the asynchronous + * operation succeeded, the response body includes the HTTP status code for the successful request. + * If the asynchronous operation failed, the response body includes the HTTP status code for the + * failed request and error information regarding the failure. */ export interface AzureAsyncOperationResult { /** - * @member {NetworkOperationStatus} [status] Status of the Azure async - * operation. Possible values are: 'InProgress', 'Succeeded', and 'Failed'. - * Possible values include: 'InProgress', 'Succeeded', 'Failed' + * Status of the Azure async operation. Possible values are: 'InProgress', 'Succeeded', and + * 'Failed'. Possible values include: 'InProgress', 'Succeeded', 'Failed' */ status?: NetworkOperationStatus; - /** - * @member {ErrorModel} [error] - */ error?: ErrorModel; } /** - * @interface - * An interface representing TagsObject. * Tags object for patch operations. - * */ export interface TagsObject { /** - * @member {{ [propertyName: string]: string }} [tags] Resource tags. + * Resource tags. */ tags?: { [propertyName: string]: string }; } /** - * @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' + * 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' + * Describes if it is in detection mode or prevention mode at policy level. Possible values + * include: 'Prevention', 'Detection' */ - mode?: Mode; + mode?: PolicyMode; + /** + * If action type is redirect, this field represents redirect URL for the client. + */ + redirectUrl?: string; + /** + * If the action type is block, customer can override the response status code. + */ + customBlockResponseStatusCode?: number; + /** + * 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 - * + * 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' + * 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 + * 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' + * Describes operator to be matched. Possible values include: 'Any', 'IPMatch', 'GeoMatch', + * 'Equal', 'Contains', 'LessThan', 'GreaterThan', 'LessThanOrEqual', 'GreaterThanOrEqual', + * 'BeginsWith', 'EndsWith', 'RegEx' */ operator: Operator; /** - * @member {boolean} [negateCondition] Describes if this is negate condition - * or not + * Describes if the result of this condition should be negated. */ negateCondition?: boolean; /** - * @member {string[]} matchValue Match value + * List of possible match values. */ matchValue: string[]; + /** + * List of transforms. + */ + transforms?: TransformType[]; } /** - * @interface - * An interface representing CustomRule. * Defines contents of a web application rule - * */ 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. + * 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.** + * Describes priority of the rule. Rules with a lower value will be evaluated before rules with a + * higher value. */ - readonly etag?: string; + priority: number; /** - * @member {number} priority Describes priority of the rule. Rules with a - * lower value will be evaluated before rules with a higher value + * Describes if the custom rule is in enabled or disabled state. Defaults to Enabled if not + * specified. Possible values include: 'Disabled', 'Enabled' */ - priority: number; + enabledState?: CustomRuleEnabledState; /** - * @member {RuleType} ruleType Describes type of rule. Possible values - * include: 'MatchRule', 'RateLimitRule' + * Describes type of rule. Possible values include: 'MatchRule', 'RateLimitRule' */ ruleType: RuleType; /** - * @member {number} [rateLimitDurationInMinutes] Defines rate limit duration. - * Default - 1 minute + * Defines rate limit duration. Default is 1 minute. */ rateLimitDurationInMinutes?: number; /** - * @member {number} [rateLimitThreshold] Defines rate limit thresold + * Defines rate limit threshold. */ rateLimitThreshold?: number; /** - * @member {MatchCondition1[]} matchConditions List of match conditions + * List of match conditions. */ - matchConditions: MatchCondition1[]; + matchConditions: MatchCondition[]; /** - * @member {Action} action Type of Actions. Possible values include: 'Allow', - * 'Block', 'Log' + * Describes what action to be applied when rule matches. Possible values include: 'Allow', + * 'Block', 'Log', 'Redirect' */ - action: Action; - /** - * @member {Transform[]} [transforms] List of transforms - */ - transforms?: Transform[]; + action: ActionType; } /** - * @interface - * An interface representing CustomRules. * Defines contents of custom rules - * */ -export interface CustomRules { +export interface CustomRuleList { /** - * @member {CustomRule[]} [rules] List of rules + * List of rules */ rules?: CustomRule[]; } /** - * Contains the possible cases for ManagedRuleSet. + * Defines a managed rule group override setting. */ -export type ManagedRuleSetUnion = ManagedRuleSet | AzureManagedRuleSet; +export interface ManagedRuleOverride { + /** + * Identifier for the managed rule. + */ + ruleId: string; + /** + * Describes if the managed rule is in enabled or disabled state. Defaults to Disabled if not + * specified. Possible values include: 'Disabled', 'Enabled' + */ + enabledState?: ManagedRuleEnabledState; + /** + * Describes the override action to be applied when rule matches. Possible values include: + * 'Allow', 'Block', 'Log', 'Redirect' + */ + action?: ActionType; +} /** - * @interface - * An interface representing ManagedRuleSet. - * Base class for all types of ManagedRuleSet. - * + * Defines a managed rule group override setting. + */ +export interface ManagedRuleGroupOverride { + /** + * Describes the managed rule group to override. + */ + ruleGroupName: string; + /** + * List of rules that will be disabled. If none specified, all rules in the group will be + * disabled. + */ + rules?: ManagedRuleOverride[]; +} + +/** + * Defines a managed rule set. */ export interface ManagedRuleSet { /** - * @member {string} ruleSetType Polymorphic Discriminator + * Defines the rule set type to use. */ - ruleSetType: "Unknown"; + ruleSetType: string; /** - * @member {number} [priority] Describes priority of the rule + * Defines the version of the rule set to use. */ - priority?: number; + ruleSetVersion: string; /** - * @member {number} [version] defines version of the ruleset + * 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 - * + * Defines the list of managed rule sets for the policy. */ -export interface ManagedRuleSets { +export interface ManagedRuleSetList { /** - * @member {ManagedRuleSetUnion[]} [ruleSets] List of rules + * List of rule sets. */ - ruleSets?: ManagedRuleSetUnion[]; + managedRuleSets?: ManagedRuleSet[]; +} + +/** + * Defines the Resource ID for a Frontend Endpoint. + */ +export interface FrontendEndpointLink { + /** + * Resource ID. + */ + id?: string; } /** - * @interface - * An interface representing WebApplicationFirewallPolicy1. * Defines web application firewall policy. - * - * @extends Resource */ -export interface WebApplicationFirewallPolicy1 extends Resource { +export interface WebApplicationFirewallPolicy extends Resource { /** - * @member {PolicySettings} [policySettings] Describes policySettings for - * policy + * Describes settings for the policy. */ policySettings?: PolicySettings; /** - * @member {CustomRules} [customRules] Describes custom rules inside the - * policy + * Describes custom rules inside the policy. + */ + customRules?: CustomRuleList; + /** + * Describes managed rules inside the policy. */ - customRules?: CustomRules; + managedRules?: ManagedRuleSetList; /** - * @member {ManagedRuleSets} [managedRules] Describes managed rules inside - * the policy + * 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. - * **NOTE: This property will not be serialized. It can only be populated by - * the server.** + * 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', + * 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.** + * **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. + * Gets a unique read-only string that changes whenever the resource is updated. */ etag?: string; } /** - * @interface - * An interface representing AzureManagedOverrideRuleGroup. - * Defines contents of a web application rule - * + * Describes a managed rule definition. */ -export interface AzureManagedOverrideRuleGroup { +export interface ManagedRuleDefinition { /** - * @member {RuleGroupOverride} ruleGroupOverride Describes overrideruleGroup. - * Possible values include: 'SqlInjection', 'XSS' + * 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' + * 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. - * + * Describes a managed rule group. */ -export interface AzureManagedRuleSet { +export interface ManagedRuleGroupDefinition { /** - * @member {string} ruleSetType Polymorphic Discriminator + * 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 + * 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; + /** + * 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[]; +} + +/** + * Describes the a managed rule set definition. + */ +export interface ManagedRuleSetDefinition extends Resource { + /** + * 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; + /** + * 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 + * 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) + * 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[]; } /** - * @interface * An interface representing FrontDoorManagementClientOptions. - * @extends AzureServiceClientOptions */ export interface FrontDoorManagementClientOptions extends AzureServiceClientOptions { - /** - * @member {string} [baseUri] - */ baseUri?: string; } - /** * @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. - * + * Result of the request to list Front Doors. It contains a list of Front Door objects and a URL + * link to get the next set of results. * @extends Array */ export interface FrontDoorListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of Front Door objects - * if there are any. + * URL to get the next set of Front Door objects if there are any. */ nextLink?: string; } /** * @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. - * + * Result of the request to list Routing Rules. It contains a list of Routing Rule objects and a + * URL link to get the next set of results. * @extends Array */ export interface RoutingRuleListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of RoutingRule objects - * if there are any. + * URL to get the next set of RoutingRule objects if there are any. */ nextLink?: string; } /** * @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. - * + * Result of the request to list HealthProbeSettings. It contains a list of HealthProbeSettings + * objects and a URL link to get the next set of results. * @extends Array */ export interface HealthProbeSettingsListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of HealthProbeSettings - * objects if there are any. + * URL to get the next set of HealthProbeSettings objects if there are any. */ nextLink?: string; } /** * @interface - * An interface representing the LoadBalancingSettingsListResult. - * Result of the request to list load balancing settings. It contains a list of - * load balancing settings objects and a URL link to get the the next set of - * results. - * + * Result of the request to list load balancing settings. It contains a list of load balancing + * settings objects and a URL link to get the next set of results. * @extends Array */ export interface LoadBalancingSettingsListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of - * LoadBalancingSettings objects if there are any. + * URL to get the next set of LoadBalancingSettings objects if there are any. */ nextLink?: string; } /** * @interface - * An interface representing the BackendPoolListResult. - * Result of the request to list Backend Pools. It contains a list of Backend - * Pools objects and a URL link to get the the next set of results. - * + * Result of the request to list Backend Pools. It contains a list of Backend Pools objects and a + * URL link to get the next set of results. * @extends Array */ export interface BackendPoolListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of BackendPool objects - * if there are any. + * URL to get the next set of BackendPool objects if there are any. */ nextLink?: string; } /** * @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. - * + * Result of the request to list frontend endpoints. It contains a list of Frontend endpoint + * objects and a URL link to get the next set of results. * @extends Array */ export interface FrontendEndpointsListResult extends Array { /** - * @member {string} [nextLink] URL to get the next set of frontend endpoints - * if there are any. + * URL to get the next set of frontend endpoints if there are any. */ nextLink?: string; } /** * @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. - * - * @extends Array + * Defines a list of WebApplicationFirewallPolicies. It contains a list of + * WebApplicationFirewallPolicy objects and a URL link to get the next set of results. + * @extends Array + */ +export interface WebApplicationFirewallPolicyList extends Array { + /** + * URL to get the next set of WebApplicationFirewallPolicy objects if there are any. + */ + nextLink?: string; +} + +/** + * @interface + * List of managed rule set definitions available for use in a policy. + * @extends Array */ -export interface WebApplicationFirewallPolicyListResult extends Array { +export interface ManagedRuleSetDefinitionList extends Array { /** - * @member {string} [nextLink] URL to get the next set of - * WebApplicationFirewallPolicy objects if there are any. + * URL to retrieve next set of managed rule set definitions. */ nextLink?: string; } @@ -1371,6 +1239,14 @@ export type FrontDoorTlsProtocolType = 'ServerNameIndication'; */ export type FrontDoorCertificateType = 'Dedicated'; +/** + * Defines values for EnforceCertificateNameCheckEnabledState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type EnforceCertificateNameCheckEnabledState = 'Enabled' | 'Disabled'; + /** * Defines values for FrontDoorEnabledState. * Possible values include: 'Enabled', 'Disabled' @@ -1387,6 +1263,14 @@ export type FrontDoorEnabledState = 'Enabled' | 'Disabled'; */ export type FrontDoorProtocol = 'Http' | 'Https'; +/** + * Defines values for RoutingRuleEnabledState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type RoutingRuleEnabledState = 'Enabled' | 'Disabled'; + /** * Defines values for FrontDoorForwardingProtocol. * Possible values include: 'HttpOnly', 'HttpsOnly', 'MatchRequest' @@ -1411,6 +1295,30 @@ export type FrontDoorQuery = 'StripNone' | 'StripAll'; */ export type DynamicCompressionEnabled = 'Enabled' | 'Disabled'; +/** + * Defines values for FrontDoorRedirectType. + * Possible values include: 'Moved', 'Found', 'TemporaryRedirect', 'PermanentRedirect' + * @readonly + * @enum {string} + */ +export type FrontDoorRedirectType = 'Moved' | 'Found' | 'TemporaryRedirect' | 'PermanentRedirect'; + +/** + * Defines values for FrontDoorRedirectProtocol. + * Possible values include: 'HttpOnly', 'HttpsOnly', 'MatchRequest' + * @readonly + * @enum {string} + */ +export type FrontDoorRedirectProtocol = 'HttpOnly' | 'HttpsOnly' | 'MatchRequest'; + +/** + * Defines values for BackendEnabledState. + * Possible values include: 'Enabled', 'Disabled' + * @readonly + * @enum {string} + */ +export type BackendEnabledState = 'Enabled' | 'Disabled'; + /** * Defines values for SessionAffinityEnabledState. * Possible values include: 'Enabled', 'Disabled' @@ -1445,20 +1353,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 +1385,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. @@ -1531,6 +1447,7 @@ export type CheckFrontDoorNameAvailabilityResponse = CheckNameAvailabilityOutput * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1550,6 +1467,7 @@ export type CheckFrontDoorNameAvailabilityWithSubscriptionResponse = CheckNameAv * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1569,6 +1487,7 @@ export type FrontDoorsListResponse = FrontDoorListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1588,6 +1507,7 @@ export type FrontDoorsListByResourceGroupResponse = FrontDoorListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1607,6 +1527,7 @@ export type FrontDoorsGetResponse = FrontDoor & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1626,6 +1547,7 @@ export type FrontDoorsCreateOrUpdateResponse = FrontDoor & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1645,6 +1567,7 @@ export type FrontDoorsValidateCustomDomainResponse = ValidateCustomDomainOutput * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1664,6 +1587,7 @@ export type FrontDoorsBeginCreateOrUpdateResponse = FrontDoor & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1683,6 +1607,7 @@ export type FrontDoorsListNextResponse = FrontDoorListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1702,6 +1627,7 @@ export type FrontDoorsListByResourceGroupNextResponse = FrontDoorListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1721,6 +1647,7 @@ export type RoutingRulesListByFrontDoorResponse = RoutingRuleListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1740,6 +1667,7 @@ export type RoutingRulesGetResponse = RoutingRule & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1759,6 +1687,7 @@ export type RoutingRulesCreateOrUpdateResponse = RoutingRule & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1778,6 +1707,7 @@ export type RoutingRulesBeginCreateOrUpdateResponse = RoutingRule & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1797,6 +1727,7 @@ export type RoutingRulesListByFrontDoorNextResponse = RoutingRuleListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1816,6 +1747,7 @@ export type HealthProbeSettingsListByFrontDoorResponse = HealthProbeSettingsList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1835,6 +1767,7 @@ export type HealthProbeSettingsGetResponse = HealthProbeSettingsModel & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1854,6 +1787,7 @@ export type HealthProbeSettingsCreateOrUpdateResponse = HealthProbeSettingsModel * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1873,6 +1807,7 @@ export type HealthProbeSettingsBeginCreateOrUpdateResponse = HealthProbeSettings * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1892,6 +1827,7 @@ export type HealthProbeSettingsListByFrontDoorNextResponse = HealthProbeSettings * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1911,6 +1847,7 @@ export type LoadBalancingSettingsListByFrontDoorResponse = LoadBalancingSettings * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1930,6 +1867,7 @@ export type LoadBalancingSettingsGetResponse = LoadBalancingSettingsModel & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1949,6 +1887,7 @@ export type LoadBalancingSettingsCreateOrUpdateResponse = LoadBalancingSettingsM * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1968,6 +1907,7 @@ export type LoadBalancingSettingsBeginCreateOrUpdateResponse = LoadBalancingSett * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -1987,6 +1927,7 @@ export type LoadBalancingSettingsListByFrontDoorNextResponse = LoadBalancingSett * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2006,6 +1947,7 @@ export type BackendPoolsListByFrontDoorResponse = BackendPoolListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2025,6 +1967,7 @@ export type BackendPoolsGetResponse = BackendPool & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2044,6 +1987,7 @@ export type BackendPoolsCreateOrUpdateResponse = BackendPool & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2063,6 +2007,7 @@ export type BackendPoolsBeginCreateOrUpdateResponse = BackendPool & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2082,6 +2027,7 @@ export type BackendPoolsListByFrontDoorNextResponse = BackendPoolListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2101,6 +2047,7 @@ export type FrontendEndpointsListByFrontDoorResponse = FrontendEndpointsListResu * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2120,6 +2067,7 @@ export type FrontendEndpointsGetResponse = FrontendEndpoint & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2139,6 +2087,7 @@ export type FrontendEndpointsCreateOrUpdateResponse = FrontendEndpoint & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2158,6 +2107,7 @@ export type FrontendEndpointsBeginCreateOrUpdateResponse = FrontendEndpoint & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2177,6 +2127,7 @@ export type FrontendEndpointsListByFrontDoorNextResponse = FrontendEndpointsList * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ @@ -2187,7 +2138,7 @@ export type FrontendEndpointsListByFrontDoorNextResponse = FrontendEndpointsList /** * Contains response data for the list operation. */ -export type PoliciesListResponse = WebApplicationFirewallPolicyListResult & { +export type PoliciesListResponse = WebApplicationFirewallPolicyList & { /** * The underlying HTTP response. */ @@ -2196,17 +2147,18 @@ export type PoliciesListResponse = WebApplicationFirewallPolicyListResult & { * The response body as text (string format) */ bodyAsText: string; + /** * 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. */ @@ -2215,17 +2167,58 @@ export type PoliciesGetResponse = WebApplicationFirewallPolicy1 & { * The response body as text (string format) */ bodyAsText: string; + /** * 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. */ @@ -2234,17 +2227,38 @@ export type PoliciesCreateOrUpdateResponse = WebApplicationFirewallPolicy1 & { * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebApplicationFirewallPolicy1; + parsedBody: WebApplicationFirewallPolicyList; + }; +}; + +/** + * Contains response data for the list operation. + */ +export type ManagedRuleSetsListResponse = ManagedRuleSetDefinitionList & { + /** + * 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: ManagedRuleSetDefinitionList; }; }; /** * Contains response data for the listNext operation. */ -export type PoliciesListNextResponse = WebApplicationFirewallPolicyListResult & { +export type ManagedRuleSetsListNextResponse = ManagedRuleSetDefinitionList & { /** * The underlying HTTP response. */ @@ -2253,9 +2267,10 @@ export type PoliciesListNextResponse = WebApplicationFirewallPolicyListResult & * The response body as text (string format) */ bodyAsText: string; + /** * The response body as parsed JSON or XML */ - parsedBody: WebApplicationFirewallPolicyListResult; + parsedBody: ManagedRuleSetDefinitionList; }; }; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/loadBalancingSettingsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/loadBalancingSettingsMappers.ts index 1c135e9f2b7f..6e69a234b5f7 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/loadBalancingSettingsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/loadBalancingSettingsMappers.ts @@ -1,39 +1,44 @@ /* * 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. */ export { discriminators, - LoadBalancingSettingsListResult, - LoadBalancingSettingsModel, - SubResource, + Backend, + BackendPool, + BackendPoolsSettings, BaseResource, - ErrorResponse, - RoutingRule, CacheConfiguration, - HealthProbeSettingsModel, - BackendPool, - Backend, + CustomHttpsConfiguration, + CustomRule, + CustomRuleList, + ErrorResponse, + ForwardingConfiguration, + FrontDoor, FrontendEndpoint, + FrontendEndpointLink, FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, - CustomHttpsConfiguration, + HealthProbeSettingsModel, KeyVaultCertificateSourceParametersVault, - Resource, - WebApplicationFirewallPolicy1, - PolicySettings, - CustomRules, - CustomRule, - MatchCondition1, - ManagedRuleSets, + LoadBalancingSettingsListResult, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, - FrontDoor + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, + WebApplicationFirewallPolicy } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts new file mode 100644 index 000000000000..08ec8c496311 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts @@ -0,0 +1,44 @@ +/* + * 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 { + discriminators, + Backend, + BackendPool, + BackendPoolsSettings, + BaseResource, + CacheConfiguration, + CustomHttpsConfiguration, + CustomRule, + CustomRuleList, + ErrorResponse, + ForwardingConfiguration, + FrontDoor, + FrontendEndpoint, + FrontendEndpointLink, + FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, + HealthProbeSettingsModel, + KeyVaultCertificateSourceParametersVault, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetDefinitionList, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, + WebApplicationFirewallPolicy +} from "../models/mappers"; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts index bf3f8f9f934e..24a3dfe90e72 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts @@ -1,11 +1,9 @@ /* * 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. */ import { CloudErrorMapper, BaseResourceMapper } from "@azure/ms-rest-azure-js"; @@ -135,6 +133,13 @@ export const FrontDoor: msRest.CompositeMapper = { } } }, + backendPoolsSettings: { + serializedName: "properties.backendPoolsSettings", + type: { + name: "Composite", + className: "BackendPoolsSettings" + } + }, enabledState: { serializedName: "properties.enabledState", type: { @@ -222,36 +227,17 @@ export const RoutingRule: msRest.CompositeMapper = { } } }, - customForwardingPath: { - serializedName: "properties.customForwardingPath", - type: { - name: "String" - } - }, - forwardingProtocol: { - serializedName: "properties.forwardingProtocol", + enabledState: { + serializedName: "properties.enabledState", type: { name: "String" } }, - cacheConfiguration: { - serializedName: "properties.cacheConfiguration", + routeConfiguration: { + serializedName: "properties.routeConfiguration", type: { name: "Composite", - className: "CacheConfiguration" - } - }, - backendPool: { - serializedName: "properties.backendPool", - type: { - name: "Composite", - className: "SubResource" - } - }, - enabledState: { - serializedName: "properties.enabledState", - type: { - name: "String" + className: "RouteConfiguration" } }, resourceState: { @@ -569,6 +555,23 @@ export const FrontendEndpoint: msRest.CompositeMapper = { } }; +export const BackendPoolsSettings: msRest.CompositeMapper = { + serializedName: "BackendPoolsSettings", + type: { + name: "Composite", + className: "BackendPoolsSettings", + modelProperties: { + enforceCertificateNameCheck: { + serializedName: "enforceCertificateNameCheck", + defaultValue: 'Enabled', + type: { + name: "String" + } + } + } + } +}; + export const FrontDoorUpdateParameters: msRest.CompositeMapper = { serializedName: "FrontDoorUpdateParameters", type: { @@ -641,6 +644,13 @@ export const FrontDoorUpdateParameters: msRest.CompositeMapper = { } } }, + backendPoolsSettings: { + serializedName: "backendPoolsSettings", + type: { + name: "Composite", + className: "BackendPoolsSettings" + } + }, enabledState: { serializedName: "enabledState", type: { @@ -673,20 +683,20 @@ export const PurgeParameters: msRest.CompositeMapper = { } }; -export const CacheConfiguration: msRest.CompositeMapper = { - serializedName: "CacheConfiguration", +export const RouteConfiguration: msRest.CompositeMapper = { + serializedName: "RouteConfiguration", type: { name: "Composite", - className: "CacheConfiguration", + polymorphicDiscriminator: { + serializedName: "@odata.type", + clientName: "odatatype" + }, + uberParent: "RouteConfiguration", + className: "RouteConfiguration", modelProperties: { - queryParameterStripDirective: { - serializedName: "queryParameterStripDirective", - type: { - name: "String" - } - }, - dynamicCompression: { - serializedName: "dynamicCompression", + odatatype: { + required: true, + serializedName: "@odata\\.type", type: { name: "String" } @@ -735,6 +745,54 @@ export const RoutingRuleUpdateParameters: msRest.CompositeMapper = { } } }, + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, + routeConfiguration: { + serializedName: "routeConfiguration", + type: { + name: "Composite", + className: "RouteConfiguration" + } + } + } + } +}; + +export const CacheConfiguration: msRest.CompositeMapper = { + serializedName: "CacheConfiguration", + type: { + name: "Composite", + className: "CacheConfiguration", + modelProperties: { + queryParameterStripDirective: { + serializedName: "queryParameterStripDirective", + type: { + name: "String" + } + }, + dynamicCompression: { + serializedName: "dynamicCompression", + type: { + name: "String" + } + } + } + } +}; + +export const ForwardingConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: RouteConfiguration.type.polymorphicDiscriminator, + uberParent: "RouteConfiguration", + className: "ForwardingConfiguration", + modelProperties: { + ...RouteConfiguration.type.modelProperties, customForwardingPath: { serializedName: "customForwardingPath", type: { @@ -760,9 +818,52 @@ export const RoutingRuleUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "SubResource" } + } + } + } +}; + +export const RedirectConfiguration: msRest.CompositeMapper = { + serializedName: "#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration", + type: { + name: "Composite", + polymorphicDiscriminator: RouteConfiguration.type.polymorphicDiscriminator, + uberParent: "RouteConfiguration", + className: "RedirectConfiguration", + modelProperties: { + ...RouteConfiguration.type.modelProperties, + redirectType: { + serializedName: "redirectType", + type: { + name: "String" + } }, - enabledState: { - serializedName: "enabledState", + redirectProtocol: { + serializedName: "redirectProtocol", + type: { + name: "String" + } + }, + customHost: { + serializedName: "customHost", + type: { + name: "String" + } + }, + customPath: { + serializedName: "customPath", + type: { + name: "String" + } + }, + customFragment: { + serializedName: "customFragment", + type: { + name: "String" + } + }, + customQueryString: { + serializedName: "customQueryString", type: { name: "String" } @@ -1232,7 +1333,7 @@ export const TagsObject: msRest.CompositeMapper = { }; export const PolicySettings: msRest.CompositeMapper = { - serializedName: "policySettings", + serializedName: "PolicySettings", type: { name: "Composite", className: "PolicySettings", @@ -1248,16 +1349,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 +1418,17 @@ export const MatchCondition1: msRest.CompositeMapper = { } } } + }, + transforms: { + serializedName: "transforms", + type: { + name: "Sequence", + element: { + type: { + name: "String" + } + } + } } } } @@ -1316,13 +1449,6 @@ export const CustomRule: msRest.CompositeMapper = { name: "String" } }, - etag: { - readOnly: true, - serializedName: "etag", - type: { - name: "String" - } - }, priority: { required: true, serializedName: "priority", @@ -1330,6 +1456,12 @@ export const CustomRule: msRest.CompositeMapper = { name: "Number" } }, + enabledState: { + serializedName: "enabledState", + type: { + name: "String" + } + }, ruleType: { required: true, serializedName: "ruleType", @@ -1357,7 +1489,7 @@ export const CustomRule: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "MatchCondition1" + className: "MatchCondition" } } } @@ -1368,14 +1500,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 +1527,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 +1576,7 @@ export const CustomRules: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "CustomRule" + className: "ManagedRuleOverride" } } } @@ -1407,47 +1586,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 +1643,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 +1677,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 +1724,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 +1748,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 +2004,40 @@ export const FrontendEndpointsListResult: msRest.CompositeMapper = { } }; -export const WebApplicationFirewallPolicyListResult: msRest.CompositeMapper = { - serializedName: "WebApplicationFirewallPolicyListResult", +export const WebApplicationFirewallPolicyList: msRest.CompositeMapper = { + serializedName: "WebApplicationFirewallPolicyList", + type: { + name: "Composite", + className: "WebApplicationFirewallPolicyList", + modelProperties: { + value: { + readOnly: true, + serializedName: "", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "WebApplicationFirewallPolicy" + } + } + } + }, + nextLink: { + serializedName: "nextLink", + type: { + name: "String" + } + } + } + } +}; + +export const ManagedRuleSetDefinitionList: msRest.CompositeMapper = { + serializedName: "ManagedRuleSetDefinitionList", type: { name: "Composite", - className: "WebApplicationFirewallPolicyListResult", + className: "ManagedRuleSetDefinitionList", modelProperties: { value: { readOnly: true, @@ -1751,7 +2047,7 @@ export const WebApplicationFirewallPolicyListResult: msRest.CompositeMapper = { element: { type: { name: "Composite", - className: "WebApplicationFirewallPolicy1" + className: "ManagedRuleSetDefinition" } } } @@ -1767,6 +2063,8 @@ export const WebApplicationFirewallPolicyListResult: msRest.CompositeMapper = { }; export const discriminators = { - 'Unknown' : ManagedRuleSet, - 'ManagedRuleSet.AzureManagedRuleSet' : AzureManagedRuleSet + 'RouteConfiguration' : RouteConfiguration, + 'RouteConfiguration.#Microsoft.Azure.FrontDoor.Models.FrontdoorForwardingConfiguration' : ForwardingConfiguration, + 'RouteConfiguration.#Microsoft.Azure.FrontDoor.Models.FrontdoorRedirectConfiguration' : RedirectConfiguration + }; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts b/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts index 4659c84bda06..dc7c5bec48df 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts @@ -20,13 +20,25 @@ export const acceptLanguage: msRest.OperationParameter = { } } }; -export const apiVersion: msRest.OperationQueryParameter = { +export const apiVersion0: msRest.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2018-08-01', + defaultValue: '2019-04-01', + type: { + name: "String" + } + } +}; +export const apiVersion1: msRest.OperationQueryParameter = { + parameterPath: "apiVersion", + mapper: { + required: true, + isConstant: true, + serializedName: "api-version", + defaultValue: '2019-03-01', type: { name: "String" } @@ -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/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts index 2d2008c70b60..e0c8bf075f86 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts @@ -1,40 +1,45 @@ /* * 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. */ export { discriminators, - WebApplicationFirewallPolicyListResult, - WebApplicationFirewallPolicy1, - Resource, + Backend, + BackendPool, + BackendPoolsSettings, BaseResource, - PolicySettings, - CustomRules, + CacheConfiguration, + CloudError, + CustomHttpsConfiguration, CustomRule, - MatchCondition1, - ManagedRuleSets, - ManagedRuleSet, + CustomRuleList, ErrorResponse, - CloudError, + ForwardingConfiguration, FrontDoor, - RoutingRule, - SubResource, - CacheConfiguration, - LoadBalancingSettingsModel, - HealthProbeSettingsModel, - BackendPool, - Backend, FrontendEndpoint, + FrontendEndpointLink, FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, - CustomHttpsConfiguration, + HealthProbeSettingsModel, KeyVaultCertificateSourceParametersVault, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, + ManagedRuleSet, + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + SubResource, + WebApplicationFirewallPolicy, + WebApplicationFirewallPolicyList } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/models/routingRulesMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/routingRulesMappers.ts index ec5458c08756..828db290298a 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/routingRulesMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/routingRulesMappers.ts @@ -1,39 +1,44 @@ /* * 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. */ export { discriminators, - RoutingRuleListResult, - RoutingRule, - SubResource, + Backend, + BackendPool, + BackendPoolsSettings, BaseResource, CacheConfiguration, + CustomHttpsConfiguration, + CustomRule, + CustomRuleList, ErrorResponse, - LoadBalancingSettingsModel, - HealthProbeSettingsModel, - BackendPool, - Backend, + ForwardingConfiguration, + FrontDoor, FrontendEndpoint, + FrontendEndpointLink, FrontendEndpointUpdateParametersWebApplicationFirewallPolicyLink, - CustomHttpsConfiguration, + HealthProbeSettingsModel, KeyVaultCertificateSourceParametersVault, - Resource, - WebApplicationFirewallPolicy1, - PolicySettings, - CustomRules, - CustomRule, - MatchCondition1, - ManagedRuleSets, + LoadBalancingSettingsModel, + ManagedRuleDefinition, + ManagedRuleGroupDefinition, + ManagedRuleGroupOverride, + ManagedRuleOverride, ManagedRuleSet, - AzureManagedRuleSet, - AzureManagedOverrideRuleGroup, - FrontDoor + ManagedRuleSetDefinition, + ManagedRuleSetList, + MatchCondition, + PolicySettings, + RedirectConfiguration, + Resource, + RouteConfiguration, + RoutingRule, + RoutingRuleListResult, + SubResource, + WebApplicationFirewallPolicy } from "../models/mappers"; - diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/backendPools.ts b/sdk/frontdoor/arm-frontdoor/src/operations/backendPools.ts index 93c510c9c385..ecd3e403bb94 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/backendPools.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts b/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts index 8813aec41332..3a1978429a63 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts index 09cbbdc01f4a..431c22010528 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts index 4c175ea66604..d3c804a5ca5f 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/healthProbeSettings.ts b/sdk/frontdoor/arm-frontdoor/src/operations/healthProbeSettings.ts index 4707ef0a6bb5..b8fe394f648c 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/healthProbeSettings.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/index.ts b/sdk/frontdoor/arm-frontdoor/src/operations/index.ts index e5a78429eb54..d95c0f0425f1 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/index.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/loadBalancingSettings.ts b/sdk/frontdoor/arm-frontdoor/src/operations/loadBalancingSettings.ts index 58afe67b9afc..012071cdbe5b 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/loadBalancingSettings.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/managedRuleSets.ts b/sdk/frontdoor/arm-frontdoor/src/operations/managedRuleSets.ts new file mode 100644 index 000000000000..9e6607069fb0 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/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/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts b/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts index de6db51d7dd9..e84cd10454ac 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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 rule set 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 rule set 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/sdk/frontdoor/arm-frontdoor/src/operations/routingRules.ts b/sdk/frontdoor/arm-frontdoor/src/operations/routingRules.ts index 30a70a8b7ce6..a2078ce78e2e 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/routingRules.ts +++ b/sdk/frontdoor/arm-frontdoor/src/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