@azure/arm-policyinsights 4.1.1 → 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 (210) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +69 -85
  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/{esm/models/policyEventsMappers.js → dist-esm/src/index.js} +5 -2
  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 +1287 -697
  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 +209 -162
  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/dist-esm/src/operations/index.js +16 -0
  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/{src/models/operationsMappers.ts → dist-esm/src/operationsInterfaces/attestations.js} +2 -8
  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/{esm/models/index.js → dist-esm/src/operationsInterfaces/operations.js} +2 -1
  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/{src/models/policyEventsMappers.ts → dist-esm/src/operationsInterfaces/policyEvents.js} +2 -8
  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/{src/models/policyMetadataOperationsMappers.ts → dist-esm/src/operationsInterfaces/policyMetadataOperations.js} +2 -9
  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 -23
  109. package/review/arm-policyinsights.api.md +1525 -0
  110. package/rollup.config.js +181 -30
  111. package/{esm/models/operationsMappers.js → src/index.ts} +5 -2
  112. package/src/lroImpl.ts +34 -0
  113. package/src/models/index.ts +1582 -2619
  114. package/src/models/mappers.ts +1454 -829
  115. package/src/models/parameters.ts +257 -163
  116. package/src/operations/attestations.ts +999 -0
  117. package/src/operations/index.ts +3 -2
  118. package/src/operations/operations.ts +27 -41
  119. package/src/operations/policyEvents.ts +1064 -600
  120. package/src/operations/policyMetadataOperations.ts +106 -113
  121. package/src/operations/policyRestrictions.ts +111 -0
  122. package/src/operations/policyStates.ts +1685 -1109
  123. package/src/operations/policyTrackedResources.ts +414 -293
  124. package/src/operations/remediations.ts +1201 -1264
  125. package/src/operationsInterfaces/attestations.ts +212 -0
  126. package/{esm/operations/index.js → src/operationsInterfaces/index.ts} +4 -3
  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 +91 -42
  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 -5548
  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 -3009
  143. package/esm/models/index.d.ts.map +0 -1
  144. package/esm/models/index.js.map +0 -1
  145. package/esm/models/mappers.d.ts +0 -42
  146. package/esm/models/mappers.d.ts.map +0 -1
  147. package/esm/models/mappers.js.map +0 -1
  148. package/esm/models/operationsMappers.d.ts +0 -2
  149. package/esm/models/operationsMappers.d.ts.map +0 -1
  150. package/esm/models/operationsMappers.js.map +0 -1
  151. package/esm/models/parameters.d.ts +0 -32
  152. package/esm/models/parameters.d.ts.map +0 -1
  153. package/esm/models/parameters.js.map +0 -1
  154. package/esm/models/policyEventsMappers.d.ts +0 -2
  155. package/esm/models/policyEventsMappers.d.ts.map +0 -1
  156. package/esm/models/policyEventsMappers.js.map +0 -1
  157. package/esm/models/policyMetadataOperationsMappers.d.ts +0 -2
  158. package/esm/models/policyMetadataOperationsMappers.d.ts.map +0 -1
  159. package/esm/models/policyMetadataOperationsMappers.js +0 -9
  160. package/esm/models/policyMetadataOperationsMappers.js.map +0 -1
  161. package/esm/models/policyStatesMappers.d.ts +0 -2
  162. package/esm/models/policyStatesMappers.d.ts.map +0 -1
  163. package/esm/models/policyStatesMappers.js +0 -9
  164. package/esm/models/policyStatesMappers.js.map +0 -1
  165. package/esm/models/policyTrackedResourcesMappers.d.ts +0 -2
  166. package/esm/models/policyTrackedResourcesMappers.d.ts.map +0 -1
  167. package/esm/models/policyTrackedResourcesMappers.js +0 -9
  168. package/esm/models/policyTrackedResourcesMappers.js.map +0 -1
  169. package/esm/models/remediationsMappers.d.ts +0 -2
  170. package/esm/models/remediationsMappers.d.ts.map +0 -1
  171. package/esm/models/remediationsMappers.js +0 -9
  172. package/esm/models/remediationsMappers.js.map +0 -1
  173. package/esm/operations/index.d.ts.map +0 -1
  174. package/esm/operations/index.js.map +0 -1
  175. package/esm/operations/operations.d.ts +0 -28
  176. package/esm/operations/operations.d.ts.map +0 -1
  177. package/esm/operations/operations.js +0 -50
  178. package/esm/operations/operations.js.map +0 -1
  179. package/esm/operations/policyEvents.d.ts +0 -323
  180. package/esm/operations/policyEvents.d.ts.map +0 -1
  181. package/esm/operations/policyEvents.js +0 -572
  182. package/esm/operations/policyEvents.js.map +0 -1
  183. package/esm/operations/policyMetadataOperations.d.ts +0 -64
  184. package/esm/operations/policyMetadataOperations.d.ts.map +0 -1
  185. package/esm/operations/policyMetadataOperations.js +0 -108
  186. package/esm/operations/policyMetadataOperations.js.map +0 -1
  187. package/esm/operations/policyStates.d.ts +0 -588
  188. package/esm/operations/policyStates.d.ts.map +0 -1
  189. package/esm/operations/policyStates.js +0 -951
  190. package/esm/operations/policyStates.js.map +0 -1
  191. package/esm/operations/policyTrackedResources.d.ts +0 -160
  192. package/esm/operations/policyTrackedResources.d.ts.map +0 -1
  193. package/esm/operations/policyTrackedResources.js +0 -269
  194. package/esm/operations/policyTrackedResources.js.map +0 -1
  195. package/esm/operations/remediations.d.ts +0 -679
  196. package/esm/operations/remediations.d.ts.map +0 -1
  197. package/esm/operations/remediations.js +0 -1037
  198. package/esm/operations/remediations.js.map +0 -1
  199. package/esm/policyInsightsClient.d.ts +0 -28
  200. package/esm/policyInsightsClient.d.ts.map +0 -1
  201. package/esm/policyInsightsClient.js +0 -41
  202. package/esm/policyInsightsClient.js.map +0 -1
  203. package/esm/policyInsightsClientContext.d.ts +0 -19
  204. package/esm/policyInsightsClientContext.d.ts.map +0 -1
  205. package/esm/policyInsightsClientContext.js +0 -54
  206. package/esm/policyInsightsClientContext.js.map +0 -1
  207. package/src/models/policyStatesMappers.ts +0 -25
  208. package/src/models/policyTrackedResourcesMappers.ts +0 -16
  209. package/src/models/remediationsMappers.ts +0 -20
  210. package/src/policyInsightsClientContext.ts +0 -59
@@ -3,239 +3,523 @@
3
3
  * Licensed under the MIT License.
4
4
  *
5
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
6
- * Changes may cause incorrect behavior and will be lost if the code is
7
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
8
7
  */
9
8
 
10
- import * as msRest from "@azure/ms-rest-js";
11
- import * as Models from "../models";
12
- import * as Mappers from "../models/policyEventsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PolicyEvents } from "../operationsInterfaces";
11
+ import * as coreClient from "@azure/core-client";
12
+ import * as Mappers from "../models/mappers";
13
13
  import * as Parameters from "../models/parameters";
14
- import { PolicyInsightsClientContext } from "../policyInsightsClientContext";
14
+ import { PolicyInsightsClient } from "../policyInsightsClient";
15
+ import {
16
+ PolicyEvent,
17
+ PolicyEventsListQueryResultsForManagementGroupNextOptionalParams,
18
+ PolicyEventsListQueryResultsForManagementGroupOptionalParams,
19
+ PolicyEventsListQueryResultsForSubscriptionNextOptionalParams,
20
+ PolicyEventsListQueryResultsForSubscriptionOptionalParams,
21
+ PolicyEventsListQueryResultsForResourceGroupNextOptionalParams,
22
+ PolicyEventsListQueryResultsForResourceGroupOptionalParams,
23
+ PolicyEventsListQueryResultsForResourceNextOptionalParams,
24
+ PolicyEventsListQueryResultsForResourceOptionalParams,
25
+ PolicyEventsListQueryResultsForPolicySetDefinitionNextOptionalParams,
26
+ PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams,
27
+ PolicyEventsListQueryResultsForPolicyDefinitionNextOptionalParams,
28
+ PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams,
29
+ PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextOptionalParams,
30
+ PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams,
31
+ PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextOptionalParams,
32
+ PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams,
33
+ PolicyEventsListQueryResultsForManagementGroupResponse,
34
+ PolicyEventsListQueryResultsForSubscriptionResponse,
35
+ PolicyEventsListQueryResultsForResourceGroupResponse,
36
+ PolicyEventsListQueryResultsForResourceResponse,
37
+ PolicyEventsListQueryResultsForPolicySetDefinitionResponse,
38
+ PolicyEventsListQueryResultsForPolicyDefinitionResponse,
39
+ PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentResponse,
40
+ PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentResponse,
41
+ PolicyEventsListQueryResultsForManagementGroupNextResponse,
42
+ PolicyEventsListQueryResultsForSubscriptionNextResponse,
43
+ PolicyEventsListQueryResultsForResourceGroupNextResponse,
44
+ PolicyEventsListQueryResultsForResourceNextResponse,
45
+ PolicyEventsListQueryResultsForPolicySetDefinitionNextResponse,
46
+ PolicyEventsListQueryResultsForPolicyDefinitionNextResponse,
47
+ PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextResponse,
48
+ PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextResponse
49
+ } from "../models";
15
50
 
16
- /** Class representing a PolicyEvents. */
17
- export class PolicyEvents {
18
- private readonly client: PolicyInsightsClientContext;
51
+ /// <reference lib="esnext.asynciterable" />
52
+ /** Class containing PolicyEvents operations. */
53
+ export class PolicyEventsImpl implements PolicyEvents {
54
+ private readonly client: PolicyInsightsClient;
19
55
 
20
56
  /**
21
- * Create a PolicyEvents.
22
- * @param {PolicyInsightsClientContext} client Reference to the service client.
57
+ * Initialize a new instance of the class PolicyEvents class.
58
+ * @param client Reference to the service client
23
59
  */
24
- constructor(client: PolicyInsightsClientContext) {
60
+ constructor(client: PolicyInsightsClient) {
25
61
  this.client = client;
26
62
  }
27
63
 
28
64
  /**
29
65
  * Queries policy events for the resources under the management group.
30
66
  * @param managementGroupName Management group name.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.PolicyEventsListQueryResultsForManagementGroupResponse>
67
+ * @param options The options parameters.
33
68
  */
34
- listQueryResultsForManagementGroup(managementGroupName: string, options?: Models.PolicyEventsListQueryResultsForManagementGroupOptionalParams): Promise<Models.PolicyEventsListQueryResultsForManagementGroupResponse>;
35
- /**
36
- * @param managementGroupName Management group name.
37
- * @param callback The callback
38
- */
39
- listQueryResultsForManagementGroup(managementGroupName: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
40
- /**
41
- * @param managementGroupName Management group name.
42
- * @param options The optional parameters
43
- * @param callback The callback
44
- */
45
- listQueryResultsForManagementGroup(managementGroupName: string, options: Models.PolicyEventsListQueryResultsForManagementGroupOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
46
- listQueryResultsForManagementGroup(managementGroupName: string, options?: Models.PolicyEventsListQueryResultsForManagementGroupOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForManagementGroupResponse> {
47
- return this.client.sendOperationRequest(
48
- {
69
+ public listQueryResultsForManagementGroup(
70
+ managementGroupName: string,
71
+ options?: PolicyEventsListQueryResultsForManagementGroupOptionalParams
72
+ ): PagedAsyncIterableIterator<PolicyEvent> {
73
+ const iter = this.listQueryResultsForManagementGroupPagingAll(
74
+ managementGroupName,
75
+ options
76
+ );
77
+ return {
78
+ next() {
79
+ return iter.next();
80
+ },
81
+ [Symbol.asyncIterator]() {
82
+ return this;
83
+ },
84
+ byPage: () => {
85
+ return this.listQueryResultsForManagementGroupPagingPage(
86
+ managementGroupName,
87
+ options
88
+ );
89
+ }
90
+ };
91
+ }
92
+
93
+ private async *listQueryResultsForManagementGroupPagingPage(
94
+ managementGroupName: string,
95
+ options?: PolicyEventsListQueryResultsForManagementGroupOptionalParams
96
+ ): AsyncIterableIterator<PolicyEvent[]> {
97
+ let result = await this._listQueryResultsForManagementGroup(
98
+ managementGroupName,
99
+ options
100
+ );
101
+ yield result.value || [];
102
+ let continuationToken = result.odataNextLink;
103
+ while (continuationToken) {
104
+ result = await this._listQueryResultsForManagementGroupNext(
49
105
  managementGroupName,
106
+ continuationToken,
50
107
  options
51
- },
52
- listQueryResultsForManagementGroupOperationSpec,
53
- callback) as Promise<Models.PolicyEventsListQueryResultsForManagementGroupResponse>;
108
+ );
109
+ continuationToken = result.odataNextLink;
110
+ yield result.value || [];
111
+ }
112
+ }
113
+
114
+ private async *listQueryResultsForManagementGroupPagingAll(
115
+ managementGroupName: string,
116
+ options?: PolicyEventsListQueryResultsForManagementGroupOptionalParams
117
+ ): AsyncIterableIterator<PolicyEvent> {
118
+ for await (const page of this.listQueryResultsForManagementGroupPagingPage(
119
+ managementGroupName,
120
+ options
121
+ )) {
122
+ yield* page;
123
+ }
54
124
  }
55
125
 
56
126
  /**
57
127
  * Queries policy events for the resources under the subscription.
58
128
  * @param subscriptionId Microsoft Azure subscription ID.
59
- * @param [options] The optional parameters
60
- * @returns Promise<Models.PolicyEventsListQueryResultsForSubscriptionResponse>
61
- */
62
- listQueryResultsForSubscription(subscriptionId: string, options?: Models.PolicyEventsListQueryResultsForSubscriptionOptionalParams): Promise<Models.PolicyEventsListQueryResultsForSubscriptionResponse>;
63
- /**
64
- * @param subscriptionId Microsoft Azure subscription ID.
65
- * @param callback The callback
66
- */
67
- listQueryResultsForSubscription(subscriptionId: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
68
- /**
69
- * @param subscriptionId Microsoft Azure subscription ID.
70
- * @param options The optional parameters
71
- * @param callback The callback
129
+ * @param options The options parameters.
72
130
  */
73
- listQueryResultsForSubscription(subscriptionId: string, options: Models.PolicyEventsListQueryResultsForSubscriptionOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
74
- listQueryResultsForSubscription(subscriptionId: string, options?: Models.PolicyEventsListQueryResultsForSubscriptionOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForSubscriptionResponse> {
75
- return this.client.sendOperationRequest(
76
- {
131
+ public listQueryResultsForSubscription(
132
+ subscriptionId: string,
133
+ options?: PolicyEventsListQueryResultsForSubscriptionOptionalParams
134
+ ): PagedAsyncIterableIterator<PolicyEvent> {
135
+ const iter = this.listQueryResultsForSubscriptionPagingAll(
136
+ subscriptionId,
137
+ options
138
+ );
139
+ return {
140
+ next() {
141
+ return iter.next();
142
+ },
143
+ [Symbol.asyncIterator]() {
144
+ return this;
145
+ },
146
+ byPage: () => {
147
+ return this.listQueryResultsForSubscriptionPagingPage(
148
+ subscriptionId,
149
+ options
150
+ );
151
+ }
152
+ };
153
+ }
154
+
155
+ private async *listQueryResultsForSubscriptionPagingPage(
156
+ subscriptionId: string,
157
+ options?: PolicyEventsListQueryResultsForSubscriptionOptionalParams
158
+ ): AsyncIterableIterator<PolicyEvent[]> {
159
+ let result = await this._listQueryResultsForSubscription(
160
+ subscriptionId,
161
+ options
162
+ );
163
+ yield result.value || [];
164
+ let continuationToken = result.odataNextLink;
165
+ while (continuationToken) {
166
+ result = await this._listQueryResultsForSubscriptionNext(
77
167
  subscriptionId,
168
+ continuationToken,
78
169
  options
79
- },
80
- listQueryResultsForSubscriptionOperationSpec,
81
- callback) as Promise<Models.PolicyEventsListQueryResultsForSubscriptionResponse>;
170
+ );
171
+ continuationToken = result.odataNextLink;
172
+ yield result.value || [];
173
+ }
174
+ }
175
+
176
+ private async *listQueryResultsForSubscriptionPagingAll(
177
+ subscriptionId: string,
178
+ options?: PolicyEventsListQueryResultsForSubscriptionOptionalParams
179
+ ): AsyncIterableIterator<PolicyEvent> {
180
+ for await (const page of this.listQueryResultsForSubscriptionPagingPage(
181
+ subscriptionId,
182
+ options
183
+ )) {
184
+ yield* page;
185
+ }
82
186
  }
83
187
 
84
188
  /**
85
189
  * Queries policy events for the resources under the resource group.
86
190
  * @param subscriptionId Microsoft Azure subscription ID.
87
191
  * @param resourceGroupName Resource group name.
88
- * @param [options] The optional parameters
89
- * @returns Promise<Models.PolicyEventsListQueryResultsForResourceGroupResponse>
90
- */
91
- listQueryResultsForResourceGroup(subscriptionId: string, resourceGroupName: string, options?: Models.PolicyEventsListQueryResultsForResourceGroupOptionalParams): Promise<Models.PolicyEventsListQueryResultsForResourceGroupResponse>;
92
- /**
93
- * @param subscriptionId Microsoft Azure subscription ID.
94
- * @param resourceGroupName Resource group name.
95
- * @param callback The callback
96
- */
97
- listQueryResultsForResourceGroup(subscriptionId: string, resourceGroupName: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
98
- /**
99
- * @param subscriptionId Microsoft Azure subscription ID.
100
- * @param resourceGroupName Resource group name.
101
- * @param options The optional parameters
102
- * @param callback The callback
192
+ * @param options The options parameters.
103
193
  */
104
- listQueryResultsForResourceGroup(subscriptionId: string, resourceGroupName: string, options: Models.PolicyEventsListQueryResultsForResourceGroupOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
105
- listQueryResultsForResourceGroup(subscriptionId: string, resourceGroupName: string, options?: Models.PolicyEventsListQueryResultsForResourceGroupOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForResourceGroupResponse> {
106
- return this.client.sendOperationRequest(
107
- {
194
+ public listQueryResultsForResourceGroup(
195
+ subscriptionId: string,
196
+ resourceGroupName: string,
197
+ options?: PolicyEventsListQueryResultsForResourceGroupOptionalParams
198
+ ): PagedAsyncIterableIterator<PolicyEvent> {
199
+ const iter = this.listQueryResultsForResourceGroupPagingAll(
200
+ subscriptionId,
201
+ resourceGroupName,
202
+ options
203
+ );
204
+ return {
205
+ next() {
206
+ return iter.next();
207
+ },
208
+ [Symbol.asyncIterator]() {
209
+ return this;
210
+ },
211
+ byPage: () => {
212
+ return this.listQueryResultsForResourceGroupPagingPage(
213
+ subscriptionId,
214
+ resourceGroupName,
215
+ options
216
+ );
217
+ }
218
+ };
219
+ }
220
+
221
+ private async *listQueryResultsForResourceGroupPagingPage(
222
+ subscriptionId: string,
223
+ resourceGroupName: string,
224
+ options?: PolicyEventsListQueryResultsForResourceGroupOptionalParams
225
+ ): AsyncIterableIterator<PolicyEvent[]> {
226
+ let result = await this._listQueryResultsForResourceGroup(
227
+ subscriptionId,
228
+ resourceGroupName,
229
+ options
230
+ );
231
+ yield result.value || [];
232
+ let continuationToken = result.odataNextLink;
233
+ while (continuationToken) {
234
+ result = await this._listQueryResultsForResourceGroupNext(
108
235
  subscriptionId,
109
236
  resourceGroupName,
237
+ continuationToken,
110
238
  options
111
- },
112
- listQueryResultsForResourceGroupOperationSpec,
113
- callback) as Promise<Models.PolicyEventsListQueryResultsForResourceGroupResponse>;
239
+ );
240
+ continuationToken = result.odataNextLink;
241
+ yield result.value || [];
242
+ }
243
+ }
244
+
245
+ private async *listQueryResultsForResourceGroupPagingAll(
246
+ subscriptionId: string,
247
+ resourceGroupName: string,
248
+ options?: PolicyEventsListQueryResultsForResourceGroupOptionalParams
249
+ ): AsyncIterableIterator<PolicyEvent> {
250
+ for await (const page of this.listQueryResultsForResourceGroupPagingPage(
251
+ subscriptionId,
252
+ resourceGroupName,
253
+ options
254
+ )) {
255
+ yield* page;
256
+ }
114
257
  }
115
258
 
116
259
  /**
117
260
  * Queries policy events for the resource.
118
261
  * @param resourceId Resource ID.
119
- * @param [options] The optional parameters
120
- * @returns Promise<Models.PolicyEventsListQueryResultsForResourceResponse>
262
+ * @param options The options parameters.
121
263
  */
122
- listQueryResultsForResource(resourceId: string, options?: Models.PolicyEventsListQueryResultsForResourceOptionalParams): Promise<Models.PolicyEventsListQueryResultsForResourceResponse>;
123
- /**
124
- * @param resourceId Resource ID.
125
- * @param callback The callback
126
- */
127
- listQueryResultsForResource(resourceId: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
128
- /**
129
- * @param resourceId Resource ID.
130
- * @param options The optional parameters
131
- * @param callback The callback
132
- */
133
- listQueryResultsForResource(resourceId: string, options: Models.PolicyEventsListQueryResultsForResourceOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
134
- listQueryResultsForResource(resourceId: string, options?: Models.PolicyEventsListQueryResultsForResourceOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForResourceResponse> {
135
- return this.client.sendOperationRequest(
136
- {
264
+ public listQueryResultsForResource(
265
+ resourceId: string,
266
+ options?: PolicyEventsListQueryResultsForResourceOptionalParams
267
+ ): PagedAsyncIterableIterator<PolicyEvent> {
268
+ const iter = this.listQueryResultsForResourcePagingAll(resourceId, options);
269
+ return {
270
+ next() {
271
+ return iter.next();
272
+ },
273
+ [Symbol.asyncIterator]() {
274
+ return this;
275
+ },
276
+ byPage: () => {
277
+ return this.listQueryResultsForResourcePagingPage(resourceId, options);
278
+ }
279
+ };
280
+ }
281
+
282
+ private async *listQueryResultsForResourcePagingPage(
283
+ resourceId: string,
284
+ options?: PolicyEventsListQueryResultsForResourceOptionalParams
285
+ ): AsyncIterableIterator<PolicyEvent[]> {
286
+ let result = await this._listQueryResultsForResource(resourceId, options);
287
+ yield result.value || [];
288
+ let continuationToken = result.odataNextLink;
289
+ while (continuationToken) {
290
+ result = await this._listQueryResultsForResourceNext(
137
291
  resourceId,
292
+ continuationToken,
138
293
  options
139
- },
140
- listQueryResultsForResourceOperationSpec,
141
- callback) as Promise<Models.PolicyEventsListQueryResultsForResourceResponse>;
294
+ );
295
+ continuationToken = result.odataNextLink;
296
+ yield result.value || [];
297
+ }
298
+ }
299
+
300
+ private async *listQueryResultsForResourcePagingAll(
301
+ resourceId: string,
302
+ options?: PolicyEventsListQueryResultsForResourceOptionalParams
303
+ ): AsyncIterableIterator<PolicyEvent> {
304
+ for await (const page of this.listQueryResultsForResourcePagingPage(
305
+ resourceId,
306
+ options
307
+ )) {
308
+ yield* page;
309
+ }
142
310
  }
143
311
 
144
312
  /**
145
313
  * Queries policy events for the subscription level policy set definition.
146
314
  * @param subscriptionId Microsoft Azure subscription ID.
147
315
  * @param policySetDefinitionName Policy set definition name.
148
- * @param [options] The optional parameters
149
- * @returns Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionResponse>
150
- */
151
- listQueryResultsForPolicySetDefinition(subscriptionId: string, policySetDefinitionName: string, options?: Models.PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams): Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionResponse>;
152
- /**
153
- * @param subscriptionId Microsoft Azure subscription ID.
154
- * @param policySetDefinitionName Policy set definition name.
155
- * @param callback The callback
316
+ * @param options The options parameters.
156
317
  */
157
- listQueryResultsForPolicySetDefinition(subscriptionId: string, policySetDefinitionName: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
158
- /**
159
- * @param subscriptionId Microsoft Azure subscription ID.
160
- * @param policySetDefinitionName Policy set definition name.
161
- * @param options The optional parameters
162
- * @param callback The callback
163
- */
164
- listQueryResultsForPolicySetDefinition(subscriptionId: string, policySetDefinitionName: string, options: Models.PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
165
- listQueryResultsForPolicySetDefinition(subscriptionId: string, policySetDefinitionName: string, options?: Models.PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionResponse> {
166
- return this.client.sendOperationRequest(
167
- {
318
+ public listQueryResultsForPolicySetDefinition(
319
+ subscriptionId: string,
320
+ policySetDefinitionName: string,
321
+ options?: PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams
322
+ ): PagedAsyncIterableIterator<PolicyEvent> {
323
+ const iter = this.listQueryResultsForPolicySetDefinitionPagingAll(
324
+ subscriptionId,
325
+ policySetDefinitionName,
326
+ options
327
+ );
328
+ return {
329
+ next() {
330
+ return iter.next();
331
+ },
332
+ [Symbol.asyncIterator]() {
333
+ return this;
334
+ },
335
+ byPage: () => {
336
+ return this.listQueryResultsForPolicySetDefinitionPagingPage(
337
+ subscriptionId,
338
+ policySetDefinitionName,
339
+ options
340
+ );
341
+ }
342
+ };
343
+ }
344
+
345
+ private async *listQueryResultsForPolicySetDefinitionPagingPage(
346
+ subscriptionId: string,
347
+ policySetDefinitionName: string,
348
+ options?: PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams
349
+ ): AsyncIterableIterator<PolicyEvent[]> {
350
+ let result = await this._listQueryResultsForPolicySetDefinition(
351
+ subscriptionId,
352
+ policySetDefinitionName,
353
+ options
354
+ );
355
+ yield result.value || [];
356
+ let continuationToken = result.odataNextLink;
357
+ while (continuationToken) {
358
+ result = await this._listQueryResultsForPolicySetDefinitionNext(
168
359
  subscriptionId,
169
360
  policySetDefinitionName,
361
+ continuationToken,
170
362
  options
171
- },
172
- listQueryResultsForPolicySetDefinitionOperationSpec,
173
- callback) as Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionResponse>;
363
+ );
364
+ continuationToken = result.odataNextLink;
365
+ yield result.value || [];
366
+ }
367
+ }
368
+
369
+ private async *listQueryResultsForPolicySetDefinitionPagingAll(
370
+ subscriptionId: string,
371
+ policySetDefinitionName: string,
372
+ options?: PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams
373
+ ): AsyncIterableIterator<PolicyEvent> {
374
+ for await (const page of this.listQueryResultsForPolicySetDefinitionPagingPage(
375
+ subscriptionId,
376
+ policySetDefinitionName,
377
+ options
378
+ )) {
379
+ yield* page;
380
+ }
174
381
  }
175
382
 
176
383
  /**
177
384
  * Queries policy events for the subscription level policy definition.
178
385
  * @param subscriptionId Microsoft Azure subscription ID.
179
386
  * @param policyDefinitionName Policy definition name.
180
- * @param [options] The optional parameters
181
- * @returns Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionResponse>
387
+ * @param options The options parameters.
182
388
  */
183
- listQueryResultsForPolicyDefinition(subscriptionId: string, policyDefinitionName: string, options?: Models.PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams): Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionResponse>;
184
- /**
185
- * @param subscriptionId Microsoft Azure subscription ID.
186
- * @param policyDefinitionName Policy definition name.
187
- * @param callback The callback
188
- */
189
- listQueryResultsForPolicyDefinition(subscriptionId: string, policyDefinitionName: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
190
- /**
191
- * @param subscriptionId Microsoft Azure subscription ID.
192
- * @param policyDefinitionName Policy definition name.
193
- * @param options The optional parameters
194
- * @param callback The callback
195
- */
196
- listQueryResultsForPolicyDefinition(subscriptionId: string, policyDefinitionName: string, options: Models.PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
197
- listQueryResultsForPolicyDefinition(subscriptionId: string, policyDefinitionName: string, options?: Models.PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionResponse> {
198
- return this.client.sendOperationRequest(
199
- {
389
+ public listQueryResultsForPolicyDefinition(
390
+ subscriptionId: string,
391
+ policyDefinitionName: string,
392
+ options?: PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams
393
+ ): PagedAsyncIterableIterator<PolicyEvent> {
394
+ const iter = this.listQueryResultsForPolicyDefinitionPagingAll(
395
+ subscriptionId,
396
+ policyDefinitionName,
397
+ options
398
+ );
399
+ return {
400
+ next() {
401
+ return iter.next();
402
+ },
403
+ [Symbol.asyncIterator]() {
404
+ return this;
405
+ },
406
+ byPage: () => {
407
+ return this.listQueryResultsForPolicyDefinitionPagingPage(
408
+ subscriptionId,
409
+ policyDefinitionName,
410
+ options
411
+ );
412
+ }
413
+ };
414
+ }
415
+
416
+ private async *listQueryResultsForPolicyDefinitionPagingPage(
417
+ subscriptionId: string,
418
+ policyDefinitionName: string,
419
+ options?: PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams
420
+ ): AsyncIterableIterator<PolicyEvent[]> {
421
+ let result = await this._listQueryResultsForPolicyDefinition(
422
+ subscriptionId,
423
+ policyDefinitionName,
424
+ options
425
+ );
426
+ yield result.value || [];
427
+ let continuationToken = result.odataNextLink;
428
+ while (continuationToken) {
429
+ result = await this._listQueryResultsForPolicyDefinitionNext(
200
430
  subscriptionId,
201
431
  policyDefinitionName,
432
+ continuationToken,
202
433
  options
203
- },
204
- listQueryResultsForPolicyDefinitionOperationSpec,
205
- callback) as Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionResponse>;
434
+ );
435
+ continuationToken = result.odataNextLink;
436
+ yield result.value || [];
437
+ }
438
+ }
439
+
440
+ private async *listQueryResultsForPolicyDefinitionPagingAll(
441
+ subscriptionId: string,
442
+ policyDefinitionName: string,
443
+ options?: PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams
444
+ ): AsyncIterableIterator<PolicyEvent> {
445
+ for await (const page of this.listQueryResultsForPolicyDefinitionPagingPage(
446
+ subscriptionId,
447
+ policyDefinitionName,
448
+ options
449
+ )) {
450
+ yield* page;
451
+ }
206
452
  }
207
453
 
208
454
  /**
209
455
  * Queries policy events for the subscription level policy assignment.
210
456
  * @param subscriptionId Microsoft Azure subscription ID.
211
457
  * @param policyAssignmentName Policy assignment name.
212
- * @param [options] The optional parameters
213
- * @returns
214
- * Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentResponse>
215
- */
216
- listQueryResultsForSubscriptionLevelPolicyAssignment(subscriptionId: string, policyAssignmentName: string, options?: Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams): Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentResponse>;
217
- /**
218
- * @param subscriptionId Microsoft Azure subscription ID.
219
- * @param policyAssignmentName Policy assignment name.
220
- * @param callback The callback
221
- */
222
- listQueryResultsForSubscriptionLevelPolicyAssignment(subscriptionId: string, policyAssignmentName: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
223
- /**
224
- * @param subscriptionId Microsoft Azure subscription ID.
225
- * @param policyAssignmentName Policy assignment name.
226
- * @param options The optional parameters
227
- * @param callback The callback
458
+ * @param options The options parameters.
228
459
  */
229
- listQueryResultsForSubscriptionLevelPolicyAssignment(subscriptionId: string, policyAssignmentName: string, options: Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
230
- listQueryResultsForSubscriptionLevelPolicyAssignment(subscriptionId: string, policyAssignmentName: string, options?: Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentResponse> {
231
- return this.client.sendOperationRequest(
232
- {
460
+ public listQueryResultsForSubscriptionLevelPolicyAssignment(
461
+ subscriptionId: string,
462
+ policyAssignmentName: string,
463
+ options?: PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams
464
+ ): PagedAsyncIterableIterator<PolicyEvent> {
465
+ const iter = this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll(
466
+ subscriptionId,
467
+ policyAssignmentName,
468
+ options
469
+ );
470
+ return {
471
+ next() {
472
+ return iter.next();
473
+ },
474
+ [Symbol.asyncIterator]() {
475
+ return this;
476
+ },
477
+ byPage: () => {
478
+ return this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(
479
+ subscriptionId,
480
+ policyAssignmentName,
481
+ options
482
+ );
483
+ }
484
+ };
485
+ }
486
+
487
+ private async *listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(
488
+ subscriptionId: string,
489
+ policyAssignmentName: string,
490
+ options?: PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams
491
+ ): AsyncIterableIterator<PolicyEvent[]> {
492
+ let result = await this._listQueryResultsForSubscriptionLevelPolicyAssignment(
493
+ subscriptionId,
494
+ policyAssignmentName,
495
+ options
496
+ );
497
+ yield result.value || [];
498
+ let continuationToken = result.odataNextLink;
499
+ while (continuationToken) {
500
+ result = await this._listQueryResultsForSubscriptionLevelPolicyAssignmentNext(
233
501
  subscriptionId,
234
502
  policyAssignmentName,
503
+ continuationToken,
235
504
  options
236
- },
237
- listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec,
238
- callback) as Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentResponse>;
505
+ );
506
+ continuationToken = result.odataNextLink;
507
+ yield result.value || [];
508
+ }
509
+ }
510
+
511
+ private async *listQueryResultsForSubscriptionLevelPolicyAssignmentPagingAll(
512
+ subscriptionId: string,
513
+ policyAssignmentName: string,
514
+ options?: PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams
515
+ ): AsyncIterableIterator<PolicyEvent> {
516
+ for await (const page of this.listQueryResultsForSubscriptionLevelPolicyAssignmentPagingPage(
517
+ subscriptionId,
518
+ policyAssignmentName,
519
+ options
520
+ )) {
521
+ yield* page;
522
+ }
239
523
  }
240
524
 
241
525
  /**
@@ -243,289 +527,422 @@ export class PolicyEvents {
243
527
  * @param subscriptionId Microsoft Azure subscription ID.
244
528
  * @param resourceGroupName Resource group name.
245
529
  * @param policyAssignmentName Policy assignment name.
246
- * @param [options] The optional parameters
247
- * @returns
248
- * Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentResponse>
249
- */
250
- listQueryResultsForResourceGroupLevelPolicyAssignment(subscriptionId: string, resourceGroupName: string, policyAssignmentName: string, options?: Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams): Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentResponse>;
251
- /**
252
- * @param subscriptionId Microsoft Azure subscription ID.
253
- * @param resourceGroupName Resource group name.
254
- * @param policyAssignmentName Policy assignment name.
255
- * @param callback The callback
256
- */
257
- listQueryResultsForResourceGroupLevelPolicyAssignment(subscriptionId: string, resourceGroupName: string, policyAssignmentName: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
258
- /**
259
- * @param subscriptionId Microsoft Azure subscription ID.
260
- * @param resourceGroupName Resource group name.
261
- * @param policyAssignmentName Policy assignment name.
262
- * @param options The optional parameters
263
- * @param callback The callback
530
+ * @param options The options parameters.
264
531
  */
265
- listQueryResultsForResourceGroupLevelPolicyAssignment(subscriptionId: string, resourceGroupName: string, policyAssignmentName: string, options: Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
266
- listQueryResultsForResourceGroupLevelPolicyAssignment(subscriptionId: string, resourceGroupName: string, policyAssignmentName: string, options?: Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentResponse> {
267
- return this.client.sendOperationRequest(
268
- {
532
+ public listQueryResultsForResourceGroupLevelPolicyAssignment(
533
+ subscriptionId: string,
534
+ resourceGroupName: string,
535
+ policyAssignmentName: string,
536
+ options?: PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams
537
+ ): PagedAsyncIterableIterator<PolicyEvent> {
538
+ const iter = this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll(
539
+ subscriptionId,
540
+ resourceGroupName,
541
+ policyAssignmentName,
542
+ options
543
+ );
544
+ return {
545
+ next() {
546
+ return iter.next();
547
+ },
548
+ [Symbol.asyncIterator]() {
549
+ return this;
550
+ },
551
+ byPage: () => {
552
+ return this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(
553
+ subscriptionId,
554
+ resourceGroupName,
555
+ policyAssignmentName,
556
+ options
557
+ );
558
+ }
559
+ };
560
+ }
561
+
562
+ private async *listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(
563
+ subscriptionId: string,
564
+ resourceGroupName: string,
565
+ policyAssignmentName: string,
566
+ options?: PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams
567
+ ): AsyncIterableIterator<PolicyEvent[]> {
568
+ let result = await this._listQueryResultsForResourceGroupLevelPolicyAssignment(
569
+ subscriptionId,
570
+ resourceGroupName,
571
+ policyAssignmentName,
572
+ options
573
+ );
574
+ yield result.value || [];
575
+ let continuationToken = result.odataNextLink;
576
+ while (continuationToken) {
577
+ result = await this._listQueryResultsForResourceGroupLevelPolicyAssignmentNext(
269
578
  subscriptionId,
270
579
  resourceGroupName,
271
580
  policyAssignmentName,
581
+ continuationToken,
272
582
  options
273
- },
274
- listQueryResultsForResourceGroupLevelPolicyAssignmentOperationSpec,
275
- callback) as Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentResponse>;
583
+ );
584
+ continuationToken = result.odataNextLink;
585
+ yield result.value || [];
586
+ }
587
+ }
588
+
589
+ private async *listQueryResultsForResourceGroupLevelPolicyAssignmentPagingAll(
590
+ subscriptionId: string,
591
+ resourceGroupName: string,
592
+ policyAssignmentName: string,
593
+ options?: PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams
594
+ ): AsyncIterableIterator<PolicyEvent> {
595
+ for await (const page of this.listQueryResultsForResourceGroupLevelPolicyAssignmentPagingPage(
596
+ subscriptionId,
597
+ resourceGroupName,
598
+ policyAssignmentName,
599
+ options
600
+ )) {
601
+ yield* page;
602
+ }
276
603
  }
277
604
 
278
605
  /**
279
606
  * Queries policy events for the resources under the management group.
280
- * @param nextPageLink The NextLink from the previous successful call to List operation.
281
- * @param [options] The optional parameters
282
- * @returns Promise<Models.PolicyEventsListQueryResultsForManagementGroupNextResponse>
283
- */
284
- listQueryResultsForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForManagementGroupNextResponse>;
285
- /**
286
- * @param nextPageLink The NextLink from the previous successful call to List operation.
287
- * @param callback The callback
288
- */
289
- listQueryResultsForManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
290
- /**
291
- * @param nextPageLink The NextLink from the previous successful call to List operation.
292
- * @param options The optional parameters
293
- * @param callback The callback
607
+ * @param managementGroupName Management group name.
608
+ * @param options The options parameters.
294
609
  */
295
- listQueryResultsForManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
296
- listQueryResultsForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForManagementGroupNextResponse> {
610
+ private _listQueryResultsForManagementGroup(
611
+ managementGroupName: string,
612
+ options?: PolicyEventsListQueryResultsForManagementGroupOptionalParams
613
+ ): Promise<PolicyEventsListQueryResultsForManagementGroupResponse> {
297
614
  return this.client.sendOperationRequest(
298
- {
299
- nextPageLink,
300
- options
301
- },
302
- listQueryResultsForManagementGroupNextOperationSpec,
303
- callback) as Promise<Models.PolicyEventsListQueryResultsForManagementGroupNextResponse>;
615
+ { managementGroupName, options },
616
+ listQueryResultsForManagementGroupOperationSpec
617
+ );
304
618
  }
305
619
 
306
620
  /**
307
621
  * Queries policy events for the resources under the subscription.
308
- * @param nextPageLink The NextLink from the previous successful call to List operation.
309
- * @param [options] The optional parameters
310
- * @returns Promise<Models.PolicyEventsListQueryResultsForSubscriptionNextResponse>
311
- */
312
- listQueryResultsForSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForSubscriptionNextResponse>;
313
- /**
314
- * @param nextPageLink The NextLink from the previous successful call to List operation.
315
- * @param callback The callback
316
- */
317
- listQueryResultsForSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
318
- /**
319
- * @param nextPageLink The NextLink from the previous successful call to List operation.
320
- * @param options The optional parameters
321
- * @param callback The callback
622
+ * @param subscriptionId Microsoft Azure subscription ID.
623
+ * @param options The options parameters.
322
624
  */
323
- listQueryResultsForSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
324
- listQueryResultsForSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForSubscriptionNextResponse> {
625
+ private _listQueryResultsForSubscription(
626
+ subscriptionId: string,
627
+ options?: PolicyEventsListQueryResultsForSubscriptionOptionalParams
628
+ ): Promise<PolicyEventsListQueryResultsForSubscriptionResponse> {
325
629
  return this.client.sendOperationRequest(
326
- {
327
- nextPageLink,
328
- options
329
- },
330
- listQueryResultsForSubscriptionNextOperationSpec,
331
- callback) as Promise<Models.PolicyEventsListQueryResultsForSubscriptionNextResponse>;
630
+ { subscriptionId, options },
631
+ listQueryResultsForSubscriptionOperationSpec
632
+ );
332
633
  }
333
634
 
334
635
  /**
335
636
  * Queries policy events for the resources under the resource group.
336
- * @param nextPageLink The NextLink from the previous successful call to List operation.
337
- * @param [options] The optional parameters
338
- * @returns Promise<Models.PolicyEventsListQueryResultsForResourceGroupNextResponse>
339
- */
340
- listQueryResultsForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForResourceGroupNextResponse>;
341
- /**
342
- * @param nextPageLink The NextLink from the previous successful call to List operation.
343
- * @param callback The callback
344
- */
345
- listQueryResultsForResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
346
- /**
347
- * @param nextPageLink The NextLink from the previous successful call to List operation.
348
- * @param options The optional parameters
349
- * @param callback The callback
637
+ * @param subscriptionId Microsoft Azure subscription ID.
638
+ * @param resourceGroupName Resource group name.
639
+ * @param options The options parameters.
350
640
  */
351
- listQueryResultsForResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
352
- listQueryResultsForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForResourceGroupNextResponse> {
641
+ private _listQueryResultsForResourceGroup(
642
+ subscriptionId: string,
643
+ resourceGroupName: string,
644
+ options?: PolicyEventsListQueryResultsForResourceGroupOptionalParams
645
+ ): Promise<PolicyEventsListQueryResultsForResourceGroupResponse> {
353
646
  return this.client.sendOperationRequest(
354
- {
355
- nextPageLink,
356
- options
357
- },
358
- listQueryResultsForResourceGroupNextOperationSpec,
359
- callback) as Promise<Models.PolicyEventsListQueryResultsForResourceGroupNextResponse>;
647
+ { subscriptionId, resourceGroupName, options },
648
+ listQueryResultsForResourceGroupOperationSpec
649
+ );
360
650
  }
361
651
 
362
652
  /**
363
653
  * Queries policy events for the resource.
364
- * @param nextPageLink The NextLink from the previous successful call to List operation.
365
- * @param [options] The optional parameters
366
- * @returns Promise<Models.PolicyEventsListQueryResultsForResourceNextResponse>
367
- */
368
- listQueryResultsForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForResourceNextResponse>;
369
- /**
370
- * @param nextPageLink The NextLink from the previous successful call to List operation.
371
- * @param callback The callback
372
- */
373
- listQueryResultsForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
374
- /**
375
- * @param nextPageLink The NextLink from the previous successful call to List operation.
376
- * @param options The optional parameters
377
- * @param callback The callback
654
+ * @param resourceId Resource ID.
655
+ * @param options The options parameters.
378
656
  */
379
- listQueryResultsForResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
380
- listQueryResultsForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForResourceNextResponse> {
657
+ private _listQueryResultsForResource(
658
+ resourceId: string,
659
+ options?: PolicyEventsListQueryResultsForResourceOptionalParams
660
+ ): Promise<PolicyEventsListQueryResultsForResourceResponse> {
381
661
  return this.client.sendOperationRequest(
382
- {
383
- nextPageLink,
384
- options
385
- },
386
- listQueryResultsForResourceNextOperationSpec,
387
- callback) as Promise<Models.PolicyEventsListQueryResultsForResourceNextResponse>;
662
+ { resourceId, options },
663
+ listQueryResultsForResourceOperationSpec
664
+ );
388
665
  }
389
666
 
390
667
  /**
391
668
  * Queries policy events for the subscription level policy set definition.
392
- * @param nextPageLink The NextLink from the previous successful call to List operation.
393
- * @param [options] The optional parameters
394
- * @returns Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionNextResponse>
669
+ * @param subscriptionId Microsoft Azure subscription ID.
670
+ * @param policySetDefinitionName Policy set definition name.
671
+ * @param options The options parameters.
395
672
  */
396
- listQueryResultsForPolicySetDefinitionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionNextResponse>;
673
+ private _listQueryResultsForPolicySetDefinition(
674
+ subscriptionId: string,
675
+ policySetDefinitionName: string,
676
+ options?: PolicyEventsListQueryResultsForPolicySetDefinitionOptionalParams
677
+ ): Promise<PolicyEventsListQueryResultsForPolicySetDefinitionResponse> {
678
+ return this.client.sendOperationRequest(
679
+ { subscriptionId, policySetDefinitionName, options },
680
+ listQueryResultsForPolicySetDefinitionOperationSpec
681
+ );
682
+ }
683
+
397
684
  /**
398
- * @param nextPageLink The NextLink from the previous successful call to List operation.
399
- * @param callback The callback
685
+ * Queries policy events for the subscription level policy definition.
686
+ * @param subscriptionId Microsoft Azure subscription ID.
687
+ * @param policyDefinitionName Policy definition name.
688
+ * @param options The options parameters.
400
689
  */
401
- listQueryResultsForPolicySetDefinitionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
690
+ private _listQueryResultsForPolicyDefinition(
691
+ subscriptionId: string,
692
+ policyDefinitionName: string,
693
+ options?: PolicyEventsListQueryResultsForPolicyDefinitionOptionalParams
694
+ ): Promise<PolicyEventsListQueryResultsForPolicyDefinitionResponse> {
695
+ return this.client.sendOperationRequest(
696
+ { subscriptionId, policyDefinitionName, options },
697
+ listQueryResultsForPolicyDefinitionOperationSpec
698
+ );
699
+ }
700
+
402
701
  /**
403
- * @param nextPageLink The NextLink from the previous successful call to List operation.
404
- * @param options The optional parameters
405
- * @param callback The callback
702
+ * Queries policy events for the subscription level policy assignment.
703
+ * @param subscriptionId Microsoft Azure subscription ID.
704
+ * @param policyAssignmentName Policy assignment name.
705
+ * @param options The options parameters.
406
706
  */
407
- listQueryResultsForPolicySetDefinitionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
408
- listQueryResultsForPolicySetDefinitionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionNextResponse> {
707
+ private _listQueryResultsForSubscriptionLevelPolicyAssignment(
708
+ subscriptionId: string,
709
+ policyAssignmentName: string,
710
+ options?: PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentOptionalParams
711
+ ): Promise<
712
+ PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentResponse
713
+ > {
409
714
  return this.client.sendOperationRequest(
410
- {
411
- nextPageLink,
412
- options
413
- },
414
- listQueryResultsForPolicySetDefinitionNextOperationSpec,
415
- callback) as Promise<Models.PolicyEventsListQueryResultsForPolicySetDefinitionNextResponse>;
715
+ { subscriptionId, policyAssignmentName, options },
716
+ listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec
717
+ );
416
718
  }
417
719
 
418
720
  /**
419
- * Queries policy events for the subscription level policy definition.
420
- * @param nextPageLink The NextLink from the previous successful call to List operation.
421
- * @param [options] The optional parameters
422
- * @returns Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionNextResponse>
721
+ * Queries policy events for the resource group level policy assignment.
722
+ * @param subscriptionId Microsoft Azure subscription ID.
723
+ * @param resourceGroupName Resource group name.
724
+ * @param policyAssignmentName Policy assignment name.
725
+ * @param options The options parameters.
423
726
  */
424
- listQueryResultsForPolicyDefinitionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionNextResponse>;
727
+ private _listQueryResultsForResourceGroupLevelPolicyAssignment(
728
+ subscriptionId: string,
729
+ resourceGroupName: string,
730
+ policyAssignmentName: string,
731
+ options?: PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentOptionalParams
732
+ ): Promise<
733
+ PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentResponse
734
+ > {
735
+ return this.client.sendOperationRequest(
736
+ { subscriptionId, resourceGroupName, policyAssignmentName, options },
737
+ listQueryResultsForResourceGroupLevelPolicyAssignmentOperationSpec
738
+ );
739
+ }
740
+
425
741
  /**
426
- * @param nextPageLink The NextLink from the previous successful call to List operation.
427
- * @param callback The callback
742
+ * ListQueryResultsForManagementGroupNext
743
+ * @param managementGroupName Management group name.
744
+ * @param nextLink The nextLink from the previous successful call to the
745
+ * ListQueryResultsForManagementGroup method.
746
+ * @param options The options parameters.
428
747
  */
429
- listQueryResultsForPolicyDefinitionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
748
+ private _listQueryResultsForManagementGroupNext(
749
+ managementGroupName: string,
750
+ nextLink: string,
751
+ options?: PolicyEventsListQueryResultsForManagementGroupNextOptionalParams
752
+ ): Promise<PolicyEventsListQueryResultsForManagementGroupNextResponse> {
753
+ return this.client.sendOperationRequest(
754
+ { managementGroupName, nextLink, options },
755
+ listQueryResultsForManagementGroupNextOperationSpec
756
+ );
757
+ }
758
+
430
759
  /**
431
- * @param nextPageLink The NextLink from the previous successful call to List operation.
432
- * @param options The optional parameters
433
- * @param callback The callback
760
+ * ListQueryResultsForSubscriptionNext
761
+ * @param subscriptionId Microsoft Azure subscription ID.
762
+ * @param nextLink The nextLink from the previous successful call to the
763
+ * ListQueryResultsForSubscription method.
764
+ * @param options The options parameters.
434
765
  */
435
- listQueryResultsForPolicyDefinitionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
436
- listQueryResultsForPolicyDefinitionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionNextResponse> {
766
+ private _listQueryResultsForSubscriptionNext(
767
+ subscriptionId: string,
768
+ nextLink: string,
769
+ options?: PolicyEventsListQueryResultsForSubscriptionNextOptionalParams
770
+ ): Promise<PolicyEventsListQueryResultsForSubscriptionNextResponse> {
437
771
  return this.client.sendOperationRequest(
438
- {
439
- nextPageLink,
440
- options
441
- },
442
- listQueryResultsForPolicyDefinitionNextOperationSpec,
443
- callback) as Promise<Models.PolicyEventsListQueryResultsForPolicyDefinitionNextResponse>;
772
+ { subscriptionId, nextLink, options },
773
+ listQueryResultsForSubscriptionNextOperationSpec
774
+ );
444
775
  }
445
776
 
446
777
  /**
447
- * Queries policy events for the subscription level policy assignment.
448
- * @param nextPageLink The NextLink from the previous successful call to List operation.
449
- * @param [options] The optional parameters
450
- * @returns
451
- * Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextResponse>
778
+ * ListQueryResultsForResourceGroupNext
779
+ * @param subscriptionId Microsoft Azure subscription ID.
780
+ * @param resourceGroupName Resource group name.
781
+ * @param nextLink The nextLink from the previous successful call to the
782
+ * ListQueryResultsForResourceGroup method.
783
+ * @param options The options parameters.
452
784
  */
453
- listQueryResultsForSubscriptionLevelPolicyAssignmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextResponse>;
785
+ private _listQueryResultsForResourceGroupNext(
786
+ subscriptionId: string,
787
+ resourceGroupName: string,
788
+ nextLink: string,
789
+ options?: PolicyEventsListQueryResultsForResourceGroupNextOptionalParams
790
+ ): Promise<PolicyEventsListQueryResultsForResourceGroupNextResponse> {
791
+ return this.client.sendOperationRequest(
792
+ { subscriptionId, resourceGroupName, nextLink, options },
793
+ listQueryResultsForResourceGroupNextOperationSpec
794
+ );
795
+ }
796
+
454
797
  /**
455
- * @param nextPageLink The NextLink from the previous successful call to List operation.
456
- * @param callback The callback
798
+ * ListQueryResultsForResourceNext
799
+ * @param resourceId Resource ID.
800
+ * @param nextLink The nextLink from the previous successful call to the ListQueryResultsForResource
801
+ * method.
802
+ * @param options The options parameters.
457
803
  */
458
- listQueryResultsForSubscriptionLevelPolicyAssignmentNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
804
+ private _listQueryResultsForResourceNext(
805
+ resourceId: string,
806
+ nextLink: string,
807
+ options?: PolicyEventsListQueryResultsForResourceNextOptionalParams
808
+ ): Promise<PolicyEventsListQueryResultsForResourceNextResponse> {
809
+ return this.client.sendOperationRequest(
810
+ { resourceId, nextLink, options },
811
+ listQueryResultsForResourceNextOperationSpec
812
+ );
813
+ }
814
+
459
815
  /**
460
- * @param nextPageLink The NextLink from the previous successful call to List operation.
461
- * @param options The optional parameters
462
- * @param callback The callback
816
+ * ListQueryResultsForPolicySetDefinitionNext
817
+ * @param subscriptionId Microsoft Azure subscription ID.
818
+ * @param policySetDefinitionName Policy set definition name.
819
+ * @param nextLink The nextLink from the previous successful call to the
820
+ * ListQueryResultsForPolicySetDefinition method.
821
+ * @param options The options parameters.
463
822
  */
464
- listQueryResultsForSubscriptionLevelPolicyAssignmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
465
- listQueryResultsForSubscriptionLevelPolicyAssignmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextResponse> {
823
+ private _listQueryResultsForPolicySetDefinitionNext(
824
+ subscriptionId: string,
825
+ policySetDefinitionName: string,
826
+ nextLink: string,
827
+ options?: PolicyEventsListQueryResultsForPolicySetDefinitionNextOptionalParams
828
+ ): Promise<PolicyEventsListQueryResultsForPolicySetDefinitionNextResponse> {
466
829
  return this.client.sendOperationRequest(
467
- {
468
- nextPageLink,
469
- options
470
- },
471
- listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec,
472
- callback) as Promise<Models.PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextResponse>;
830
+ { subscriptionId, policySetDefinitionName, nextLink, options },
831
+ listQueryResultsForPolicySetDefinitionNextOperationSpec
832
+ );
473
833
  }
474
834
 
475
835
  /**
476
- * Queries policy events for the resource group level policy assignment.
477
- * @param nextPageLink The NextLink from the previous successful call to List operation.
478
- * @param [options] The optional parameters
479
- * @returns
480
- * Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextResponse>
836
+ * ListQueryResultsForPolicyDefinitionNext
837
+ * @param subscriptionId Microsoft Azure subscription ID.
838
+ * @param policyDefinitionName Policy definition name.
839
+ * @param nextLink The nextLink from the previous successful call to the
840
+ * ListQueryResultsForPolicyDefinition method.
841
+ * @param options The options parameters.
481
842
  */
482
- listQueryResultsForResourceGroupLevelPolicyAssignmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextResponse>;
843
+ private _listQueryResultsForPolicyDefinitionNext(
844
+ subscriptionId: string,
845
+ policyDefinitionName: string,
846
+ nextLink: string,
847
+ options?: PolicyEventsListQueryResultsForPolicyDefinitionNextOptionalParams
848
+ ): Promise<PolicyEventsListQueryResultsForPolicyDefinitionNextResponse> {
849
+ return this.client.sendOperationRequest(
850
+ { subscriptionId, policyDefinitionName, nextLink, options },
851
+ listQueryResultsForPolicyDefinitionNextOperationSpec
852
+ );
853
+ }
854
+
483
855
  /**
484
- * @param nextPageLink The NextLink from the previous successful call to List operation.
485
- * @param callback The callback
856
+ * ListQueryResultsForSubscriptionLevelPolicyAssignmentNext
857
+ * @param subscriptionId Microsoft Azure subscription ID.
858
+ * @param policyAssignmentName Policy assignment name.
859
+ * @param nextLink The nextLink from the previous successful call to the
860
+ * ListQueryResultsForSubscriptionLevelPolicyAssignment method.
861
+ * @param options The options parameters.
486
862
  */
487
- listQueryResultsForResourceGroupLevelPolicyAssignmentNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
863
+ private _listQueryResultsForSubscriptionLevelPolicyAssignmentNext(
864
+ subscriptionId: string,
865
+ policyAssignmentName: string,
866
+ nextLink: string,
867
+ options?: PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextOptionalParams
868
+ ): Promise<
869
+ PolicyEventsListQueryResultsForSubscriptionLevelPolicyAssignmentNextResponse
870
+ > {
871
+ return this.client.sendOperationRequest(
872
+ { subscriptionId, policyAssignmentName, nextLink, options },
873
+ listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec
874
+ );
875
+ }
876
+
488
877
  /**
489
- * @param nextPageLink The NextLink from the previous successful call to List operation.
490
- * @param options The optional parameters
491
- * @param callback The callback
878
+ * ListQueryResultsForResourceGroupLevelPolicyAssignmentNext
879
+ * @param subscriptionId Microsoft Azure subscription ID.
880
+ * @param resourceGroupName Resource group name.
881
+ * @param policyAssignmentName Policy assignment name.
882
+ * @param nextLink The nextLink from the previous successful call to the
883
+ * ListQueryResultsForResourceGroupLevelPolicyAssignment method.
884
+ * @param options The options parameters.
492
885
  */
493
- listQueryResultsForResourceGroupLevelPolicyAssignmentNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): void;
494
- listQueryResultsForResourceGroupLevelPolicyAssignmentNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyEventsQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyEventsQueryResults>): Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextResponse> {
886
+ private _listQueryResultsForResourceGroupLevelPolicyAssignmentNext(
887
+ subscriptionId: string,
888
+ resourceGroupName: string,
889
+ policyAssignmentName: string,
890
+ nextLink: string,
891
+ options?: PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextOptionalParams
892
+ ): Promise<
893
+ PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextResponse
894
+ > {
495
895
  return this.client.sendOperationRequest(
496
896
  {
497
- nextPageLink,
897
+ subscriptionId,
898
+ resourceGroupName,
899
+ policyAssignmentName,
900
+ nextLink,
498
901
  options
499
902
  },
500
- listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec,
501
- callback) as Promise<Models.PolicyEventsListQueryResultsForResourceGroupLevelPolicyAssignmentNextResponse>;
903
+ listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec
904
+ );
502
905
  }
503
906
  }
504
-
505
907
  // Operation Specifications
506
- const serializer = new msRest.Serializer(Mappers);
507
- const listQueryResultsForManagementGroupOperationSpec: msRest.OperationSpec = {
908
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
909
+
910
+ const listQueryResultsForManagementGroupOperationSpec: coreClient.OperationSpec = {
911
+ path:
912
+ "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
508
913
  httpMethod: "POST",
509
- path: "providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
510
- urlParameters: [
511
- Parameters.policyEventsResource,
512
- Parameters.managementGroupsNamespace,
513
- Parameters.managementGroupName
514
- ],
914
+ responses: {
915
+ 200: {
916
+ bodyMapper: Mappers.PolicyEventsQueryResults
917
+ },
918
+ default: {
919
+ bodyMapper: Mappers.QueryFailure
920
+ }
921
+ },
515
922
  queryParameters: [
516
- Parameters.apiVersion2,
517
923
  Parameters.top,
924
+ Parameters.filter,
925
+ Parameters.apiVersion2,
518
926
  Parameters.orderBy,
519
927
  Parameters.select,
520
- Parameters.from,
928
+ Parameters.fromParam,
521
929
  Parameters.to,
522
- Parameters.filter,
523
930
  Parameters.apply,
524
931
  Parameters.skipToken
525
932
  ],
526
- headerParameters: [
527
- Parameters.acceptLanguage
933
+ urlParameters: [
934
+ Parameters.$host,
935
+ Parameters.managementGroupsNamespace,
936
+ Parameters.managementGroupName,
937
+ Parameters.policyEventsResource
528
938
  ],
939
+ headerParameters: [Parameters.accept],
940
+ serializer
941
+ };
942
+ const listQueryResultsForSubscriptionOperationSpec: coreClient.OperationSpec = {
943
+ path:
944
+ "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
945
+ httpMethod: "POST",
529
946
  responses: {
530
947
  200: {
531
948
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -534,30 +951,61 @@ const listQueryResultsForManagementGroupOperationSpec: msRest.OperationSpec = {
534
951
  bodyMapper: Mappers.QueryFailure
535
952
  }
536
953
  },
537
- serializer
538
- };
539
-
540
- const listQueryResultsForSubscriptionOperationSpec: msRest.OperationSpec = {
541
- httpMethod: "POST",
542
- path: "subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
954
+ queryParameters: [
955
+ Parameters.top,
956
+ Parameters.filter,
957
+ Parameters.apiVersion2,
958
+ Parameters.orderBy,
959
+ Parameters.select,
960
+ Parameters.fromParam,
961
+ Parameters.to,
962
+ Parameters.apply,
963
+ Parameters.skipToken
964
+ ],
543
965
  urlParameters: [
966
+ Parameters.$host,
544
967
  Parameters.policyEventsResource,
545
- Parameters.subscriptionId
968
+ Parameters.subscriptionId1
546
969
  ],
970
+ headerParameters: [Parameters.accept],
971
+ serializer
972
+ };
973
+ const listQueryResultsForResourceGroupOperationSpec: coreClient.OperationSpec = {
974
+ path:
975
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
976
+ httpMethod: "POST",
977
+ responses: {
978
+ 200: {
979
+ bodyMapper: Mappers.PolicyEventsQueryResults
980
+ },
981
+ default: {
982
+ bodyMapper: Mappers.QueryFailure
983
+ }
984
+ },
547
985
  queryParameters: [
548
- Parameters.apiVersion2,
549
986
  Parameters.top,
987
+ Parameters.filter,
988
+ Parameters.apiVersion2,
550
989
  Parameters.orderBy,
551
990
  Parameters.select,
552
- Parameters.from,
991
+ Parameters.fromParam,
553
992
  Parameters.to,
554
- Parameters.filter,
555
993
  Parameters.apply,
556
994
  Parameters.skipToken
557
995
  ],
558
- headerParameters: [
559
- Parameters.acceptLanguage
996
+ urlParameters: [
997
+ Parameters.$host,
998
+ Parameters.resourceGroupName,
999
+ Parameters.policyEventsResource,
1000
+ Parameters.subscriptionId1
560
1001
  ],
1002
+ headerParameters: [Parameters.accept],
1003
+ serializer
1004
+ };
1005
+ const listQueryResultsForResourceOperationSpec: coreClient.OperationSpec = {
1006
+ path:
1007
+ "/{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
1008
+ httpMethod: "POST",
561
1009
  responses: {
562
1010
  200: {
563
1011
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -566,31 +1014,63 @@ const listQueryResultsForSubscriptionOperationSpec: msRest.OperationSpec = {
566
1014
  bodyMapper: Mappers.QueryFailure
567
1015
  }
568
1016
  },
1017
+ queryParameters: [
1018
+ Parameters.top,
1019
+ Parameters.filter,
1020
+ Parameters.apiVersion2,
1021
+ Parameters.orderBy,
1022
+ Parameters.select,
1023
+ Parameters.fromParam,
1024
+ Parameters.to,
1025
+ Parameters.apply,
1026
+ Parameters.skipToken,
1027
+ Parameters.expand
1028
+ ],
1029
+ urlParameters: [
1030
+ Parameters.$host,
1031
+ Parameters.resourceId,
1032
+ Parameters.policyEventsResource
1033
+ ],
1034
+ headerParameters: [Parameters.accept],
569
1035
  serializer
570
1036
  };
571
-
572
- const listQueryResultsForResourceGroupOperationSpec: msRest.OperationSpec = {
1037
+ const listQueryResultsForPolicySetDefinitionOperationSpec: coreClient.OperationSpec = {
1038
+ path:
1039
+ "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
573
1040
  httpMethod: "POST",
574
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
575
- urlParameters: [
576
- Parameters.policyEventsResource,
577
- Parameters.subscriptionId,
578
- Parameters.resourceGroupName
579
- ],
1041
+ responses: {
1042
+ 200: {
1043
+ bodyMapper: Mappers.PolicyEventsQueryResults
1044
+ },
1045
+ default: {
1046
+ bodyMapper: Mappers.QueryFailure
1047
+ }
1048
+ },
580
1049
  queryParameters: [
581
- Parameters.apiVersion2,
582
1050
  Parameters.top,
1051
+ Parameters.filter,
1052
+ Parameters.apiVersion2,
583
1053
  Parameters.orderBy,
584
1054
  Parameters.select,
585
- Parameters.from,
1055
+ Parameters.fromParam,
586
1056
  Parameters.to,
587
- Parameters.filter,
588
1057
  Parameters.apply,
589
1058
  Parameters.skipToken
590
1059
  ],
591
- headerParameters: [
592
- Parameters.acceptLanguage
1060
+ urlParameters: [
1061
+ Parameters.$host,
1062
+ Parameters.policyEventsResource,
1063
+ Parameters.subscriptionId1,
1064
+ Parameters.authorizationNamespace,
1065
+ Parameters.policySetDefinitionName
593
1066
  ],
1067
+ headerParameters: [Parameters.accept],
1068
+ serializer
1069
+ };
1070
+ const listQueryResultsForPolicyDefinitionOperationSpec: coreClient.OperationSpec = {
1071
+ path:
1072
+ "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
1073
+ httpMethod: "POST",
594
1074
  responses: {
595
1075
  200: {
596
1076
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -599,31 +1079,31 @@ const listQueryResultsForResourceGroupOperationSpec: msRest.OperationSpec = {
599
1079
  bodyMapper: Mappers.QueryFailure
600
1080
  }
601
1081
  },
602
- serializer
603
- };
604
-
605
- const listQueryResultsForResourceOperationSpec: msRest.OperationSpec = {
606
- httpMethod: "POST",
607
- path: "{resourceId}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
608
- urlParameters: [
609
- Parameters.policyEventsResource,
610
- Parameters.resourceId
611
- ],
612
1082
  queryParameters: [
613
- Parameters.apiVersion2,
614
1083
  Parameters.top,
1084
+ Parameters.filter,
1085
+ Parameters.apiVersion2,
615
1086
  Parameters.orderBy,
616
1087
  Parameters.select,
617
- Parameters.from,
1088
+ Parameters.fromParam,
618
1089
  Parameters.to,
619
- Parameters.filter,
620
1090
  Parameters.apply,
621
- Parameters.expand,
622
1091
  Parameters.skipToken
623
1092
  ],
624
- headerParameters: [
625
- Parameters.acceptLanguage
1093
+ urlParameters: [
1094
+ Parameters.$host,
1095
+ Parameters.policyEventsResource,
1096
+ Parameters.subscriptionId1,
1097
+ Parameters.authorizationNamespace,
1098
+ Parameters.policyDefinitionName
626
1099
  ],
1100
+ headerParameters: [Parameters.accept],
1101
+ serializer
1102
+ };
1103
+ const listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec: coreClient.OperationSpec = {
1104
+ path:
1105
+ "/subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
1106
+ httpMethod: "POST",
627
1107
  responses: {
628
1108
  200: {
629
1109
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -632,32 +1112,31 @@ const listQueryResultsForResourceOperationSpec: msRest.OperationSpec = {
632
1112
  bodyMapper: Mappers.QueryFailure
633
1113
  }
634
1114
  },
635
- serializer
636
- };
637
-
638
- const listQueryResultsForPolicySetDefinitionOperationSpec: msRest.OperationSpec = {
639
- httpMethod: "POST",
640
- path: "subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policySetDefinitions/{policySetDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
641
- urlParameters: [
642
- Parameters.policyEventsResource,
643
- Parameters.subscriptionId,
644
- Parameters.authorizationNamespace,
645
- Parameters.policySetDefinitionName
646
- ],
647
1115
  queryParameters: [
648
- Parameters.apiVersion2,
649
1116
  Parameters.top,
1117
+ Parameters.filter,
1118
+ Parameters.apiVersion2,
650
1119
  Parameters.orderBy,
651
1120
  Parameters.select,
652
- Parameters.from,
1121
+ Parameters.fromParam,
653
1122
  Parameters.to,
654
- Parameters.filter,
655
1123
  Parameters.apply,
656
1124
  Parameters.skipToken
657
1125
  ],
658
- headerParameters: [
659
- Parameters.acceptLanguage
1126
+ urlParameters: [
1127
+ Parameters.$host,
1128
+ Parameters.policyEventsResource,
1129
+ Parameters.subscriptionId1,
1130
+ Parameters.authorizationNamespace,
1131
+ Parameters.policyAssignmentName
660
1132
  ],
1133
+ headerParameters: [Parameters.accept],
1134
+ serializer
1135
+ };
1136
+ const listQueryResultsForResourceGroupLevelPolicyAssignmentOperationSpec: coreClient.OperationSpec = {
1137
+ path:
1138
+ "/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
1139
+ httpMethod: "POST",
661
1140
  responses: {
662
1141
  200: {
663
1142
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -666,32 +1145,31 @@ const listQueryResultsForPolicySetDefinitionOperationSpec: msRest.OperationSpec
666
1145
  bodyMapper: Mappers.QueryFailure
667
1146
  }
668
1147
  },
669
- serializer
670
- };
671
-
672
- const listQueryResultsForPolicyDefinitionOperationSpec: msRest.OperationSpec = {
673
- httpMethod: "POST",
674
- path: "subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyDefinitions/{policyDefinitionName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
675
- urlParameters: [
676
- Parameters.policyEventsResource,
677
- Parameters.subscriptionId,
678
- Parameters.authorizationNamespace,
679
- Parameters.policyDefinitionName
680
- ],
681
1148
  queryParameters: [
682
- Parameters.apiVersion2,
683
1149
  Parameters.top,
1150
+ Parameters.filter,
1151
+ Parameters.apiVersion2,
684
1152
  Parameters.orderBy,
685
1153
  Parameters.select,
686
- Parameters.from,
1154
+ Parameters.fromParam,
687
1155
  Parameters.to,
688
- Parameters.filter,
689
1156
  Parameters.apply,
690
1157
  Parameters.skipToken
691
1158
  ],
692
- headerParameters: [
693
- Parameters.acceptLanguage
1159
+ urlParameters: [
1160
+ Parameters.$host,
1161
+ Parameters.resourceGroupName,
1162
+ Parameters.policyEventsResource,
1163
+ Parameters.subscriptionId1,
1164
+ Parameters.authorizationNamespace,
1165
+ Parameters.policyAssignmentName
694
1166
  ],
1167
+ headerParameters: [Parameters.accept],
1168
+ serializer
1169
+ };
1170
+ const listQueryResultsForManagementGroupNextOperationSpec: coreClient.OperationSpec = {
1171
+ path: "{nextLink}",
1172
+ httpMethod: "GET",
695
1173
  responses: {
696
1174
  200: {
697
1175
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -700,32 +1178,30 @@ const listQueryResultsForPolicyDefinitionOperationSpec: msRest.OperationSpec = {
700
1178
  bodyMapper: Mappers.QueryFailure
701
1179
  }
702
1180
  },
703
- serializer
704
- };
705
-
706
- const listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec: msRest.OperationSpec = {
707
- httpMethod: "POST",
708
- path: "subscriptions/{subscriptionId}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
709
- urlParameters: [
710
- Parameters.policyEventsResource,
711
- Parameters.subscriptionId,
712
- Parameters.authorizationNamespace,
713
- Parameters.policyAssignmentName
714
- ],
715
1181
  queryParameters: [
716
- Parameters.apiVersion2,
717
1182
  Parameters.top,
1183
+ Parameters.filter,
1184
+ Parameters.apiVersion2,
718
1185
  Parameters.orderBy,
719
1186
  Parameters.select,
720
- Parameters.from,
1187
+ Parameters.fromParam,
721
1188
  Parameters.to,
722
- Parameters.filter,
723
1189
  Parameters.apply,
724
1190
  Parameters.skipToken
725
1191
  ],
726
- headerParameters: [
727
- Parameters.acceptLanguage
1192
+ urlParameters: [
1193
+ Parameters.$host,
1194
+ Parameters.managementGroupsNamespace,
1195
+ Parameters.managementGroupName,
1196
+ Parameters.nextLink,
1197
+ Parameters.policyEventsResource
728
1198
  ],
1199
+ headerParameters: [Parameters.accept],
1200
+ serializer
1201
+ };
1202
+ const listQueryResultsForSubscriptionNextOperationSpec: coreClient.OperationSpec = {
1203
+ path: "{nextLink}",
1204
+ httpMethod: "GET",
729
1205
  responses: {
730
1206
  200: {
731
1207
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -734,57 +1210,29 @@ const listQueryResultsForSubscriptionLevelPolicyAssignmentOperationSpec: msRest.
734
1210
  bodyMapper: Mappers.QueryFailure
735
1211
  }
736
1212
  },
737
- serializer
738
- };
739
-
740
- const listQueryResultsForResourceGroupLevelPolicyAssignmentOperationSpec: msRest.OperationSpec = {
741
- httpMethod: "POST",
742
- path: "subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/{authorizationNamespace}/policyAssignments/{policyAssignmentName}/providers/Microsoft.PolicyInsights/policyEvents/{policyEventsResource}/queryResults",
743
- urlParameters: [
744
- Parameters.policyEventsResource,
745
- Parameters.subscriptionId,
746
- Parameters.resourceGroupName,
747
- Parameters.authorizationNamespace,
748
- Parameters.policyAssignmentName
749
- ],
750
1213
  queryParameters: [
751
- Parameters.apiVersion2,
752
1214
  Parameters.top,
1215
+ Parameters.filter,
1216
+ Parameters.apiVersion2,
753
1217
  Parameters.orderBy,
754
1218
  Parameters.select,
755
- Parameters.from,
1219
+ Parameters.fromParam,
756
1220
  Parameters.to,
757
- Parameters.filter,
758
1221
  Parameters.apply,
759
1222
  Parameters.skipToken
760
1223
  ],
761
- headerParameters: [
762
- Parameters.acceptLanguage
1224
+ urlParameters: [
1225
+ Parameters.$host,
1226
+ Parameters.nextLink,
1227
+ Parameters.policyEventsResource,
1228
+ Parameters.subscriptionId1
763
1229
  ],
764
- responses: {
765
- 200: {
766
- bodyMapper: Mappers.PolicyEventsQueryResults
767
- },
768
- default: {
769
- bodyMapper: Mappers.QueryFailure
770
- }
771
- },
1230
+ headerParameters: [Parameters.accept],
772
1231
  serializer
773
1232
  };
774
-
775
- const listQueryResultsForManagementGroupNextOperationSpec: msRest.OperationSpec = {
776
- httpMethod: "POST",
777
- baseUrl: "https://management.azure.com",
1233
+ const listQueryResultsForResourceGroupNextOperationSpec: coreClient.OperationSpec = {
778
1234
  path: "{nextLink}",
779
- urlParameters: [
780
- Parameters.nextPageLink
781
- ],
782
- queryParameters: [
783
- Parameters.apiVersion2
784
- ],
785
- headerParameters: [
786
- Parameters.acceptLanguage
787
- ],
1235
+ httpMethod: "GET",
788
1236
  responses: {
789
1237
  200: {
790
1238
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -793,46 +1241,30 @@ const listQueryResultsForManagementGroupNextOperationSpec: msRest.OperationSpec
793
1241
  bodyMapper: Mappers.QueryFailure
794
1242
  }
795
1243
  },
796
- serializer
797
- };
798
-
799
- const listQueryResultsForSubscriptionNextOperationSpec: msRest.OperationSpec = {
800
- httpMethod: "POST",
801
- baseUrl: "https://management.azure.com",
802
- path: "{nextLink}",
803
- urlParameters: [
804
- Parameters.nextPageLink
805
- ],
806
1244
  queryParameters: [
807
- Parameters.apiVersion2
1245
+ Parameters.top,
1246
+ Parameters.filter,
1247
+ Parameters.apiVersion2,
1248
+ Parameters.orderBy,
1249
+ Parameters.select,
1250
+ Parameters.fromParam,
1251
+ Parameters.to,
1252
+ Parameters.apply,
1253
+ Parameters.skipToken
808
1254
  ],
809
- headerParameters: [
810
- Parameters.acceptLanguage
1255
+ urlParameters: [
1256
+ Parameters.$host,
1257
+ Parameters.resourceGroupName,
1258
+ Parameters.nextLink,
1259
+ Parameters.policyEventsResource,
1260
+ Parameters.subscriptionId1
811
1261
  ],
812
- responses: {
813
- 200: {
814
- bodyMapper: Mappers.PolicyEventsQueryResults
815
- },
816
- default: {
817
- bodyMapper: Mappers.QueryFailure
818
- }
819
- },
1262
+ headerParameters: [Parameters.accept],
820
1263
  serializer
821
1264
  };
822
-
823
- const listQueryResultsForResourceGroupNextOperationSpec: msRest.OperationSpec = {
824
- httpMethod: "POST",
825
- baseUrl: "https://management.azure.com",
1265
+ const listQueryResultsForResourceNextOperationSpec: coreClient.OperationSpec = {
826
1266
  path: "{nextLink}",
827
- urlParameters: [
828
- Parameters.nextPageLink
829
- ],
830
- queryParameters: [
831
- Parameters.apiVersion2
832
- ],
833
- headerParameters: [
834
- Parameters.acceptLanguage
835
- ],
1267
+ httpMethod: "GET",
836
1268
  responses: {
837
1269
  200: {
838
1270
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -841,46 +1273,30 @@ const listQueryResultsForResourceGroupNextOperationSpec: msRest.OperationSpec =
841
1273
  bodyMapper: Mappers.QueryFailure
842
1274
  }
843
1275
  },
844
- serializer
845
- };
846
-
847
- const listQueryResultsForResourceNextOperationSpec: msRest.OperationSpec = {
848
- httpMethod: "POST",
849
- baseUrl: "https://management.azure.com",
850
- path: "{nextLink}",
851
- urlParameters: [
852
- Parameters.nextPageLink
853
- ],
854
1276
  queryParameters: [
855
- Parameters.apiVersion2
1277
+ Parameters.top,
1278
+ Parameters.filter,
1279
+ Parameters.apiVersion2,
1280
+ Parameters.orderBy,
1281
+ Parameters.select,
1282
+ Parameters.fromParam,
1283
+ Parameters.to,
1284
+ Parameters.apply,
1285
+ Parameters.skipToken,
1286
+ Parameters.expand
856
1287
  ],
857
- headerParameters: [
858
- Parameters.acceptLanguage
1288
+ urlParameters: [
1289
+ Parameters.$host,
1290
+ Parameters.resourceId,
1291
+ Parameters.nextLink,
1292
+ Parameters.policyEventsResource
859
1293
  ],
860
- responses: {
861
- 200: {
862
- bodyMapper: Mappers.PolicyEventsQueryResults
863
- },
864
- default: {
865
- bodyMapper: Mappers.QueryFailure
866
- }
867
- },
1294
+ headerParameters: [Parameters.accept],
868
1295
  serializer
869
1296
  };
870
-
871
- const listQueryResultsForPolicySetDefinitionNextOperationSpec: msRest.OperationSpec = {
872
- httpMethod: "POST",
873
- baseUrl: "https://management.azure.com",
1297
+ const listQueryResultsForPolicySetDefinitionNextOperationSpec: coreClient.OperationSpec = {
874
1298
  path: "{nextLink}",
875
- urlParameters: [
876
- Parameters.nextPageLink
877
- ],
878
- queryParameters: [
879
- Parameters.apiVersion2
880
- ],
881
- headerParameters: [
882
- Parameters.acceptLanguage
883
- ],
1299
+ httpMethod: "GET",
884
1300
  responses: {
885
1301
  200: {
886
1302
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -889,22 +1305,31 @@ const listQueryResultsForPolicySetDefinitionNextOperationSpec: msRest.OperationS
889
1305
  bodyMapper: Mappers.QueryFailure
890
1306
  }
891
1307
  },
892
- serializer
893
- };
894
-
895
- const listQueryResultsForPolicyDefinitionNextOperationSpec: msRest.OperationSpec = {
896
- httpMethod: "POST",
897
- baseUrl: "https://management.azure.com",
898
- path: "{nextLink}",
899
- urlParameters: [
900
- Parameters.nextPageLink
901
- ],
902
1308
  queryParameters: [
903
- Parameters.apiVersion2
1309
+ Parameters.top,
1310
+ Parameters.filter,
1311
+ Parameters.apiVersion2,
1312
+ Parameters.orderBy,
1313
+ Parameters.select,
1314
+ Parameters.fromParam,
1315
+ Parameters.to,
1316
+ Parameters.apply,
1317
+ Parameters.skipToken
904
1318
  ],
905
- headerParameters: [
906
- Parameters.acceptLanguage
1319
+ urlParameters: [
1320
+ Parameters.$host,
1321
+ Parameters.nextLink,
1322
+ Parameters.policyEventsResource,
1323
+ Parameters.subscriptionId1,
1324
+ Parameters.authorizationNamespace,
1325
+ Parameters.policySetDefinitionName
907
1326
  ],
1327
+ headerParameters: [Parameters.accept],
1328
+ serializer
1329
+ };
1330
+ const listQueryResultsForPolicyDefinitionNextOperationSpec: coreClient.OperationSpec = {
1331
+ path: "{nextLink}",
1332
+ httpMethod: "GET",
908
1333
  responses: {
909
1334
  200: {
910
1335
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -913,22 +1338,31 @@ const listQueryResultsForPolicyDefinitionNextOperationSpec: msRest.OperationSpec
913
1338
  bodyMapper: Mappers.QueryFailure
914
1339
  }
915
1340
  },
916
- serializer
917
- };
918
-
919
- const listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec: msRest.OperationSpec = {
920
- httpMethod: "POST",
921
- baseUrl: "https://management.azure.com",
922
- path: "{nextLink}",
923
- urlParameters: [
924
- Parameters.nextPageLink
925
- ],
926
1341
  queryParameters: [
927
- Parameters.apiVersion2
1342
+ Parameters.top,
1343
+ Parameters.filter,
1344
+ Parameters.apiVersion2,
1345
+ Parameters.orderBy,
1346
+ Parameters.select,
1347
+ Parameters.fromParam,
1348
+ Parameters.to,
1349
+ Parameters.apply,
1350
+ Parameters.skipToken
928
1351
  ],
929
- headerParameters: [
930
- Parameters.acceptLanguage
1352
+ urlParameters: [
1353
+ Parameters.$host,
1354
+ Parameters.nextLink,
1355
+ Parameters.policyEventsResource,
1356
+ Parameters.subscriptionId1,
1357
+ Parameters.authorizationNamespace,
1358
+ Parameters.policyDefinitionName
931
1359
  ],
1360
+ headerParameters: [Parameters.accept],
1361
+ serializer
1362
+ };
1363
+ const listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec: coreClient.OperationSpec = {
1364
+ path: "{nextLink}",
1365
+ httpMethod: "GET",
932
1366
  responses: {
933
1367
  200: {
934
1368
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -937,22 +1371,31 @@ const listQueryResultsForSubscriptionLevelPolicyAssignmentNextOperationSpec: msR
937
1371
  bodyMapper: Mappers.QueryFailure
938
1372
  }
939
1373
  },
940
- serializer
941
- };
942
-
943
- const listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec: msRest.OperationSpec = {
944
- httpMethod: "POST",
945
- baseUrl: "https://management.azure.com",
946
- path: "{nextLink}",
947
- urlParameters: [
948
- Parameters.nextPageLink
949
- ],
950
1374
  queryParameters: [
951
- Parameters.apiVersion2
1375
+ Parameters.top,
1376
+ Parameters.filter,
1377
+ Parameters.apiVersion2,
1378
+ Parameters.orderBy,
1379
+ Parameters.select,
1380
+ Parameters.fromParam,
1381
+ Parameters.to,
1382
+ Parameters.apply,
1383
+ Parameters.skipToken
952
1384
  ],
953
- headerParameters: [
954
- Parameters.acceptLanguage
1385
+ urlParameters: [
1386
+ Parameters.$host,
1387
+ Parameters.nextLink,
1388
+ Parameters.policyEventsResource,
1389
+ Parameters.subscriptionId1,
1390
+ Parameters.authorizationNamespace,
1391
+ Parameters.policyAssignmentName
955
1392
  ],
1393
+ headerParameters: [Parameters.accept],
1394
+ serializer
1395
+ };
1396
+ const listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec: coreClient.OperationSpec = {
1397
+ path: "{nextLink}",
1398
+ httpMethod: "GET",
956
1399
  responses: {
957
1400
  200: {
958
1401
  bodyMapper: Mappers.PolicyEventsQueryResults
@@ -961,5 +1404,26 @@ const listQueryResultsForResourceGroupLevelPolicyAssignmentNextOperationSpec: ms
961
1404
  bodyMapper: Mappers.QueryFailure
962
1405
  }
963
1406
  },
1407
+ queryParameters: [
1408
+ Parameters.top,
1409
+ Parameters.filter,
1410
+ Parameters.apiVersion2,
1411
+ Parameters.orderBy,
1412
+ Parameters.select,
1413
+ Parameters.fromParam,
1414
+ Parameters.to,
1415
+ Parameters.apply,
1416
+ Parameters.skipToken
1417
+ ],
1418
+ urlParameters: [
1419
+ Parameters.$host,
1420
+ Parameters.resourceGroupName,
1421
+ Parameters.nextLink,
1422
+ Parameters.policyEventsResource,
1423
+ Parameters.subscriptionId1,
1424
+ Parameters.authorizationNamespace,
1425
+ Parameters.policyAssignmentName
1426
+ ],
1427
+ headerParameters: [Parameters.accept],
964
1428
  serializer
965
1429
  };