@azure/arm-policyinsights 3.2.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +72 -79
  4. package/dist/index.js +8639 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1870 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +50 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +60 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +1336 -589
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +42 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/parameters.js +202 -166
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/attestations.d.ts +161 -0
  29. package/dist-esm/src/operations/attestations.d.ts.map +1 -0
  30. package/dist-esm/src/operations/attestations.js +747 -0
  31. package/dist-esm/src/operations/attestations.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +5 -5
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +18 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +46 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/policyEvents.d.ts +208 -0
  41. package/dist-esm/src/operations/policyEvents.d.ts.map +1 -0
  42. package/dist-esm/src/operations/policyEvents.js +1097 -0
  43. package/dist-esm/src/operations/policyEvents.js.map +1 -0
  44. package/dist-esm/src/operations/policyMetadataOperations.d.ts +38 -0
  45. package/dist-esm/src/operations/policyMetadataOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/policyMetadataOperations.js +144 -0
  47. package/dist-esm/src/operations/policyMetadataOperations.js.map +1 -0
  48. package/dist-esm/src/operations/policyRestrictions.d.ts +27 -0
  49. package/dist-esm/src/operations/policyRestrictions.d.ts.map +1 -0
  50. package/dist-esm/src/operations/policyRestrictions.js +81 -0
  51. package/dist-esm/src/operations/policyRestrictions.js.map +1 -0
  52. package/dist-esm/src/operations/policyStates.d.ts +361 -0
  53. package/dist-esm/src/operations/policyStates.d.ts.map +1 -0
  54. package/dist-esm/src/operations/policyStates.js +1632 -0
  55. package/dist-esm/src/operations/policyStates.js.map +1 -0
  56. package/dist-esm/src/operations/policyTrackedResources.d.ts +99 -0
  57. package/dist-esm/src/operations/policyTrackedResources.d.ts.map +1 -0
  58. package/dist-esm/src/operations/policyTrackedResources.js +458 -0
  59. package/dist-esm/src/operations/policyTrackedResources.js.map +1 -0
  60. package/dist-esm/src/operations/remediations.d.ts +304 -0
  61. package/dist-esm/src/operations/remediations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/remediations.js +1377 -0
  63. package/dist-esm/src/operations/remediations.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/attestations.d.ts +110 -0
  65. package/dist-esm/src/operationsInterfaces/attestations.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/attestations.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/attestations.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/index.d.ts +9 -0
  69. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/index.js +16 -0
  71. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  73. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/policyEvents.d.ts +60 -0
  77. package/dist-esm/src/operationsInterfaces/policyEvents.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/policyEvents.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/policyEvents.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.d.ts +17 -0
  81. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/policyRestrictions.d.ts +19 -0
  85. package/dist-esm/src/operationsInterfaces/policyRestrictions.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/policyRestrictions.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/policyRestrictions.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/policyStates.d.ts +165 -0
  89. package/dist-esm/src/operationsInterfaces/policyStates.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/policyStates.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/policyStates.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/policyTrackedResources.d.ts +29 -0
  93. package/dist-esm/src/operationsInterfaces/policyTrackedResources.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/policyTrackedResources.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/policyTrackedResources.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/remediations.d.ts +168 -0
  97. package/dist-esm/src/operationsInterfaces/remediations.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/remediations.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/remediations.js.map +1 -0
  100. package/dist-esm/src/policyInsightsClient.d.ts +24 -0
  101. package/dist-esm/src/policyInsightsClient.d.ts.map +1 -0
  102. package/dist-esm/src/policyInsightsClient.js +57 -0
  103. package/dist-esm/src/policyInsightsClient.js.map +1 -0
  104. package/dist-esm/test/sampleTest.d.ts +2 -0
  105. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  106. package/dist-esm/test/sampleTest.js +40 -0
  107. package/dist-esm/test/sampleTest.js.map +1 -0
  108. package/package.json +82 -22
  109. package/review/arm-policyinsights.api.md +1525 -0
  110. package/rollup.config.js +181 -30
  111. package/src/index.ts +12 -0
  112. package/src/lroImpl.ts +34 -0
  113. package/src/models/index.ts +1645 -2293
  114. package/src/models/mappers.ts +1579 -795
  115. package/src/models/parameters.ts +250 -167
  116. package/src/operations/attestations.ts +999 -0
  117. package/src/operations/index.ts +5 -5
  118. package/src/operations/operations.ts +29 -44
  119. package/src/operations/policyEvents.ts +1158 -327
  120. package/src/operations/policyMetadataOperations.ts +108 -113
  121. package/src/operations/policyRestrictions.ts +111 -0
  122. package/src/operations/policyStates.ts +1751 -750
  123. package/src/operations/policyTrackedResources.ts +416 -284
  124. package/src/operations/remediations.ts +1208 -1248
  125. package/src/operationsInterfaces/attestations.ts +212 -0
  126. package/src/operationsInterfaces/index.ts +16 -0
  127. package/src/operationsInterfaces/operations.ts +21 -0
  128. package/src/operationsInterfaces/policyEvents.ts +109 -0
  129. package/src/operationsInterfaces/policyMetadataOperations.ts +36 -0
  130. package/src/operationsInterfaces/policyRestrictions.ts +40 -0
  131. package/src/operationsInterfaces/policyStates.ts +287 -0
  132. package/src/operationsInterfaces/policyTrackedResources.ts +55 -0
  133. package/src/operationsInterfaces/remediations.ts +310 -0
  134. package/src/policyInsightsClient.ts +93 -39
  135. package/tsconfig.json +20 -7
  136. package/types/arm-policyinsights.d.ts +2728 -0
  137. package/types/tsdoc-metadata.json +11 -0
  138. package/dist/arm-policyinsights.js +0 -4909
  139. package/dist/arm-policyinsights.js.map +0 -1
  140. package/dist/arm-policyinsights.min.js +0 -1
  141. package/dist/arm-policyinsights.min.js.map +0 -1
  142. package/esm/models/index.d.ts +0 -2651
  143. package/esm/models/index.d.ts.map +0 -1
  144. package/esm/models/index.js +0 -8
  145. package/esm/models/index.js.map +0 -1
  146. package/esm/models/mappers.d.ts +0 -40
  147. package/esm/models/mappers.d.ts.map +0 -1
  148. package/esm/models/mappers.js.map +0 -1
  149. package/esm/models/operationsMappers.d.ts +0 -2
  150. package/esm/models/operationsMappers.d.ts.map +0 -1
  151. package/esm/models/operationsMappers.js +0 -9
  152. package/esm/models/operationsMappers.js.map +0 -1
  153. package/esm/models/parameters.d.ts +0 -33
  154. package/esm/models/parameters.d.ts.map +0 -1
  155. package/esm/models/parameters.js.map +0 -1
  156. package/esm/models/policyEventsMappers.d.ts +0 -2
  157. package/esm/models/policyEventsMappers.d.ts.map +0 -1
  158. package/esm/models/policyEventsMappers.js +0 -9
  159. package/esm/models/policyEventsMappers.js.map +0 -1
  160. package/esm/models/policyMetadataOperationsMappers.d.ts +0 -2
  161. package/esm/models/policyMetadataOperationsMappers.d.ts.map +0 -1
  162. package/esm/models/policyMetadataOperationsMappers.js +0 -9
  163. package/esm/models/policyMetadataOperationsMappers.js.map +0 -1
  164. package/esm/models/policyStatesMappers.d.ts +0 -2
  165. package/esm/models/policyStatesMappers.d.ts.map +0 -1
  166. package/esm/models/policyStatesMappers.js +0 -9
  167. package/esm/models/policyStatesMappers.js.map +0 -1
  168. package/esm/models/policyTrackedResourcesMappers.d.ts +0 -2
  169. package/esm/models/policyTrackedResourcesMappers.d.ts.map +0 -1
  170. package/esm/models/policyTrackedResourcesMappers.js +0 -9
  171. package/esm/models/policyTrackedResourcesMappers.js.map +0 -1
  172. package/esm/models/remediationsMappers.d.ts +0 -2
  173. package/esm/models/remediationsMappers.d.ts.map +0 -1
  174. package/esm/models/remediationsMappers.js +0 -9
  175. package/esm/models/remediationsMappers.js.map +0 -1
  176. package/esm/operations/index.d.ts.map +0 -1
  177. package/esm/operations/index.js.map +0 -1
  178. package/esm/operations/operations.d.ts +0 -28
  179. package/esm/operations/operations.d.ts.map +0 -1
  180. package/esm/operations/operations.js +0 -51
  181. package/esm/operations/operations.js.map +0 -1
  182. package/esm/operations/policyEvents.d.ts +0 -198
  183. package/esm/operations/policyEvents.d.ts.map +0 -1
  184. package/esm/operations/policyEvents.js +0 -365
  185. package/esm/operations/policyEvents.js.map +0 -1
  186. package/esm/operations/policyMetadataOperations.d.ts +0 -64
  187. package/esm/operations/policyMetadataOperations.d.ts.map +0 -1
  188. package/esm/operations/policyMetadataOperations.js +0 -106
  189. package/esm/operations/policyMetadataOperations.js.map +0 -1
  190. package/esm/operations/policyStates.d.ts +0 -442
  191. package/esm/operations/policyStates.d.ts.map +0 -1
  192. package/esm/operations/policyStates.js +0 -712
  193. package/esm/operations/policyStates.js.map +0 -1
  194. package/esm/operations/policyTrackedResources.d.ts +0 -160
  195. package/esm/operations/policyTrackedResources.d.ts.map +0 -1
  196. package/esm/operations/policyTrackedResources.js +0 -258
  197. package/esm/operations/policyTrackedResources.js.map +0 -1
  198. package/esm/operations/remediations.d.ts +0 -679
  199. package/esm/operations/remediations.d.ts.map +0 -1
  200. package/esm/operations/remediations.js +0 -1014
  201. package/esm/operations/remediations.js.map +0 -1
  202. package/esm/policyInsightsClient.d.ts +0 -22
  203. package/esm/policyInsightsClient.d.ts.map +0 -1
  204. package/esm/policyInsightsClient.js +0 -37
  205. package/esm/policyInsightsClient.js.map +0 -1
  206. package/esm/policyInsightsClientContext.d.ts +0 -13
  207. package/esm/policyInsightsClientContext.d.ts.map +0 -1
  208. package/esm/policyInsightsClientContext.js +0 -50
  209. package/esm/policyInsightsClientContext.js.map +0 -1
  210. package/src/models/operationsMappers.ts +0 -15
  211. package/src/models/policyEventsMappers.ts +0 -14
  212. package/src/models/policyMetadataOperationsMappers.ts +0 -16
  213. package/src/models/policyStatesMappers.ts +0 -24
  214. package/src/models/policyTrackedResourcesMappers.ts +0 -16
  215. package/src/models/remediationsMappers.ts +0 -20
  216. package/src/policyInsightsClientContext.ts +0 -54
@@ -0,0 +1,1632 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+ import { __asyncDelegator, __asyncGenerator, __asyncValues, __await, __awaiter } from "tslib";
9
+ import * as coreClient from "@azure/core-client";
10
+ import * as Mappers from "../models/mappers";
11
+ import * as Parameters from "../models/parameters";
12
+ import { LroEngine } from "@azure/core-lro";
13
+ import { LroImpl } from "../lroImpl";
14
+ /// <reference lib="esnext.asynciterable" />
15
+ /** Class containing PolicyStates operations. */
16
+ export class PolicyStatesImpl {
17
+ /**
18
+ * Initialize a new instance of the class PolicyStates class.
19
+ * @param client Reference to the service client
20
+ */
21
+ constructor(client) {
22
+ this.client = client;
23
+ }
24
+ /**
25
+ * Queries policy states for the resources under the management group.
26
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
27
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
28
+ * state(s).
29
+ * @param managementGroupName Management group name.
30
+ * @param options The options parameters.
31
+ */
32
+ listQueryResultsForManagementGroup(policyStatesResource, managementGroupName, options) {
33
+ const iter = this.listQueryResultsForManagementGroupPagingAll(policyStatesResource, managementGroupName, options);
34
+ return {
35
+ next() {
36
+ return iter.next();
37
+ },
38
+ [Symbol.asyncIterator]() {
39
+ return this;
40
+ },
41
+ byPage: () => {
42
+ return this.listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options);
43
+ }
44
+ };
45
+ }
46
+ listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options) {
47
+ return __asyncGenerator(this, arguments, function* listQueryResultsForManagementGroupPagingPage_1() {
48
+ let result = yield __await(this._listQueryResultsForManagementGroup(policyStatesResource, managementGroupName, options));
49
+ yield yield __await(result.value || []);
50
+ let continuationToken = result.odataNextLink;
51
+ while (continuationToken) {
52
+ result = yield __await(this._listQueryResultsForManagementGroupNext(policyStatesResource, managementGroupName, continuationToken, options));
53
+ continuationToken = result.odataNextLink;
54
+ yield yield __await(result.value || []);
55
+ }
56
+ });
57
+ }
58
+ listQueryResultsForManagementGroupPagingAll(policyStatesResource, managementGroupName, options) {
59
+ return __asyncGenerator(this, arguments, function* listQueryResultsForManagementGroupPagingAll_1() {
60
+ var e_1, _a;
61
+ try {
62
+ for (var _b = __asyncValues(this.listQueryResultsForManagementGroupPagingPage(policyStatesResource, managementGroupName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
63
+ const page = _c.value;
64
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
65
+ }
66
+ }
67
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
68
+ finally {
69
+ try {
70
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
71
+ }
72
+ finally { if (e_1) throw e_1.error; }
73
+ }
74
+ });
75
+ }
76
+ /**
77
+ * Queries policy states for the resources under the subscription.
78
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
79
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
80
+ * state(s).
81
+ * @param subscriptionId Microsoft Azure subscription ID.
82
+ * @param options The options parameters.
83
+ */
84
+ listQueryResultsForSubscription(policyStatesResource, subscriptionId, options) {
85
+ const iter = this.listQueryResultsForSubscriptionPagingAll(policyStatesResource, subscriptionId, options);
86
+ return {
87
+ next() {
88
+ return iter.next();
89
+ },
90
+ [Symbol.asyncIterator]() {
91
+ return this;
92
+ },
93
+ byPage: () => {
94
+ return this.listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options);
95
+ }
96
+ };
97
+ }
98
+ listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options) {
99
+ return __asyncGenerator(this, arguments, function* listQueryResultsForSubscriptionPagingPage_1() {
100
+ let result = yield __await(this._listQueryResultsForSubscription(policyStatesResource, subscriptionId, options));
101
+ yield yield __await(result.value || []);
102
+ let continuationToken = result.odataNextLink;
103
+ while (continuationToken) {
104
+ result = yield __await(this._listQueryResultsForSubscriptionNext(policyStatesResource, subscriptionId, continuationToken, options));
105
+ continuationToken = result.odataNextLink;
106
+ yield yield __await(result.value || []);
107
+ }
108
+ });
109
+ }
110
+ listQueryResultsForSubscriptionPagingAll(policyStatesResource, subscriptionId, options) {
111
+ return __asyncGenerator(this, arguments, function* listQueryResultsForSubscriptionPagingAll_1() {
112
+ var e_2, _a;
113
+ try {
114
+ for (var _b = __asyncValues(this.listQueryResultsForSubscriptionPagingPage(policyStatesResource, subscriptionId, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
115
+ const page = _c.value;
116
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
117
+ }
118
+ }
119
+ catch (e_2_1) { e_2 = { error: e_2_1 }; }
120
+ finally {
121
+ try {
122
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
123
+ }
124
+ finally { if (e_2) throw e_2.error; }
125
+ }
126
+ });
127
+ }
128
+ /**
129
+ * Queries policy states for the resources under the resource group.
130
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
131
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
132
+ * state(s).
133
+ * @param subscriptionId Microsoft Azure subscription ID.
134
+ * @param resourceGroupName Resource group name.
135
+ * @param options The options parameters.
136
+ */
137
+ listQueryResultsForResourceGroup(policyStatesResource, subscriptionId, resourceGroupName, options) {
138
+ const iter = this.listQueryResultsForResourceGroupPagingAll(policyStatesResource, subscriptionId, resourceGroupName, options);
139
+ return {
140
+ next() {
141
+ return iter.next();
142
+ },
143
+ [Symbol.asyncIterator]() {
144
+ return this;
145
+ },
146
+ byPage: () => {
147
+ return this.listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options);
148
+ }
149
+ };
150
+ }
151
+ listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options) {
152
+ return __asyncGenerator(this, arguments, function* listQueryResultsForResourceGroupPagingPage_1() {
153
+ let result = yield __await(this._listQueryResultsForResourceGroup(policyStatesResource, subscriptionId, resourceGroupName, options));
154
+ yield yield __await(result.value || []);
155
+ let continuationToken = result.odataNextLink;
156
+ while (continuationToken) {
157
+ result = yield __await(this._listQueryResultsForResourceGroupNext(policyStatesResource, subscriptionId, resourceGroupName, continuationToken, options));
158
+ continuationToken = result.odataNextLink;
159
+ yield yield __await(result.value || []);
160
+ }
161
+ });
162
+ }
163
+ listQueryResultsForResourceGroupPagingAll(policyStatesResource, subscriptionId, resourceGroupName, options) {
164
+ return __asyncGenerator(this, arguments, function* listQueryResultsForResourceGroupPagingAll_1() {
165
+ var e_3, _a;
166
+ try {
167
+ for (var _b = __asyncValues(this.listQueryResultsForResourceGroupPagingPage(policyStatesResource, subscriptionId, resourceGroupName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
168
+ const page = _c.value;
169
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
170
+ }
171
+ }
172
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
173
+ finally {
174
+ try {
175
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
176
+ }
177
+ finally { if (e_3) throw e_3.error; }
178
+ }
179
+ });
180
+ }
181
+ /**
182
+ * Queries policy states for the resource.
183
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
184
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
185
+ * state(s).
186
+ * @param resourceId Resource ID.
187
+ * @param options The options parameters.
188
+ */
189
+ listQueryResultsForResource(policyStatesResource, resourceId, options) {
190
+ const iter = this.listQueryResultsForResourcePagingAll(policyStatesResource, resourceId, options);
191
+ return {
192
+ next() {
193
+ return iter.next();
194
+ },
195
+ [Symbol.asyncIterator]() {
196
+ return this;
197
+ },
198
+ byPage: () => {
199
+ return this.listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options);
200
+ }
201
+ };
202
+ }
203
+ listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options) {
204
+ return __asyncGenerator(this, arguments, function* listQueryResultsForResourcePagingPage_1() {
205
+ let result = yield __await(this._listQueryResultsForResource(policyStatesResource, resourceId, options));
206
+ yield yield __await(result.value || []);
207
+ let continuationToken = result.odataNextLink;
208
+ while (continuationToken) {
209
+ result = yield __await(this._listQueryResultsForResourceNext(policyStatesResource, resourceId, continuationToken, options));
210
+ continuationToken = result.odataNextLink;
211
+ yield yield __await(result.value || []);
212
+ }
213
+ });
214
+ }
215
+ listQueryResultsForResourcePagingAll(policyStatesResource, resourceId, options) {
216
+ return __asyncGenerator(this, arguments, function* listQueryResultsForResourcePagingAll_1() {
217
+ var e_4, _a;
218
+ try {
219
+ for (var _b = __asyncValues(this.listQueryResultsForResourcePagingPage(policyStatesResource, resourceId, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
220
+ const page = _c.value;
221
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
222
+ }
223
+ }
224
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
225
+ finally {
226
+ try {
227
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
228
+ }
229
+ finally { if (e_4) throw e_4.error; }
230
+ }
231
+ });
232
+ }
233
+ /**
234
+ * Queries policy states for the subscription level policy set definition.
235
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
236
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
237
+ * state(s).
238
+ * @param subscriptionId Microsoft Azure subscription ID.
239
+ * @param policySetDefinitionName Policy set definition name.
240
+ * @param options The options parameters.
241
+ */
242
+ listQueryResultsForPolicySetDefinition(policyStatesResource, subscriptionId, policySetDefinitionName, options) {
243
+ const iter = this.listQueryResultsForPolicySetDefinitionPagingAll(policyStatesResource, subscriptionId, policySetDefinitionName, options);
244
+ return {
245
+ next() {
246
+ return iter.next();
247
+ },
248
+ [Symbol.asyncIterator]() {
249
+ return this;
250
+ },
251
+ byPage: () => {
252
+ return this.listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options);
253
+ }
254
+ };
255
+ }
256
+ listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options) {
257
+ return __asyncGenerator(this, arguments, function* listQueryResultsForPolicySetDefinitionPagingPage_1() {
258
+ let result = yield __await(this._listQueryResultsForPolicySetDefinition(policyStatesResource, subscriptionId, policySetDefinitionName, options));
259
+ yield yield __await(result.value || []);
260
+ let continuationToken = result.odataNextLink;
261
+ while (continuationToken) {
262
+ result = yield __await(this._listQueryResultsForPolicySetDefinitionNext(policyStatesResource, subscriptionId, policySetDefinitionName, continuationToken, options));
263
+ continuationToken = result.odataNextLink;
264
+ yield yield __await(result.value || []);
265
+ }
266
+ });
267
+ }
268
+ listQueryResultsForPolicySetDefinitionPagingAll(policyStatesResource, subscriptionId, policySetDefinitionName, options) {
269
+ return __asyncGenerator(this, arguments, function* listQueryResultsForPolicySetDefinitionPagingAll_1() {
270
+ var e_5, _a;
271
+ try {
272
+ for (var _b = __asyncValues(this.listQueryResultsForPolicySetDefinitionPagingPage(policyStatesResource, subscriptionId, policySetDefinitionName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
273
+ const page = _c.value;
274
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
275
+ }
276
+ }
277
+ catch (e_5_1) { e_5 = { error: e_5_1 }; }
278
+ finally {
279
+ try {
280
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
281
+ }
282
+ finally { if (e_5) throw e_5.error; }
283
+ }
284
+ });
285
+ }
286
+ /**
287
+ * Queries policy states for the subscription level policy definition.
288
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
289
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
290
+ * state(s).
291
+ * @param subscriptionId Microsoft Azure subscription ID.
292
+ * @param policyDefinitionName Policy definition name.
293
+ * @param options The options parameters.
294
+ */
295
+ listQueryResultsForPolicyDefinition(policyStatesResource, subscriptionId, policyDefinitionName, options) {
296
+ const iter = this.listQueryResultsForPolicyDefinitionPagingAll(policyStatesResource, subscriptionId, policyDefinitionName, options);
297
+ return {
298
+ next() {
299
+ return iter.next();
300
+ },
301
+ [Symbol.asyncIterator]() {
302
+ return this;
303
+ },
304
+ byPage: () => {
305
+ return this.listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options);
306
+ }
307
+ };
308
+ }
309
+ listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options) {
310
+ return __asyncGenerator(this, arguments, function* listQueryResultsForPolicyDefinitionPagingPage_1() {
311
+ let result = yield __await(this._listQueryResultsForPolicyDefinition(policyStatesResource, subscriptionId, policyDefinitionName, options));
312
+ yield yield __await(result.value || []);
313
+ let continuationToken = result.odataNextLink;
314
+ while (continuationToken) {
315
+ result = yield __await(this._listQueryResultsForPolicyDefinitionNext(policyStatesResource, subscriptionId, policyDefinitionName, continuationToken, options));
316
+ continuationToken = result.odataNextLink;
317
+ yield yield __await(result.value || []);
318
+ }
319
+ });
320
+ }
321
+ listQueryResultsForPolicyDefinitionPagingAll(policyStatesResource, subscriptionId, policyDefinitionName, options) {
322
+ return __asyncGenerator(this, arguments, function* listQueryResultsForPolicyDefinitionPagingAll_1() {
323
+ var e_6, _a;
324
+ try {
325
+ for (var _b = __asyncValues(this.listQueryResultsForPolicyDefinitionPagingPage(policyStatesResource, subscriptionId, policyDefinitionName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
326
+ const page = _c.value;
327
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
328
+ }
329
+ }
330
+ catch (e_6_1) { e_6 = { error: e_6_1 }; }
331
+ finally {
332
+ try {
333
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
334
+ }
335
+ finally { if (e_6) throw e_6.error; }
336
+ }
337
+ });
338
+ }
339
+ /**
340
+ * Queries policy states for the subscription level policy assignment.
341
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
342
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
343
+ * state(s).
344
+ * @param subscriptionId Microsoft Azure subscription ID.
345
+ * @param policyAssignmentName Policy assignment name.
346
+ * @param options The options parameters.
347
+ */
348
+ listQueryResultsForSubscriptionLevelPolicyAssignment(policyStatesResource, subscriptionId, policyAssignmentName, options) {
349
+ const iter = this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, policyAssignmentName, options);
350
+ return {
351
+ next() {
352
+ return iter.next();
353
+ },
354
+ [Symbol.asyncIterator]() {
355
+ return this;
356
+ },
357
+ byPage: () => {
358
+ return this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options);
359
+ }
360
+ };
361
+ }
362
+ listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options) {
363
+ return __asyncGenerator(this, arguments, function* listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage_1() {
364
+ let result = yield __await(this._listQueryResultsForSubscriptionLevelPolicyAssignment(policyStatesResource, subscriptionId, policyAssignmentName, options));
365
+ yield yield __await(result.value || []);
366
+ let continuationToken = result.odataNextLink;
367
+ while (continuationToken) {
368
+ result = yield __await(this._listQueryResultsForSubscriptionLevelPolicyAssignmentNext(policyStatesResource, subscriptionId, policyAssignmentName, continuationToken, options));
369
+ continuationToken = result.odataNextLink;
370
+ yield yield __await(result.value || []);
371
+ }
372
+ });
373
+ }
374
+ listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, policyAssignmentName, options) {
375
+ return __asyncGenerator(this, arguments, function* listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll_1() {
376
+ var e_7, _a;
377
+ try {
378
+ for (var _b = __asyncValues(this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, policyAssignmentName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
379
+ const page = _c.value;
380
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
381
+ }
382
+ }
383
+ catch (e_7_1) { e_7 = { error: e_7_1 }; }
384
+ finally {
385
+ try {
386
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
387
+ }
388
+ finally { if (e_7) throw e_7.error; }
389
+ }
390
+ });
391
+ }
392
+ /**
393
+ * Queries policy states for the resource group level policy assignment.
394
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
395
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
396
+ * state(s).
397
+ * @param subscriptionId Microsoft Azure subscription ID.
398
+ * @param resourceGroupName Resource group name.
399
+ * @param policyAssignmentName Policy assignment name.
400
+ * @param options The options parameters.
401
+ */
402
+ listQueryResultsForResourceGroupLevelPolicyAssignment(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options) {
403
+ const iter = this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options);
404
+ return {
405
+ next() {
406
+ return iter.next();
407
+ },
408
+ [Symbol.asyncIterator]() {
409
+ return this;
410
+ },
411
+ byPage: () => {
412
+ return this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options);
413
+ }
414
+ };
415
+ }
416
+ listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options) {
417
+ return __asyncGenerator(this, arguments, function* listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage_1() {
418
+ let result = yield __await(this._listQueryResultsForResourceGroupLevelPolicyAssignment(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options));
419
+ yield yield __await(result.value || []);
420
+ let continuationToken = result.odataNextLink;
421
+ while (continuationToken) {
422
+ result = yield __await(this._listQueryResultsForResourceGroupLevelPolicyAssignmentNext(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, continuationToken, options));
423
+ continuationToken = result.odataNextLink;
424
+ yield yield __await(result.value || []);
425
+ }
426
+ });
427
+ }
428
+ listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options) {
429
+ return __asyncGenerator(this, arguments, function* listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll_1() {
430
+ var e_8, _a;
431
+ try {
432
+ for (var _b = __asyncValues(this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options)), _c; _c = yield __await(_b.next()), !_c.done;) {
433
+ const page = _c.value;
434
+ yield __await(yield* __asyncDelegator(__asyncValues(page)));
435
+ }
436
+ }
437
+ catch (e_8_1) { e_8 = { error: e_8_1 }; }
438
+ finally {
439
+ try {
440
+ if (_c && !_c.done && (_a = _b.return)) yield __await(_a.call(_b));
441
+ }
442
+ finally { if (e_8) throw e_8.error; }
443
+ }
444
+ });
445
+ }
446
+ /**
447
+ * Queries policy states for the resources under the management group.
448
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
449
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
450
+ * state(s).
451
+ * @param managementGroupName Management group name.
452
+ * @param options The options parameters.
453
+ */
454
+ _listQueryResultsForManagementGroup(policyStatesResource, managementGroupName, options) {
455
+ return this.client.sendOperationRequest({ policyStatesResource, managementGroupName, options }, listQueryResultsForManagementGroupOperationSpec);
456
+ }
457
+ /**
458
+ * Summarizes policy states for the resources under the management group.
459
+ * @param managementGroupName Management group name.
460
+ * @param options The options parameters.
461
+ */
462
+ summarizeForManagementGroup(managementGroupName, options) {
463
+ return this.client.sendOperationRequest({ managementGroupName, options }, summarizeForManagementGroupOperationSpec);
464
+ }
465
+ /**
466
+ * Queries policy states for the resources under the subscription.
467
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
468
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
469
+ * state(s).
470
+ * @param subscriptionId Microsoft Azure subscription ID.
471
+ * @param options The options parameters.
472
+ */
473
+ _listQueryResultsForSubscription(policyStatesResource, subscriptionId, options) {
474
+ return this.client.sendOperationRequest({ policyStatesResource, subscriptionId, options }, listQueryResultsForSubscriptionOperationSpec);
475
+ }
476
+ /**
477
+ * Summarizes policy states for the resources under the subscription.
478
+ * @param subscriptionId Microsoft Azure subscription ID.
479
+ * @param options The options parameters.
480
+ */
481
+ summarizeForSubscription(subscriptionId, options) {
482
+ return this.client.sendOperationRequest({ subscriptionId, options }, summarizeForSubscriptionOperationSpec);
483
+ }
484
+ /**
485
+ * Queries policy states for the resources under the resource group.
486
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
487
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
488
+ * state(s).
489
+ * @param subscriptionId Microsoft Azure subscription ID.
490
+ * @param resourceGroupName Resource group name.
491
+ * @param options The options parameters.
492
+ */
493
+ _listQueryResultsForResourceGroup(policyStatesResource, subscriptionId, resourceGroupName, options) {
494
+ return this.client.sendOperationRequest({ policyStatesResource, subscriptionId, resourceGroupName, options }, listQueryResultsForResourceGroupOperationSpec);
495
+ }
496
+ /**
497
+ * Summarizes policy states for the resources under the resource group.
498
+ * @param subscriptionId Microsoft Azure subscription ID.
499
+ * @param resourceGroupName Resource group name.
500
+ * @param options The options parameters.
501
+ */
502
+ summarizeForResourceGroup(subscriptionId, resourceGroupName, options) {
503
+ return this.client.sendOperationRequest({ subscriptionId, resourceGroupName, options }, summarizeForResourceGroupOperationSpec);
504
+ }
505
+ /**
506
+ * Queries policy states for the resource.
507
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
508
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
509
+ * state(s).
510
+ * @param resourceId Resource ID.
511
+ * @param options The options parameters.
512
+ */
513
+ _listQueryResultsForResource(policyStatesResource, resourceId, options) {
514
+ return this.client.sendOperationRequest({ policyStatesResource, resourceId, options }, listQueryResultsForResourceOperationSpec);
515
+ }
516
+ /**
517
+ * Summarizes policy states for the resource.
518
+ * @param resourceId Resource ID.
519
+ * @param options The options parameters.
520
+ */
521
+ summarizeForResource(resourceId, options) {
522
+ return this.client.sendOperationRequest({ resourceId, options }, summarizeForResourceOperationSpec);
523
+ }
524
+ /**
525
+ * Triggers a policy evaluation scan for all the resources under the subscription
526
+ * @param subscriptionId Microsoft Azure subscription ID.
527
+ * @param options The options parameters.
528
+ */
529
+ beginTriggerSubscriptionEvaluation(subscriptionId, options) {
530
+ return __awaiter(this, void 0, void 0, function* () {
531
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
532
+ return this.client.sendOperationRequest(args, spec);
533
+ });
534
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
535
+ var _a;
536
+ let currentRawResponse = undefined;
537
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
538
+ const callback = (rawResponse, flatResponse) => {
539
+ currentRawResponse = rawResponse;
540
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
541
+ };
542
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
543
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
544
+ return {
545
+ flatResponse,
546
+ rawResponse: {
547
+ statusCode: currentRawResponse.status,
548
+ body: currentRawResponse.parsedBody,
549
+ headers: currentRawResponse.headers.toJSON()
550
+ }
551
+ };
552
+ });
553
+ const lro = new LroImpl(sendOperation, { subscriptionId, options }, triggerSubscriptionEvaluationOperationSpec);
554
+ return new LroEngine(lro, {
555
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
556
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
557
+ lroResourceLocationConfig: "location"
558
+ });
559
+ });
560
+ }
561
+ /**
562
+ * Triggers a policy evaluation scan for all the resources under the subscription
563
+ * @param subscriptionId Microsoft Azure subscription ID.
564
+ * @param options The options parameters.
565
+ */
566
+ beginTriggerSubscriptionEvaluationAndWait(subscriptionId, options) {
567
+ return __awaiter(this, void 0, void 0, function* () {
568
+ const poller = yield this.beginTriggerSubscriptionEvaluation(subscriptionId, options);
569
+ return poller.pollUntilDone();
570
+ });
571
+ }
572
+ /**
573
+ * Triggers a policy evaluation scan for all the resources under the resource group.
574
+ * @param subscriptionId Microsoft Azure subscription ID.
575
+ * @param resourceGroupName Resource group name.
576
+ * @param options The options parameters.
577
+ */
578
+ beginTriggerResourceGroupEvaluation(subscriptionId, resourceGroupName, options) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ const directSendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
581
+ return this.client.sendOperationRequest(args, spec);
582
+ });
583
+ const sendOperation = (args, spec) => __awaiter(this, void 0, void 0, function* () {
584
+ var _a;
585
+ let currentRawResponse = undefined;
586
+ const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
587
+ const callback = (rawResponse, flatResponse) => {
588
+ currentRawResponse = rawResponse;
589
+ providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
590
+ };
591
+ const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
592
+ const flatResponse = yield directSendOperation(updatedArgs, spec);
593
+ return {
594
+ flatResponse,
595
+ rawResponse: {
596
+ statusCode: currentRawResponse.status,
597
+ body: currentRawResponse.parsedBody,
598
+ headers: currentRawResponse.headers.toJSON()
599
+ }
600
+ };
601
+ });
602
+ const lro = new LroImpl(sendOperation, { subscriptionId, resourceGroupName, options }, triggerResourceGroupEvaluationOperationSpec);
603
+ return new LroEngine(lro, {
604
+ resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
605
+ intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
606
+ lroResourceLocationConfig: "location"
607
+ });
608
+ });
609
+ }
610
+ /**
611
+ * Triggers a policy evaluation scan for all the resources under the resource group.
612
+ * @param subscriptionId Microsoft Azure subscription ID.
613
+ * @param resourceGroupName Resource group name.
614
+ * @param options The options parameters.
615
+ */
616
+ beginTriggerResourceGroupEvaluationAndWait(subscriptionId, resourceGroupName, options) {
617
+ return __awaiter(this, void 0, void 0, function* () {
618
+ const poller = yield this.beginTriggerResourceGroupEvaluation(subscriptionId, resourceGroupName, options);
619
+ return poller.pollUntilDone();
620
+ });
621
+ }
622
+ /**
623
+ * Queries policy states for the subscription level policy set definition.
624
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
625
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
626
+ * state(s).
627
+ * @param subscriptionId Microsoft Azure subscription ID.
628
+ * @param policySetDefinitionName Policy set definition name.
629
+ * @param options The options parameters.
630
+ */
631
+ _listQueryResultsForPolicySetDefinition(policyStatesResource, subscriptionId, policySetDefinitionName, options) {
632
+ return this.client.sendOperationRequest({
633
+ policyStatesResource,
634
+ subscriptionId,
635
+ policySetDefinitionName,
636
+ options
637
+ }, listQueryResultsForPolicySetDefinitionOperationSpec);
638
+ }
639
+ /**
640
+ * Summarizes policy states for the subscription level policy set definition.
641
+ * @param subscriptionId Microsoft Azure subscription ID.
642
+ * @param policySetDefinitionName Policy set definition name.
643
+ * @param options The options parameters.
644
+ */
645
+ summarizeForPolicySetDefinition(subscriptionId, policySetDefinitionName, options) {
646
+ return this.client.sendOperationRequest({ subscriptionId, policySetDefinitionName, options }, summarizeForPolicySetDefinitionOperationSpec);
647
+ }
648
+ /**
649
+ * Queries policy states for the subscription level policy definition.
650
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
651
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
652
+ * state(s).
653
+ * @param subscriptionId Microsoft Azure subscription ID.
654
+ * @param policyDefinitionName Policy definition name.
655
+ * @param options The options parameters.
656
+ */
657
+ _listQueryResultsForPolicyDefinition(policyStatesResource, subscriptionId, policyDefinitionName, options) {
658
+ return this.client.sendOperationRequest({ policyStatesResource, subscriptionId, policyDefinitionName, options }, listQueryResultsForPolicyDefinitionOperationSpec);
659
+ }
660
+ /**
661
+ * Summarizes policy states for the subscription level policy definition.
662
+ * @param subscriptionId Microsoft Azure subscription ID.
663
+ * @param policyDefinitionName Policy definition name.
664
+ * @param options The options parameters.
665
+ */
666
+ summarizeForPolicyDefinition(subscriptionId, policyDefinitionName, options) {
667
+ return this.client.sendOperationRequest({ subscriptionId, policyDefinitionName, options }, summarizeForPolicyDefinitionOperationSpec);
668
+ }
669
+ /**
670
+ * Queries policy states for the subscription level policy assignment.
671
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
672
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
673
+ * state(s).
674
+ * @param subscriptionId Microsoft Azure subscription ID.
675
+ * @param policyAssignmentName Policy assignment name.
676
+ * @param options The options parameters.
677
+ */
678
+ _listQueryResultsForSubscriptionLevelPolicyAssignment(policyStatesResource, subscriptionId, policyAssignmentName, options) {
679
+ return this.client.sendOperationRequest({ policyStatesResource, subscriptionId, policyAssignmentName, options }, listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec);
680
+ }
681
+ /**
682
+ * Summarizes policy states for the subscription level policy assignment.
683
+ * @param subscriptionId Microsoft Azure subscription ID.
684
+ * @param policyAssignmentName Policy assignment name.
685
+ * @param options The options parameters.
686
+ */
687
+ summarizeForSubscriptionLevelPolicyAssignment(subscriptionId, policyAssignmentName, options) {
688
+ return this.client.sendOperationRequest({ subscriptionId, policyAssignmentName, options }, summarizeForSubscriptionLevelPolicyAssignmentOperationSpec);
689
+ }
690
+ /**
691
+ * Queries policy states for the resource group level policy assignment.
692
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
693
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
694
+ * state(s).
695
+ * @param subscriptionId Microsoft Azure subscription ID.
696
+ * @param resourceGroupName Resource group name.
697
+ * @param policyAssignmentName Policy assignment name.
698
+ * @param options The options parameters.
699
+ */
700
+ _listQueryResultsForResourceGroupLevelPolicyAssignment(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, options) {
701
+ return this.client.sendOperationRequest({
702
+ policyStatesResource,
703
+ subscriptionId,
704
+ resourceGroupName,
705
+ policyAssignmentName,
706
+ options
707
+ }, listQueryResultsForResourceGroupLevelPolicyAssignmentOperationSpec);
708
+ }
709
+ /**
710
+ * Summarizes policy states for the resource group level policy assignment.
711
+ * @param subscriptionId Microsoft Azure subscription ID.
712
+ * @param resourceGroupName Resource group name.
713
+ * @param policyAssignmentName Policy assignment name.
714
+ * @param options The options parameters.
715
+ */
716
+ summarizeForResourceGroupLevelPolicyAssignment(subscriptionId, resourceGroupName, policyAssignmentName, options) {
717
+ return this.client.sendOperationRequest({ subscriptionId, resourceGroupName, policyAssignmentName, options }, summarizeForResourceGroupLevelPolicyAssignmentOperationSpec);
718
+ }
719
+ /**
720
+ * ListQueryResultsForManagementGroupNext
721
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
722
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
723
+ * state(s).
724
+ * @param managementGroupName Management group name.
725
+ * @param nextLink The nextLink from the previous successful call to the
726
+ * ListQueryResultsForManagementGroup method.
727
+ * @param options The options parameters.
728
+ */
729
+ _listQueryResultsForManagementGroupNext(policyStatesResource, managementGroupName, nextLink, options) {
730
+ return this.client.sendOperationRequest({ policyStatesResource, managementGroupName, nextLink, options }, listQueryResultsForManagementGroupNextOperationSpec);
731
+ }
732
+ /**
733
+ * ListQueryResultsForSubscriptionNext
734
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
735
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
736
+ * state(s).
737
+ * @param subscriptionId Microsoft Azure subscription ID.
738
+ * @param nextLink The nextLink from the previous successful call to the
739
+ * ListQueryResultsForSubscription method.
740
+ * @param options The options parameters.
741
+ */
742
+ _listQueryResultsForSubscriptionNext(policyStatesResource, subscriptionId, nextLink, options) {
743
+ return this.client.sendOperationRequest({ policyStatesResource, subscriptionId, nextLink, options }, listQueryResultsForSubscriptionNextOperationSpec);
744
+ }
745
+ /**
746
+ * ListQueryResultsForResourceGroupNext
747
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
748
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
749
+ * state(s).
750
+ * @param subscriptionId Microsoft Azure subscription ID.
751
+ * @param resourceGroupName Resource group name.
752
+ * @param nextLink The nextLink from the previous successful call to the
753
+ * ListQueryResultsForResourceGroup method.
754
+ * @param options The options parameters.
755
+ */
756
+ _listQueryResultsForResourceGroupNext(policyStatesResource, subscriptionId, resourceGroupName, nextLink, options) {
757
+ return this.client.sendOperationRequest({
758
+ policyStatesResource,
759
+ subscriptionId,
760
+ resourceGroupName,
761
+ nextLink,
762
+ options
763
+ }, listQueryResultsForResourceGroupNextOperationSpec);
764
+ }
765
+ /**
766
+ * ListQueryResultsForResourceNext
767
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
768
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
769
+ * state(s).
770
+ * @param resourceId Resource ID.
771
+ * @param nextLink The nextLink from the previous successful call to the ListQueryResultsForResource
772
+ * method.
773
+ * @param options The options parameters.
774
+ */
775
+ _listQueryResultsForResourceNext(policyStatesResource, resourceId, nextLink, options) {
776
+ return this.client.sendOperationRequest({ policyStatesResource, resourceId, nextLink, options }, listQueryResultsForResourceNextOperationSpec);
777
+ }
778
+ /**
779
+ * ListQueryResultsForPolicySetDefinitionNext
780
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
781
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
782
+ * state(s).
783
+ * @param subscriptionId Microsoft Azure subscription ID.
784
+ * @param policySetDefinitionName Policy set definition name.
785
+ * @param nextLink The nextLink from the previous successful call to the
786
+ * ListQueryResultsForPolicySetDefinition method.
787
+ * @param options The options parameters.
788
+ */
789
+ _listQueryResultsForPolicySetDefinitionNext(policyStatesResource, subscriptionId, policySetDefinitionName, nextLink, options) {
790
+ return this.client.sendOperationRequest({
791
+ policyStatesResource,
792
+ subscriptionId,
793
+ policySetDefinitionName,
794
+ nextLink,
795
+ options
796
+ }, listQueryResultsForPolicySetDefinitionNextOperationSpec);
797
+ }
798
+ /**
799
+ * ListQueryResultsForPolicyDefinitionNext
800
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
801
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
802
+ * state(s).
803
+ * @param subscriptionId Microsoft Azure subscription ID.
804
+ * @param policyDefinitionName Policy definition name.
805
+ * @param nextLink The nextLink from the previous successful call to the
806
+ * ListQueryResultsForPolicyDefinition method.
807
+ * @param options The options parameters.
808
+ */
809
+ _listQueryResultsForPolicyDefinitionNext(policyStatesResource, subscriptionId, policyDefinitionName, nextLink, options) {
810
+ return this.client.sendOperationRequest({
811
+ policyStatesResource,
812
+ subscriptionId,
813
+ policyDefinitionName,
814
+ nextLink,
815
+ options
816
+ }, listQueryResultsForPolicyDefinitionNextOperationSpec);
817
+ }
818
+ /**
819
+ * ListQueryResultsForSubscriptionLevelPolicyAssignmentNext
820
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
821
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
822
+ * state(s).
823
+ * @param subscriptionId Microsoft Azure subscription ID.
824
+ * @param policyAssignmentName Policy assignment name.
825
+ * @param nextLink The nextLink from the previous successful call to the
826
+ * ListQueryResultsForSubscriptionLevelPolicyAssignment method.
827
+ * @param options The options parameters.
828
+ */
829
+ _listQueryResultsForSubscriptionLevelPolicyAssignmentNext(policyStatesResource, subscriptionId, policyAssignmentName, nextLink, options) {
830
+ return this.client.sendOperationRequest({
831
+ policyStatesResource,
832
+ subscriptionId,
833
+ policyAssignmentName,
834
+ nextLink,
835
+ options
836
+ }, listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec);
837
+ }
838
+ /**
839
+ * ListQueryResultsForResourceGroupLevelPolicyAssignmentNext
840
+ * @param policyStatesResource The virtual resource under PolicyStates resource type. In a given time
841
+ * range, 'latest' represents the latest policy state(s), whereas 'default' represents all policy
842
+ * state(s).
843
+ * @param subscriptionId Microsoft Azure subscription ID.
844
+ * @param resourceGroupName Resource group name.
845
+ * @param policyAssignmentName Policy assignment name.
846
+ * @param nextLink The nextLink from the previous successful call to the
847
+ * ListQueryResultsForResourceGroupLevelPolicyAssignment method.
848
+ * @param options The options parameters.
849
+ */
850
+ _listQueryResultsForResourceGroupLevelPolicyAssignmentNext(policyStatesResource, subscriptionId, resourceGroupName, policyAssignmentName, nextLink, options) {
851
+ return this.client.sendOperationRequest({
852
+ policyStatesResource,
853
+ subscriptionId,
854
+ resourceGroupName,
855
+ policyAssignmentName,
856
+ nextLink,
857
+ options
858
+ }, listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec);
859
+ }
860
+ }
861
+ // Operation Specifications
862
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
863
+ const listQueryResultsForManagementGroupOperationSpec = {
864
+ path: "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
865
+ httpMethod: "POST",
866
+ responses: {
867
+ 200: {
868
+ bodyMapper: Mappers.PolicyStatesQueryResults
869
+ },
870
+ default: {
871
+ bodyMapper: Mappers.QueryFailure
872
+ }
873
+ },
874
+ queryParameters: [
875
+ Parameters.top,
876
+ Parameters.filter,
877
+ Parameters.apiVersion2,
878
+ Parameters.orderBy,
879
+ Parameters.select,
880
+ Parameters.fromParam,
881
+ Parameters.to,
882
+ Parameters.apply,
883
+ Parameters.skipToken
884
+ ],
885
+ urlParameters: [
886
+ Parameters.$host,
887
+ Parameters.managementGroupsNamespace,
888
+ Parameters.managementGroupName,
889
+ Parameters.policyStatesResource
890
+ ],
891
+ headerParameters: [Parameters.accept],
892
+ serializer
893
+ };
894
+ const summarizeForManagementGroupOperationSpec = {
895
+ path: "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
896
+ httpMethod: "POST",
897
+ responses: {
898
+ 200: {
899
+ bodyMapper: Mappers.SummarizeResults
900
+ },
901
+ default: {
902
+ bodyMapper: Mappers.QueryFailure
903
+ }
904
+ },
905
+ queryParameters: [
906
+ Parameters.top,
907
+ Parameters.filter,
908
+ Parameters.apiVersion2,
909
+ Parameters.fromParam,
910
+ Parameters.to
911
+ ],
912
+ urlParameters: [
913
+ Parameters.$host,
914
+ Parameters.managementGroupsNamespace,
915
+ Parameters.managementGroupName,
916
+ Parameters.policyStatesSummaryResource
917
+ ],
918
+ headerParameters: [Parameters.accept],
919
+ serializer
920
+ };
921
+ const listQueryResultsForSubscriptionOperationSpec = {
922
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
923
+ httpMethod: "POST",
924
+ responses: {
925
+ 200: {
926
+ bodyMapper: Mappers.PolicyStatesQueryResults
927
+ },
928
+ default: {
929
+ bodyMapper: Mappers.QueryFailure
930
+ }
931
+ },
932
+ queryParameters: [
933
+ Parameters.top,
934
+ Parameters.filter,
935
+ Parameters.apiVersion2,
936
+ Parameters.orderBy,
937
+ Parameters.select,
938
+ Parameters.fromParam,
939
+ Parameters.to,
940
+ Parameters.apply,
941
+ Parameters.skipToken
942
+ ],
943
+ urlParameters: [
944
+ Parameters.$host,
945
+ Parameters.subscriptionId1,
946
+ Parameters.policyStatesResource
947
+ ],
948
+ headerParameters: [Parameters.accept],
949
+ serializer
950
+ };
951
+ const summarizeForSubscriptionOperationSpec = {
952
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
953
+ httpMethod: "POST",
954
+ responses: {
955
+ 200: {
956
+ bodyMapper: Mappers.SummarizeResults
957
+ },
958
+ default: {
959
+ bodyMapper: Mappers.QueryFailure
960
+ }
961
+ },
962
+ queryParameters: [
963
+ Parameters.top,
964
+ Parameters.filter,
965
+ Parameters.apiVersion2,
966
+ Parameters.fromParam,
967
+ Parameters.to
968
+ ],
969
+ urlParameters: [
970
+ Parameters.$host,
971
+ Parameters.subscriptionId1,
972
+ Parameters.policyStatesSummaryResource
973
+ ],
974
+ headerParameters: [Parameters.accept],
975
+ serializer
976
+ };
977
+ const listQueryResultsForResourceGroupOperationSpec = {
978
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
979
+ httpMethod: "POST",
980
+ responses: {
981
+ 200: {
982
+ bodyMapper: Mappers.PolicyStatesQueryResults
983
+ },
984
+ default: {
985
+ bodyMapper: Mappers.QueryFailure
986
+ }
987
+ },
988
+ queryParameters: [
989
+ Parameters.top,
990
+ Parameters.filter,
991
+ Parameters.apiVersion2,
992
+ Parameters.orderBy,
993
+ Parameters.select,
994
+ Parameters.fromParam,
995
+ Parameters.to,
996
+ Parameters.apply,
997
+ Parameters.skipToken
998
+ ],
999
+ urlParameters: [
1000
+ Parameters.$host,
1001
+ Parameters.resourceGroupName,
1002
+ Parameters.subscriptionId1,
1003
+ Parameters.policyStatesResource
1004
+ ],
1005
+ headerParameters: [Parameters.accept],
1006
+ serializer
1007
+ };
1008
+ const summarizeForResourceGroupOperationSpec = {
1009
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
1010
+ httpMethod: "POST",
1011
+ responses: {
1012
+ 200: {
1013
+ bodyMapper: Mappers.SummarizeResults
1014
+ },
1015
+ default: {
1016
+ bodyMapper: Mappers.QueryFailure
1017
+ }
1018
+ },
1019
+ queryParameters: [
1020
+ Parameters.top,
1021
+ Parameters.filter,
1022
+ Parameters.apiVersion2,
1023
+ Parameters.fromParam,
1024
+ Parameters.to
1025
+ ],
1026
+ urlParameters: [
1027
+ Parameters.$host,
1028
+ Parameters.resourceGroupName,
1029
+ Parameters.subscriptionId1,
1030
+ Parameters.policyStatesSummaryResource
1031
+ ],
1032
+ headerParameters: [Parameters.accept],
1033
+ serializer
1034
+ };
1035
+ const listQueryResultsForResourceOperationSpec = {
1036
+ path: "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
1037
+ httpMethod: "POST",
1038
+ responses: {
1039
+ 200: {
1040
+ bodyMapper: Mappers.PolicyStatesQueryResults
1041
+ },
1042
+ default: {
1043
+ bodyMapper: Mappers.QueryFailure
1044
+ }
1045
+ },
1046
+ queryParameters: [
1047
+ Parameters.top,
1048
+ Parameters.filter,
1049
+ Parameters.apiVersion2,
1050
+ Parameters.orderBy,
1051
+ Parameters.select,
1052
+ Parameters.fromParam,
1053
+ Parameters.to,
1054
+ Parameters.apply,
1055
+ Parameters.skipToken,
1056
+ Parameters.expand
1057
+ ],
1058
+ urlParameters: [
1059
+ Parameters.$host,
1060
+ Parameters.resourceId,
1061
+ Parameters.policyStatesResource
1062
+ ],
1063
+ headerParameters: [Parameters.accept],
1064
+ serializer
1065
+ };
1066
+ const summarizeForResourceOperationSpec = {
1067
+ path: "/{resourceId}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
1068
+ httpMethod: "POST",
1069
+ responses: {
1070
+ 200: {
1071
+ bodyMapper: Mappers.SummarizeResults
1072
+ },
1073
+ default: {
1074
+ bodyMapper: Mappers.QueryFailure
1075
+ }
1076
+ },
1077
+ queryParameters: [
1078
+ Parameters.top,
1079
+ Parameters.filter,
1080
+ Parameters.apiVersion2,
1081
+ Parameters.fromParam,
1082
+ Parameters.to
1083
+ ],
1084
+ urlParameters: [
1085
+ Parameters.$host,
1086
+ Parameters.resourceId,
1087
+ Parameters.policyStatesSummaryResource
1088
+ ],
1089
+ headerParameters: [Parameters.accept],
1090
+ serializer
1091
+ };
1092
+ const triggerSubscriptionEvaluationOperationSpec = {
1093
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation",
1094
+ httpMethod: "POST",
1095
+ responses: {
1096
+ 200: {},
1097
+ 201: {},
1098
+ 202: {},
1099
+ 204: {},
1100
+ default: {
1101
+ bodyMapper: Mappers.QueryFailure
1102
+ }
1103
+ },
1104
+ queryParameters: [Parameters.apiVersion2],
1105
+ urlParameters: [Parameters.$host, Parameters.subscriptionId1],
1106
+ headerParameters: [Parameters.accept],
1107
+ serializer
1108
+ };
1109
+ const triggerResourceGroupEvaluationOperationSpec = {
1110
+ path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation",
1111
+ httpMethod: "POST",
1112
+ responses: {
1113
+ 200: {},
1114
+ 201: {},
1115
+ 202: {},
1116
+ 204: {},
1117
+ default: {
1118
+ bodyMapper: Mappers.QueryFailure
1119
+ }
1120
+ },
1121
+ queryParameters: [Parameters.apiVersion2],
1122
+ urlParameters: [
1123
+ Parameters.$host,
1124
+ Parameters.resourceGroupName,
1125
+ Parameters.subscriptionId1
1126
+ ],
1127
+ headerParameters: [Parameters.accept],
1128
+ serializer
1129
+ };
1130
+ const listQueryResultsForPolicySetDefinitionOperationSpec = {
1131
+ path: "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
1132
+ httpMethod: "POST",
1133
+ responses: {
1134
+ 200: {
1135
+ bodyMapper: Mappers.PolicyStatesQueryResults
1136
+ },
1137
+ default: {
1138
+ bodyMapper: Mappers.QueryFailure
1139
+ }
1140
+ },
1141
+ queryParameters: [
1142
+ Parameters.top,
1143
+ Parameters.filter,
1144
+ Parameters.apiVersion2,
1145
+ Parameters.orderBy,
1146
+ Parameters.select,
1147
+ Parameters.fromParam,
1148
+ Parameters.to,
1149
+ Parameters.apply,
1150
+ Parameters.skipToken
1151
+ ],
1152
+ urlParameters: [
1153
+ Parameters.$host,
1154
+ Parameters.subscriptionId1,
1155
+ Parameters.authorizationNamespace,
1156
+ Parameters.policySetDefinitionName,
1157
+ Parameters.policyStatesResource
1158
+ ],
1159
+ headerParameters: [Parameters.accept],
1160
+ serializer
1161
+ };
1162
+ const summarizeForPolicySetDefinitionOperationSpec = {
1163
+ path: "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
1164
+ httpMethod: "POST",
1165
+ responses: {
1166
+ 200: {
1167
+ bodyMapper: Mappers.SummarizeResults
1168
+ },
1169
+ default: {
1170
+ bodyMapper: Mappers.QueryFailure
1171
+ }
1172
+ },
1173
+ queryParameters: [
1174
+ Parameters.top,
1175
+ Parameters.filter,
1176
+ Parameters.apiVersion2,
1177
+ Parameters.fromParam,
1178
+ Parameters.to
1179
+ ],
1180
+ urlParameters: [
1181
+ Parameters.$host,
1182
+ Parameters.subscriptionId1,
1183
+ Parameters.authorizationNamespace,
1184
+ Parameters.policySetDefinitionName,
1185
+ Parameters.policyStatesSummaryResource
1186
+ ],
1187
+ headerParameters: [Parameters.accept],
1188
+ serializer
1189
+ };
1190
+ const listQueryResultsForPolicyDefinitionOperationSpec = {
1191
+ path: "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
1192
+ httpMethod: "POST",
1193
+ responses: {
1194
+ 200: {
1195
+ bodyMapper: Mappers.PolicyStatesQueryResults
1196
+ },
1197
+ default: {
1198
+ bodyMapper: Mappers.QueryFailure
1199
+ }
1200
+ },
1201
+ queryParameters: [
1202
+ Parameters.top,
1203
+ Parameters.filter,
1204
+ Parameters.apiVersion2,
1205
+ Parameters.orderBy,
1206
+ Parameters.select,
1207
+ Parameters.fromParam,
1208
+ Parameters.to,
1209
+ Parameters.apply,
1210
+ Parameters.skipToken
1211
+ ],
1212
+ urlParameters: [
1213
+ Parameters.$host,
1214
+ Parameters.subscriptionId1,
1215
+ Parameters.authorizationNamespace,
1216
+ Parameters.policyDefinitionName,
1217
+ Parameters.policyStatesResource
1218
+ ],
1219
+ headerParameters: [Parameters.accept],
1220
+ serializer
1221
+ };
1222
+ const summarizeForPolicyDefinitionOperationSpec = {
1223
+ path: "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
1224
+ httpMethod: "POST",
1225
+ responses: {
1226
+ 200: {
1227
+ bodyMapper: Mappers.SummarizeResults
1228
+ },
1229
+ default: {
1230
+ bodyMapper: Mappers.QueryFailure
1231
+ }
1232
+ },
1233
+ queryParameters: [
1234
+ Parameters.top,
1235
+ Parameters.filter,
1236
+ Parameters.apiVersion2,
1237
+ Parameters.fromParam,
1238
+ Parameters.to
1239
+ ],
1240
+ urlParameters: [
1241
+ Parameters.$host,
1242
+ Parameters.subscriptionId1,
1243
+ Parameters.authorizationNamespace,
1244
+ Parameters.policyDefinitionName,
1245
+ Parameters.policyStatesSummaryResource
1246
+ ],
1247
+ headerParameters: [Parameters.accept],
1248
+ serializer
1249
+ };
1250
+ const listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec = {
1251
+ path: "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
1252
+ httpMethod: "POST",
1253
+ responses: {
1254
+ 200: {
1255
+ bodyMapper: Mappers.PolicyStatesQueryResults
1256
+ },
1257
+ default: {
1258
+ bodyMapper: Mappers.QueryFailure
1259
+ }
1260
+ },
1261
+ queryParameters: [
1262
+ Parameters.top,
1263
+ Parameters.filter,
1264
+ Parameters.apiVersion2,
1265
+ Parameters.orderBy,
1266
+ Parameters.select,
1267
+ Parameters.fromParam,
1268
+ Parameters.to,
1269
+ Parameters.apply,
1270
+ Parameters.skipToken
1271
+ ],
1272
+ urlParameters: [
1273
+ Parameters.$host,
1274
+ Parameters.subscriptionId1,
1275
+ Parameters.authorizationNamespace,
1276
+ Parameters.policyAssignmentName,
1277
+ Parameters.policyStatesResource
1278
+ ],
1279
+ headerParameters: [Parameters.accept],
1280
+ serializer
1281
+ };
1282
+ const summarizeForSubscriptionLevelPolicyAssignmentOperationSpec = {
1283
+ path: "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
1284
+ httpMethod: "POST",
1285
+ responses: {
1286
+ 200: {
1287
+ bodyMapper: Mappers.SummarizeResults
1288
+ },
1289
+ default: {
1290
+ bodyMapper: Mappers.QueryFailure
1291
+ }
1292
+ },
1293
+ queryParameters: [
1294
+ Parameters.top,
1295
+ Parameters.filter,
1296
+ Parameters.apiVersion2,
1297
+ Parameters.fromParam,
1298
+ Parameters.to
1299
+ ],
1300
+ urlParameters: [
1301
+ Parameters.$host,
1302
+ Parameters.subscriptionId1,
1303
+ Parameters.authorizationNamespace,
1304
+ Parameters.policyAssignmentName,
1305
+ Parameters.policyStatesSummaryResource
1306
+ ],
1307
+ headerParameters: [Parameters.accept],
1308
+ serializer
1309
+ };
1310
+ const listQueryResultsForResourceGroupLevelPolicyAssignmentOperationSpec = {
1311
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesResource}/queryResults",
1312
+ httpMethod: "POST",
1313
+ responses: {
1314
+ 200: {
1315
+ bodyMapper: Mappers.PolicyStatesQueryResults
1316
+ },
1317
+ default: {
1318
+ bodyMapper: Mappers.QueryFailure
1319
+ }
1320
+ },
1321
+ queryParameters: [
1322
+ Parameters.top,
1323
+ Parameters.filter,
1324
+ Parameters.apiVersion2,
1325
+ Parameters.orderBy,
1326
+ Parameters.select,
1327
+ Parameters.fromParam,
1328
+ Parameters.to,
1329
+ Parameters.apply,
1330
+ Parameters.skipToken
1331
+ ],
1332
+ urlParameters: [
1333
+ Parameters.$host,
1334
+ Parameters.resourceGroupName,
1335
+ Parameters.subscriptionId1,
1336
+ Parameters.authorizationNamespace,
1337
+ Parameters.policyAssignmentName,
1338
+ Parameters.policyStatesResource
1339
+ ],
1340
+ headerParameters: [Parameters.accept],
1341
+ serializer
1342
+ };
1343
+ const summarizeForResourceGroupLevelPolicyAssignmentOperationSpec = {
1344
+ path: "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyStates/{policyStatesSummaryResource}/summarize",
1345
+ httpMethod: "POST",
1346
+ responses: {
1347
+ 200: {
1348
+ bodyMapper: Mappers.SummarizeResults
1349
+ },
1350
+ default: {
1351
+ bodyMapper: Mappers.QueryFailure
1352
+ }
1353
+ },
1354
+ queryParameters: [
1355
+ Parameters.top,
1356
+ Parameters.filter,
1357
+ Parameters.apiVersion2,
1358
+ Parameters.fromParam,
1359
+ Parameters.to
1360
+ ],
1361
+ urlParameters: [
1362
+ Parameters.$host,
1363
+ Parameters.resourceGroupName,
1364
+ Parameters.subscriptionId1,
1365
+ Parameters.authorizationNamespace,
1366
+ Parameters.policyAssignmentName,
1367
+ Parameters.policyStatesSummaryResource
1368
+ ],
1369
+ headerParameters: [Parameters.accept],
1370
+ serializer
1371
+ };
1372
+ const listQueryResultsForManagementGroupNextOperationSpec = {
1373
+ path: "{nextLink}",
1374
+ httpMethod: "GET",
1375
+ responses: {
1376
+ 200: {
1377
+ bodyMapper: Mappers.PolicyStatesQueryResults
1378
+ },
1379
+ default: {
1380
+ bodyMapper: Mappers.QueryFailure
1381
+ }
1382
+ },
1383
+ queryParameters: [
1384
+ Parameters.top,
1385
+ Parameters.filter,
1386
+ Parameters.apiVersion2,
1387
+ Parameters.orderBy,
1388
+ Parameters.select,
1389
+ Parameters.fromParam,
1390
+ Parameters.to,
1391
+ Parameters.apply,
1392
+ Parameters.skipToken
1393
+ ],
1394
+ urlParameters: [
1395
+ Parameters.$host,
1396
+ Parameters.managementGroupsNamespace,
1397
+ Parameters.managementGroupName,
1398
+ Parameters.nextLink,
1399
+ Parameters.policyStatesResource
1400
+ ],
1401
+ headerParameters: [Parameters.accept],
1402
+ serializer
1403
+ };
1404
+ const listQueryResultsForSubscriptionNextOperationSpec = {
1405
+ path: "{nextLink}",
1406
+ httpMethod: "GET",
1407
+ responses: {
1408
+ 200: {
1409
+ bodyMapper: Mappers.PolicyStatesQueryResults
1410
+ },
1411
+ default: {
1412
+ bodyMapper: Mappers.QueryFailure
1413
+ }
1414
+ },
1415
+ queryParameters: [
1416
+ Parameters.top,
1417
+ Parameters.filter,
1418
+ Parameters.apiVersion2,
1419
+ Parameters.orderBy,
1420
+ Parameters.select,
1421
+ Parameters.fromParam,
1422
+ Parameters.to,
1423
+ Parameters.apply,
1424
+ Parameters.skipToken
1425
+ ],
1426
+ urlParameters: [
1427
+ Parameters.$host,
1428
+ Parameters.nextLink,
1429
+ Parameters.subscriptionId1,
1430
+ Parameters.policyStatesResource
1431
+ ],
1432
+ headerParameters: [Parameters.accept],
1433
+ serializer
1434
+ };
1435
+ const listQueryResultsForResourceGroupNextOperationSpec = {
1436
+ path: "{nextLink}",
1437
+ httpMethod: "GET",
1438
+ responses: {
1439
+ 200: {
1440
+ bodyMapper: Mappers.PolicyStatesQueryResults
1441
+ },
1442
+ default: {
1443
+ bodyMapper: Mappers.QueryFailure
1444
+ }
1445
+ },
1446
+ queryParameters: [
1447
+ Parameters.top,
1448
+ Parameters.filter,
1449
+ Parameters.apiVersion2,
1450
+ Parameters.orderBy,
1451
+ Parameters.select,
1452
+ Parameters.fromParam,
1453
+ Parameters.to,
1454
+ Parameters.apply,
1455
+ Parameters.skipToken
1456
+ ],
1457
+ urlParameters: [
1458
+ Parameters.$host,
1459
+ Parameters.resourceGroupName,
1460
+ Parameters.nextLink,
1461
+ Parameters.subscriptionId1,
1462
+ Parameters.policyStatesResource
1463
+ ],
1464
+ headerParameters: [Parameters.accept],
1465
+ serializer
1466
+ };
1467
+ const listQueryResultsForResourceNextOperationSpec = {
1468
+ path: "{nextLink}",
1469
+ httpMethod: "GET",
1470
+ responses: {
1471
+ 200: {
1472
+ bodyMapper: Mappers.PolicyStatesQueryResults
1473
+ },
1474
+ default: {
1475
+ bodyMapper: Mappers.QueryFailure
1476
+ }
1477
+ },
1478
+ queryParameters: [
1479
+ Parameters.top,
1480
+ Parameters.filter,
1481
+ Parameters.apiVersion2,
1482
+ Parameters.orderBy,
1483
+ Parameters.select,
1484
+ Parameters.fromParam,
1485
+ Parameters.to,
1486
+ Parameters.apply,
1487
+ Parameters.skipToken,
1488
+ Parameters.expand
1489
+ ],
1490
+ urlParameters: [
1491
+ Parameters.$host,
1492
+ Parameters.resourceId,
1493
+ Parameters.nextLink,
1494
+ Parameters.policyStatesResource
1495
+ ],
1496
+ headerParameters: [Parameters.accept],
1497
+ serializer
1498
+ };
1499
+ const listQueryResultsForPolicySetDefinitionNextOperationSpec = {
1500
+ path: "{nextLink}",
1501
+ httpMethod: "GET",
1502
+ responses: {
1503
+ 200: {
1504
+ bodyMapper: Mappers.PolicyStatesQueryResults
1505
+ },
1506
+ default: {
1507
+ bodyMapper: Mappers.QueryFailure
1508
+ }
1509
+ },
1510
+ queryParameters: [
1511
+ Parameters.top,
1512
+ Parameters.filter,
1513
+ Parameters.apiVersion2,
1514
+ Parameters.orderBy,
1515
+ Parameters.select,
1516
+ Parameters.fromParam,
1517
+ Parameters.to,
1518
+ Parameters.apply,
1519
+ Parameters.skipToken
1520
+ ],
1521
+ urlParameters: [
1522
+ Parameters.$host,
1523
+ Parameters.nextLink,
1524
+ Parameters.subscriptionId1,
1525
+ Parameters.authorizationNamespace,
1526
+ Parameters.policySetDefinitionName,
1527
+ Parameters.policyStatesResource
1528
+ ],
1529
+ headerParameters: [Parameters.accept],
1530
+ serializer
1531
+ };
1532
+ const listQueryResultsForPolicyDefinitionNextOperationSpec = {
1533
+ path: "{nextLink}",
1534
+ httpMethod: "GET",
1535
+ responses: {
1536
+ 200: {
1537
+ bodyMapper: Mappers.PolicyStatesQueryResults
1538
+ },
1539
+ default: {
1540
+ bodyMapper: Mappers.QueryFailure
1541
+ }
1542
+ },
1543
+ queryParameters: [
1544
+ Parameters.top,
1545
+ Parameters.filter,
1546
+ Parameters.apiVersion2,
1547
+ Parameters.orderBy,
1548
+ Parameters.select,
1549
+ Parameters.fromParam,
1550
+ Parameters.to,
1551
+ Parameters.apply,
1552
+ Parameters.skipToken
1553
+ ],
1554
+ urlParameters: [
1555
+ Parameters.$host,
1556
+ Parameters.nextLink,
1557
+ Parameters.subscriptionId1,
1558
+ Parameters.authorizationNamespace,
1559
+ Parameters.policyDefinitionName,
1560
+ Parameters.policyStatesResource
1561
+ ],
1562
+ headerParameters: [Parameters.accept],
1563
+ serializer
1564
+ };
1565
+ const listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec = {
1566
+ path: "{nextLink}",
1567
+ httpMethod: "GET",
1568
+ responses: {
1569
+ 200: {
1570
+ bodyMapper: Mappers.PolicyStatesQueryResults
1571
+ },
1572
+ default: {
1573
+ bodyMapper: Mappers.QueryFailure
1574
+ }
1575
+ },
1576
+ queryParameters: [
1577
+ Parameters.top,
1578
+ Parameters.filter,
1579
+ Parameters.apiVersion2,
1580
+ Parameters.orderBy,
1581
+ Parameters.select,
1582
+ Parameters.fromParam,
1583
+ Parameters.to,
1584
+ Parameters.apply,
1585
+ Parameters.skipToken
1586
+ ],
1587
+ urlParameters: [
1588
+ Parameters.$host,
1589
+ Parameters.nextLink,
1590
+ Parameters.subscriptionId1,
1591
+ Parameters.authorizationNamespace,
1592
+ Parameters.policyAssignmentName,
1593
+ Parameters.policyStatesResource
1594
+ ],
1595
+ headerParameters: [Parameters.accept],
1596
+ serializer
1597
+ };
1598
+ const listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec = {
1599
+ path: "{nextLink}",
1600
+ httpMethod: "GET",
1601
+ responses: {
1602
+ 200: {
1603
+ bodyMapper: Mappers.PolicyStatesQueryResults
1604
+ },
1605
+ default: {
1606
+ bodyMapper: Mappers.QueryFailure
1607
+ }
1608
+ },
1609
+ queryParameters: [
1610
+ Parameters.top,
1611
+ Parameters.filter,
1612
+ Parameters.apiVersion2,
1613
+ Parameters.orderBy,
1614
+ Parameters.select,
1615
+ Parameters.fromParam,
1616
+ Parameters.to,
1617
+ Parameters.apply,
1618
+ Parameters.skipToken
1619
+ ],
1620
+ urlParameters: [
1621
+ Parameters.$host,
1622
+ Parameters.resourceGroupName,
1623
+ Parameters.nextLink,
1624
+ Parameters.subscriptionId1,
1625
+ Parameters.authorizationNamespace,
1626
+ Parameters.policyAssignmentName,
1627
+ Parameters.policyStatesResource
1628
+ ],
1629
+ headerParameters: [Parameters.accept],
1630
+ serializer
1631
+ };
1632
+ //# sourceMappingURL=policyStates.js.map