From cdff3f6653c25a3e7bc26451a16828822bf8fc23 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 23 Mar 2021 07:12:38 +0000 Subject: [PATCH] CodeGen from PR 13574 in Azure/azure-rest-api-specs Merge 6bdf6f7cfb0a43e337c41a2d770aaadd47d367d9 into d253cf9ef249942b23ab380f5da6c61f30cb4985 --- sdk/frontdoor/arm-frontdoor/LICENSE.txt | 2 +- sdk/frontdoor/arm-frontdoor/README.md | 9 +- sdk/frontdoor/arm-frontdoor/rollup.config.js | 4 +- .../src/frontDoorManagementClient.ts | 123 +-------------- .../src/frontDoorManagementClientContext.ts | 5 +- .../src/models/endpointsMappers.ts | 4 +- .../src/models/experimentsMappers.ts | 8 +- .../frontDoorNameAvailabilityMappers.ts | 14 ++ ...NameAvailabilityWithSubscriptionMappers.ts | 14 ++ .../src/models/frontDoorsMappers.ts | 8 +- .../src/models/frontendEndpointsMappers.ts | 8 +- .../arm-frontdoor/src/models/index.ts | 127 +++++++++++++-- .../src/models/managedRuleSetsMappers.ts | 8 +- .../arm-frontdoor/src/models/mappers.ts | 148 ++++++++++++++++-- .../networkExperimentProfilesMappers.ts | 8 +- .../arm-frontdoor/src/models/parameters.ts | 9 +- .../src/models/policiesMappers.ts | 8 +- .../models/preconfiguredEndpointsMappers.ts | 8 +- .../src/models/reportsMappers.ts | 8 +- .../src/models/rulesEnginesMappers.ts | 8 +- .../arm-frontdoor/src/operations/endpoints.ts | 5 +- .../src/operations/experiments.ts | 8 +- .../operations/frontDoorNameAvailability.ts | 84 ++++++++++ ...ontDoorNameAvailabilityWithSubscription.ts | 87 ++++++++++ .../src/operations/frontDoors.ts | 11 +- .../src/operations/frontendEndpoints.ts | 8 +- .../arm-frontdoor/src/operations/index.ts | 7 +- .../src/operations/managedRuleSets.ts | 8 +- .../operations/networkExperimentProfiles.ts | 11 +- .../arm-frontdoor/src/operations/policies.ts | 10 +- .../src/operations/preconfiguredEndpoints.ts | 8 +- .../arm-frontdoor/src/operations/reports.ts | 5 +- .../src/operations/rulesEngines.ts | 8 +- 33 files changed, 585 insertions(+), 206 deletions(-) create mode 100644 sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts create mode 100644 sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts create mode 100644 sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts create mode 100644 sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts diff --git a/sdk/frontdoor/arm-frontdoor/LICENSE.txt b/sdk/frontdoor/arm-frontdoor/LICENSE.txt index ea8fb1516028..2d3163745319 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) 2020 Microsoft +Copyright (c) 2021 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 3714fa555cc1..e80e7dbc4436 100644 --- a/sdk/frontdoor/arm-frontdoor/README.md +++ b/sdk/frontdoor/arm-frontdoor/README.md @@ -15,7 +15,7 @@ npm install @azure/arm-frontdoor ### How to use -#### nodejs - Authentication, client creation and list networkExperimentProfiles as an example written in TypeScript. +#### nodejs - client creation and list networkExperimentProfiles as an example written in TypeScript. ##### Install @azure/ms-rest-nodeauth @@ -26,11 +26,10 @@ npm install @azure/ms-rest-nodeauth@"^3.0.0" ##### Sample code +While the below sample uses the interactive login, other authentication options can be found in the [README.md file of @azure/ms-rest-nodeauth](https://www.npmjs.com/package/@azure/ms-rest-nodeauth) package ```typescript -import * as msRest from "@azure/ms-rest-js"; -import * as msRestAzure from "@azure/ms-rest-azure-js"; -import * as msRestNodeAuth from "@azure/ms-rest-nodeauth"; -import { FrontDoorManagementClient, FrontDoorManagementModels, FrontDoorManagementMappers } from "@azure/arm-frontdoor"; +const msRestNodeAuth = require("@azure/ms-rest-nodeauth"); +const { FrontDoorManagementClient } = require("@azure/arm-frontdoor"); const subscriptionId = process.env["AZURE_SUBSCRIPTION_ID"]; msRestNodeAuth.interactiveLogin().then((creds) => { diff --git a/sdk/frontdoor/arm-frontdoor/rollup.config.js b/sdk/frontdoor/arm-frontdoor/rollup.config.js index 6e3c9e3a47d4..35675b0b4fbf 100644 --- a/sdk/frontdoor/arm-frontdoor/rollup.config.js +++ b/sdk/frontdoor/arm-frontdoor/rollup.config.js @@ -21,8 +21,8 @@ const config = { "@azure/ms-rest-azure-js": "msRestAzure" }, banner: `/* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts index 5388cb4f8e81..46addf6c77ff 100644 --- a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts +++ b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClient.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -11,7 +10,6 @@ import * as msRest from "@azure/ms-rest-js"; import * as Models from "./models"; import * as Mappers from "./models/mappers"; -import * as Parameters from "./models/parameters"; import * as operations from "./operations"; import { FrontDoorManagementClientContext } from "./frontDoorManagementClientContext"; @@ -22,6 +20,8 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { preconfiguredEndpoints: operations.PreconfiguredEndpoints; experiments: operations.Experiments; reports: operations.Reports; + frontDoorNameAvailability: operations.FrontDoorNameAvailability; + frontDoorNameAvailabilityWithSubscription: operations.FrontDoorNameAvailabilityWithSubscription; frontDoors: operations.FrontDoors; frontendEndpoints: operations.FrontendEndpoints; endpoints: operations.Endpoints; @@ -42,6 +42,8 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { this.preconfiguredEndpoints = new operations.PreconfiguredEndpoints(this); this.experiments = new operations.Experiments(this); this.reports = new operations.Reports(this); + this.frontDoorNameAvailability = new operations.FrontDoorNameAvailability(this); + this.frontDoorNameAvailabilityWithSubscription = new operations.FrontDoorNameAvailabilityWithSubscription(this); this.frontDoors = new operations.FrontDoors(this); this.frontendEndpoints = new operations.FrontendEndpoints(this); this.endpoints = new operations.Endpoints(this); @@ -49,122 +51,9 @@ class FrontDoorManagementClient extends FrontDoorManagementClientContext { this.policies = new operations.Policies(this); this.managedRuleSets = new operations.ManagedRuleSets(this); } - - /** - * Check the availability of a Front Door resource name. - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param [options] The optional parameters - * @returns Promise - */ - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param callback The callback - */ - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param options The optional parameters - * @param callback The callback - */ - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkFrontDoorNameAvailability(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - checkFrontDoorNameAvailabilityInput, - options - }, - checkFrontDoorNameAvailabilityOperationSpec, - callback) as Promise; - } - - /** - * Check the availability of a Front Door subdomain. - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param [options] The optional parameters - * @returns Promise - */ - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param callback The callback - */ - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; - /** - * @param checkFrontDoorNameAvailabilityInput Input to check. - * @param options The optional parameters - * @param callback The callback - */ - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; - checkFrontDoorNameAvailabilityWithSubscription(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { - return this.sendOperationRequest( - { - checkFrontDoorNameAvailabilityInput, - options - }, - checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec, - callback) as Promise; - } } // Operation Specifications -const serializer = new msRest.Serializer(Mappers); -const checkFrontDoorNameAvailabilityOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "providers/Microsoft.Network/checkFrontDoorNameAvailability", - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "checkFrontDoorNameAvailabilityInput", - mapper: { - ...Mappers.CheckNameAvailabilityInput, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CheckNameAvailabilityOutput - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; - -const checkFrontDoorNameAvailabilityWithSubscriptionOperationSpec: msRest.OperationSpec = { - httpMethod: "POST", - path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability", - urlParameters: [ - Parameters.subscriptionId - ], - queryParameters: [ - Parameters.apiVersion1 - ], - headerParameters: [ - Parameters.acceptLanguage - ], - requestBody: { - parameterPath: "checkFrontDoorNameAvailabilityInput", - mapper: { - ...Mappers.CheckNameAvailabilityInput, - required: true - } - }, - responses: { - 200: { - bodyMapper: Mappers.CheckNameAvailabilityOutput - }, - default: { - bodyMapper: Mappers.ErrorResponse - } - }, - serializer -}; export { FrontDoorManagementClient, diff --git a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts index cb08f9cfe86d..832c4588bdba 100644 --- a/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts +++ b/sdk/frontdoor/arm-frontdoor/src/frontDoorManagementClientContext.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts index 71c1b3bfbe8c..f7de64ea3989 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/endpointsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. diff --git a/sdk/frontdoor/arm-frontdoor/src/models/experimentsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/experimentsMappers.ts index 66c09ebb11d3..fba4e0ae0679 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/experimentsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/experimentsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -48,10 +48,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts new file mode 100644 index 000000000000..36733fea854f --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts new file mode 100644 index 000000000000..36733fea854f --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorNameAvailabilityWithSubscriptionMappers.ts @@ -0,0 +1,14 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * Code generated by Microsoft (R) AutoRest Code Generator. + * Changes may cause incorrect behavior and will be lost if the code is regenerated. + */ + +export { + discriminators, + CheckNameAvailabilityInput, + CheckNameAvailabilityOutput, + ErrorResponse +} from "../models/mappers"; diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts index 2da88499e759..f53d89ceeab0 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontDoorsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -47,10 +47,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts index e01f0f6bf186..d5bd000f94ef 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/frontendEndpointsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -47,10 +47,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/index.ts b/sdk/frontdoor/arm-frontdoor/src/models/index.ts index 2a6e256159df..6ad372e0e82d 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/index.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/index.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -521,6 +521,10 @@ export interface RoutingRule extends SubResource { * A reference to a specific Rules Engine Configuration to apply to this route. */ rulesEngine?: SubResource; + /** + * Defines the Web Application Firewall policy for each routing rule (if applicable) + */ + webApplicationFirewallPolicyLink?: RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink; /** * Resource status. Possible values include: 'Creating', 'Enabling', 'Enabled', 'Disabling', * 'Disabled', 'Deleting' @@ -842,6 +846,16 @@ export interface RouteConfiguration { odatatype: "RouteConfiguration"; } +/** + * Defines the Web Application Firewall policy for each routing rule (if applicable) + */ +export interface RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink { + /** + * Resource ID. + */ + id?: string; +} + /** * Routing rules to apply to an endpoint */ @@ -871,6 +885,10 @@ export interface RoutingRuleUpdateParameters { * A reference to a specific Rules Engine Configuration to apply to this route. */ rulesEngine?: SubResource; + /** + * Defines the Web Application Firewall policy for each routing rule (if applicable) + */ + webApplicationFirewallPolicyLink?: RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink; } /** @@ -982,6 +1000,16 @@ export interface Backend { * backend is 'Private' */ privateLinkAlias?: string; + /** + * The Resource Id of the Private Link resource. Populating this optional field indicates that + * this backend is 'Private' + */ + privateLinkResourceId?: string; + /** + * The location of the Private Link resource. Required only if 'privateLinkResourceId' is + * populated + */ + privateLinkLocation?: string; /** * The Approval status for the connection to the Private Link. Possible values include: * 'Pending', 'Approved', 'Rejected', 'Disconnected', 'Timeout' @@ -1376,6 +1404,11 @@ export interface PolicySettings { * specified in base64 encoding. */ customBlockResponseBody?: string; + /** + * Describes if policy managed rules will inspect the request body content. Possible values + * include: 'Disabled', 'Enabled' + */ + requestBodyCheck?: PolicyRequestBodyCheck; } /** @@ -1470,7 +1503,8 @@ export interface CustomRuleList { export interface ManagedRuleExclusion { /** * The variable type to be excluded. Possible values include: 'RequestHeaderNames', - * 'RequestCookieNames', 'QueryStringArgNames', 'RequestBodyPostArgNames' + * 'RequestCookieNames', 'QueryStringArgNames', 'RequestBodyPostArgNames', + * 'RequestBodyJsonArgNames' */ matchVariable: ManagedRuleExclusionMatchVariable; /** @@ -1540,6 +1574,10 @@ export interface ManagedRuleSet { * Defines the version of the rule set to use. */ ruleSetVersion: string; + /** + * Possible values include: 'Block', 'Log', 'Redirect' + */ + ruleSetAction?: ManagedRuleSetActionType; /** * Describes the exclusions that are applied to all rules in the set. */ @@ -1570,6 +1608,37 @@ export interface FrontendEndpointLink { id?: string; } +/** + * Defines the Resource ID for a Routing Rule. + */ +export interface RoutingRuleLink { + /** + * Resource ID. + */ + id?: string; +} + +/** + * Defines the Resource ID for a Security Policy. + */ +export interface SecurityPolicyLink { + /** + * Resource ID. + */ + id?: string; +} + +/** + * The pricing tier of the web application firewall policy. + */ +export interface Sku { + /** + * Name of the pricing tier. Possible values include: 'Classic_AzureFrontDoor', + * 'Standard_AzureFrontDoor', 'Premium_AzureFrontDoor' + */ + name?: SkuName; +} + /** * Defines web application firewall policy. */ @@ -1591,6 +1660,16 @@ export interface WebApplicationFirewallPolicy extends Resource { * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly frontendEndpointLinks?: FrontendEndpointLink[]; + /** + * Describes Routing Rules associated with this Web Application Firewall policy. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly routingRuleLinks?: RoutingRuleLink[]; + /** + * Describes Security Policy associated with this Web Application Firewall policy. + * **NOTE: This property will not be serialized. It can only be populated by the server.** + */ + readonly securityPolicyLinks?: SecurityPolicyLink[]; /** * Provisioning state of the policy. * **NOTE: This property will not be serialized. It can only be populated by the server.** @@ -1606,6 +1685,11 @@ export interface WebApplicationFirewallPolicy extends Resource { * Gets a unique read-only string that changes whenever the resource is updated. */ etag?: string; + /** + * The pricing tier of web application firewall policy. Defaults to Classic_AzureFrontDoor if not + * specified. + */ + sku?: Sku; } /** @@ -2116,6 +2200,14 @@ export type PolicyEnabledState = 'Disabled' | 'Enabled'; */ export type PolicyMode = 'Prevention' | 'Detection'; +/** + * Defines values for PolicyRequestBodyCheck. + * Possible values include: 'Disabled', 'Enabled' + * @readonly + * @enum {string} + */ +export type PolicyRequestBodyCheck = 'Disabled' | 'Enabled'; + /** * Defines values for CustomRuleEnabledState. * Possible values include: 'Disabled', 'Enabled' @@ -2167,14 +2259,22 @@ export type TransformType = 'Lowercase' | 'Uppercase' | 'Trim' | 'UrlDecode' | ' */ export type ActionType = 'Allow' | 'Block' | 'Log' | 'Redirect'; +/** + * Defines values for ManagedRuleSetActionType. + * Possible values include: 'Block', 'Log', 'Redirect' + * @readonly + * @enum {string} + */ +export type ManagedRuleSetActionType = 'Block' | 'Log' | 'Redirect'; + /** * Defines values for ManagedRuleExclusionMatchVariable. * Possible values include: 'RequestHeaderNames', 'RequestCookieNames', 'QueryStringArgNames', - * 'RequestBodyPostArgNames' + * 'RequestBodyPostArgNames', 'RequestBodyJsonArgNames' * @readonly * @enum {string} */ -export type ManagedRuleExclusionMatchVariable = 'RequestHeaderNames' | 'RequestCookieNames' | 'QueryStringArgNames' | 'RequestBodyPostArgNames'; +export type ManagedRuleExclusionMatchVariable = 'RequestHeaderNames' | 'RequestCookieNames' | 'QueryStringArgNames' | 'RequestBodyPostArgNames' | 'RequestBodyJsonArgNames'; /** * Defines values for ManagedRuleExclusionSelectorMatchOperator. @@ -2200,6 +2300,15 @@ export type ManagedRuleEnabledState = 'Disabled' | 'Enabled'; */ export type PolicyResourceState = 'Creating' | 'Enabling' | 'Enabled' | 'Disabling' | 'Disabled' | 'Deleting'; +/** + * Defines values for SkuName. + * Possible values include: 'Classic_AzureFrontDoor', 'Standard_AzureFrontDoor', + * 'Premium_AzureFrontDoor' + * @readonly + * @enum {string} + */ +export type SkuName = 'Classic_AzureFrontDoor' | 'Standard_AzureFrontDoor' | 'Premium_AzureFrontDoor'; + /** * Defines values for LatencyScorecardAggregationInterval. * Possible values include: 'Daily', 'Weekly', 'Monthly' @@ -2617,9 +2726,9 @@ export type ReportsGetTimeseriesResponse = Timeseries & { }; /** - * Contains response data for the checkFrontDoorNameAvailability operation. + * Contains response data for the check operation. */ -export type CheckFrontDoorNameAvailabilityResponse = CheckNameAvailabilityOutput & { +export type FrontDoorNameAvailabilityCheckResponse = CheckNameAvailabilityOutput & { /** * The underlying HTTP response. */ @@ -2637,9 +2746,9 @@ export type CheckFrontDoorNameAvailabilityResponse = CheckNameAvailabilityOutput }; /** - * Contains response data for the checkFrontDoorNameAvailabilityWithSubscription operation. + * Contains response data for the check operation. */ -export type CheckFrontDoorNameAvailabilityWithSubscriptionResponse = CheckNameAvailabilityOutput & { +export type FrontDoorNameAvailabilityWithSubscriptionCheckResponse = CheckNameAvailabilityOutput & { /** * The underlying HTTP response. */ diff --git a/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts index 4f81f0a2035f..eec79d1a5b7c 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/managedRuleSetsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -47,10 +47,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts index cf91b00d42d1..d8748cc41d65 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/mappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -901,6 +901,13 @@ export const RoutingRule: msRest.CompositeMapper = { className: "SubResource" } }, + webApplicationFirewallPolicyLink: { + serializedName: "properties.webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: "RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink" + } + }, resourceState: { serializedName: "properties.resourceState", type: { @@ -1428,6 +1435,22 @@ export const RouteConfiguration: msRest.CompositeMapper = { } }; +export const RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink: msRest.CompositeMapper = { + serializedName: "RoutingRuleUpdateParameters_webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: "RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + export const RoutingRuleUpdateParameters: msRest.CompositeMapper = { serializedName: "RoutingRuleUpdateParameters", type: { @@ -1487,6 +1510,13 @@ export const RoutingRuleUpdateParameters: msRest.CompositeMapper = { name: "Composite", className: "SubResource" } + }, + webApplicationFirewallPolicyLink: { + serializedName: "webApplicationFirewallPolicyLink", + type: { + name: "Composite", + className: "RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink" + } } } } @@ -1632,18 +1662,23 @@ export const Backend: msRest.CompositeMapper = { name: "String" } }, + privateLinkResourceId: { + serializedName: "privateLinkResourceId", + type: { + name: "String" + } + }, + privateLinkLocation: { + serializedName: "privateLinkLocation", + type: { + name: "String" + } + }, privateEndpointStatus: { readOnly: true, serializedName: "privateEndpointStatus", type: { - name: "Enum", - allowedValues: [ - "Pending", - "Approved", - "Rejected", - "Disconnected", - "Timeout" - ] + name: "String" } }, privateLinkApprovalMessage: { @@ -2298,6 +2333,12 @@ export const PolicySettings: msRest.CompositeMapper = { type: { name: "String" } + }, + requestBodyCheck: { + serializedName: "requestBodyCheck", + type: { + name: "String" + } } } } @@ -2595,6 +2636,12 @@ export const ManagedRuleSet: msRest.CompositeMapper = { name: "String" } }, + ruleSetAction: { + serializedName: "ruleSetAction", + type: { + name: "String" + } + }, exclusions: { serializedName: "exclusions", type: { @@ -2661,6 +2708,54 @@ export const FrontendEndpointLink: msRest.CompositeMapper = { } }; +export const RoutingRuleLink: msRest.CompositeMapper = { + serializedName: "RoutingRuleLink", + type: { + name: "Composite", + className: "RoutingRuleLink", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const SecurityPolicyLink: msRest.CompositeMapper = { + serializedName: "SecurityPolicyLink", + type: { + name: "Composite", + className: "SecurityPolicyLink", + modelProperties: { + id: { + serializedName: "id", + type: { + name: "String" + } + } + } + } +}; + +export const Sku: msRest.CompositeMapper = { + serializedName: "Sku", + type: { + name: "Composite", + className: "Sku", + modelProperties: { + name: { + serializedName: "name", + type: { + name: "String" + } + } + } + } +}; + export const WebApplicationFirewallPolicy: msRest.CompositeMapper = { serializedName: "WebApplicationFirewallPolicy", type: { @@ -2702,6 +2797,32 @@ export const WebApplicationFirewallPolicy: msRest.CompositeMapper = { } } }, + routingRuleLinks: { + readOnly: true, + serializedName: "properties.routingRuleLinks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "RoutingRuleLink" + } + } + } + }, + securityPolicyLinks: { + readOnly: true, + serializedName: "properties.securityPolicyLinks", + type: { + name: "Sequence", + element: { + type: { + name: "Composite", + className: "SecurityPolicyLink" + } + } + } + }, provisioningState: { readOnly: true, serializedName: "properties.provisioningState", @@ -2721,6 +2842,13 @@ export const WebApplicationFirewallPolicy: msRest.CompositeMapper = { type: { name: "String" } + }, + sku: { + serializedName: "sku", + type: { + name: "Composite", + className: "Sku" + } } } } diff --git a/sdk/frontdoor/arm-frontdoor/src/models/networkExperimentProfilesMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/networkExperimentProfilesMappers.ts index 2ddd3947da3d..e9a1931c3ec4 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/networkExperimentProfilesMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/networkExperimentProfilesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -48,10 +48,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts b/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts index 70836d18cf88..9e328aab8046 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/parameters.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -48,7 +47,7 @@ export const apiVersion1: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2020-01-01', + defaultValue: '2020-05-01', type: { name: "String" } @@ -60,7 +59,7 @@ export const apiVersion2: msRest.OperationQueryParameter = { required: true, isConstant: true, serializedName: "api-version", - defaultValue: '2019-10-01', + defaultValue: '2020-11-01', type: { name: "String" } diff --git a/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts index c5dbca62c385..1d29025c35ac 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/policiesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -47,10 +47,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/preconfiguredEndpointsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/preconfiguredEndpointsMappers.ts index b13b4598634b..6aa444f6caf0 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/preconfiguredEndpointsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/preconfiguredEndpointsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -47,10 +47,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/reportsMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/reportsMappers.ts index 3df4446229f9..75e41700e816 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/reportsMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/reportsMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -46,10 +46,14 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/models/rulesEnginesMappers.ts b/sdk/frontdoor/arm-frontdoor/src/models/rulesEnginesMappers.ts index 121ac12f0039..218f1366bdfd 100644 --- a/sdk/frontdoor/arm-frontdoor/src/models/rulesEnginesMappers.ts +++ b/sdk/frontdoor/arm-frontdoor/src/models/rulesEnginesMappers.ts @@ -1,6 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. @@ -46,11 +46,15 @@ export { Resource, RouteConfiguration, RoutingRule, + RoutingRuleLink, + RoutingRuleUpdateParametersWebApplicationFirewallPolicyLink, RulesEngine, RulesEngineAction, RulesEngineListResult, RulesEngineMatchCondition, RulesEngineRule, + SecurityPolicyLink, + Sku, SubResource, Timeseries, TimeseriesDataPoint, diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts b/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts index a992846b4ea0..5718792216d2 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/endpoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/experiments.ts b/sdk/frontdoor/arm-frontdoor/src/operations/experiments.ts index 5a63862cc381..e9cc55a8d0e5 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/experiments.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/experiments.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -392,6 +391,9 @@ const listByProfileNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts new file mode 100644 index 000000000000..65f3c89785d6 --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailability.ts @@ -0,0 +1,84 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/frontDoorNameAvailabilityMappers"; +import * as Parameters from "../models/parameters"; +import { FrontDoorManagementClientContext } from "../frontDoorManagementClientContext"; + +/** Class representing a FrontDoorNameAvailability. */ +export class FrontDoorNameAvailability { + private readonly client: FrontDoorManagementClientContext; + + /** + * Create a FrontDoorNameAvailability. + * @param {FrontDoorManagementClientContext} client Reference to the service client. + */ + constructor(client: FrontDoorManagementClientContext) { + this.client = client; + } + + /** + * Check the availability of a Front Door resource name. + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param [options] The optional parameters + * @returns Promise + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param options The optional parameters + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + checkFrontDoorNameAvailabilityInput, + options + }, + checkOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "providers/Microsoft.Network/checkFrontDoorNameAvailability", + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkFrontDoorNameAvailabilityInput", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts new file mode 100644 index 000000000000..9296a95f53bc --- /dev/null +++ b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoorNameAvailabilityWithSubscription.ts @@ -0,0 +1,87 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. + * + * 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/frontDoorNameAvailabilityWithSubscriptionMappers"; +import * as Parameters from "../models/parameters"; +import { FrontDoorManagementClientContext } from "../frontDoorManagementClientContext"; + +/** Class representing a FrontDoorNameAvailabilityWithSubscription. */ +export class FrontDoorNameAvailabilityWithSubscription { + private readonly client: FrontDoorManagementClientContext; + + /** + * Create a FrontDoorNameAvailabilityWithSubscription. + * @param {FrontDoorManagementClientContext} client Reference to the service client. + */ + constructor(client: FrontDoorManagementClientContext) { + this.client = client; + } + + /** + * Check the availability of a Front Door subdomain. + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param [options] The optional parameters + * @returns Promise + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase): Promise; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, callback: msRest.ServiceCallback): void; + /** + * @param checkFrontDoorNameAvailabilityInput Input to check. + * @param options The optional parameters + * @param callback The callback + */ + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback): void; + check(checkFrontDoorNameAvailabilityInput: Models.CheckNameAvailabilityInput, options?: msRest.RequestOptionsBase | msRest.ServiceCallback, callback?: msRest.ServiceCallback): Promise { + return this.client.sendOperationRequest( + { + checkFrontDoorNameAvailabilityInput, + options + }, + checkOperationSpec, + callback) as Promise; + } +} + +// Operation Specifications +const serializer = new msRest.Serializer(Mappers); +const checkOperationSpec: msRest.OperationSpec = { + httpMethod: "POST", + path: "subscriptions/{subscriptionId}/providers/Microsoft.Network/checkFrontDoorNameAvailability", + urlParameters: [ + Parameters.subscriptionId + ], + queryParameters: [ + Parameters.apiVersion1 + ], + headerParameters: [ + Parameters.acceptLanguage + ], + requestBody: { + parameterPath: "checkFrontDoorNameAvailabilityInput", + mapper: { + ...Mappers.CheckNameAvailabilityInput, + required: true + } + }, + responses: { + 200: { + bodyMapper: Mappers.CheckNameAvailabilityOutput + }, + default: { + bodyMapper: Mappers.ErrorResponse + } + }, + serializer +}; diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts index 951f53de9255..62edae4a85d8 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/frontDoors.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -445,6 +444,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -466,6 +468,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts b/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts index 80d27042ad7b..466266329b5a 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/frontendEndpoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -310,6 +309,9 @@ const listByFrontDoorNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/index.ts b/sdk/frontdoor/arm-frontdoor/src/operations/index.ts index 3b7a5c55a765..d27c8701f7ea 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/index.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/index.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -12,6 +11,8 @@ export * from "./networkExperimentProfiles"; export * from "./preconfiguredEndpoints"; export * from "./experiments"; export * from "./reports"; +export * from "./frontDoorNameAvailability"; +export * from "./frontDoorNameAvailabilityWithSubscription"; export * from "./frontDoors"; export * from "./frontendEndpoints"; export * from "./endpoints"; diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/managedRuleSets.ts b/sdk/frontdoor/arm-frontdoor/src/operations/managedRuleSets.ts index b5c28c6a5356..3ccfe84c4d07 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/managedRuleSets.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/managedRuleSets.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -111,6 +110,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion2 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/networkExperimentProfiles.ts b/sdk/frontdoor/arm-frontdoor/src/operations/networkExperimentProfiles.ts index c99b0a36d18a..b354f0126347 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/networkExperimentProfiles.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/networkExperimentProfiles.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -445,6 +444,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], @@ -466,6 +468,9 @@ const listByResourceGroupNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts b/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts index 5e6188f3943d..75d3168a22fd 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/policies.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -183,7 +182,7 @@ export class Policies { const serializer = new msRest.Serializer(Mappers); const listOperationSpec: msRest.OperationSpec = { httpMethod: "GET", - path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies", + path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies", urlParameters: [ Parameters.resourceGroupName, Parameters.subscriptionId @@ -300,6 +299,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion2 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/preconfiguredEndpoints.ts b/sdk/frontdoor/arm-frontdoor/src/operations/preconfiguredEndpoints.ts index ec4f3e16e6ee..54c9ddf827e1 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/preconfiguredEndpoints.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/preconfiguredEndpoints.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -121,6 +120,9 @@ const listNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion0 + ], headerParameters: [ Parameters.acceptLanguage ], diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/reports.ts b/sdk/frontdoor/arm-frontdoor/src/operations/reports.ts index 72774629453c..9df9e58e8a94 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/reports.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/reports.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is diff --git a/sdk/frontdoor/arm-frontdoor/src/operations/rulesEngines.ts b/sdk/frontdoor/arm-frontdoor/src/operations/rulesEngines.ts index 3e409bfeabb2..1d8457d21e00 100644 --- a/sdk/frontdoor/arm-frontdoor/src/operations/rulesEngines.ts +++ b/sdk/frontdoor/arm-frontdoor/src/operations/rulesEngines.ts @@ -1,7 +1,6 @@ /* - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt in the project root for - * license information. + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is @@ -321,6 +320,9 @@ const listByFrontDoorNextOperationSpec: msRest.OperationSpec = { urlParameters: [ Parameters.nextPageLink ], + queryParameters: [ + Parameters.apiVersion1 + ], headerParameters: [ Parameters.acceptLanguage ],