@azure/arm-policyinsights 6.0.0-alpha.20250718.1 → 6.0.0-alpha.20250730.1
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/dist/browser/lroImpl.js +7 -3
- package/dist/browser/lroImpl.js.map +1 -1
- package/dist/browser/models/mappers.js +34 -16
- package/dist/browser/models/mappers.js.map +1 -1
- package/dist/browser/operations/attestations.js +100 -136
- package/dist/browser/operations/attestations.js.map +1 -1
- package/dist/browser/operations/componentPolicyStates.js +1 -0
- package/dist/browser/operations/componentPolicyStates.js.map +1 -1
- package/dist/browser/operations/operations.js +1 -0
- package/dist/browser/operations/operations.js.map +1 -1
- package/dist/browser/operations/policyEvents.js +180 -316
- package/dist/browser/operations/policyEvents.js.map +1 -1
- package/dist/browser/operations/policyMetadataOperations.js +23 -40
- package/dist/browser/operations/policyMetadataOperations.js.map +1 -1
- package/dist/browser/operations/policyRestrictions.js +1 -0
- package/dist/browser/operations/policyRestrictions.js.map +1 -1
- package/dist/browser/operations/policyStates.js +202 -328
- package/dist/browser/operations/policyStates.js.map +1 -1
- package/dist/browser/operations/policyTrackedResources.js +89 -157
- package/dist/browser/operations/policyTrackedResources.js.map +1 -1
- package/dist/browser/operations/remediations.js +177 -313
- package/dist/browser/operations/remediations.js.map +1 -1
- package/dist/browser/pagingHelper.js +2 -4
- package/dist/browser/pagingHelper.js.map +1 -1
- package/dist/browser/policyInsightsClient.js +21 -5
- package/dist/browser/policyInsightsClient.js.map +1 -1
- package/dist/commonjs/lroImpl.js +7 -3
- package/dist/commonjs/lroImpl.js.map +1 -1
- package/dist/commonjs/models/mappers.js +34 -16
- package/dist/commonjs/models/mappers.js.map +1 -1
- package/dist/commonjs/operations/attestations.js +100 -135
- package/dist/commonjs/operations/attestations.js.map +1 -1
- package/dist/commonjs/operations/componentPolicyStates.js +1 -0
- package/dist/commonjs/operations/componentPolicyStates.js.map +1 -1
- package/dist/commonjs/operations/operations.js +1 -0
- package/dist/commonjs/operations/operations.js.map +1 -1
- package/dist/commonjs/operations/policyEvents.js +180 -315
- package/dist/commonjs/operations/policyEvents.js.map +1 -1
- package/dist/commonjs/operations/policyMetadataOperations.js +23 -39
- package/dist/commonjs/operations/policyMetadataOperations.js.map +1 -1
- package/dist/commonjs/operations/policyRestrictions.js +1 -0
- package/dist/commonjs/operations/policyRestrictions.js.map +1 -1
- package/dist/commonjs/operations/policyStates.js +202 -327
- package/dist/commonjs/operations/policyStates.js.map +1 -1
- package/dist/commonjs/operations/policyTrackedResources.js +89 -156
- package/dist/commonjs/operations/policyTrackedResources.js.map +1 -1
- package/dist/commonjs/operations/remediations.js +177 -312
- package/dist/commonjs/operations/remediations.js.map +1 -1
- package/dist/commonjs/pagingHelper.js +2 -4
- package/dist/commonjs/pagingHelper.js.map +1 -1
- package/dist/commonjs/policyInsightsClient.js +21 -5
- package/dist/commonjs/policyInsightsClient.js.map +1 -1
- package/dist/commonjs/tsdoc-metadata.json +11 -11
- package/dist/esm/lroImpl.js +7 -3
- package/dist/esm/lroImpl.js.map +1 -1
- package/dist/esm/models/mappers.js +34 -16
- package/dist/esm/models/mappers.js.map +1 -1
- package/dist/esm/operations/attestations.js +100 -136
- package/dist/esm/operations/attestations.js.map +1 -1
- package/dist/esm/operations/componentPolicyStates.js +1 -0
- package/dist/esm/operations/componentPolicyStates.js.map +1 -1
- package/dist/esm/operations/operations.js +1 -0
- package/dist/esm/operations/operations.js.map +1 -1
- package/dist/esm/operations/policyEvents.js +180 -316
- package/dist/esm/operations/policyEvents.js.map +1 -1
- package/dist/esm/operations/policyMetadataOperations.js +23 -40
- package/dist/esm/operations/policyMetadataOperations.js.map +1 -1
- package/dist/esm/operations/policyRestrictions.js +1 -0
- package/dist/esm/operations/policyRestrictions.js.map +1 -1
- package/dist/esm/operations/policyStates.js +202 -328
- package/dist/esm/operations/policyStates.js.map +1 -1
- package/dist/esm/operations/policyTrackedResources.js +89 -157
- package/dist/esm/operations/policyTrackedResources.js.map +1 -1
- package/dist/esm/operations/remediations.js +177 -313
- package/dist/esm/operations/remediations.js.map +1 -1
- package/dist/esm/pagingHelper.js +2 -4
- package/dist/esm/pagingHelper.js.map +1 -1
- package/dist/esm/policyInsightsClient.js +21 -5
- package/dist/esm/policyInsightsClient.js.map +1 -1
- package/dist/react-native/lroImpl.js +7 -3
- package/dist/react-native/lroImpl.js.map +1 -1
- package/dist/react-native/models/mappers.js +34 -16
- package/dist/react-native/models/mappers.js.map +1 -1
- package/dist/react-native/operations/attestations.js +100 -136
- package/dist/react-native/operations/attestations.js.map +1 -1
- package/dist/react-native/operations/componentPolicyStates.js +1 -0
- package/dist/react-native/operations/componentPolicyStates.js.map +1 -1
- package/dist/react-native/operations/operations.js +1 -0
- package/dist/react-native/operations/operations.js.map +1 -1
- package/dist/react-native/operations/policyEvents.js +180 -316
- package/dist/react-native/operations/policyEvents.js.map +1 -1
- package/dist/react-native/operations/policyMetadataOperations.js +23 -40
- package/dist/react-native/operations/policyMetadataOperations.js.map +1 -1
- package/dist/react-native/operations/policyRestrictions.js +1 -0
- package/dist/react-native/operations/policyRestrictions.js.map +1 -1
- package/dist/react-native/operations/policyStates.js +202 -328
- package/dist/react-native/operations/policyStates.js.map +1 -1
- package/dist/react-native/operations/policyTrackedResources.js +89 -157
- package/dist/react-native/operations/policyTrackedResources.js.map +1 -1
- package/dist/react-native/operations/remediations.js +177 -313
- package/dist/react-native/operations/remediations.js.map +1 -1
- package/dist/react-native/pagingHelper.js +2 -4
- package/dist/react-native/pagingHelper.js.map +1 -1
- package/dist/react-native/policyInsightsClient.js +21 -5
- package/dist/react-native/policyInsightsClient.js.map +1 -1
- package/package.json +2 -2
- package/review/arm-policyinsights-node.api.md +1716 -1716
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
|
-
import { __asyncDelegator, __asyncGenerator, __asyncValues, __await } from "tslib";
|
|
9
8
|
import { setContinuationToken } from "../pagingHelper.js";
|
|
10
9
|
import * as coreClient from "@azure/core-client";
|
|
11
10
|
import * as Mappers from "../models/mappers.js";
|
|
@@ -15,6 +14,7 @@ import { createLroSpec } from "../lroImpl.js";
|
|
|
15
14
|
/// <reference lib="esnext.asynciterable" />
|
|
16
15
|
/** Class containing PolicyStates operations. */
|
|
17
16
|
export class PolicyStatesImpl {
|
|
17
|
+
client;
|
|
18
18
|
/**
|
|
19
19
|
* Initialize a new instance of the class PolicyStates class.
|
|
20
20
|
* @param client Reference to the service client
|
|
@@ -40,52 +40,35 @@ export class PolicyStatesImpl {
|
|
|
40
40
|
return this;
|
|
41
41
|
},
|
|
42
42
|
byPage: (settings) => {
|
|
43
|
-
if (settings
|
|
43
|
+
if (settings?.maxPageSize) {
|
|
44
44
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
45
45
|
}
|
|
46
46
|
return this.listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options, settings);
|
|
47
47
|
},
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
-
listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options, settings) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
});
|
|
50
|
+
async *listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options, settings) {
|
|
51
|
+
let result;
|
|
52
|
+
let continuationToken = settings?.continuationToken;
|
|
53
|
+
if (!continuationToken) {
|
|
54
|
+
result = await this._listQueryResultsForManagementGroup(policyStatesResource, managementGroupName, options);
|
|
55
|
+
let page = result.value || [];
|
|
56
|
+
continuationToken = result.odataNextLink;
|
|
57
|
+
setContinuationToken(page, continuationToken);
|
|
58
|
+
yield page;
|
|
59
|
+
}
|
|
60
|
+
while (continuationToken) {
|
|
61
|
+
result = await this._listQueryResultsForManagementGroupNext(policyStatesResource, managementGroupName, continuationToken, options);
|
|
62
|
+
continuationToken = result.odataNextLink;
|
|
63
|
+
let page = result.value || [];
|
|
64
|
+
setContinuationToken(page, continuationToken);
|
|
65
|
+
yield page;
|
|
66
|
+
}
|
|
69
67
|
}
|
|
70
|
-
listQueryResultsForManagementGroupPagingAll(policyStatesResource, managementGroupName, options) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
75
|
-
_c = _f.value;
|
|
76
|
-
_d = false;
|
|
77
|
-
const page = _c;
|
|
78
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
82
|
-
finally {
|
|
83
|
-
try {
|
|
84
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
85
|
-
}
|
|
86
|
-
finally { if (e_1) throw e_1.error; }
|
|
87
|
-
}
|
|
88
|
-
});
|
|
68
|
+
async *listQueryResultsForManagementGroupPagingAll(policyStatesResource, managementGroupName, options) {
|
|
69
|
+
for await (const page of this.listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options)) {
|
|
70
|
+
yield* page;
|
|
71
|
+
}
|
|
89
72
|
}
|
|
90
73
|
/**
|
|
91
74
|
* Queries policy states for the resources under the subscription.
|
|
@@ -105,52 +88,35 @@ export class PolicyStatesImpl {
|
|
|
105
88
|
return this;
|
|
106
89
|
},
|
|
107
90
|
byPage: (settings) => {
|
|
108
|
-
if (settings
|
|
91
|
+
if (settings?.maxPageSize) {
|
|
109
92
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
110
93
|
}
|
|
111
94
|
return this.listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options, settings);
|
|
112
95
|
},
|
|
113
96
|
};
|
|
114
97
|
}
|
|
115
|
-
listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options, settings) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
});
|
|
98
|
+
async *listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options, settings) {
|
|
99
|
+
let result;
|
|
100
|
+
let continuationToken = settings?.continuationToken;
|
|
101
|
+
if (!continuationToken) {
|
|
102
|
+
result = await this._listQueryResultsForSubscription(policyStatesResource, subscriptionId, options);
|
|
103
|
+
let page = result.value || [];
|
|
104
|
+
continuationToken = result.odataNextLink;
|
|
105
|
+
setContinuationToken(page, continuationToken);
|
|
106
|
+
yield page;
|
|
107
|
+
}
|
|
108
|
+
while (continuationToken) {
|
|
109
|
+
result = await this._listQueryResultsForSubscriptionNext(policyStatesResource, subscriptionId, continuationToken, options);
|
|
110
|
+
continuationToken = result.odataNextLink;
|
|
111
|
+
let page = result.value || [];
|
|
112
|
+
setContinuationToken(page, continuationToken);
|
|
113
|
+
yield page;
|
|
114
|
+
}
|
|
134
115
|
}
|
|
135
|
-
listQueryResultsForSubscriptionPagingAll(policyStatesResource, subscriptionId, options) {
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
140
|
-
_c = _f.value;
|
|
141
|
-
_d = false;
|
|
142
|
-
const page = _c;
|
|
143
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
147
|
-
finally {
|
|
148
|
-
try {
|
|
149
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
150
|
-
}
|
|
151
|
-
finally { if (e_2) throw e_2.error; }
|
|
152
|
-
}
|
|
153
|
-
});
|
|
116
|
+
async *listQueryResultsForSubscriptionPagingAll(policyStatesResource, subscriptionId, options) {
|
|
117
|
+
for await (const page of this.listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options)) {
|
|
118
|
+
yield* page;
|
|
119
|
+
}
|
|
154
120
|
}
|
|
155
121
|
/**
|
|
156
122
|
* Queries policy states for the resources under the resource group.
|
|
@@ -171,52 +137,35 @@ export class PolicyStatesImpl {
|
|
|
171
137
|
return this;
|
|
172
138
|
},
|
|
173
139
|
byPage: (settings) => {
|
|
174
|
-
if (settings
|
|
140
|
+
if (settings?.maxPageSize) {
|
|
175
141
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
176
142
|
}
|
|
177
143
|
return this.listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options, settings);
|
|
178
144
|
},
|
|
179
145
|
};
|
|
180
146
|
}
|
|
181
|
-
listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options, settings) {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
}
|
|
199
|
-
});
|
|
147
|
+
async *listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options, settings) {
|
|
148
|
+
let result;
|
|
149
|
+
let continuationToken = settings?.continuationToken;
|
|
150
|
+
if (!continuationToken) {
|
|
151
|
+
result = await this._listQueryResultsForResourceGroup(policyStatesResource, subscriptionId, resourceGroupName, options);
|
|
152
|
+
let page = result.value || [];
|
|
153
|
+
continuationToken = result.odataNextLink;
|
|
154
|
+
setContinuationToken(page, continuationToken);
|
|
155
|
+
yield page;
|
|
156
|
+
}
|
|
157
|
+
while (continuationToken) {
|
|
158
|
+
result = await this._listQueryResultsForResourceGroupNext(policyStatesResource, subscriptionId, resourceGroupName, continuationToken, options);
|
|
159
|
+
continuationToken = result.odataNextLink;
|
|
160
|
+
let page = result.value || [];
|
|
161
|
+
setContinuationToken(page, continuationToken);
|
|
162
|
+
yield page;
|
|
163
|
+
}
|
|
200
164
|
}
|
|
201
|
-
listQueryResultsForResourceGroupPagingAll(policyStatesResource, subscriptionId, resourceGroupName, options) {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
206
|
-
_c = _f.value;
|
|
207
|
-
_d = false;
|
|
208
|
-
const page = _c;
|
|
209
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
catch (e_3_1) { e_3 = { error: e_3_1 }; }
|
|
213
|
-
finally {
|
|
214
|
-
try {
|
|
215
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
216
|
-
}
|
|
217
|
-
finally { if (e_3) throw e_3.error; }
|
|
218
|
-
}
|
|
219
|
-
});
|
|
165
|
+
async *listQueryResultsForResourceGroupPagingAll(policyStatesResource, subscriptionId, resourceGroupName, options) {
|
|
166
|
+
for await (const page of this.listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options)) {
|
|
167
|
+
yield* page;
|
|
168
|
+
}
|
|
220
169
|
}
|
|
221
170
|
/**
|
|
222
171
|
* Queries policy states for the resource.
|
|
@@ -236,52 +185,35 @@ export class PolicyStatesImpl {
|
|
|
236
185
|
return this;
|
|
237
186
|
},
|
|
238
187
|
byPage: (settings) => {
|
|
239
|
-
if (settings
|
|
188
|
+
if (settings?.maxPageSize) {
|
|
240
189
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
241
190
|
}
|
|
242
191
|
return this.listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options, settings);
|
|
243
192
|
},
|
|
244
193
|
};
|
|
245
194
|
}
|
|
246
|
-
listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options, settings) {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
});
|
|
195
|
+
async *listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options, settings) {
|
|
196
|
+
let result;
|
|
197
|
+
let continuationToken = settings?.continuationToken;
|
|
198
|
+
if (!continuationToken) {
|
|
199
|
+
result = await this._listQueryResultsForResource(policyStatesResource, resourceId, options);
|
|
200
|
+
let page = result.value || [];
|
|
201
|
+
continuationToken = result.odataNextLink;
|
|
202
|
+
setContinuationToken(page, continuationToken);
|
|
203
|
+
yield page;
|
|
204
|
+
}
|
|
205
|
+
while (continuationToken) {
|
|
206
|
+
result = await this._listQueryResultsForResourceNext(policyStatesResource, resourceId, continuationToken, options);
|
|
207
|
+
continuationToken = result.odataNextLink;
|
|
208
|
+
let page = result.value || [];
|
|
209
|
+
setContinuationToken(page, continuationToken);
|
|
210
|
+
yield page;
|
|
211
|
+
}
|
|
265
212
|
}
|
|
266
|
-
listQueryResultsForResourcePagingAll(policyStatesResource, resourceId, options) {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
271
|
-
_c = _f.value;
|
|
272
|
-
_d = false;
|
|
273
|
-
const page = _c;
|
|
274
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
catch (e_4_1) { e_4 = { error: e_4_1 }; }
|
|
278
|
-
finally {
|
|
279
|
-
try {
|
|
280
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
281
|
-
}
|
|
282
|
-
finally { if (e_4) throw e_4.error; }
|
|
283
|
-
}
|
|
284
|
-
});
|
|
213
|
+
async *listQueryResultsForResourcePagingAll(policyStatesResource, resourceId, options) {
|
|
214
|
+
for await (const page of this.listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options)) {
|
|
215
|
+
yield* page;
|
|
216
|
+
}
|
|
285
217
|
}
|
|
286
218
|
/**
|
|
287
219
|
* Queries policy states for the subscription level policy set definition.
|
|
@@ -302,52 +234,35 @@ export class PolicyStatesImpl {
|
|
|
302
234
|
return this;
|
|
303
235
|
},
|
|
304
236
|
byPage: (settings) => {
|
|
305
|
-
if (settings
|
|
237
|
+
if (settings?.maxPageSize) {
|
|
306
238
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
307
239
|
}
|
|
308
240
|
return this.listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options, settings);
|
|
309
241
|
},
|
|
310
242
|
};
|
|
311
243
|
}
|
|
312
|
-
listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options, settings) {
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
}
|
|
330
|
-
});
|
|
244
|
+
async *listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options, settings) {
|
|
245
|
+
let result;
|
|
246
|
+
let continuationToken = settings?.continuationToken;
|
|
247
|
+
if (!continuationToken) {
|
|
248
|
+
result = await this._listQueryResultsForPolicySetDefinition(policyStatesResource, subscriptionId, policySetDefinitionName, options);
|
|
249
|
+
let page = result.value || [];
|
|
250
|
+
continuationToken = result.odataNextLink;
|
|
251
|
+
setContinuationToken(page, continuationToken);
|
|
252
|
+
yield page;
|
|
253
|
+
}
|
|
254
|
+
while (continuationToken) {
|
|
255
|
+
result = await this._listQueryResultsForPolicySetDefinitionNext(policyStatesResource, subscriptionId, policySetDefinitionName, continuationToken, options);
|
|
256
|
+
continuationToken = result.odataNextLink;
|
|
257
|
+
let page = result.value || [];
|
|
258
|
+
setContinuationToken(page, continuationToken);
|
|
259
|
+
yield page;
|
|
260
|
+
}
|
|
331
261
|
}
|
|
332
|
-
listQueryResultsForPolicySetDefinitionPagingAll(policyStatesResource, subscriptionId, policySetDefinitionName, options) {
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
337
|
-
_c = _f.value;
|
|
338
|
-
_d = false;
|
|
339
|
-
const page = _c;
|
|
340
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
344
|
-
finally {
|
|
345
|
-
try {
|
|
346
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
347
|
-
}
|
|
348
|
-
finally { if (e_5) throw e_5.error; }
|
|
349
|
-
}
|
|
350
|
-
});
|
|
262
|
+
async *listQueryResultsForPolicySetDefinitionPagingAll(policyStatesResource, subscriptionId, policySetDefinitionName, options) {
|
|
263
|
+
for await (const page of this.listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options)) {
|
|
264
|
+
yield* page;
|
|
265
|
+
}
|
|
351
266
|
}
|
|
352
267
|
/**
|
|
353
268
|
* Queries policy states for the subscription level policy definition.
|
|
@@ -368,52 +283,35 @@ export class PolicyStatesImpl {
|
|
|
368
283
|
return this;
|
|
369
284
|
},
|
|
370
285
|
byPage: (settings) => {
|
|
371
|
-
if (settings
|
|
286
|
+
if (settings?.maxPageSize) {
|
|
372
287
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
373
288
|
}
|
|
374
289
|
return this.listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options, settings);
|
|
375
290
|
},
|
|
376
291
|
};
|
|
377
292
|
}
|
|
378
|
-
listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options, settings) {
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
}
|
|
396
|
-
});
|
|
293
|
+
async *listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options, settings) {
|
|
294
|
+
let result;
|
|
295
|
+
let continuationToken = settings?.continuationToken;
|
|
296
|
+
if (!continuationToken) {
|
|
297
|
+
result = await this._listQueryResultsForPolicyDefinition(policyStatesResource, subscriptionId, policyDefinitionName, options);
|
|
298
|
+
let page = result.value || [];
|
|
299
|
+
continuationToken = result.odataNextLink;
|
|
300
|
+
setContinuationToken(page, continuationToken);
|
|
301
|
+
yield page;
|
|
302
|
+
}
|
|
303
|
+
while (continuationToken) {
|
|
304
|
+
result = await this._listQueryResultsForPolicyDefinitionNext(policyStatesResource, subscriptionId, policyDefinitionName, continuationToken, options);
|
|
305
|
+
continuationToken = result.odataNextLink;
|
|
306
|
+
let page = result.value || [];
|
|
307
|
+
setContinuationToken(page, continuationToken);
|
|
308
|
+
yield page;
|
|
309
|
+
}
|
|
397
310
|
}
|
|
398
|
-
listQueryResultsForPolicyDefinitionPagingAll(policyStatesResource, subscriptionId, policyDefinitionName, options) {
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
403
|
-
_c = _f.value;
|
|
404
|
-
_d = false;
|
|
405
|
-
const page = _c;
|
|
406
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
catch (e_6_1) { e_6 = { error: e_6_1 }; }
|
|
410
|
-
finally {
|
|
411
|
-
try {
|
|
412
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
413
|
-
}
|
|
414
|
-
finally { if (e_6) throw e_6.error; }
|
|
415
|
-
}
|
|
416
|
-
});
|
|
311
|
+
async *listQueryResultsForPolicyDefinitionPagingAll(policyStatesResource, subscriptionId, policyDefinitionName, options) {
|
|
312
|
+
for await (const page of this.listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options)) {
|
|
313
|
+
yield* page;
|
|
314
|
+
}
|
|
417
315
|
}
|
|
418
316
|
/**
|
|
419
317
|
* Queries policy states for the subscription level policy assignment.
|
|
@@ -434,53 +332,36 @@ export class PolicyStatesImpl {
|
|
|
434
332
|
return this;
|
|
435
333
|
},
|
|
436
334
|
byPage: (settings) => {
|
|
437
|
-
if (settings
|
|
335
|
+
if (settings?.maxPageSize) {
|
|
438
336
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
439
337
|
}
|
|
440
338
|
return this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options, settings);
|
|
441
339
|
},
|
|
442
340
|
};
|
|
443
341
|
}
|
|
444
|
-
listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options, settings) {
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
}
|
|
463
|
-
});
|
|
342
|
+
async *listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options, settings) {
|
|
343
|
+
let result;
|
|
344
|
+
let continuationToken = settings?.continuationToken;
|
|
345
|
+
if (!continuationToken) {
|
|
346
|
+
result = await this._listQueryResultsForSubscriptionLevelPolicyAssignment(policyStatesResource, subscriptionId, policyAssignmentName, options);
|
|
347
|
+
let page = result.value || [];
|
|
348
|
+
continuationToken = result.odataNextLink;
|
|
349
|
+
setContinuationToken(page, continuationToken);
|
|
350
|
+
yield page;
|
|
351
|
+
}
|
|
352
|
+
while (continuationToken) {
|
|
353
|
+
result =
|
|
354
|
+
await this._listQueryResultsForSubscriptionLevelPolicyAssignmentNext(policyStatesResource, subscriptionId, policyAssignmentName, continuationToken, options);
|
|
355
|
+
continuationToken = result.odataNextLink;
|
|
356
|
+
let page = result.value || [];
|
|
357
|
+
setContinuationToken(page, continuationToken);
|
|
358
|
+
yield page;
|
|
359
|
+
}
|
|
464
360
|
}
|
|
465
|
-
listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, policyAssignmentName, options) {
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
470
|
-
_c = _f.value;
|
|
471
|
-
_d = false;
|
|
472
|
-
const page = _c;
|
|
473
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
474
|
-
}
|
|
475
|
-
}
|
|
476
|
-
catch (e_7_1) { e_7 = { error: e_7_1 }; }
|
|
477
|
-
finally {
|
|
478
|
-
try {
|
|
479
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
480
|
-
}
|
|
481
|
-
finally { if (e_7) throw e_7.error; }
|
|
482
|
-
}
|
|
483
|
-
});
|
|
361
|
+
async *listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, policyAssignmentName, options) {
|
|
362
|
+
for await (const page of this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options)) {
|
|
363
|
+
yield* page;
|
|
364
|
+
}
|
|
484
365
|
}
|
|
485
366
|
/**
|
|
486
367
|
* Queries policy states for the resource group level policy assignment.
|
|
@@ -502,54 +383,37 @@ export class PolicyStatesImpl {
|
|
|
502
383
|
return this;
|
|
503
384
|
},
|
|
504
385
|
byPage: (settings) => {
|
|
505
|
-
if (settings
|
|
386
|
+
if (settings?.maxPageSize) {
|
|
506
387
|
throw new Error("maxPageSize is not supported by this operation.");
|
|
507
388
|
}
|
|
508
389
|
return this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options, settings);
|
|
509
390
|
},
|
|
510
391
|
};
|
|
511
392
|
}
|
|
512
|
-
listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options, settings) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
}
|
|
532
|
-
});
|
|
393
|
+
async *listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options, settings) {
|
|
394
|
+
let result;
|
|
395
|
+
let continuationToken = settings?.continuationToken;
|
|
396
|
+
if (!continuationToken) {
|
|
397
|
+
result =
|
|
398
|
+
await this._listQueryResultsForResourceGroupLevelPolicyAssignment(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options);
|
|
399
|
+
let page = result.value || [];
|
|
400
|
+
continuationToken = result.odataNextLink;
|
|
401
|
+
setContinuationToken(page, continuationToken);
|
|
402
|
+
yield page;
|
|
403
|
+
}
|
|
404
|
+
while (continuationToken) {
|
|
405
|
+
result =
|
|
406
|
+
await this._listQueryResultsForResourceGroupLevelPolicyAssignmentNext(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, continuationToken, options);
|
|
407
|
+
continuationToken = result.odataNextLink;
|
|
408
|
+
let page = result.value || [];
|
|
409
|
+
setContinuationToken(page, continuationToken);
|
|
410
|
+
yield page;
|
|
411
|
+
}
|
|
533
412
|
}
|
|
534
|
-
listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options) {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
for (var _d = true, _e = __asyncValues(this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
539
|
-
_c = _f.value;
|
|
540
|
-
_d = false;
|
|
541
|
-
const page = _c;
|
|
542
|
-
yield __await(yield* __asyncDelegator(__asyncValues(page)));
|
|
543
|
-
}
|
|
544
|
-
}
|
|
545
|
-
catch (e_8_1) { e_8 = { error: e_8_1 }; }
|
|
546
|
-
finally {
|
|
547
|
-
try {
|
|
548
|
-
if (!_d && !_a && (_b = _e.return)) yield __await(_b.call(_e));
|
|
549
|
-
}
|
|
550
|
-
finally { if (e_8) throw e_8.error; }
|
|
551
|
-
}
|
|
552
|
-
});
|
|
413
|
+
async *listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options) {
|
|
414
|
+
for await (const page of this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options)) {
|
|
415
|
+
yield* page;
|
|
416
|
+
}
|
|
553
417
|
}
|
|
554
418
|
/**
|
|
555
419
|
* Queries policy states for the resources under the management group.
|
|
@@ -656,14 +520,19 @@ export class PolicyStatesImpl {
|
|
|
656
520
|
return this.client.sendOperationRequest(args, spec);
|
|
657
521
|
};
|
|
658
522
|
const sendOperationFn = async (args, spec) => {
|
|
659
|
-
var _a;
|
|
660
523
|
let currentRawResponse = undefined;
|
|
661
|
-
const providedCallback =
|
|
524
|
+
const providedCallback = args.options?.onResponse;
|
|
662
525
|
const callback = (rawResponse, flatResponse) => {
|
|
663
526
|
currentRawResponse = rawResponse;
|
|
664
|
-
providedCallback
|
|
527
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
528
|
+
};
|
|
529
|
+
const updatedArgs = {
|
|
530
|
+
...args,
|
|
531
|
+
options: {
|
|
532
|
+
...args.options,
|
|
533
|
+
onResponse: callback,
|
|
534
|
+
},
|
|
665
535
|
};
|
|
666
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
667
536
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
668
537
|
return {
|
|
669
538
|
flatResponse,
|
|
@@ -680,8 +549,8 @@ export class PolicyStatesImpl {
|
|
|
680
549
|
spec: triggerSubscriptionEvaluationOperationSpec,
|
|
681
550
|
});
|
|
682
551
|
const poller = await createHttpPoller(lro, {
|
|
683
|
-
restoreFrom: options
|
|
684
|
-
intervalInMs: options
|
|
552
|
+
restoreFrom: options?.resumeFrom,
|
|
553
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
685
554
|
resourceLocationConfig: "location",
|
|
686
555
|
});
|
|
687
556
|
await poller.poll();
|
|
@@ -707,14 +576,19 @@ export class PolicyStatesImpl {
|
|
|
707
576
|
return this.client.sendOperationRequest(args, spec);
|
|
708
577
|
};
|
|
709
578
|
const sendOperationFn = async (args, spec) => {
|
|
710
|
-
var _a;
|
|
711
579
|
let currentRawResponse = undefined;
|
|
712
|
-
const providedCallback =
|
|
580
|
+
const providedCallback = args.options?.onResponse;
|
|
713
581
|
const callback = (rawResponse, flatResponse) => {
|
|
714
582
|
currentRawResponse = rawResponse;
|
|
715
|
-
providedCallback
|
|
583
|
+
providedCallback?.(rawResponse, flatResponse);
|
|
584
|
+
};
|
|
585
|
+
const updatedArgs = {
|
|
586
|
+
...args,
|
|
587
|
+
options: {
|
|
588
|
+
...args.options,
|
|
589
|
+
onResponse: callback,
|
|
590
|
+
},
|
|
716
591
|
};
|
|
717
|
-
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
718
592
|
const flatResponse = await directSendOperation(updatedArgs, spec);
|
|
719
593
|
return {
|
|
720
594
|
flatResponse,
|
|
@@ -731,8 +605,8 @@ export class PolicyStatesImpl {
|
|
|
731
605
|
spec: triggerResourceGroupEvaluationOperationSpec,
|
|
732
606
|
});
|
|
733
607
|
const poller = await createHttpPoller(lro, {
|
|
734
|
-
restoreFrom: options
|
|
735
|
-
intervalInMs: options
|
|
608
|
+
restoreFrom: options?.resumeFrom,
|
|
609
|
+
intervalInMs: options?.updateIntervalInMs,
|
|
736
610
|
resourceLocationConfig: "location",
|
|
737
611
|
});
|
|
738
612
|
await poller.poll();
|