@azure/arm-frontdoor 3.1.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/LICENSE +21 -0
- package/LICENSE.txt +1 -1
- package/README.md +75 -73
- package/dist/index.js +6728 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/frontDoorManagementClient.d.ts +29 -0
- package/dist-esm/src/frontDoorManagementClient.d.ts.map +1 -0
- package/dist-esm/src/frontDoorManagementClient.js +62 -0
- package/dist-esm/src/frontDoorManagementClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +2380 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +399 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +93 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +3048 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +36 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +316 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/endpoints.d.ts +34 -0
- package/dist-esm/src/operations/endpoints.d.ts.map +1 -0
- package/dist-esm/src/operations/endpoints.js +106 -0
- package/dist-esm/src/operations/endpoints.js.map +1 -0
- package/dist-esm/src/operations/experiments.d.ts +99 -0
- package/dist-esm/src/operations/experiments.d.ts.map +1 -0
- package/dist-esm/src/operations/experiments.js +417 -0
- package/dist-esm/src/operations/experiments.js.map +1 -0
- package/dist-esm/src/operations/frontDoorNameAvailability.d.ts +19 -0
- package/dist-esm/src/operations/frontDoorNameAvailability.d.ts.map +1 -0
- package/dist-esm/src/operations/frontDoorNameAvailability.js +49 -0
- package/dist-esm/src/operations/frontDoorNameAvailability.js.map +1 -0
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.d.ts +19 -0
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.d.ts.map +1 -0
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.js +49 -0
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.js.map +1 -0
- package/dist-esm/src/operations/frontDoors.d.ts +100 -0
- package/dist-esm/src/operations/frontDoors.d.ts.map +1 -0
- package/dist-esm/src/operations/frontDoors.js +453 -0
- package/dist-esm/src/operations/frontDoors.js.map +1 -0
- package/dist-esm/src/operations/frontendEndpoints.d.ts +81 -0
- package/dist-esm/src/operations/frontendEndpoints.d.ts.map +1 -0
- package/dist-esm/src/operations/frontendEndpoints.js +331 -0
- package/dist-esm/src/operations/frontendEndpoints.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +13 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +20 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/managedRuleSets.d.ts +32 -0
- package/dist-esm/src/operations/managedRuleSets.d.ts.map +1 -0
- package/dist-esm/src/operations/managedRuleSets.js +124 -0
- package/dist-esm/src/operations/managedRuleSets.js.map +1 -0
- package/dist-esm/src/operations/networkExperimentProfiles.d.ts +107 -0
- package/dist-esm/src/operations/networkExperimentProfiles.d.ts.map +1 -0
- package/dist-esm/src/operations/networkExperimentProfiles.js +500 -0
- package/dist-esm/src/operations/networkExperimentProfiles.js.map +1 -0
- package/dist-esm/src/operations/policies.d.ts +73 -0
- package/dist-esm/src/operations/policies.d.ts.map +1 -0
- package/dist-esm/src/operations/policies.js +309 -0
- package/dist-esm/src/operations/policies.js.map +1 -0
- package/dist-esm/src/operations/preconfiguredEndpoints.d.ts +38 -0
- package/dist-esm/src/operations/preconfiguredEndpoints.d.ts.map +1 -0
- package/dist-esm/src/operations/preconfiguredEndpoints.js +137 -0
- package/dist-esm/src/operations/preconfiguredEndpoints.js.map +1 -0
- package/dist-esm/src/operations/reports.d.ts +34 -0
- package/dist-esm/src/operations/reports.d.ts.map +1 -0
- package/dist-esm/src/operations/reports.js +120 -0
- package/dist-esm/src/operations/reports.js.map +1 -0
- package/dist-esm/src/operations/rulesEngines.d.ts +83 -0
- package/dist-esm/src/operations/rulesEngines.d.ts.map +1 -0
- package/dist-esm/src/operations/rulesEngines.js +341 -0
- package/dist-esm/src/operations/rulesEngines.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/endpoints.d.ts +26 -0
- package/dist-esm/src/operationsInterfaces/endpoints.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/endpoints.js +9 -0
- package/dist-esm/src/operationsInterfaces/endpoints.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/experiments.d.ts +74 -0
- package/dist-esm/src/operationsInterfaces/experiments.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/experiments.js +9 -0
- package/dist-esm/src/operationsInterfaces/experiments.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailability.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailability.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailability.js +9 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailability.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailabilityWithSubscription.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailabilityWithSubscription.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailabilityWithSubscription.js +9 -0
- package/dist-esm/src/operationsInterfaces/frontDoorNameAvailabilityWithSubscription.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontDoors.d.ts +64 -0
- package/dist-esm/src/operationsInterfaces/frontDoors.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontDoors.js +9 -0
- package/dist-esm/src/operationsInterfaces/frontDoors.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontendEndpoints.d.ts +56 -0
- package/dist-esm/src/operationsInterfaces/frontendEndpoints.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/frontendEndpoints.js +9 -0
- package/dist-esm/src/operationsInterfaces/frontendEndpoints.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +20 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/managedRuleSets.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/managedRuleSets.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/managedRuleSets.js +9 -0
- package/dist-esm/src/operationsInterfaces/managedRuleSets.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/networkExperimentProfiles.d.ts +71 -0
- package/dist-esm/src/operationsInterfaces/networkExperimentProfiles.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/networkExperimentProfiles.js +9 -0
- package/dist-esm/src/operationsInterfaces/networkExperimentProfiles.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/policies.d.ts +50 -0
- package/dist-esm/src/operationsInterfaces/policies.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/policies.js +9 -0
- package/dist-esm/src/operationsInterfaces/policies.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/preconfiguredEndpoints.d.ts +13 -0
- package/dist-esm/src/operationsInterfaces/preconfiguredEndpoints.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/preconfiguredEndpoints.js +9 -0
- package/dist-esm/src/operationsInterfaces/preconfiguredEndpoints.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/reports.d.ts +26 -0
- package/dist-esm/src/operationsInterfaces/reports.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/reports.js +9 -0
- package/dist-esm/src/operationsInterfaces/reports.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/rulesEngines.d.ts +58 -0
- package/dist-esm/src/operationsInterfaces/rulesEngines.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/rulesEngines.js +9 -0
- package/dist-esm/src/operationsInterfaces/rulesEngines.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +70 -34
- package/review/arm-frontdoor.api.md +1910 -0
- package/rollup.config.js +184 -27
- package/src/frontDoorManagementClient.ts +124 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +2676 -0
- package/src/models/mappers.ts +3311 -0
- package/src/models/parameters.ts +367 -0
- package/src/operations/endpoints.ts +150 -0
- package/src/operations/experiments.ts +608 -0
- package/src/operations/frontDoorNameAvailability.ts +68 -0
- package/src/operations/frontDoorNameAvailabilityWithSubscription.ts +69 -0
- package/src/operations/frontDoors.ts +594 -0
- package/src/operations/frontendEndpoints.ts +471 -0
- package/src/operations/index.ts +20 -0
- package/src/operations/managedRuleSets.ts +142 -0
- package/src/operations/networkExperimentProfiles.ts +672 -0
- package/src/operations/policies.ts +425 -0
- package/src/operations/preconfiguredEndpoints.ts +177 -0
- package/src/operations/reports.ts +160 -0
- package/src/operations/rulesEngines.ts +486 -0
- package/src/operationsInterfaces/endpoints.ts +47 -0
- package/src/operationsInterfaces/experiments.ts +147 -0
- package/src/operationsInterfaces/frontDoorNameAvailability.ts +26 -0
- package/src/operationsInterfaces/frontDoorNameAvailabilityWithSubscription.ts +26 -0
- package/src/operationsInterfaces/frontDoors.ts +122 -0
- package/src/operationsInterfaces/frontendEndpoints.ts +104 -0
- package/src/operationsInterfaces/index.ts +20 -0
- package/src/operationsInterfaces/managedRuleSets.ts +25 -0
- package/src/operationsInterfaces/networkExperimentProfiles.ts +139 -0
- package/src/operationsInterfaces/policies.ts +97 -0
- package/src/operationsInterfaces/preconfiguredEndpoints.ts +29 -0
- package/src/operationsInterfaces/reports.ts +57 -0
- package/src/operationsInterfaces/rulesEngines.ts +111 -0
- package/tsconfig.json +4 -4
- package/types/arm-frontdoor.d.ts +3127 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-frontdoor.js +0 -4289
- package/dist/arm-frontdoor.js.map +0 -1
- package/dist/arm-frontdoor.min.js +0 -1
- package/dist/arm-frontdoor.min.js.map +0 -1
- package/esm/frontDoorManagementClient.d.ts +0 -62
- package/esm/frontDoorManagementClient.d.ts.map +0 -1
- package/esm/frontDoorManagementClient.js +0 -105
- package/esm/frontDoorManagementClient.js.map +0 -1
- package/esm/frontDoorManagementClientContext.d.ts +0 -16
- package/esm/frontDoorManagementClientContext.d.ts.map +0 -1
- package/esm/frontDoorManagementClientContext.js +0 -56
- package/esm/frontDoorManagementClientContext.js.map +0 -1
- package/esm/models/backendPoolsMappers.d.ts +0 -2
- package/esm/models/backendPoolsMappers.d.ts.map +0 -1
- package/esm/models/backendPoolsMappers.js +0 -11
- package/esm/models/backendPoolsMappers.js.map +0 -1
- package/esm/models/endpointsMappers.d.ts +0 -2
- package/esm/models/endpointsMappers.d.ts.map +0 -1
- package/esm/models/endpointsMappers.js +0 -11
- package/esm/models/endpointsMappers.js.map +0 -1
- package/esm/models/frontDoorsMappers.d.ts +0 -2
- package/esm/models/frontDoorsMappers.d.ts.map +0 -1
- package/esm/models/frontDoorsMappers.js +0 -11
- package/esm/models/frontDoorsMappers.js.map +0 -1
- package/esm/models/frontendEndpointsMappers.d.ts +0 -2
- package/esm/models/frontendEndpointsMappers.d.ts.map +0 -1
- package/esm/models/frontendEndpointsMappers.js +0 -11
- package/esm/models/frontendEndpointsMappers.js.map +0 -1
- package/esm/models/healthProbeSettingsMappers.d.ts +0 -2
- package/esm/models/healthProbeSettingsMappers.d.ts.map +0 -1
- package/esm/models/healthProbeSettingsMappers.js +0 -11
- package/esm/models/healthProbeSettingsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -2143
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -10
- package/esm/models/index.js.map +0 -1
- package/esm/models/loadBalancingSettingsMappers.d.ts +0 -2
- package/esm/models/loadBalancingSettingsMappers.d.ts.map +0 -1
- package/esm/models/loadBalancingSettingsMappers.js +0 -11
- package/esm/models/loadBalancingSettingsMappers.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -53
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -1653
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -15
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -181
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/policiesMappers.d.ts +0 -2
- package/esm/models/policiesMappers.d.ts.map +0 -1
- package/esm/models/policiesMappers.js +0 -11
- package/esm/models/policiesMappers.js.map +0 -1
- package/esm/models/routingRulesMappers.d.ts +0 -2
- package/esm/models/routingRulesMappers.d.ts.map +0 -1
- package/esm/models/routingRulesMappers.js +0 -11
- package/esm/models/routingRulesMappers.js.map +0 -1
- package/esm/operations/backendPools.d.ts +0 -115
- package/esm/operations/backendPools.d.ts.map +0 -1
- package/esm/operations/backendPools.js +0 -236
- package/esm/operations/backendPools.js.map +0 -1
- package/esm/operations/endpoints.d.ts +0 -36
- package/esm/operations/endpoints.d.ts.map +0 -1
- package/esm/operations/endpoints.js +0 -87
- package/esm/operations/endpoints.js.map +0 -1
- package/esm/operations/frontDoors.d.ts +0 -165
- package/esm/operations/frontDoors.d.ts.map +0 -1
- package/esm/operations/frontDoors.js +0 -315
- package/esm/operations/frontDoors.js.map +0 -1
- package/esm/operations/frontendEndpoints.d.ts +0 -153
- package/esm/operations/frontendEndpoints.d.ts.map +0 -1
- package/esm/operations/frontendEndpoints.js +0 -347
- package/esm/operations/frontendEndpoints.js.map +0 -1
- package/esm/operations/healthProbeSettings.d.ts +0 -124
- package/esm/operations/healthProbeSettings.d.ts.map +0 -1
- package/esm/operations/healthProbeSettings.js +0 -242
- package/esm/operations/healthProbeSettings.js.map +0 -1
- package/esm/operations/index.d.ts +0 -9
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -18
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/loadBalancingSettings.d.ts +0 -126
- package/esm/operations/loadBalancingSettings.d.ts.map +0 -1
- package/esm/operations/loadBalancingSettings.js +0 -244
- package/esm/operations/loadBalancingSettings.js.map +0 -1
- package/esm/operations/policies.d.ts +0 -111
- package/esm/operations/policies.d.ts.map +0 -1
- package/esm/operations/policies.js +0 -202
- package/esm/operations/policies.js.map +0 -1
- package/esm/operations/routingRules.d.ts +0 -115
- package/esm/operations/routingRules.d.ts.map +0 -1
- package/esm/operations/routingRules.js +0 -236
- package/esm/operations/routingRules.js.map +0 -1
- package/lib/frontDoorManagementClient.ts +0 -171
- package/lib/frontDoorManagementClientContext.ts +0 -61
- package/lib/models/backendPoolsMappers.ts +0 -39
- package/lib/models/endpointsMappers.ts +0 -16
- package/lib/models/frontDoorsMappers.ts +0 -41
- package/lib/models/frontendEndpointsMappers.ts +0 -39
- package/lib/models/healthProbeSettingsMappers.ts +0 -39
- package/lib/models/index.ts +0 -2261
- package/lib/models/loadBalancingSettingsMappers.ts +0 -39
- package/lib/models/mappers.ts +0 -1772
- package/lib/models/parameters.ts +0 -183
- package/lib/models/policiesMappers.ts +0 -40
- package/lib/models/routingRulesMappers.ts +0 -39
- package/lib/operations/backendPools.ts +0 -332
- package/lib/operations/endpoints.ts +0 -99
- package/lib/operations/frontDoors.ts +0 -481
- package/lib/operations/frontendEndpoints.ts +0 -458
- package/lib/operations/healthProbeSettings.ts +0 -341
- package/lib/operations/index.ts +0 -18
- package/lib/operations/loadBalancingSettings.ts +0 -343
- package/lib/operations/policies.ts +0 -315
- package/lib/operations/routingRules.ts +0 -332
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { FrontendEndpoints } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { FrontDoorManagementClient } from "../frontDoorManagementClient";
|
|
15
|
+
import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
|
|
16
|
+
import { LroImpl } from "../lroImpl";
|
|
17
|
+
import {
|
|
18
|
+
FrontendEndpoint,
|
|
19
|
+
FrontendEndpointsListByFrontDoorNextOptionalParams,
|
|
20
|
+
FrontendEndpointsListByFrontDoorOptionalParams,
|
|
21
|
+
FrontendEndpointsListByFrontDoorResponse,
|
|
22
|
+
FrontendEndpointsGetOptionalParams,
|
|
23
|
+
FrontendEndpointsGetResponse,
|
|
24
|
+
CustomHttpsConfiguration,
|
|
25
|
+
FrontendEndpointsEnableHttpsOptionalParams,
|
|
26
|
+
FrontendEndpointsDisableHttpsOptionalParams,
|
|
27
|
+
FrontendEndpointsListByFrontDoorNextResponse
|
|
28
|
+
} from "../models";
|
|
29
|
+
|
|
30
|
+
/// <reference lib="esnext.asynciterable" />
|
|
31
|
+
/** Class containing FrontendEndpoints operations. */
|
|
32
|
+
export class FrontendEndpointsImpl implements FrontendEndpoints {
|
|
33
|
+
private readonly client: FrontDoorManagementClient;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Initialize a new instance of the class FrontendEndpoints class.
|
|
37
|
+
* @param client Reference to the service client
|
|
38
|
+
*/
|
|
39
|
+
constructor(client: FrontDoorManagementClient) {
|
|
40
|
+
this.client = client;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Lists all of the frontend endpoints within a Front Door.
|
|
45
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
46
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
47
|
+
* @param options The options parameters.
|
|
48
|
+
*/
|
|
49
|
+
public listByFrontDoor(
|
|
50
|
+
resourceGroupName: string,
|
|
51
|
+
frontDoorName: string,
|
|
52
|
+
options?: FrontendEndpointsListByFrontDoorOptionalParams
|
|
53
|
+
): PagedAsyncIterableIterator<FrontendEndpoint> {
|
|
54
|
+
const iter = this.listByFrontDoorPagingAll(
|
|
55
|
+
resourceGroupName,
|
|
56
|
+
frontDoorName,
|
|
57
|
+
options
|
|
58
|
+
);
|
|
59
|
+
return {
|
|
60
|
+
next() {
|
|
61
|
+
return iter.next();
|
|
62
|
+
},
|
|
63
|
+
[Symbol.asyncIterator]() {
|
|
64
|
+
return this;
|
|
65
|
+
},
|
|
66
|
+
byPage: () => {
|
|
67
|
+
return this.listByFrontDoorPagingPage(
|
|
68
|
+
resourceGroupName,
|
|
69
|
+
frontDoorName,
|
|
70
|
+
options
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
private async *listByFrontDoorPagingPage(
|
|
77
|
+
resourceGroupName: string,
|
|
78
|
+
frontDoorName: string,
|
|
79
|
+
options?: FrontendEndpointsListByFrontDoorOptionalParams
|
|
80
|
+
): AsyncIterableIterator<FrontendEndpoint[]> {
|
|
81
|
+
let result = await this._listByFrontDoor(
|
|
82
|
+
resourceGroupName,
|
|
83
|
+
frontDoorName,
|
|
84
|
+
options
|
|
85
|
+
);
|
|
86
|
+
yield result.value || [];
|
|
87
|
+
let continuationToken = result.nextLink;
|
|
88
|
+
while (continuationToken) {
|
|
89
|
+
result = await this._listByFrontDoorNext(
|
|
90
|
+
resourceGroupName,
|
|
91
|
+
frontDoorName,
|
|
92
|
+
continuationToken,
|
|
93
|
+
options
|
|
94
|
+
);
|
|
95
|
+
continuationToken = result.nextLink;
|
|
96
|
+
yield result.value || [];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
private async *listByFrontDoorPagingAll(
|
|
101
|
+
resourceGroupName: string,
|
|
102
|
+
frontDoorName: string,
|
|
103
|
+
options?: FrontendEndpointsListByFrontDoorOptionalParams
|
|
104
|
+
): AsyncIterableIterator<FrontendEndpoint> {
|
|
105
|
+
for await (const page of this.listByFrontDoorPagingPage(
|
|
106
|
+
resourceGroupName,
|
|
107
|
+
frontDoorName,
|
|
108
|
+
options
|
|
109
|
+
)) {
|
|
110
|
+
yield* page;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Lists all of the frontend endpoints within a Front Door.
|
|
116
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
117
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
118
|
+
* @param options The options parameters.
|
|
119
|
+
*/
|
|
120
|
+
private _listByFrontDoor(
|
|
121
|
+
resourceGroupName: string,
|
|
122
|
+
frontDoorName: string,
|
|
123
|
+
options?: FrontendEndpointsListByFrontDoorOptionalParams
|
|
124
|
+
): Promise<FrontendEndpointsListByFrontDoorResponse> {
|
|
125
|
+
return this.client.sendOperationRequest(
|
|
126
|
+
{ resourceGroupName, frontDoorName, options },
|
|
127
|
+
listByFrontDoorOperationSpec
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Gets a Frontend endpoint with the specified name within the specified Front Door.
|
|
133
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
134
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
135
|
+
* @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door.
|
|
136
|
+
* @param options The options parameters.
|
|
137
|
+
*/
|
|
138
|
+
get(
|
|
139
|
+
resourceGroupName: string,
|
|
140
|
+
frontDoorName: string,
|
|
141
|
+
frontendEndpointName: string,
|
|
142
|
+
options?: FrontendEndpointsGetOptionalParams
|
|
143
|
+
): Promise<FrontendEndpointsGetResponse> {
|
|
144
|
+
return this.client.sendOperationRequest(
|
|
145
|
+
{ resourceGroupName, frontDoorName, frontendEndpointName, options },
|
|
146
|
+
getOperationSpec
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Enables a frontendEndpoint for HTTPS traffic
|
|
152
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
153
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
154
|
+
* @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door.
|
|
155
|
+
* @param customHttpsConfiguration The configuration specifying how to enable HTTPS
|
|
156
|
+
* @param options The options parameters.
|
|
157
|
+
*/
|
|
158
|
+
async beginEnableHttps(
|
|
159
|
+
resourceGroupName: string,
|
|
160
|
+
frontDoorName: string,
|
|
161
|
+
frontendEndpointName: string,
|
|
162
|
+
customHttpsConfiguration: CustomHttpsConfiguration,
|
|
163
|
+
options?: FrontendEndpointsEnableHttpsOptionalParams
|
|
164
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
165
|
+
const directSendOperation = async (
|
|
166
|
+
args: coreClient.OperationArguments,
|
|
167
|
+
spec: coreClient.OperationSpec
|
|
168
|
+
): Promise<void> => {
|
|
169
|
+
return this.client.sendOperationRequest(args, spec);
|
|
170
|
+
};
|
|
171
|
+
const sendOperation = async (
|
|
172
|
+
args: coreClient.OperationArguments,
|
|
173
|
+
spec: coreClient.OperationSpec
|
|
174
|
+
) => {
|
|
175
|
+
let currentRawResponse:
|
|
176
|
+
| coreClient.FullOperationResponse
|
|
177
|
+
| undefined = undefined;
|
|
178
|
+
const providedCallback = args.options?.onResponse;
|
|
179
|
+
const callback: coreClient.RawResponseCallback = (
|
|
180
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
181
|
+
flatResponse: unknown
|
|
182
|
+
) => {
|
|
183
|
+
currentRawResponse = rawResponse;
|
|
184
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
185
|
+
};
|
|
186
|
+
const updatedArgs = {
|
|
187
|
+
...args,
|
|
188
|
+
options: {
|
|
189
|
+
...args.options,
|
|
190
|
+
onResponse: callback
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
194
|
+
return {
|
|
195
|
+
flatResponse,
|
|
196
|
+
rawResponse: {
|
|
197
|
+
statusCode: currentRawResponse!.status,
|
|
198
|
+
body: currentRawResponse!.parsedBody,
|
|
199
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
|
|
204
|
+
const lro = new LroImpl(
|
|
205
|
+
sendOperation,
|
|
206
|
+
{
|
|
207
|
+
resourceGroupName,
|
|
208
|
+
frontDoorName,
|
|
209
|
+
frontendEndpointName,
|
|
210
|
+
customHttpsConfiguration,
|
|
211
|
+
options
|
|
212
|
+
},
|
|
213
|
+
enableHttpsOperationSpec
|
|
214
|
+
);
|
|
215
|
+
return new LroEngine(lro, {
|
|
216
|
+
resumeFrom: options?.resumeFrom,
|
|
217
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
218
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Enables a frontendEndpoint for HTTPS traffic
|
|
224
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
225
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
226
|
+
* @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door.
|
|
227
|
+
* @param customHttpsConfiguration The configuration specifying how to enable HTTPS
|
|
228
|
+
* @param options The options parameters.
|
|
229
|
+
*/
|
|
230
|
+
async beginEnableHttpsAndWait(
|
|
231
|
+
resourceGroupName: string,
|
|
232
|
+
frontDoorName: string,
|
|
233
|
+
frontendEndpointName: string,
|
|
234
|
+
customHttpsConfiguration: CustomHttpsConfiguration,
|
|
235
|
+
options?: FrontendEndpointsEnableHttpsOptionalParams
|
|
236
|
+
): Promise<void> {
|
|
237
|
+
const poller = await this.beginEnableHttps(
|
|
238
|
+
resourceGroupName,
|
|
239
|
+
frontDoorName,
|
|
240
|
+
frontendEndpointName,
|
|
241
|
+
customHttpsConfiguration,
|
|
242
|
+
options
|
|
243
|
+
);
|
|
244
|
+
return poller.pollUntilDone();
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
/**
|
|
248
|
+
* Disables a frontendEndpoint for HTTPS traffic
|
|
249
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
250
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
251
|
+
* @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door.
|
|
252
|
+
* @param options The options parameters.
|
|
253
|
+
*/
|
|
254
|
+
async beginDisableHttps(
|
|
255
|
+
resourceGroupName: string,
|
|
256
|
+
frontDoorName: string,
|
|
257
|
+
frontendEndpointName: string,
|
|
258
|
+
options?: FrontendEndpointsDisableHttpsOptionalParams
|
|
259
|
+
): Promise<PollerLike<PollOperationState<void>, void>> {
|
|
260
|
+
const directSendOperation = async (
|
|
261
|
+
args: coreClient.OperationArguments,
|
|
262
|
+
spec: coreClient.OperationSpec
|
|
263
|
+
): Promise<void> => {
|
|
264
|
+
return this.client.sendOperationRequest(args, spec);
|
|
265
|
+
};
|
|
266
|
+
const sendOperation = async (
|
|
267
|
+
args: coreClient.OperationArguments,
|
|
268
|
+
spec: coreClient.OperationSpec
|
|
269
|
+
) => {
|
|
270
|
+
let currentRawResponse:
|
|
271
|
+
| coreClient.FullOperationResponse
|
|
272
|
+
| undefined = undefined;
|
|
273
|
+
const providedCallback = args.options?.onResponse;
|
|
274
|
+
const callback: coreClient.RawResponseCallback = (
|
|
275
|
+
rawResponse: coreClient.FullOperationResponse,
|
|
276
|
+
flatResponse: unknown
|
|
277
|
+
) => {
|
|
278
|
+
currentRawResponse = rawResponse;
|
|
279
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
280
|
+
};
|
|
281
|
+
const updatedArgs = {
|
|
282
|
+
...args,
|
|
283
|
+
options: {
|
|
284
|
+
...args.options,
|
|
285
|
+
onResponse: callback
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
289
|
+
return {
|
|
290
|
+
flatResponse,
|
|
291
|
+
rawResponse: {
|
|
292
|
+
statusCode: currentRawResponse!.status,
|
|
293
|
+
body: currentRawResponse!.parsedBody,
|
|
294
|
+
headers: currentRawResponse!.headers.toJSON()
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
const lro = new LroImpl(
|
|
300
|
+
sendOperation,
|
|
301
|
+
{ resourceGroupName, frontDoorName, frontendEndpointName, options },
|
|
302
|
+
disableHttpsOperationSpec
|
|
303
|
+
);
|
|
304
|
+
return new LroEngine(lro, {
|
|
305
|
+
resumeFrom: options?.resumeFrom,
|
|
306
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
307
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Disables a frontendEndpoint for HTTPS traffic
|
|
313
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
314
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
315
|
+
* @param frontendEndpointName Name of the Frontend endpoint which is unique within the Front Door.
|
|
316
|
+
* @param options The options parameters.
|
|
317
|
+
*/
|
|
318
|
+
async beginDisableHttpsAndWait(
|
|
319
|
+
resourceGroupName: string,
|
|
320
|
+
frontDoorName: string,
|
|
321
|
+
frontendEndpointName: string,
|
|
322
|
+
options?: FrontendEndpointsDisableHttpsOptionalParams
|
|
323
|
+
): Promise<void> {
|
|
324
|
+
const poller = await this.beginDisableHttps(
|
|
325
|
+
resourceGroupName,
|
|
326
|
+
frontDoorName,
|
|
327
|
+
frontendEndpointName,
|
|
328
|
+
options
|
|
329
|
+
);
|
|
330
|
+
return poller.pollUntilDone();
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
/**
|
|
334
|
+
* ListByFrontDoorNext
|
|
335
|
+
* @param resourceGroupName Name of the Resource group within the Azure subscription.
|
|
336
|
+
* @param frontDoorName Name of the Front Door which is globally unique.
|
|
337
|
+
* @param nextLink The nextLink from the previous successful call to the ListByFrontDoor method.
|
|
338
|
+
* @param options The options parameters.
|
|
339
|
+
*/
|
|
340
|
+
private _listByFrontDoorNext(
|
|
341
|
+
resourceGroupName: string,
|
|
342
|
+
frontDoorName: string,
|
|
343
|
+
nextLink: string,
|
|
344
|
+
options?: FrontendEndpointsListByFrontDoorNextOptionalParams
|
|
345
|
+
): Promise<FrontendEndpointsListByFrontDoorNextResponse> {
|
|
346
|
+
return this.client.sendOperationRequest(
|
|
347
|
+
{ resourceGroupName, frontDoorName, nextLink, options },
|
|
348
|
+
listByFrontDoorNextOperationSpec
|
|
349
|
+
);
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
// Operation Specifications
|
|
353
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
354
|
+
|
|
355
|
+
const listByFrontDoorOperationSpec: coreClient.OperationSpec = {
|
|
356
|
+
path:
|
|
357
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints",
|
|
358
|
+
httpMethod: "GET",
|
|
359
|
+
responses: {
|
|
360
|
+
200: {
|
|
361
|
+
bodyMapper: Mappers.FrontendEndpointsListResult
|
|
362
|
+
},
|
|
363
|
+
default: {
|
|
364
|
+
bodyMapper: Mappers.ErrorResponse
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
queryParameters: [Parameters.apiVersion1],
|
|
368
|
+
urlParameters: [
|
|
369
|
+
Parameters.$host,
|
|
370
|
+
Parameters.subscriptionId,
|
|
371
|
+
Parameters.resourceGroupName,
|
|
372
|
+
Parameters.frontDoorName
|
|
373
|
+
],
|
|
374
|
+
headerParameters: [Parameters.accept],
|
|
375
|
+
serializer
|
|
376
|
+
};
|
|
377
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
378
|
+
path:
|
|
379
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}",
|
|
380
|
+
httpMethod: "GET",
|
|
381
|
+
responses: {
|
|
382
|
+
200: {
|
|
383
|
+
bodyMapper: Mappers.FrontendEndpoint
|
|
384
|
+
},
|
|
385
|
+
default: {
|
|
386
|
+
bodyMapper: Mappers.ErrorResponse
|
|
387
|
+
}
|
|
388
|
+
},
|
|
389
|
+
queryParameters: [Parameters.apiVersion1],
|
|
390
|
+
urlParameters: [
|
|
391
|
+
Parameters.$host,
|
|
392
|
+
Parameters.subscriptionId,
|
|
393
|
+
Parameters.resourceGroupName,
|
|
394
|
+
Parameters.frontDoorName,
|
|
395
|
+
Parameters.frontendEndpointName
|
|
396
|
+
],
|
|
397
|
+
headerParameters: [Parameters.accept],
|
|
398
|
+
serializer
|
|
399
|
+
};
|
|
400
|
+
const enableHttpsOperationSpec: coreClient.OperationSpec = {
|
|
401
|
+
path:
|
|
402
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/enableHttps",
|
|
403
|
+
httpMethod: "POST",
|
|
404
|
+
responses: {
|
|
405
|
+
200: {},
|
|
406
|
+
201: {},
|
|
407
|
+
202: {},
|
|
408
|
+
204: {},
|
|
409
|
+
default: {
|
|
410
|
+
bodyMapper: Mappers.ErrorResponse
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
requestBody: Parameters.customHttpsConfiguration,
|
|
414
|
+
queryParameters: [Parameters.apiVersion1],
|
|
415
|
+
urlParameters: [
|
|
416
|
+
Parameters.$host,
|
|
417
|
+
Parameters.subscriptionId,
|
|
418
|
+
Parameters.resourceGroupName,
|
|
419
|
+
Parameters.frontDoorName,
|
|
420
|
+
Parameters.frontendEndpointName
|
|
421
|
+
],
|
|
422
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
423
|
+
mediaType: "json",
|
|
424
|
+
serializer
|
|
425
|
+
};
|
|
426
|
+
const disableHttpsOperationSpec: coreClient.OperationSpec = {
|
|
427
|
+
path:
|
|
428
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoors/{frontDoorName}/frontendEndpoints/{frontendEndpointName}/disableHttps",
|
|
429
|
+
httpMethod: "POST",
|
|
430
|
+
responses: {
|
|
431
|
+
200: {},
|
|
432
|
+
201: {},
|
|
433
|
+
202: {},
|
|
434
|
+
204: {},
|
|
435
|
+
default: {
|
|
436
|
+
bodyMapper: Mappers.ErrorResponse
|
|
437
|
+
}
|
|
438
|
+
},
|
|
439
|
+
queryParameters: [Parameters.apiVersion1],
|
|
440
|
+
urlParameters: [
|
|
441
|
+
Parameters.$host,
|
|
442
|
+
Parameters.subscriptionId,
|
|
443
|
+
Parameters.resourceGroupName,
|
|
444
|
+
Parameters.frontDoorName,
|
|
445
|
+
Parameters.frontendEndpointName
|
|
446
|
+
],
|
|
447
|
+
headerParameters: [Parameters.accept],
|
|
448
|
+
serializer
|
|
449
|
+
};
|
|
450
|
+
const listByFrontDoorNextOperationSpec: coreClient.OperationSpec = {
|
|
451
|
+
path: "{nextLink}",
|
|
452
|
+
httpMethod: "GET",
|
|
453
|
+
responses: {
|
|
454
|
+
200: {
|
|
455
|
+
bodyMapper: Mappers.FrontendEndpointsListResult
|
|
456
|
+
},
|
|
457
|
+
default: {
|
|
458
|
+
bodyMapper: Mappers.ErrorResponse
|
|
459
|
+
}
|
|
460
|
+
},
|
|
461
|
+
queryParameters: [Parameters.apiVersion1],
|
|
462
|
+
urlParameters: [
|
|
463
|
+
Parameters.$host,
|
|
464
|
+
Parameters.subscriptionId,
|
|
465
|
+
Parameters.resourceGroupName,
|
|
466
|
+
Parameters.nextLink,
|
|
467
|
+
Parameters.frontDoorName
|
|
468
|
+
],
|
|
469
|
+
headerParameters: [Parameters.accept],
|
|
470
|
+
serializer
|
|
471
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export * from "./networkExperimentProfiles";
|
|
10
|
+
export * from "./preconfiguredEndpoints";
|
|
11
|
+
export * from "./experiments";
|
|
12
|
+
export * from "./reports";
|
|
13
|
+
export * from "./frontDoorNameAvailability";
|
|
14
|
+
export * from "./frontDoorNameAvailabilityWithSubscription";
|
|
15
|
+
export * from "./frontDoors";
|
|
16
|
+
export * from "./frontendEndpoints";
|
|
17
|
+
export * from "./endpoints";
|
|
18
|
+
export * from "./rulesEngines";
|
|
19
|
+
export * from "./policies";
|
|
20
|
+
export * from "./managedRuleSets";
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Microsoft Corporation.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*
|
|
5
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { ManagedRuleSets } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { FrontDoorManagementClient } from "../frontDoorManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
ManagedRuleSetDefinition,
|
|
17
|
+
ManagedRuleSetsListNextOptionalParams,
|
|
18
|
+
ManagedRuleSetsListOptionalParams,
|
|
19
|
+
ManagedRuleSetsListResponse,
|
|
20
|
+
ManagedRuleSetsListNextResponse
|
|
21
|
+
} from "../models";
|
|
22
|
+
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing ManagedRuleSets operations. */
|
|
25
|
+
export class ManagedRuleSetsImpl implements ManagedRuleSets {
|
|
26
|
+
private readonly client: FrontDoorManagementClient;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Initialize a new instance of the class ManagedRuleSets class.
|
|
30
|
+
* @param client Reference to the service client
|
|
31
|
+
*/
|
|
32
|
+
constructor(client: FrontDoorManagementClient) {
|
|
33
|
+
this.client = client;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Lists all available managed rule sets.
|
|
38
|
+
* @param options The options parameters.
|
|
39
|
+
*/
|
|
40
|
+
public list(
|
|
41
|
+
options?: ManagedRuleSetsListOptionalParams
|
|
42
|
+
): PagedAsyncIterableIterator<ManagedRuleSetDefinition> {
|
|
43
|
+
const iter = this.listPagingAll(options);
|
|
44
|
+
return {
|
|
45
|
+
next() {
|
|
46
|
+
return iter.next();
|
|
47
|
+
},
|
|
48
|
+
[Symbol.asyncIterator]() {
|
|
49
|
+
return this;
|
|
50
|
+
},
|
|
51
|
+
byPage: () => {
|
|
52
|
+
return this.listPagingPage(options);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private async *listPagingPage(
|
|
58
|
+
options?: ManagedRuleSetsListOptionalParams
|
|
59
|
+
): AsyncIterableIterator<ManagedRuleSetDefinition[]> {
|
|
60
|
+
let result = await this._list(options);
|
|
61
|
+
yield result.value || [];
|
|
62
|
+
let continuationToken = result.nextLink;
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listNext(continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
yield result.value || [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async *listPagingAll(
|
|
71
|
+
options?: ManagedRuleSetsListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<ManagedRuleSetDefinition> {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Lists all available managed rule sets.
|
|
80
|
+
* @param options The options parameters.
|
|
81
|
+
*/
|
|
82
|
+
private _list(
|
|
83
|
+
options?: ManagedRuleSetsListOptionalParams
|
|
84
|
+
): Promise<ManagedRuleSetsListResponse> {
|
|
85
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* ListNext
|
|
90
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
91
|
+
* @param options The options parameters.
|
|
92
|
+
*/
|
|
93
|
+
private _listNext(
|
|
94
|
+
nextLink: string,
|
|
95
|
+
options?: ManagedRuleSetsListNextOptionalParams
|
|
96
|
+
): Promise<ManagedRuleSetsListNextResponse> {
|
|
97
|
+
return this.client.sendOperationRequest(
|
|
98
|
+
{ nextLink, options },
|
|
99
|
+
listNextOperationSpec
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
// Operation Specifications
|
|
104
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
105
|
+
|
|
106
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
107
|
+
path:
|
|
108
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallManagedRuleSets",
|
|
109
|
+
httpMethod: "GET",
|
|
110
|
+
responses: {
|
|
111
|
+
200: {
|
|
112
|
+
bodyMapper: Mappers.ManagedRuleSetDefinitionList
|
|
113
|
+
},
|
|
114
|
+
default: {
|
|
115
|
+
bodyMapper: Mappers.ErrorResponse
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
queryParameters: [Parameters.apiVersion2],
|
|
119
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
120
|
+
headerParameters: [Parameters.accept],
|
|
121
|
+
serializer
|
|
122
|
+
};
|
|
123
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
124
|
+
path: "{nextLink}",
|
|
125
|
+
httpMethod: "GET",
|
|
126
|
+
responses: {
|
|
127
|
+
200: {
|
|
128
|
+
bodyMapper: Mappers.ManagedRuleSetDefinitionList
|
|
129
|
+
},
|
|
130
|
+
default: {
|
|
131
|
+
bodyMapper: Mappers.ErrorResponse
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
queryParameters: [Parameters.apiVersion2],
|
|
135
|
+
urlParameters: [
|
|
136
|
+
Parameters.$host,
|
|
137
|
+
Parameters.subscriptionId,
|
|
138
|
+
Parameters.nextLink
|
|
139
|
+
],
|
|
140
|
+
headerParameters: [Parameters.accept],
|
|
141
|
+
serializer
|
|
142
|
+
};
|