@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,275 +3,413 @@
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/policyTrackedResourcesMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PolicyTrackedResources } 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
+ PolicyTrackedResource,
17
+ PolicyTrackedResourcesListQueryResultsForManagementGroupNextOptionalParams,
18
+ PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams,
19
+ PolicyTrackedResourcesListQueryResultsForSubscriptionNextOptionalParams,
20
+ PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams,
21
+ PolicyTrackedResourcesListQueryResultsForResourceGroupNextOptionalParams,
22
+ PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams,
23
+ PolicyTrackedResourcesListQueryResultsForResourceNextOptionalParams,
24
+ PolicyTrackedResourcesListQueryResultsForResourceOptionalParams,
25
+ PolicyTrackedResourcesListQueryResultsForManagementGroupResponse,
26
+ PolicyTrackedResourcesListQueryResultsForSubscriptionResponse,
27
+ PolicyTrackedResourcesListQueryResultsForResourceGroupResponse,
28
+ PolicyTrackedResourcesListQueryResultsForResourceResponse,
29
+ PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse,
30
+ PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse,
31
+ PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse,
32
+ PolicyTrackedResourcesListQueryResultsForResourceNextResponse
33
+ } from "../models";
15
34
 
16
- /** Class representing a PolicyTrackedResources. */
17
- export class PolicyTrackedResources {
18
- private readonly client: PolicyInsightsClientContext;
35
+ /// <reference lib="esnext.asynciterable" />
36
+ /** Class containing PolicyTrackedResources operations. */
37
+ export class PolicyTrackedResourcesImpl implements PolicyTrackedResources {
38
+ private readonly client: PolicyInsightsClient;
19
39
 
20
40
  /**
21
- * Create a PolicyTrackedResources.
22
- * @param {PolicyInsightsClientContext} client Reference to the service client.
41
+ * Initialize a new instance of the class PolicyTrackedResources class.
42
+ * @param client Reference to the service client
23
43
  */
24
- constructor(client: PolicyInsightsClientContext) {
44
+ constructor(client: PolicyInsightsClient) {
25
45
  this.client = client;
26
46
  }
27
47
 
28
48
  /**
29
49
  * Queries policy tracked resources under the management group.
30
50
  * @param managementGroupName Management group name.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse>
51
+ * @param options The options parameters.
33
52
  */
34
- listQueryResultsForManagementGroup(managementGroupName: string, options?: Models.PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse>;
35
- /**
36
- * @param managementGroupName Management group name.
37
- * @param callback The callback
38
- */
39
- listQueryResultsForManagementGroup(managementGroupName: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): 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.PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
46
- listQueryResultsForManagementGroup(managementGroupName: string, options?: Models.PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse> {
47
- return this.client.sendOperationRequest(
48
- {
53
+ public listQueryResultsForManagementGroup(
54
+ managementGroupName: string,
55
+ options?: PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams
56
+ ): PagedAsyncIterableIterator<PolicyTrackedResource> {
57
+ const iter = this.listQueryResultsForManagementGroupPagingAll(
58
+ managementGroupName,
59
+ options
60
+ );
61
+ return {
62
+ next() {
63
+ return iter.next();
64
+ },
65
+ [Symbol.asyncIterator]() {
66
+ return this;
67
+ },
68
+ byPage: () => {
69
+ return this.listQueryResultsForManagementGroupPagingPage(
70
+ managementGroupName,
71
+ options
72
+ );
73
+ }
74
+ };
75
+ }
76
+
77
+ private async *listQueryResultsForManagementGroupPagingPage(
78
+ managementGroupName: string,
79
+ options?: PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams
80
+ ): AsyncIterableIterator<PolicyTrackedResource[]> {
81
+ let result = await this._listQueryResultsForManagementGroup(
82
+ managementGroupName,
83
+ options
84
+ );
85
+ yield result.value || [];
86
+ let continuationToken = result.nextLink;
87
+ while (continuationToken) {
88
+ result = await this._listQueryResultsForManagementGroupNext(
49
89
  managementGroupName,
90
+ continuationToken,
50
91
  options
51
- },
52
- listQueryResultsForManagementGroupOperationSpec,
53
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse>;
92
+ );
93
+ continuationToken = result.nextLink;
94
+ yield result.value || [];
95
+ }
96
+ }
97
+
98
+ private async *listQueryResultsForManagementGroupPagingAll(
99
+ managementGroupName: string,
100
+ options?: PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams
101
+ ): AsyncIterableIterator<PolicyTrackedResource> {
102
+ for await (const page of this.listQueryResultsForManagementGroupPagingPage(
103
+ managementGroupName,
104
+ options
105
+ )) {
106
+ yield* page;
107
+ }
54
108
  }
55
109
 
56
110
  /**
57
111
  * Queries policy tracked resources under the subscription.
58
- * @param subscriptionId Microsoft Azure subscription ID.
59
- * @param [options] The optional parameters
60
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse>
61
- */
62
- listQueryResultsForSubscription(subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse>;
63
- /**
64
- * @param subscriptionId Microsoft Azure subscription ID.
65
- * @param callback The callback
112
+ * @param options The options parameters.
66
113
  */
67
- listQueryResultsForSubscription(subscriptionId: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
68
- /**
69
- * @param subscriptionId Microsoft Azure subscription ID.
70
- * @param options The optional parameters
71
- * @param callback The callback
72
- */
73
- listQueryResultsForSubscription(subscriptionId: string, options: Models.PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
74
- listQueryResultsForSubscription(subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse> {
75
- return this.client.sendOperationRequest(
76
- {
77
- subscriptionId,
78
- options
114
+ public listQueryResultsForSubscription(
115
+ options?: PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams
116
+ ): PagedAsyncIterableIterator<PolicyTrackedResource> {
117
+ const iter = this.listQueryResultsForSubscriptionPagingAll(options);
118
+ return {
119
+ next() {
120
+ return iter.next();
121
+ },
122
+ [Symbol.asyncIterator]() {
123
+ return this;
79
124
  },
80
- listQueryResultsForSubscriptionOperationSpec,
81
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse>;
125
+ byPage: () => {
126
+ return this.listQueryResultsForSubscriptionPagingPage(options);
127
+ }
128
+ };
129
+ }
130
+
131
+ private async *listQueryResultsForSubscriptionPagingPage(
132
+ options?: PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams
133
+ ): AsyncIterableIterator<PolicyTrackedResource[]> {
134
+ let result = await this._listQueryResultsForSubscription(options);
135
+ yield result.value || [];
136
+ let continuationToken = result.nextLink;
137
+ while (continuationToken) {
138
+ result = await this._listQueryResultsForSubscriptionNext(
139
+ continuationToken,
140
+ options
141
+ );
142
+ continuationToken = result.nextLink;
143
+ yield result.value || [];
144
+ }
145
+ }
146
+
147
+ private async *listQueryResultsForSubscriptionPagingAll(
148
+ options?: PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams
149
+ ): AsyncIterableIterator<PolicyTrackedResource> {
150
+ for await (const page of this.listQueryResultsForSubscriptionPagingPage(
151
+ options
152
+ )) {
153
+ yield* page;
154
+ }
82
155
  }
83
156
 
84
157
  /**
85
158
  * Queries policy tracked resources under the resource group.
86
159
  * @param resourceGroupName Resource group name.
87
- * @param subscriptionId Microsoft Azure subscription ID.
88
- * @param [options] The optional parameters
89
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse>
90
- */
91
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse>;
92
- /**
93
- * @param resourceGroupName Resource group name.
94
- * @param subscriptionId Microsoft Azure subscription ID.
95
- * @param callback The callback
160
+ * @param options The options parameters.
96
161
  */
97
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
98
- /**
99
- * @param resourceGroupName Resource group name.
100
- * @param subscriptionId Microsoft Azure subscription ID.
101
- * @param options The optional parameters
102
- * @param callback The callback
103
- */
104
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, options: Models.PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
105
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse> {
106
- return this.client.sendOperationRequest(
107
- {
162
+ public listQueryResultsForResourceGroup(
163
+ resourceGroupName: string,
164
+ options?: PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams
165
+ ): PagedAsyncIterableIterator<PolicyTrackedResource> {
166
+ const iter = this.listQueryResultsForResourceGroupPagingAll(
167
+ resourceGroupName,
168
+ options
169
+ );
170
+ return {
171
+ next() {
172
+ return iter.next();
173
+ },
174
+ [Symbol.asyncIterator]() {
175
+ return this;
176
+ },
177
+ byPage: () => {
178
+ return this.listQueryResultsForResourceGroupPagingPage(
179
+ resourceGroupName,
180
+ options
181
+ );
182
+ }
183
+ };
184
+ }
185
+
186
+ private async *listQueryResultsForResourceGroupPagingPage(
187
+ resourceGroupName: string,
188
+ options?: PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams
189
+ ): AsyncIterableIterator<PolicyTrackedResource[]> {
190
+ let result = await this._listQueryResultsForResourceGroup(
191
+ resourceGroupName,
192
+ options
193
+ );
194
+ yield result.value || [];
195
+ let continuationToken = result.nextLink;
196
+ while (continuationToken) {
197
+ result = await this._listQueryResultsForResourceGroupNext(
108
198
  resourceGroupName,
109
- subscriptionId,
199
+ continuationToken,
110
200
  options
111
- },
112
- listQueryResultsForResourceGroupOperationSpec,
113
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse>;
201
+ );
202
+ continuationToken = result.nextLink;
203
+ yield result.value || [];
204
+ }
205
+ }
206
+
207
+ private async *listQueryResultsForResourceGroupPagingAll(
208
+ resourceGroupName: string,
209
+ options?: PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams
210
+ ): AsyncIterableIterator<PolicyTrackedResource> {
211
+ for await (const page of this.listQueryResultsForResourceGroupPagingPage(
212
+ resourceGroupName,
213
+ options
214
+ )) {
215
+ yield* page;
216
+ }
114
217
  }
115
218
 
116
219
  /**
117
220
  * Queries policy tracked resources under the resource.
118
221
  * @param resourceId Resource ID.
119
- * @param [options] The optional parameters
120
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse>
222
+ * @param options The options parameters.
121
223
  */
122
- listQueryResultsForResource(resourceId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse>;
123
- /**
124
- * @param resourceId Resource ID.
125
- * @param callback The callback
126
- */
127
- listQueryResultsForResource(resourceId: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): 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.PolicyTrackedResourcesListQueryResultsForResourceOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
134
- listQueryResultsForResource(resourceId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse> {
135
- return this.client.sendOperationRequest(
136
- {
224
+ public listQueryResultsForResource(
225
+ resourceId: string,
226
+ options?: PolicyTrackedResourcesListQueryResultsForResourceOptionalParams
227
+ ): PagedAsyncIterableIterator<PolicyTrackedResource> {
228
+ const iter = this.listQueryResultsForResourcePagingAll(resourceId, options);
229
+ return {
230
+ next() {
231
+ return iter.next();
232
+ },
233
+ [Symbol.asyncIterator]() {
234
+ return this;
235
+ },
236
+ byPage: () => {
237
+ return this.listQueryResultsForResourcePagingPage(resourceId, options);
238
+ }
239
+ };
240
+ }
241
+
242
+ private async *listQueryResultsForResourcePagingPage(
243
+ resourceId: string,
244
+ options?: PolicyTrackedResourcesListQueryResultsForResourceOptionalParams
245
+ ): AsyncIterableIterator<PolicyTrackedResource[]> {
246
+ let result = await this._listQueryResultsForResource(resourceId, options);
247
+ yield result.value || [];
248
+ let continuationToken = result.nextLink;
249
+ while (continuationToken) {
250
+ result = await this._listQueryResultsForResourceNext(
137
251
  resourceId,
252
+ continuationToken,
138
253
  options
139
- },
140
- listQueryResultsForResourceOperationSpec,
141
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse>;
254
+ );
255
+ continuationToken = result.nextLink;
256
+ yield result.value || [];
257
+ }
258
+ }
259
+
260
+ private async *listQueryResultsForResourcePagingAll(
261
+ resourceId: string,
262
+ options?: PolicyTrackedResourcesListQueryResultsForResourceOptionalParams
263
+ ): AsyncIterableIterator<PolicyTrackedResource> {
264
+ for await (const page of this.listQueryResultsForResourcePagingPage(
265
+ resourceId,
266
+ options
267
+ )) {
268
+ yield* page;
269
+ }
142
270
  }
143
271
 
144
272
  /**
145
273
  * Queries policy tracked resources under the management group.
146
- * @param nextPageLink The NextLink from the previous successful call to List operation.
147
- * @param [options] The optional parameters
148
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse>
149
- */
150
- listQueryResultsForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse>;
151
- /**
152
- * @param nextPageLink The NextLink from the previous successful call to List operation.
153
- * @param callback The callback
154
- */
155
- listQueryResultsForManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
156
- /**
157
- * @param nextPageLink The NextLink from the previous successful call to List operation.
158
- * @param options The optional parameters
159
- * @param callback The callback
274
+ * @param managementGroupName Management group name.
275
+ * @param options The options parameters.
160
276
  */
161
- listQueryResultsForManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
162
- listQueryResultsForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse> {
277
+ private _listQueryResultsForManagementGroup(
278
+ managementGroupName: string,
279
+ options?: PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams
280
+ ): Promise<PolicyTrackedResourcesListQueryResultsForManagementGroupResponse> {
163
281
  return this.client.sendOperationRequest(
164
- {
165
- nextPageLink,
166
- options
167
- },
168
- listQueryResultsForManagementGroupNextOperationSpec,
169
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse>;
282
+ { managementGroupName, options },
283
+ listQueryResultsForManagementGroupOperationSpec
284
+ );
170
285
  }
171
286
 
172
287
  /**
173
288
  * Queries policy tracked resources under the subscription.
174
- * @param nextPageLink The NextLink from the previous successful call to List operation.
175
- * @param [options] The optional parameters
176
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse>
289
+ * @param options The options parameters.
177
290
  */
178
- listQueryResultsForSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse>;
179
- /**
180
- * @param nextPageLink The NextLink from the previous successful call to List operation.
181
- * @param callback The callback
182
- */
183
- listQueryResultsForSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
184
- /**
185
- * @param nextPageLink The NextLink from the previous successful call to List operation.
186
- * @param options The optional parameters
187
- * @param callback The callback
188
- */
189
- listQueryResultsForSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
190
- listQueryResultsForSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse> {
291
+ private _listQueryResultsForSubscription(
292
+ options?: PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams
293
+ ): Promise<PolicyTrackedResourcesListQueryResultsForSubscriptionResponse> {
191
294
  return this.client.sendOperationRequest(
192
- {
193
- nextPageLink,
194
- options
195
- },
196
- listQueryResultsForSubscriptionNextOperationSpec,
197
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse>;
295
+ { options },
296
+ listQueryResultsForSubscriptionOperationSpec
297
+ );
198
298
  }
199
299
 
200
300
  /**
201
301
  * Queries policy tracked resources under the resource group.
202
- * @param nextPageLink The NextLink from the previous successful call to List operation.
203
- * @param [options] The optional parameters
204
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse>
302
+ * @param resourceGroupName Resource group name.
303
+ * @param options The options parameters.
205
304
  */
206
- listQueryResultsForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse>;
305
+ private _listQueryResultsForResourceGroup(
306
+ resourceGroupName: string,
307
+ options?: PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams
308
+ ): Promise<PolicyTrackedResourcesListQueryResultsForResourceGroupResponse> {
309
+ return this.client.sendOperationRequest(
310
+ { resourceGroupName, options },
311
+ listQueryResultsForResourceGroupOperationSpec
312
+ );
313
+ }
314
+
207
315
  /**
208
- * @param nextPageLink The NextLink from the previous successful call to List operation.
209
- * @param callback The callback
316
+ * Queries policy tracked resources under the resource.
317
+ * @param resourceId Resource ID.
318
+ * @param options The options parameters.
210
319
  */
211
- listQueryResultsForResourceGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
320
+ private _listQueryResultsForResource(
321
+ resourceId: string,
322
+ options?: PolicyTrackedResourcesListQueryResultsForResourceOptionalParams
323
+ ): Promise<PolicyTrackedResourcesListQueryResultsForResourceResponse> {
324
+ return this.client.sendOperationRequest(
325
+ { resourceId, options },
326
+ listQueryResultsForResourceOperationSpec
327
+ );
328
+ }
329
+
212
330
  /**
213
- * @param nextPageLink The NextLink from the previous successful call to List operation.
214
- * @param options The optional parameters
215
- * @param callback The callback
331
+ * ListQueryResultsForManagementGroupNext
332
+ * @param managementGroupName Management group name.
333
+ * @param nextLink The nextLink from the previous successful call to the
334
+ * ListQueryResultsForManagementGroup method.
335
+ * @param options The options parameters.
216
336
  */
217
- listQueryResultsForResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
218
- listQueryResultsForResourceGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse> {
337
+ private _listQueryResultsForManagementGroupNext(
338
+ managementGroupName: string,
339
+ nextLink: string,
340
+ options?: PolicyTrackedResourcesListQueryResultsForManagementGroupNextOptionalParams
341
+ ): Promise<
342
+ PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse
343
+ > {
219
344
  return this.client.sendOperationRequest(
220
- {
221
- nextPageLink,
222
- options
223
- },
224
- listQueryResultsForResourceGroupNextOperationSpec,
225
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse>;
345
+ { managementGroupName, nextLink, options },
346
+ listQueryResultsForManagementGroupNextOperationSpec
347
+ );
226
348
  }
227
349
 
228
350
  /**
229
- * Queries policy tracked resources under the resource.
230
- * @param nextPageLink The NextLink from the previous successful call to List operation.
231
- * @param [options] The optional parameters
232
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceNextResponse>
351
+ * ListQueryResultsForSubscriptionNext
352
+ * @param nextLink The nextLink from the previous successful call to the
353
+ * ListQueryResultsForSubscription method.
354
+ * @param options The options parameters.
233
355
  */
234
- listQueryResultsForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceNextResponse>;
356
+ private _listQueryResultsForSubscriptionNext(
357
+ nextLink: string,
358
+ options?: PolicyTrackedResourcesListQueryResultsForSubscriptionNextOptionalParams
359
+ ): Promise<
360
+ PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse
361
+ > {
362
+ return this.client.sendOperationRequest(
363
+ { nextLink, options },
364
+ listQueryResultsForSubscriptionNextOperationSpec
365
+ );
366
+ }
367
+
235
368
  /**
236
- * @param nextPageLink The NextLink from the previous successful call to List operation.
237
- * @param callback The callback
369
+ * ListQueryResultsForResourceGroupNext
370
+ * @param resourceGroupName Resource group name.
371
+ * @param nextLink The nextLink from the previous successful call to the
372
+ * ListQueryResultsForResourceGroup method.
373
+ * @param options The options parameters.
238
374
  */
239
- listQueryResultsForResourceNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
375
+ private _listQueryResultsForResourceGroupNext(
376
+ resourceGroupName: string,
377
+ nextLink: string,
378
+ options?: PolicyTrackedResourcesListQueryResultsForResourceGroupNextOptionalParams
379
+ ): Promise<
380
+ PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse
381
+ > {
382
+ return this.client.sendOperationRequest(
383
+ { resourceGroupName, nextLink, options },
384
+ listQueryResultsForResourceGroupNextOperationSpec
385
+ );
386
+ }
387
+
240
388
  /**
241
- * @param nextPageLink The NextLink from the previous successful call to List operation.
242
- * @param options The optional parameters
243
- * @param callback The callback
389
+ * ListQueryResultsForResourceNext
390
+ * @param resourceId Resource ID.
391
+ * @param nextLink The nextLink from the previous successful call to the ListQueryResultsForResource
392
+ * method.
393
+ * @param options The options parameters.
244
394
  */
245
- listQueryResultsForResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
246
- listQueryResultsForResourceNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceNextResponse> {
395
+ private _listQueryResultsForResourceNext(
396
+ resourceId: string,
397
+ nextLink: string,
398
+ options?: PolicyTrackedResourcesListQueryResultsForResourceNextOptionalParams
399
+ ): Promise<PolicyTrackedResourcesListQueryResultsForResourceNextResponse> {
247
400
  return this.client.sendOperationRequest(
248
- {
249
- nextPageLink,
250
- options
251
- },
252
- listQueryResultsForResourceNextOperationSpec,
253
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceNextResponse>;
401
+ { resourceId, nextLink, options },
402
+ listQueryResultsForResourceNextOperationSpec
403
+ );
254
404
  }
255
405
  }
256
-
257
406
  // Operation Specifications
258
- const serializer = new msRest.Serializer(Mappers);
259
- const listQueryResultsForManagementGroupOperationSpec: msRest.OperationSpec = {
407
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
408
+
409
+ const listQueryResultsForManagementGroupOperationSpec: coreClient.OperationSpec = {
410
+ path:
411
+ "/providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
260
412
  httpMethod: "POST",
261
- path: "providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
262
- urlParameters: [
263
- Parameters.managementGroupsNamespace,
264
- Parameters.managementGroupName,
265
- Parameters.policyTrackedResourcesResource
266
- ],
267
- queryParameters: [
268
- Parameters.apiVersion0,
269
- Parameters.top,
270
- Parameters.filter
271
- ],
272
- headerParameters: [
273
- Parameters.acceptLanguage
274
- ],
275
413
  responses: {
276
414
  200: {
277
415
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -280,24 +418,20 @@ const listQueryResultsForManagementGroupOperationSpec: msRest.OperationSpec = {
280
418
  bodyMapper: Mappers.QueryFailure
281
419
  }
282
420
  },
421
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
422
+ urlParameters: [
423
+ Parameters.$host,
424
+ Parameters.managementGroupsNamespace,
425
+ Parameters.managementGroupName,
426
+ Parameters.policyTrackedResourcesResource
427
+ ],
428
+ headerParameters: [Parameters.accept],
283
429
  serializer
284
430
  };
285
-
286
- const listQueryResultsForSubscriptionOperationSpec: msRest.OperationSpec = {
431
+ const listQueryResultsForSubscriptionOperationSpec: coreClient.OperationSpec = {
432
+ path:
433
+ "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
287
434
  httpMethod: "POST",
288
- path: "subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
289
- urlParameters: [
290
- Parameters.policyTrackedResourcesResource,
291
- Parameters.subscriptionId
292
- ],
293
- queryParameters: [
294
- Parameters.apiVersion0,
295
- Parameters.top,
296
- Parameters.filter
297
- ],
298
- headerParameters: [
299
- Parameters.acceptLanguage
300
- ],
301
435
  responses: {
302
436
  200: {
303
437
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -306,25 +440,19 @@ const listQueryResultsForSubscriptionOperationSpec: msRest.OperationSpec = {
306
440
  bodyMapper: Mappers.QueryFailure
307
441
  }
308
442
  },
309
- serializer
310
- };
311
-
312
- const listQueryResultsForResourceGroupOperationSpec: msRest.OperationSpec = {
313
- httpMethod: "POST",
314
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
443
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
315
444
  urlParameters: [
316
- Parameters.resourceGroupName,
445
+ Parameters.$host,
317
446
  Parameters.policyTrackedResourcesResource,
318
447
  Parameters.subscriptionId
319
448
  ],
320
- queryParameters: [
321
- Parameters.apiVersion0,
322
- Parameters.top,
323
- Parameters.filter
324
- ],
325
- headerParameters: [
326
- Parameters.acceptLanguage
327
- ],
449
+ headerParameters: [Parameters.accept],
450
+ serializer
451
+ };
452
+ const listQueryResultsForResourceGroupOperationSpec: coreClient.OperationSpec = {
453
+ path:
454
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
455
+ httpMethod: "POST",
328
456
  responses: {
329
457
  200: {
330
458
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -333,24 +461,20 @@ const listQueryResultsForResourceGroupOperationSpec: msRest.OperationSpec = {
333
461
  bodyMapper: Mappers.QueryFailure
334
462
  }
335
463
  },
464
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
465
+ urlParameters: [
466
+ Parameters.$host,
467
+ Parameters.policyTrackedResourcesResource,
468
+ Parameters.subscriptionId,
469
+ Parameters.resourceGroupName
470
+ ],
471
+ headerParameters: [Parameters.accept],
336
472
  serializer
337
473
  };
338
-
339
- const listQueryResultsForResourceOperationSpec: msRest.OperationSpec = {
474
+ const listQueryResultsForResourceOperationSpec: coreClient.OperationSpec = {
475
+ path:
476
+ "/{resourceId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
340
477
  httpMethod: "POST",
341
- path: "{resourceId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
342
- urlParameters: [
343
- Parameters.resourceId,
344
- Parameters.policyTrackedResourcesResource
345
- ],
346
- queryParameters: [
347
- Parameters.apiVersion0,
348
- Parameters.top,
349
- Parameters.filter
350
- ],
351
- headerParameters: [
352
- Parameters.acceptLanguage
353
- ],
354
478
  responses: {
355
479
  200: {
356
480
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -359,22 +483,18 @@ const listQueryResultsForResourceOperationSpec: msRest.OperationSpec = {
359
483
  bodyMapper: Mappers.QueryFailure
360
484
  }
361
485
  },
486
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
487
+ urlParameters: [
488
+ Parameters.$host,
489
+ Parameters.policyTrackedResourcesResource,
490
+ Parameters.resourceId
491
+ ],
492
+ headerParameters: [Parameters.accept],
362
493
  serializer
363
494
  };
364
-
365
- const listQueryResultsForManagementGroupNextOperationSpec: msRest.OperationSpec = {
366
- httpMethod: "POST",
367
- baseUrl: "https://management.azure.com",
495
+ const listQueryResultsForManagementGroupNextOperationSpec: coreClient.OperationSpec = {
368
496
  path: "{nextLink}",
369
- urlParameters: [
370
- Parameters.nextPageLink
371
- ],
372
- queryParameters: [
373
- Parameters.apiVersion0
374
- ],
375
- headerParameters: [
376
- Parameters.acceptLanguage
377
- ],
497
+ httpMethod: "GET",
378
498
  responses: {
379
499
  200: {
380
500
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -383,22 +503,20 @@ const listQueryResultsForManagementGroupNextOperationSpec: msRest.OperationSpec
383
503
  bodyMapper: Mappers.QueryFailure
384
504
  }
385
505
  },
506
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
507
+ urlParameters: [
508
+ Parameters.$host,
509
+ Parameters.managementGroupsNamespace,
510
+ Parameters.managementGroupName,
511
+ Parameters.policyTrackedResourcesResource,
512
+ Parameters.nextLink
513
+ ],
514
+ headerParameters: [Parameters.accept],
386
515
  serializer
387
516
  };
388
-
389
- const listQueryResultsForSubscriptionNextOperationSpec: msRest.OperationSpec = {
390
- httpMethod: "POST",
391
- baseUrl: "https://management.azure.com",
517
+ const listQueryResultsForSubscriptionNextOperationSpec: coreClient.OperationSpec = {
392
518
  path: "{nextLink}",
393
- urlParameters: [
394
- Parameters.nextPageLink
395
- ],
396
- queryParameters: [
397
- Parameters.apiVersion0
398
- ],
399
- headerParameters: [
400
- Parameters.acceptLanguage
401
- ],
519
+ httpMethod: "GET",
402
520
  responses: {
403
521
  200: {
404
522
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -407,22 +525,19 @@ const listQueryResultsForSubscriptionNextOperationSpec: msRest.OperationSpec = {
407
525
  bodyMapper: Mappers.QueryFailure
408
526
  }
409
527
  },
528
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
529
+ urlParameters: [
530
+ Parameters.$host,
531
+ Parameters.policyTrackedResourcesResource,
532
+ Parameters.subscriptionId,
533
+ Parameters.nextLink
534
+ ],
535
+ headerParameters: [Parameters.accept],
410
536
  serializer
411
537
  };
412
-
413
- const listQueryResultsForResourceGroupNextOperationSpec: msRest.OperationSpec = {
414
- httpMethod: "POST",
415
- baseUrl: "https://management.azure.com",
538
+ const listQueryResultsForResourceGroupNextOperationSpec: coreClient.OperationSpec = {
416
539
  path: "{nextLink}",
417
- urlParameters: [
418
- Parameters.nextPageLink
419
- ],
420
- queryParameters: [
421
- Parameters.apiVersion0
422
- ],
423
- headerParameters: [
424
- Parameters.acceptLanguage
425
- ],
540
+ httpMethod: "GET",
426
541
  responses: {
427
542
  200: {
428
543
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -431,22 +546,20 @@ const listQueryResultsForResourceGroupNextOperationSpec: msRest.OperationSpec =
431
546
  bodyMapper: Mappers.QueryFailure
432
547
  }
433
548
  },
549
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
550
+ urlParameters: [
551
+ Parameters.$host,
552
+ Parameters.policyTrackedResourcesResource,
553
+ Parameters.subscriptionId,
554
+ Parameters.resourceGroupName,
555
+ Parameters.nextLink
556
+ ],
557
+ headerParameters: [Parameters.accept],
434
558
  serializer
435
559
  };
436
-
437
- const listQueryResultsForResourceNextOperationSpec: msRest.OperationSpec = {
438
- httpMethod: "POST",
439
- baseUrl: "https://management.azure.com",
560
+ const listQueryResultsForResourceNextOperationSpec: coreClient.OperationSpec = {
440
561
  path: "{nextLink}",
441
- urlParameters: [
442
- Parameters.nextPageLink
443
- ],
444
- queryParameters: [
445
- Parameters.apiVersion0
446
- ],
447
- headerParameters: [
448
- Parameters.acceptLanguage
449
- ],
562
+ httpMethod: "GET",
450
563
  responses: {
451
564
  200: {
452
565
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -455,5 +568,13 @@ const listQueryResultsForResourceNextOperationSpec: msRest.OperationSpec = {
455
568
  bodyMapper: Mappers.QueryFailure
456
569
  }
457
570
  },
571
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
572
+ urlParameters: [
573
+ Parameters.$host,
574
+ Parameters.policyTrackedResourcesResource,
575
+ Parameters.resourceId,
576
+ Parameters.nextLink
577
+ ],
578
+ headerParameters: [Parameters.accept],
458
579
  serializer
459
580
  };