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