@azure/arm-frontdoor 5.2.1-alpha.20240411.1 → 5.3.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 +24 -10
- package/LICENSE +1 -1
- package/dist/index.js +1619 -1476
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/endpointsPurgeContentSample.js +2 -2
- package/dist-esm/samples-dev/endpointsPurgeContentSample.js.map +1 -1
- package/dist-esm/samples-dev/experimentsCreateOrUpdateSample.js +1 -1
- package/dist-esm/samples-dev/experimentsListByProfileSample.js +1 -1
- package/dist-esm/samples-dev/experimentsListByProfileSample.js.map +1 -1
- package/dist-esm/samples-dev/experimentsUpdateSample.js +2 -2
- package/dist-esm/samples-dev/experimentsUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/frontDoorNameAvailabilityCheckSample.js +3 -5
- package/dist-esm/samples-dev/frontDoorNameAvailabilityCheckSample.js.map +1 -1
- package/dist-esm/samples-dev/frontDoorNameAvailabilityWithSubscriptionCheckSample.js +2 -2
- package/dist-esm/samples-dev/frontDoorNameAvailabilityWithSubscriptionCheckSample.js.map +1 -1
- package/dist-esm/samples-dev/frontDoorsCreateOrUpdateSample.js +26 -26
- package/dist-esm/samples-dev/frontDoorsCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/frontDoorsListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/frontDoorsListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/frontDoorsListSample.js +1 -1
- package/dist-esm/samples-dev/frontDoorsListSample.js.map +1 -1
- package/dist-esm/samples-dev/frontDoorsValidateCustomDomainSample.js +2 -2
- package/dist-esm/samples-dev/frontDoorsValidateCustomDomainSample.js.map +1 -1
- package/dist-esm/samples-dev/frontendEndpointsEnableHttpsSample.js +3 -3
- package/dist-esm/samples-dev/frontendEndpointsEnableHttpsSample.js.map +1 -1
- package/dist-esm/samples-dev/frontendEndpointsListByFrontDoorSample.js +1 -1
- package/dist-esm/samples-dev/frontendEndpointsListByFrontDoorSample.js.map +1 -1
- package/dist-esm/samples-dev/managedRuleSetsListSample.js +2 -2
- package/dist-esm/samples-dev/managedRuleSetsListSample.js.map +1 -1
- package/dist-esm/samples-dev/networkExperimentProfilesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/networkExperimentProfilesListByResourceGroupSample.js +1 -1
- package/dist-esm/samples-dev/networkExperimentProfilesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/networkExperimentProfilesListSample.js +1 -1
- package/dist-esm/samples-dev/networkExperimentProfilesListSample.js.map +1 -1
- package/dist-esm/samples-dev/networkExperimentProfilesUpdateSample.js +2 -2
- package/dist-esm/samples-dev/networkExperimentProfilesUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/policiesCreateOrUpdateSample.js +37 -27
- package/dist-esm/samples-dev/policiesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/policiesDeleteSample.js +1 -1
- package/dist-esm/samples-dev/policiesGetSample.js +1 -1
- package/dist-esm/samples-dev/policiesListBySubscriptionSample.js +2 -2
- package/dist-esm/samples-dev/policiesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/policiesListSample.js +2 -2
- package/dist-esm/samples-dev/policiesListSample.js.map +1 -1
- package/dist-esm/samples-dev/policiesUpdateSample.js +1 -1
- package/dist-esm/samples-dev/preconfiguredEndpointsListSample.js +1 -1
- package/dist-esm/samples-dev/preconfiguredEndpointsListSample.js.map +1 -1
- package/dist-esm/samples-dev/rulesEnginesCreateOrUpdateSample.js +20 -20
- package/dist-esm/samples-dev/rulesEnginesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/rulesEnginesListByFrontDoorSample.js +1 -1
- package/dist-esm/samples-dev/rulesEnginesListByFrontDoorSample.js.map +1 -1
- package/dist-esm/src/frontDoorManagementClient.d.ts +2 -1
- package/dist-esm/src/frontDoorManagementClient.d.ts.map +1 -1
- package/dist-esm/src/frontDoorManagementClient.js +16 -18
- package/dist-esm/src/frontDoorManagementClient.js.map +1 -1
- package/dist-esm/src/lroImpl.js +1 -1
- package/dist-esm/src/models/index.d.ts +127 -2
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +54 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +2 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +1117 -1028
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +90 -90
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/endpoints.d.ts.map +1 -1
- package/dist-esm/src/operations/endpoints.js +9 -9
- package/dist-esm/src/operations/endpoints.js.map +1 -1
- package/dist-esm/src/operations/experiments.d.ts.map +1 -1
- package/dist-esm/src/operations/experiments.js +51 -51
- package/dist-esm/src/operations/experiments.js.map +1 -1
- package/dist-esm/src/operations/frontDoorNameAvailability.d.ts.map +1 -1
- package/dist-esm/src/operations/frontDoorNameAvailability.js +4 -4
- package/dist-esm/src/operations/frontDoorNameAvailability.js.map +1 -1
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.d.ts.map +1 -1
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.js +4 -4
- package/dist-esm/src/operations/frontDoorNameAvailabilityWithSubscription.js.map +1 -1
- package/dist-esm/src/operations/frontDoors.d.ts.map +1 -1
- package/dist-esm/src/operations/frontDoors.js +52 -52
- package/dist-esm/src/operations/frontDoors.js.map +1 -1
- package/dist-esm/src/operations/frontendEndpoints.d.ts.map +1 -1
- package/dist-esm/src/operations/frontendEndpoints.js +34 -34
- package/dist-esm/src/operations/frontendEndpoints.js.map +1 -1
- package/dist-esm/src/operations/managedRuleSets.js +10 -10
- package/dist-esm/src/operations/managedRuleSets.js.map +1 -1
- package/dist-esm/src/operations/networkExperimentProfiles.d.ts.map +1 -1
- package/dist-esm/src/operations/networkExperimentProfiles.js +59 -59
- package/dist-esm/src/operations/networkExperimentProfiles.js.map +1 -1
- package/dist-esm/src/operations/policies.d.ts.map +1 -1
- package/dist-esm/src/operations/policies.js +57 -57
- package/dist-esm/src/operations/policies.js.map +1 -1
- package/dist-esm/src/operations/preconfiguredEndpoints.js +11 -11
- package/dist-esm/src/operations/preconfiguredEndpoints.js.map +1 -1
- package/dist-esm/src/operations/reports.js +14 -14
- package/dist-esm/src/operations/reports.js.map +1 -1
- package/dist-esm/src/operations/rulesEngines.d.ts.map +1 -1
- package/dist-esm/src/operations/rulesEngines.js +38 -38
- package/dist-esm/src/operations/rulesEngines.js.map +1 -1
- package/dist-esm/test/frontdoor_operations_test.spec.js +1 -1
- package/dist-esm/test/frontdoor_operations_test.spec.js.map +1 -1
- package/package.json +10 -10
- package/review/arm-frontdoor.api.md +71 -1
- package/src/frontDoorManagementClient.ts +33 -19
- package/src/lroImpl.ts +3 -3
- package/src/models/index.ts +202 -58
- package/src/models/mappers.ts +1201 -1103
- package/src/models/parameters.ts +91 -91
- package/src/operations/endpoints.ts +21 -23
- package/src/operations/experiments.ts +101 -109
- package/src/operations/frontDoorNameAvailability.ts +9 -8
- package/src/operations/frontDoorNameAvailabilityWithSubscription.ts +10 -10
- package/src/operations/frontDoors.ts +99 -107
- package/src/operations/frontendEndpoints.ts +73 -79
- package/src/operations/managedRuleSets.ts +18 -19
- package/src/operations/networkExperimentProfiles.ts +116 -124
- package/src/operations/policies.ts +111 -120
- package/src/operations/preconfiguredEndpoints.ts +23 -24
- package/src/operations/reports.ts +21 -23
- package/src/operations/rulesEngines.ts +77 -83
- package/src/operationsInterfaces/endpoints.ts +3 -3
- package/src/operationsInterfaces/experiments.ts +9 -9
- package/src/operationsInterfaces/frontDoorNameAvailability.ts +2 -2
- package/src/operationsInterfaces/frontDoorNameAvailabilityWithSubscription.ts +2 -2
- package/src/operationsInterfaces/frontDoors.ts +9 -9
- package/src/operationsInterfaces/frontendEndpoints.ts +7 -7
- package/src/operationsInterfaces/managedRuleSets.ts +2 -2
- package/src/operationsInterfaces/networkExperimentProfiles.ts +10 -10
- package/src/operationsInterfaces/policies.ts +10 -10
- package/src/operationsInterfaces/preconfiguredEndpoints.ts +2 -2
- package/src/operationsInterfaces/reports.ts +3 -3
- package/src/operationsInterfaces/rulesEngines.ts +7 -7
- package/src/pagingHelper.ts +1 -1
- package/types/arm-frontdoor.d.ts +141 -3
|
@@ -16,7 +16,7 @@ import { FrontDoorManagementClient } from "../frontDoorManagementClient";
|
|
|
16
16
|
import {
|
|
17
17
|
SimplePollerLike,
|
|
18
18
|
OperationState,
|
|
19
|
-
createHttpPoller
|
|
19
|
+
createHttpPoller,
|
|
20
20
|
} from "@azure/core-lro";
|
|
21
21
|
import { createLroSpec } from "../lroImpl";
|
|
22
22
|
import {
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
PoliciesUpdateResponse,
|
|
37
37
|
PoliciesDeleteOptionalParams,
|
|
38
38
|
PoliciesListNextResponse,
|
|
39
|
-
PoliciesListBySubscriptionNextResponse
|
|
39
|
+
PoliciesListBySubscriptionNextResponse,
|
|
40
40
|
} from "../models";
|
|
41
41
|
|
|
42
42
|
/// <reference lib="esnext.asynciterable" />
|
|
@@ -59,7 +59,7 @@ export class PoliciesImpl implements Policies {
|
|
|
59
59
|
*/
|
|
60
60
|
public list(
|
|
61
61
|
resourceGroupName: string,
|
|
62
|
-
options?: PoliciesListOptionalParams
|
|
62
|
+
options?: PoliciesListOptionalParams,
|
|
63
63
|
): PagedAsyncIterableIterator<WebApplicationFirewallPolicy> {
|
|
64
64
|
const iter = this.listPagingAll(resourceGroupName, options);
|
|
65
65
|
return {
|
|
@@ -74,14 +74,14 @@ export class PoliciesImpl implements Policies {
|
|
|
74
74
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
75
75
|
}
|
|
76
76
|
return this.listPagingPage(resourceGroupName, options, settings);
|
|
77
|
-
}
|
|
77
|
+
},
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
private async *listPagingPage(
|
|
82
82
|
resourceGroupName: string,
|
|
83
83
|
options?: PoliciesListOptionalParams,
|
|
84
|
-
settings?: PageSettings
|
|
84
|
+
settings?: PageSettings,
|
|
85
85
|
): AsyncIterableIterator<WebApplicationFirewallPolicy[]> {
|
|
86
86
|
let result: PoliciesListResponse;
|
|
87
87
|
let continuationToken = settings?.continuationToken;
|
|
@@ -96,7 +96,7 @@ export class PoliciesImpl implements Policies {
|
|
|
96
96
|
result = await this._listNext(
|
|
97
97
|
resourceGroupName,
|
|
98
98
|
continuationToken,
|
|
99
|
-
options
|
|
99
|
+
options,
|
|
100
100
|
);
|
|
101
101
|
continuationToken = result.nextLink;
|
|
102
102
|
let page = result.value || [];
|
|
@@ -107,7 +107,7 @@ export class PoliciesImpl implements Policies {
|
|
|
107
107
|
|
|
108
108
|
private async *listPagingAll(
|
|
109
109
|
resourceGroupName: string,
|
|
110
|
-
options?: PoliciesListOptionalParams
|
|
110
|
+
options?: PoliciesListOptionalParams,
|
|
111
111
|
): AsyncIterableIterator<WebApplicationFirewallPolicy> {
|
|
112
112
|
for await (const page of this.listPagingPage(resourceGroupName, options)) {
|
|
113
113
|
yield* page;
|
|
@@ -119,7 +119,7 @@ export class PoliciesImpl implements Policies {
|
|
|
119
119
|
* @param options The options parameters.
|
|
120
120
|
*/
|
|
121
121
|
public listBySubscription(
|
|
122
|
-
options?: PoliciesListBySubscriptionOptionalParams
|
|
122
|
+
options?: PoliciesListBySubscriptionOptionalParams,
|
|
123
123
|
): PagedAsyncIterableIterator<WebApplicationFirewallPolicy> {
|
|
124
124
|
const iter = this.listBySubscriptionPagingAll(options);
|
|
125
125
|
return {
|
|
@@ -134,13 +134,13 @@ export class PoliciesImpl implements Policies {
|
|
|
134
134
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
135
135
|
}
|
|
136
136
|
return this.listBySubscriptionPagingPage(options, settings);
|
|
137
|
-
}
|
|
137
|
+
},
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
private async *listBySubscriptionPagingPage(
|
|
142
142
|
options?: PoliciesListBySubscriptionOptionalParams,
|
|
143
|
-
settings?: PageSettings
|
|
143
|
+
settings?: PageSettings,
|
|
144
144
|
): AsyncIterableIterator<WebApplicationFirewallPolicy[]> {
|
|
145
145
|
let result: PoliciesListBySubscriptionResponse;
|
|
146
146
|
let continuationToken = settings?.continuationToken;
|
|
@@ -161,7 +161,7 @@ export class PoliciesImpl implements Policies {
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
private async *listBySubscriptionPagingAll(
|
|
164
|
-
options?: PoliciesListBySubscriptionOptionalParams
|
|
164
|
+
options?: PoliciesListBySubscriptionOptionalParams,
|
|
165
165
|
): AsyncIterableIterator<WebApplicationFirewallPolicy> {
|
|
166
166
|
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
167
167
|
yield* page;
|
|
@@ -175,11 +175,11 @@ export class PoliciesImpl implements Policies {
|
|
|
175
175
|
*/
|
|
176
176
|
private _list(
|
|
177
177
|
resourceGroupName: string,
|
|
178
|
-
options?: PoliciesListOptionalParams
|
|
178
|
+
options?: PoliciesListOptionalParams,
|
|
179
179
|
): Promise<PoliciesListResponse> {
|
|
180
180
|
return this.client.sendOperationRequest(
|
|
181
181
|
{ resourceGroupName, options },
|
|
182
|
-
listOperationSpec
|
|
182
|
+
listOperationSpec,
|
|
183
183
|
);
|
|
184
184
|
}
|
|
185
185
|
|
|
@@ -188,11 +188,11 @@ export class PoliciesImpl implements Policies {
|
|
|
188
188
|
* @param options The options parameters.
|
|
189
189
|
*/
|
|
190
190
|
private _listBySubscription(
|
|
191
|
-
options?: PoliciesListBySubscriptionOptionalParams
|
|
191
|
+
options?: PoliciesListBySubscriptionOptionalParams,
|
|
192
192
|
): Promise<PoliciesListBySubscriptionResponse> {
|
|
193
193
|
return this.client.sendOperationRequest(
|
|
194
194
|
{ options },
|
|
195
|
-
listBySubscriptionOperationSpec
|
|
195
|
+
listBySubscriptionOperationSpec,
|
|
196
196
|
);
|
|
197
197
|
}
|
|
198
198
|
|
|
@@ -205,11 +205,11 @@ export class PoliciesImpl implements Policies {
|
|
|
205
205
|
get(
|
|
206
206
|
resourceGroupName: string,
|
|
207
207
|
policyName: string,
|
|
208
|
-
options?: PoliciesGetOptionalParams
|
|
208
|
+
options?: PoliciesGetOptionalParams,
|
|
209
209
|
): Promise<PoliciesGetResponse> {
|
|
210
210
|
return this.client.sendOperationRequest(
|
|
211
211
|
{ resourceGroupName, policyName, options },
|
|
212
|
-
getOperationSpec
|
|
212
|
+
getOperationSpec,
|
|
213
213
|
);
|
|
214
214
|
}
|
|
215
215
|
|
|
@@ -224,7 +224,7 @@ export class PoliciesImpl implements Policies {
|
|
|
224
224
|
resourceGroupName: string,
|
|
225
225
|
policyName: string,
|
|
226
226
|
parameters: WebApplicationFirewallPolicy,
|
|
227
|
-
options?: PoliciesCreateOrUpdateOptionalParams
|
|
227
|
+
options?: PoliciesCreateOrUpdateOptionalParams,
|
|
228
228
|
): Promise<
|
|
229
229
|
SimplePollerLike<
|
|
230
230
|
OperationState<PoliciesCreateOrUpdateResponse>,
|
|
@@ -233,21 +233,20 @@ export class PoliciesImpl implements Policies {
|
|
|
233
233
|
> {
|
|
234
234
|
const directSendOperation = async (
|
|
235
235
|
args: coreClient.OperationArguments,
|
|
236
|
-
spec: coreClient.OperationSpec
|
|
236
|
+
spec: coreClient.OperationSpec,
|
|
237
237
|
): Promise<PoliciesCreateOrUpdateResponse> => {
|
|
238
238
|
return this.client.sendOperationRequest(args, spec);
|
|
239
239
|
};
|
|
240
240
|
const sendOperationFn = async (
|
|
241
241
|
args: coreClient.OperationArguments,
|
|
242
|
-
spec: coreClient.OperationSpec
|
|
242
|
+
spec: coreClient.OperationSpec,
|
|
243
243
|
) => {
|
|
244
|
-
let currentRawResponse:
|
|
245
|
-
|
|
246
|
-
| undefined = undefined;
|
|
244
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
245
|
+
undefined;
|
|
247
246
|
const providedCallback = args.options?.onResponse;
|
|
248
247
|
const callback: coreClient.RawResponseCallback = (
|
|
249
248
|
rawResponse: coreClient.FullOperationResponse,
|
|
250
|
-
flatResponse: unknown
|
|
249
|
+
flatResponse: unknown,
|
|
251
250
|
) => {
|
|
252
251
|
currentRawResponse = rawResponse;
|
|
253
252
|
providedCallback?.(rawResponse, flatResponse);
|
|
@@ -256,8 +255,8 @@ export class PoliciesImpl implements Policies {
|
|
|
256
255
|
...args,
|
|
257
256
|
options: {
|
|
258
257
|
...args.options,
|
|
259
|
-
onResponse: callback
|
|
260
|
-
}
|
|
258
|
+
onResponse: callback,
|
|
259
|
+
},
|
|
261
260
|
};
|
|
262
261
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
263
262
|
return {
|
|
@@ -265,22 +264,22 @@ export class PoliciesImpl implements Policies {
|
|
|
265
264
|
rawResponse: {
|
|
266
265
|
statusCode: currentRawResponse!.status,
|
|
267
266
|
body: currentRawResponse!.parsedBody,
|
|
268
|
-
headers: currentRawResponse!.headers.toJSON()
|
|
269
|
-
}
|
|
267
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
268
|
+
},
|
|
270
269
|
};
|
|
271
270
|
};
|
|
272
271
|
|
|
273
272
|
const lro = createLroSpec({
|
|
274
273
|
sendOperationFn,
|
|
275
274
|
args: { resourceGroupName, policyName, parameters, options },
|
|
276
|
-
spec: createOrUpdateOperationSpec
|
|
275
|
+
spec: createOrUpdateOperationSpec,
|
|
277
276
|
});
|
|
278
277
|
const poller = await createHttpPoller<
|
|
279
278
|
PoliciesCreateOrUpdateResponse,
|
|
280
279
|
OperationState<PoliciesCreateOrUpdateResponse>
|
|
281
280
|
>(lro, {
|
|
282
281
|
restoreFrom: options?.resumeFrom,
|
|
283
|
-
intervalInMs: options?.updateIntervalInMs
|
|
282
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
284
283
|
});
|
|
285
284
|
await poller.poll();
|
|
286
285
|
return poller;
|
|
@@ -297,13 +296,13 @@ export class PoliciesImpl implements Policies {
|
|
|
297
296
|
resourceGroupName: string,
|
|
298
297
|
policyName: string,
|
|
299
298
|
parameters: WebApplicationFirewallPolicy,
|
|
300
|
-
options?: PoliciesCreateOrUpdateOptionalParams
|
|
299
|
+
options?: PoliciesCreateOrUpdateOptionalParams,
|
|
301
300
|
): Promise<PoliciesCreateOrUpdateResponse> {
|
|
302
301
|
const poller = await this.beginCreateOrUpdate(
|
|
303
302
|
resourceGroupName,
|
|
304
303
|
policyName,
|
|
305
304
|
parameters,
|
|
306
|
-
options
|
|
305
|
+
options,
|
|
307
306
|
);
|
|
308
307
|
return poller.pollUntilDone();
|
|
309
308
|
}
|
|
@@ -320,7 +319,7 @@ export class PoliciesImpl implements Policies {
|
|
|
320
319
|
resourceGroupName: string,
|
|
321
320
|
policyName: string,
|
|
322
321
|
parameters: TagsObject,
|
|
323
|
-
options?: PoliciesUpdateOptionalParams
|
|
322
|
+
options?: PoliciesUpdateOptionalParams,
|
|
324
323
|
): Promise<
|
|
325
324
|
SimplePollerLike<
|
|
326
325
|
OperationState<PoliciesUpdateResponse>,
|
|
@@ -329,21 +328,20 @@ export class PoliciesImpl implements Policies {
|
|
|
329
328
|
> {
|
|
330
329
|
const directSendOperation = async (
|
|
331
330
|
args: coreClient.OperationArguments,
|
|
332
|
-
spec: coreClient.OperationSpec
|
|
331
|
+
spec: coreClient.OperationSpec,
|
|
333
332
|
): Promise<PoliciesUpdateResponse> => {
|
|
334
333
|
return this.client.sendOperationRequest(args, spec);
|
|
335
334
|
};
|
|
336
335
|
const sendOperationFn = async (
|
|
337
336
|
args: coreClient.OperationArguments,
|
|
338
|
-
spec: coreClient.OperationSpec
|
|
337
|
+
spec: coreClient.OperationSpec,
|
|
339
338
|
) => {
|
|
340
|
-
let currentRawResponse:
|
|
341
|
-
|
|
342
|
-
| undefined = undefined;
|
|
339
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
340
|
+
undefined;
|
|
343
341
|
const providedCallback = args.options?.onResponse;
|
|
344
342
|
const callback: coreClient.RawResponseCallback = (
|
|
345
343
|
rawResponse: coreClient.FullOperationResponse,
|
|
346
|
-
flatResponse: unknown
|
|
344
|
+
flatResponse: unknown,
|
|
347
345
|
) => {
|
|
348
346
|
currentRawResponse = rawResponse;
|
|
349
347
|
providedCallback?.(rawResponse, flatResponse);
|
|
@@ -352,8 +350,8 @@ export class PoliciesImpl implements Policies {
|
|
|
352
350
|
...args,
|
|
353
351
|
options: {
|
|
354
352
|
...args.options,
|
|
355
|
-
onResponse: callback
|
|
356
|
-
}
|
|
353
|
+
onResponse: callback,
|
|
354
|
+
},
|
|
357
355
|
};
|
|
358
356
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
359
357
|
return {
|
|
@@ -361,22 +359,22 @@ export class PoliciesImpl implements Policies {
|
|
|
361
359
|
rawResponse: {
|
|
362
360
|
statusCode: currentRawResponse!.status,
|
|
363
361
|
body: currentRawResponse!.parsedBody,
|
|
364
|
-
headers: currentRawResponse!.headers.toJSON()
|
|
365
|
-
}
|
|
362
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
363
|
+
},
|
|
366
364
|
};
|
|
367
365
|
};
|
|
368
366
|
|
|
369
367
|
const lro = createLroSpec({
|
|
370
368
|
sendOperationFn,
|
|
371
369
|
args: { resourceGroupName, policyName, parameters, options },
|
|
372
|
-
spec: updateOperationSpec
|
|
370
|
+
spec: updateOperationSpec,
|
|
373
371
|
});
|
|
374
372
|
const poller = await createHttpPoller<
|
|
375
373
|
PoliciesUpdateResponse,
|
|
376
374
|
OperationState<PoliciesUpdateResponse>
|
|
377
375
|
>(lro, {
|
|
378
376
|
restoreFrom: options?.resumeFrom,
|
|
379
|
-
intervalInMs: options?.updateIntervalInMs
|
|
377
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
380
378
|
});
|
|
381
379
|
await poller.poll();
|
|
382
380
|
return poller;
|
|
@@ -394,13 +392,13 @@ export class PoliciesImpl implements Policies {
|
|
|
394
392
|
resourceGroupName: string,
|
|
395
393
|
policyName: string,
|
|
396
394
|
parameters: TagsObject,
|
|
397
|
-
options?: PoliciesUpdateOptionalParams
|
|
395
|
+
options?: PoliciesUpdateOptionalParams,
|
|
398
396
|
): Promise<PoliciesUpdateResponse> {
|
|
399
397
|
const poller = await this.beginUpdate(
|
|
400
398
|
resourceGroupName,
|
|
401
399
|
policyName,
|
|
402
400
|
parameters,
|
|
403
|
-
options
|
|
401
|
+
options,
|
|
404
402
|
);
|
|
405
403
|
return poller.pollUntilDone();
|
|
406
404
|
}
|
|
@@ -414,25 +412,24 @@ export class PoliciesImpl implements Policies {
|
|
|
414
412
|
async beginDelete(
|
|
415
413
|
resourceGroupName: string,
|
|
416
414
|
policyName: string,
|
|
417
|
-
options?: PoliciesDeleteOptionalParams
|
|
415
|
+
options?: PoliciesDeleteOptionalParams,
|
|
418
416
|
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
419
417
|
const directSendOperation = async (
|
|
420
418
|
args: coreClient.OperationArguments,
|
|
421
|
-
spec: coreClient.OperationSpec
|
|
419
|
+
spec: coreClient.OperationSpec,
|
|
422
420
|
): Promise<void> => {
|
|
423
421
|
return this.client.sendOperationRequest(args, spec);
|
|
424
422
|
};
|
|
425
423
|
const sendOperationFn = async (
|
|
426
424
|
args: coreClient.OperationArguments,
|
|
427
|
-
spec: coreClient.OperationSpec
|
|
425
|
+
spec: coreClient.OperationSpec,
|
|
428
426
|
) => {
|
|
429
|
-
let currentRawResponse:
|
|
430
|
-
|
|
431
|
-
| undefined = undefined;
|
|
427
|
+
let currentRawResponse: coreClient.FullOperationResponse | undefined =
|
|
428
|
+
undefined;
|
|
432
429
|
const providedCallback = args.options?.onResponse;
|
|
433
430
|
const callback: coreClient.RawResponseCallback = (
|
|
434
431
|
rawResponse: coreClient.FullOperationResponse,
|
|
435
|
-
flatResponse: unknown
|
|
432
|
+
flatResponse: unknown,
|
|
436
433
|
) => {
|
|
437
434
|
currentRawResponse = rawResponse;
|
|
438
435
|
providedCallback?.(rawResponse, flatResponse);
|
|
@@ -441,8 +438,8 @@ export class PoliciesImpl implements Policies {
|
|
|
441
438
|
...args,
|
|
442
439
|
options: {
|
|
443
440
|
...args.options,
|
|
444
|
-
onResponse: callback
|
|
445
|
-
}
|
|
441
|
+
onResponse: callback,
|
|
442
|
+
},
|
|
446
443
|
};
|
|
447
444
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
448
445
|
return {
|
|
@@ -450,19 +447,19 @@ export class PoliciesImpl implements Policies {
|
|
|
450
447
|
rawResponse: {
|
|
451
448
|
statusCode: currentRawResponse!.status,
|
|
452
449
|
body: currentRawResponse!.parsedBody,
|
|
453
|
-
headers: currentRawResponse!.headers.toJSON()
|
|
454
|
-
}
|
|
450
|
+
headers: currentRawResponse!.headers.toJSON(),
|
|
451
|
+
},
|
|
455
452
|
};
|
|
456
453
|
};
|
|
457
454
|
|
|
458
455
|
const lro = createLroSpec({
|
|
459
456
|
sendOperationFn,
|
|
460
457
|
args: { resourceGroupName, policyName, options },
|
|
461
|
-
spec: deleteOperationSpec
|
|
458
|
+
spec: deleteOperationSpec,
|
|
462
459
|
});
|
|
463
460
|
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
464
461
|
restoreFrom: options?.resumeFrom,
|
|
465
|
-
intervalInMs: options?.updateIntervalInMs
|
|
462
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
466
463
|
});
|
|
467
464
|
await poller.poll();
|
|
468
465
|
return poller;
|
|
@@ -477,12 +474,12 @@ export class PoliciesImpl implements Policies {
|
|
|
477
474
|
async beginDeleteAndWait(
|
|
478
475
|
resourceGroupName: string,
|
|
479
476
|
policyName: string,
|
|
480
|
-
options?: PoliciesDeleteOptionalParams
|
|
477
|
+
options?: PoliciesDeleteOptionalParams,
|
|
481
478
|
): Promise<void> {
|
|
482
479
|
const poller = await this.beginDelete(
|
|
483
480
|
resourceGroupName,
|
|
484
481
|
policyName,
|
|
485
|
-
options
|
|
482
|
+
options,
|
|
486
483
|
);
|
|
487
484
|
return poller.pollUntilDone();
|
|
488
485
|
}
|
|
@@ -496,11 +493,11 @@ export class PoliciesImpl implements Policies {
|
|
|
496
493
|
private _listNext(
|
|
497
494
|
resourceGroupName: string,
|
|
498
495
|
nextLink: string,
|
|
499
|
-
options?: PoliciesListNextOptionalParams
|
|
496
|
+
options?: PoliciesListNextOptionalParams,
|
|
500
497
|
): Promise<PoliciesListNextResponse> {
|
|
501
498
|
return this.client.sendOperationRequest(
|
|
502
499
|
{ resourceGroupName, nextLink, options },
|
|
503
|
-
listNextOperationSpec
|
|
500
|
+
listNextOperationSpec,
|
|
504
501
|
);
|
|
505
502
|
}
|
|
506
503
|
|
|
@@ -511,11 +508,11 @@ export class PoliciesImpl implements Policies {
|
|
|
511
508
|
*/
|
|
512
509
|
private _listBySubscriptionNext(
|
|
513
510
|
nextLink: string,
|
|
514
|
-
options?: PoliciesListBySubscriptionNextOptionalParams
|
|
511
|
+
options?: PoliciesListBySubscriptionNextOptionalParams,
|
|
515
512
|
): Promise<PoliciesListBySubscriptionNextResponse> {
|
|
516
513
|
return this.client.sendOperationRequest(
|
|
517
514
|
{ nextLink, options },
|
|
518
|
-
listBySubscriptionNextOperationSpec
|
|
515
|
+
listBySubscriptionNextOperationSpec,
|
|
519
516
|
);
|
|
520
517
|
}
|
|
521
518
|
}
|
|
@@ -523,85 +520,81 @@ export class PoliciesImpl implements Policies {
|
|
|
523
520
|
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
524
521
|
|
|
525
522
|
const listOperationSpec: coreClient.OperationSpec = {
|
|
526
|
-
path:
|
|
527
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies",
|
|
523
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies",
|
|
528
524
|
httpMethod: "GET",
|
|
529
525
|
responses: {
|
|
530
526
|
200: {
|
|
531
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicyList
|
|
527
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicyList,
|
|
532
528
|
},
|
|
533
529
|
default: {
|
|
534
|
-
bodyMapper: Mappers.ErrorResponse
|
|
535
|
-
}
|
|
530
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
531
|
+
},
|
|
536
532
|
},
|
|
537
533
|
queryParameters: [Parameters.apiVersion],
|
|
538
534
|
urlParameters: [
|
|
539
535
|
Parameters.$host,
|
|
540
536
|
Parameters.resourceGroupName,
|
|
541
|
-
Parameters.subscriptionId
|
|
537
|
+
Parameters.subscriptionId,
|
|
542
538
|
],
|
|
543
539
|
headerParameters: [Parameters.accept],
|
|
544
|
-
serializer
|
|
540
|
+
serializer,
|
|
545
541
|
};
|
|
546
542
|
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
547
|
-
path:
|
|
548
|
-
"/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies",
|
|
543
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/frontDoorWebApplicationFirewallPolicies",
|
|
549
544
|
httpMethod: "GET",
|
|
550
545
|
responses: {
|
|
551
546
|
200: {
|
|
552
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicyList
|
|
547
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicyList,
|
|
553
548
|
},
|
|
554
549
|
default: {
|
|
555
|
-
bodyMapper: Mappers.DefaultErrorResponse
|
|
556
|
-
}
|
|
550
|
+
bodyMapper: Mappers.DefaultErrorResponse,
|
|
551
|
+
},
|
|
557
552
|
},
|
|
558
553
|
queryParameters: [Parameters.apiVersion],
|
|
559
554
|
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
560
555
|
headerParameters: [Parameters.accept],
|
|
561
|
-
serializer
|
|
556
|
+
serializer,
|
|
562
557
|
};
|
|
563
558
|
const getOperationSpec: coreClient.OperationSpec = {
|
|
564
|
-
path:
|
|
565
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
559
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
566
560
|
httpMethod: "GET",
|
|
567
561
|
responses: {
|
|
568
562
|
200: {
|
|
569
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
563
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
570
564
|
},
|
|
571
565
|
default: {
|
|
572
|
-
bodyMapper: Mappers.ErrorResponse
|
|
573
|
-
}
|
|
566
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
567
|
+
},
|
|
574
568
|
},
|
|
575
569
|
queryParameters: [Parameters.apiVersion],
|
|
576
570
|
urlParameters: [
|
|
577
571
|
Parameters.$host,
|
|
578
572
|
Parameters.resourceGroupName,
|
|
579
573
|
Parameters.subscriptionId,
|
|
580
|
-
Parameters.policyName
|
|
574
|
+
Parameters.policyName,
|
|
581
575
|
],
|
|
582
576
|
headerParameters: [Parameters.accept],
|
|
583
|
-
serializer
|
|
577
|
+
serializer,
|
|
584
578
|
};
|
|
585
579
|
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
586
|
-
path:
|
|
587
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
580
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
588
581
|
httpMethod: "PUT",
|
|
589
582
|
responses: {
|
|
590
583
|
200: {
|
|
591
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
584
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
592
585
|
},
|
|
593
586
|
201: {
|
|
594
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
587
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
595
588
|
},
|
|
596
589
|
202: {
|
|
597
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
590
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
598
591
|
},
|
|
599
592
|
204: {
|
|
600
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
593
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
601
594
|
},
|
|
602
595
|
default: {
|
|
603
|
-
bodyMapper: Mappers.ErrorResponse
|
|
604
|
-
}
|
|
596
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
597
|
+
},
|
|
605
598
|
},
|
|
606
599
|
requestBody: Parameters.parameters,
|
|
607
600
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -609,32 +602,31 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
|
609
602
|
Parameters.$host,
|
|
610
603
|
Parameters.resourceGroupName,
|
|
611
604
|
Parameters.subscriptionId,
|
|
612
|
-
Parameters.policyName
|
|
605
|
+
Parameters.policyName,
|
|
613
606
|
],
|
|
614
607
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
615
608
|
mediaType: "json",
|
|
616
|
-
serializer
|
|
609
|
+
serializer,
|
|
617
610
|
};
|
|
618
611
|
const updateOperationSpec: coreClient.OperationSpec = {
|
|
619
|
-
path:
|
|
620
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
612
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
621
613
|
httpMethod: "PATCH",
|
|
622
614
|
responses: {
|
|
623
615
|
200: {
|
|
624
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
616
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
625
617
|
},
|
|
626
618
|
201: {
|
|
627
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
619
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
628
620
|
},
|
|
629
621
|
202: {
|
|
630
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
622
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
631
623
|
},
|
|
632
624
|
204: {
|
|
633
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicy
|
|
625
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicy,
|
|
634
626
|
},
|
|
635
627
|
default: {
|
|
636
|
-
bodyMapper: Mappers.ErrorResponse
|
|
637
|
-
}
|
|
628
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
629
|
+
},
|
|
638
630
|
},
|
|
639
631
|
requestBody: Parameters.parameters1,
|
|
640
632
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -642,15 +634,14 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
642
634
|
Parameters.$host,
|
|
643
635
|
Parameters.resourceGroupName,
|
|
644
636
|
Parameters.subscriptionId,
|
|
645
|
-
Parameters.policyName
|
|
637
|
+
Parameters.policyName,
|
|
646
638
|
],
|
|
647
639
|
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
648
640
|
mediaType: "json",
|
|
649
|
-
serializer
|
|
641
|
+
serializer,
|
|
650
642
|
};
|
|
651
643
|
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
652
|
-
path:
|
|
653
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
644
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/FrontDoorWebApplicationFirewallPolicies/{policyName}",
|
|
654
645
|
httpMethod: "DELETE",
|
|
655
646
|
responses: { 200: {}, 201: {}, 202: {}, 204: {} },
|
|
656
647
|
queryParameters: [Parameters.apiVersion],
|
|
@@ -658,46 +649,46 @@ const deleteOperationSpec: coreClient.OperationSpec = {
|
|
|
658
649
|
Parameters.$host,
|
|
659
650
|
Parameters.resourceGroupName,
|
|
660
651
|
Parameters.subscriptionId,
|
|
661
|
-
Parameters.policyName
|
|
652
|
+
Parameters.policyName,
|
|
662
653
|
],
|
|
663
|
-
serializer
|
|
654
|
+
serializer,
|
|
664
655
|
};
|
|
665
656
|
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
666
657
|
path: "{nextLink}",
|
|
667
658
|
httpMethod: "GET",
|
|
668
659
|
responses: {
|
|
669
660
|
200: {
|
|
670
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicyList
|
|
661
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicyList,
|
|
671
662
|
},
|
|
672
663
|
default: {
|
|
673
|
-
bodyMapper: Mappers.ErrorResponse
|
|
674
|
-
}
|
|
664
|
+
bodyMapper: Mappers.ErrorResponse,
|
|
665
|
+
},
|
|
675
666
|
},
|
|
676
667
|
urlParameters: [
|
|
677
668
|
Parameters.$host,
|
|
678
669
|
Parameters.resourceGroupName,
|
|
679
670
|
Parameters.subscriptionId,
|
|
680
|
-
Parameters.nextLink
|
|
671
|
+
Parameters.nextLink,
|
|
681
672
|
],
|
|
682
673
|
headerParameters: [Parameters.accept],
|
|
683
|
-
serializer
|
|
674
|
+
serializer,
|
|
684
675
|
};
|
|
685
676
|
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
686
677
|
path: "{nextLink}",
|
|
687
678
|
httpMethod: "GET",
|
|
688
679
|
responses: {
|
|
689
680
|
200: {
|
|
690
|
-
bodyMapper: Mappers.WebApplicationFirewallPolicyList
|
|
681
|
+
bodyMapper: Mappers.WebApplicationFirewallPolicyList,
|
|
691
682
|
},
|
|
692
683
|
default: {
|
|
693
|
-
bodyMapper: Mappers.DefaultErrorResponse
|
|
694
|
-
}
|
|
684
|
+
bodyMapper: Mappers.DefaultErrorResponse,
|
|
685
|
+
},
|
|
695
686
|
},
|
|
696
687
|
urlParameters: [
|
|
697
688
|
Parameters.$host,
|
|
698
689
|
Parameters.subscriptionId,
|
|
699
|
-
Parameters.nextLink
|
|
690
|
+
Parameters.nextLink,
|
|
700
691
|
],
|
|
701
692
|
headerParameters: [Parameters.accept],
|
|
702
|
-
serializer
|
|
693
|
+
serializer,
|
|
703
694
|
};
|