@azure/arm-policyinsights 3.2.0 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +72 -79
  4. package/dist/index.js +8639 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.js +1 -0
  7. package/dist/index.min.js.map +1 -0
  8. package/dist-esm/src/index.d.ts +5 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +12 -0
  11. package/dist-esm/src/index.js.map +1 -0
  12. package/dist-esm/src/lroImpl.d.ts +16 -0
  13. package/dist-esm/src/lroImpl.d.ts.map +1 -0
  14. package/dist-esm/src/lroImpl.js +29 -0
  15. package/dist-esm/src/lroImpl.js.map +1 -0
  16. package/dist-esm/src/models/index.d.ts +1870 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +50 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +60 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/{esm → dist-esm/src}/models/mappers.js +1336 -589
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +42 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/{esm → dist-esm/src}/models/parameters.js +202 -166
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/attestations.d.ts +161 -0
  29. package/dist-esm/src/operations/attestations.d.ts.map +1 -0
  30. package/dist-esm/src/operations/attestations.js +747 -0
  31. package/dist-esm/src/operations/attestations.js.map +1 -0
  32. package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
  33. package/dist-esm/src/operations/index.d.ts.map +1 -0
  34. package/{esm → dist-esm/src}/operations/index.js +5 -5
  35. package/dist-esm/src/operations/index.js.map +1 -0
  36. package/dist-esm/src/operations/operations.d.ts +18 -0
  37. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  38. package/dist-esm/src/operations/operations.js +46 -0
  39. package/dist-esm/src/operations/operations.js.map +1 -0
  40. package/dist-esm/src/operations/policyEvents.d.ts +208 -0
  41. package/dist-esm/src/operations/policyEvents.d.ts.map +1 -0
  42. package/dist-esm/src/operations/policyEvents.js +1097 -0
  43. package/dist-esm/src/operations/policyEvents.js.map +1 -0
  44. package/dist-esm/src/operations/policyMetadataOperations.d.ts +38 -0
  45. package/dist-esm/src/operations/policyMetadataOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/policyMetadataOperations.js +144 -0
  47. package/dist-esm/src/operations/policyMetadataOperations.js.map +1 -0
  48. package/dist-esm/src/operations/policyRestrictions.d.ts +27 -0
  49. package/dist-esm/src/operations/policyRestrictions.d.ts.map +1 -0
  50. package/dist-esm/src/operations/policyRestrictions.js +81 -0
  51. package/dist-esm/src/operations/policyRestrictions.js.map +1 -0
  52. package/dist-esm/src/operations/policyStates.d.ts +361 -0
  53. package/dist-esm/src/operations/policyStates.d.ts.map +1 -0
  54. package/dist-esm/src/operations/policyStates.js +1632 -0
  55. package/dist-esm/src/operations/policyStates.js.map +1 -0
  56. package/dist-esm/src/operations/policyTrackedResources.d.ts +99 -0
  57. package/dist-esm/src/operations/policyTrackedResources.d.ts.map +1 -0
  58. package/dist-esm/src/operations/policyTrackedResources.js +458 -0
  59. package/dist-esm/src/operations/policyTrackedResources.js.map +1 -0
  60. package/dist-esm/src/operations/remediations.d.ts +304 -0
  61. package/dist-esm/src/operations/remediations.d.ts.map +1 -0
  62. package/dist-esm/src/operations/remediations.js +1377 -0
  63. package/dist-esm/src/operations/remediations.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/attestations.d.ts +110 -0
  65. package/dist-esm/src/operationsInterfaces/attestations.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/attestations.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/attestations.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/index.d.ts +9 -0
  69. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/index.js +16 -0
  71. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/operations.d.ts +10 -0
  73. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/policyEvents.d.ts +60 -0
  77. package/dist-esm/src/operationsInterfaces/policyEvents.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/policyEvents.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/policyEvents.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.d.ts +17 -0
  81. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/policyMetadataOperations.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/policyRestrictions.d.ts +19 -0
  85. package/dist-esm/src/operationsInterfaces/policyRestrictions.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/policyRestrictions.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/policyRestrictions.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/policyStates.d.ts +165 -0
  89. package/dist-esm/src/operationsInterfaces/policyStates.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/policyStates.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/policyStates.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/policyTrackedResources.d.ts +29 -0
  93. package/dist-esm/src/operationsInterfaces/policyTrackedResources.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/policyTrackedResources.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/policyTrackedResources.js.map +1 -0
  96. package/dist-esm/src/operationsInterfaces/remediations.d.ts +168 -0
  97. package/dist-esm/src/operationsInterfaces/remediations.d.ts.map +1 -0
  98. package/dist-esm/src/operationsInterfaces/remediations.js +9 -0
  99. package/dist-esm/src/operationsInterfaces/remediations.js.map +1 -0
  100. package/dist-esm/src/policyInsightsClient.d.ts +24 -0
  101. package/dist-esm/src/policyInsightsClient.d.ts.map +1 -0
  102. package/dist-esm/src/policyInsightsClient.js +57 -0
  103. package/dist-esm/src/policyInsightsClient.js.map +1 -0
  104. package/dist-esm/test/sampleTest.d.ts +2 -0
  105. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  106. package/dist-esm/test/sampleTest.js +40 -0
  107. package/dist-esm/test/sampleTest.js.map +1 -0
  108. package/package.json +82 -22
  109. package/review/arm-policyinsights.api.md +1525 -0
  110. package/rollup.config.js +181 -30
  111. package/src/index.ts +12 -0
  112. package/src/lroImpl.ts +34 -0
  113. package/src/models/index.ts +1645 -2293
  114. package/src/models/mappers.ts +1579 -795
  115. package/src/models/parameters.ts +250 -167
  116. package/src/operations/attestations.ts +999 -0
  117. package/src/operations/index.ts +5 -5
  118. package/src/operations/operations.ts +29 -44
  119. package/src/operations/policyEvents.ts +1158 -327
  120. package/src/operations/policyMetadataOperations.ts +108 -113
  121. package/src/operations/policyRestrictions.ts +111 -0
  122. package/src/operations/policyStates.ts +1751 -750
  123. package/src/operations/policyTrackedResources.ts +416 -284
  124. package/src/operations/remediations.ts +1208 -1248
  125. package/src/operationsInterfaces/attestations.ts +212 -0
  126. package/src/operationsInterfaces/index.ts +16 -0
  127. package/src/operationsInterfaces/operations.ts +21 -0
  128. package/src/operationsInterfaces/policyEvents.ts +109 -0
  129. package/src/operationsInterfaces/policyMetadataOperations.ts +36 -0
  130. package/src/operationsInterfaces/policyRestrictions.ts +40 -0
  131. package/src/operationsInterfaces/policyStates.ts +287 -0
  132. package/src/operationsInterfaces/policyTrackedResources.ts +55 -0
  133. package/src/operationsInterfaces/remediations.ts +310 -0
  134. package/src/policyInsightsClient.ts +93 -39
  135. package/tsconfig.json +20 -7
  136. package/types/arm-policyinsights.d.ts +2728 -0
  137. package/types/tsdoc-metadata.json +11 -0
  138. package/dist/arm-policyinsights.js +0 -4909
  139. package/dist/arm-policyinsights.js.map +0 -1
  140. package/dist/arm-policyinsights.min.js +0 -1
  141. package/dist/arm-policyinsights.min.js.map +0 -1
  142. package/esm/models/index.d.ts +0 -2651
  143. package/esm/models/index.d.ts.map +0 -1
  144. package/esm/models/index.js +0 -8
  145. package/esm/models/index.js.map +0 -1
  146. package/esm/models/mappers.d.ts +0 -40
  147. package/esm/models/mappers.d.ts.map +0 -1
  148. package/esm/models/mappers.js.map +0 -1
  149. package/esm/models/operationsMappers.d.ts +0 -2
  150. package/esm/models/operationsMappers.d.ts.map +0 -1
  151. package/esm/models/operationsMappers.js +0 -9
  152. package/esm/models/operationsMappers.js.map +0 -1
  153. package/esm/models/parameters.d.ts +0 -33
  154. package/esm/models/parameters.d.ts.map +0 -1
  155. package/esm/models/parameters.js.map +0 -1
  156. package/esm/models/policyEventsMappers.d.ts +0 -2
  157. package/esm/models/policyEventsMappers.d.ts.map +0 -1
  158. package/esm/models/policyEventsMappers.js +0 -9
  159. package/esm/models/policyEventsMappers.js.map +0 -1
  160. package/esm/models/policyMetadataOperationsMappers.d.ts +0 -2
  161. package/esm/models/policyMetadataOperationsMappers.d.ts.map +0 -1
  162. package/esm/models/policyMetadataOperationsMappers.js +0 -9
  163. package/esm/models/policyMetadataOperationsMappers.js.map +0 -1
  164. package/esm/models/policyStatesMappers.d.ts +0 -2
  165. package/esm/models/policyStatesMappers.d.ts.map +0 -1
  166. package/esm/models/policyStatesMappers.js +0 -9
  167. package/esm/models/policyStatesMappers.js.map +0 -1
  168. package/esm/models/policyTrackedResourcesMappers.d.ts +0 -2
  169. package/esm/models/policyTrackedResourcesMappers.d.ts.map +0 -1
  170. package/esm/models/policyTrackedResourcesMappers.js +0 -9
  171. package/esm/models/policyTrackedResourcesMappers.js.map +0 -1
  172. package/esm/models/remediationsMappers.d.ts +0 -2
  173. package/esm/models/remediationsMappers.d.ts.map +0 -1
  174. package/esm/models/remediationsMappers.js +0 -9
  175. package/esm/models/remediationsMappers.js.map +0 -1
  176. package/esm/operations/index.d.ts.map +0 -1
  177. package/esm/operations/index.js.map +0 -1
  178. package/esm/operations/operations.d.ts +0 -28
  179. package/esm/operations/operations.d.ts.map +0 -1
  180. package/esm/operations/operations.js +0 -51
  181. package/esm/operations/operations.js.map +0 -1
  182. package/esm/operations/policyEvents.d.ts +0 -198
  183. package/esm/operations/policyEvents.d.ts.map +0 -1
  184. package/esm/operations/policyEvents.js +0 -365
  185. package/esm/operations/policyEvents.js.map +0 -1
  186. package/esm/operations/policyMetadataOperations.d.ts +0 -64
  187. package/esm/operations/policyMetadataOperations.d.ts.map +0 -1
  188. package/esm/operations/policyMetadataOperations.js +0 -106
  189. package/esm/operations/policyMetadataOperations.js.map +0 -1
  190. package/esm/operations/policyStates.d.ts +0 -442
  191. package/esm/operations/policyStates.d.ts.map +0 -1
  192. package/esm/operations/policyStates.js +0 -712
  193. package/esm/operations/policyStates.js.map +0 -1
  194. package/esm/operations/policyTrackedResources.d.ts +0 -160
  195. package/esm/operations/policyTrackedResources.d.ts.map +0 -1
  196. package/esm/operations/policyTrackedResources.js +0 -258
  197. package/esm/operations/policyTrackedResources.js.map +0 -1
  198. package/esm/operations/remediations.d.ts +0 -679
  199. package/esm/operations/remediations.d.ts.map +0 -1
  200. package/esm/operations/remediations.js +0 -1014
  201. package/esm/operations/remediations.js.map +0 -1
  202. package/esm/policyInsightsClient.d.ts +0 -22
  203. package/esm/policyInsightsClient.d.ts.map +0 -1
  204. package/esm/policyInsightsClient.js +0 -37
  205. package/esm/policyInsightsClient.js.map +0 -1
  206. package/esm/policyInsightsClientContext.d.ts +0 -13
  207. package/esm/policyInsightsClientContext.d.ts.map +0 -1
  208. package/esm/policyInsightsClientContext.js +0 -50
  209. package/esm/policyInsightsClientContext.js.map +0 -1
  210. package/src/models/operationsMappers.ts +0 -15
  211. package/src/models/policyEventsMappers.ts +0 -14
  212. package/src/models/policyMetadataOperationsMappers.ts +0 -16
  213. package/src/models/policyStatesMappers.ts +0 -24
  214. package/src/models/policyTrackedResourcesMappers.ts +0 -16
  215. package/src/models/remediationsMappers.ts +0 -20
  216. package/src/policyInsightsClientContext.ts +0 -54
@@ -1,278 +1,415 @@
1
1
  /*
2
- * Copyright (c) Microsoft Corporation. All rights reserved.
3
- * Licensed under the MIT License. See License.txt in the project root for
4
- * license information.
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
5
4
  *
6
5
  * Code generated by Microsoft (R) AutoRest Code Generator.
7
- * Changes may cause incorrect behavior and will be lost if the code is
8
- * regenerated.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
9
7
  */
10
8
 
11
- import * as msRest from "@azure/ms-rest-js";
12
- import * as Models from "../models";
13
- 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";
14
13
  import * as Parameters from "../models/parameters";
15
- 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";
16
34
 
17
- /** Class representing a PolicyTrackedResources. */
18
- export class PolicyTrackedResources {
19
- 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;
20
39
 
21
40
  /**
22
- * Create a PolicyTrackedResources.
23
- * @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
24
43
  */
25
- constructor(client: PolicyInsightsClientContext) {
44
+ constructor(client: PolicyInsightsClient) {
26
45
  this.client = client;
27
46
  }
28
47
 
29
48
  /**
30
49
  * Queries policy tracked resources under the management group.
31
50
  * @param managementGroupName Management group name.
32
- * @param [options] The optional parameters
33
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse>
51
+ * @param options The options parameters.
34
52
  */
35
- listQueryResultsForManagementGroup(managementGroupName: string, options?: Models.PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse>;
36
- /**
37
- * @param managementGroupName Management group name.
38
- * @param callback The callback
39
- */
40
- listQueryResultsForManagementGroup(managementGroupName: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
41
- /**
42
- * @param managementGroupName Management group name.
43
- * @param options The optional parameters
44
- * @param callback The callback
45
- */
46
- listQueryResultsForManagementGroup(managementGroupName: string, options: Models.PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
47
- listQueryResultsForManagementGroup(managementGroupName: string, options?: Models.PolicyTrackedResourcesListQueryResultsForManagementGroupOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupResponse> {
48
- return this.client.sendOperationRequest(
49
- {
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(
50
89
  managementGroupName,
90
+ continuationToken,
51
91
  options
52
- },
53
- listQueryResultsForManagementGroupOperationSpec,
54
- 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
+ }
55
108
  }
56
109
 
57
110
  /**
58
111
  * Queries policy tracked resources under the subscription.
59
- * @param subscriptionId Microsoft Azure subscription ID.
60
- * @param [options] The optional parameters
61
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse>
62
- */
63
- listQueryResultsForSubscription(subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse>;
64
- /**
65
- * @param subscriptionId Microsoft Azure subscription ID.
66
- * @param callback The callback
112
+ * @param options The options parameters.
67
113
  */
68
- listQueryResultsForSubscription(subscriptionId: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
69
- /**
70
- * @param subscriptionId Microsoft Azure subscription ID.
71
- * @param options The optional parameters
72
- * @param callback The callback
73
- */
74
- listQueryResultsForSubscription(subscriptionId: string, options: Models.PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
75
- listQueryResultsForSubscription(subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForSubscriptionOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionResponse> {
76
- return this.client.sendOperationRequest(
77
- {
78
- subscriptionId,
79
- 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;
80
124
  },
81
- listQueryResultsForSubscriptionOperationSpec,
82
- 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
+ }
83
155
  }
84
156
 
85
157
  /**
86
158
  * Queries policy tracked resources under the resource group.
87
159
  * @param resourceGroupName Resource group name.
88
- * @param subscriptionId Microsoft Azure subscription ID.
89
- * @param [options] The optional parameters
90
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse>
91
- */
92
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse>;
93
- /**
94
- * @param resourceGroupName Resource group name.
95
- * @param subscriptionId Microsoft Azure subscription ID.
96
- * @param callback The callback
97
- */
98
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
99
- /**
100
- * @param resourceGroupName Resource group name.
101
- * @param subscriptionId Microsoft Azure subscription ID.
102
- * @param options The optional parameters
103
- * @param callback The callback
160
+ * @param options The options parameters.
104
161
  */
105
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, options: Models.PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
106
- listQueryResultsForResourceGroup(resourceGroupName: string, subscriptionId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceGroupOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupResponse> {
107
- return this.client.sendOperationRequest(
108
- {
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(
109
198
  resourceGroupName,
110
- subscriptionId,
199
+ continuationToken,
111
200
  options
112
- },
113
- listQueryResultsForResourceGroupOperationSpec,
114
- 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
+ }
115
217
  }
116
218
 
117
219
  /**
118
220
  * Queries policy tracked resources under the resource.
119
221
  * @param resourceId Resource ID.
120
- * @param [options] The optional parameters
121
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse>
122
- */
123
- listQueryResultsForResource(resourceId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceOptionalParams): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse>;
124
- /**
125
- * @param resourceId Resource ID.
126
- * @param callback The callback
222
+ * @param options The options parameters.
127
223
  */
128
- listQueryResultsForResource(resourceId: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
129
- /**
130
- * @param resourceId Resource ID.
131
- * @param options The optional parameters
132
- * @param callback The callback
133
- */
134
- listQueryResultsForResource(resourceId: string, options: Models.PolicyTrackedResourcesListQueryResultsForResourceOptionalParams, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
135
- listQueryResultsForResource(resourceId: string, options?: Models.PolicyTrackedResourcesListQueryResultsForResourceOptionalParams | msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>, callback?: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceResponse> {
136
- return this.client.sendOperationRequest(
137
- {
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(
138
251
  resourceId,
252
+ continuationToken,
139
253
  options
140
- },
141
- listQueryResultsForResourceOperationSpec,
142
- 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
+ }
143
270
  }
144
271
 
145
272
  /**
146
273
  * Queries policy tracked resources under the management group.
147
- * @param nextPageLink The NextLink from the previous successful call to List operation.
148
- * @param [options] The optional parameters
149
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse>
150
- */
151
- listQueryResultsForManagementGroupNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse>;
152
- /**
153
- * @param nextPageLink The NextLink from the previous successful call to List operation.
154
- * @param callback The callback
155
- */
156
- listQueryResultsForManagementGroupNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
157
- /**
158
- * @param nextPageLink The NextLink from the previous successful call to List operation.
159
- * @param options The optional parameters
160
- * @param callback The callback
274
+ * @param managementGroupName Management group name.
275
+ * @param options The options parameters.
161
276
  */
162
- listQueryResultsForManagementGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
163
- 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> {
164
281
  return this.client.sendOperationRequest(
165
- {
166
- nextPageLink,
167
- options
168
- },
169
- listQueryResultsForManagementGroupNextOperationSpec,
170
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForManagementGroupNextResponse>;
282
+ { managementGroupName, options },
283
+ listQueryResultsForManagementGroupOperationSpec
284
+ );
171
285
  }
172
286
 
173
287
  /**
174
288
  * Queries policy tracked resources under the subscription.
175
- * @param nextPageLink The NextLink from the previous successful call to List operation.
176
- * @param [options] The optional parameters
177
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse>
178
- */
179
- listQueryResultsForSubscriptionNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse>;
180
- /**
181
- * @param nextPageLink The NextLink from the previous successful call to List operation.
182
- * @param callback The callback
183
- */
184
- listQueryResultsForSubscriptionNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
185
- /**
186
- * @param nextPageLink The NextLink from the previous successful call to List operation.
187
- * @param options The optional parameters
188
- * @param callback The callback
289
+ * @param options The options parameters.
189
290
  */
190
- listQueryResultsForSubscriptionNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
191
- 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> {
192
294
  return this.client.sendOperationRequest(
193
- {
194
- nextPageLink,
195
- options
196
- },
197
- listQueryResultsForSubscriptionNextOperationSpec,
198
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForSubscriptionNextResponse>;
295
+ { options },
296
+ listQueryResultsForSubscriptionOperationSpec
297
+ );
199
298
  }
200
299
 
201
300
  /**
202
301
  * Queries policy tracked resources under the resource group.
203
- * @param nextPageLink The NextLink from the previous successful call to List operation.
204
- * @param [options] The optional parameters
205
- * @returns Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse>
302
+ * @param resourceGroupName Resource group name.
303
+ * @param options The options parameters.
206
304
  */
207
- 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
+
208
315
  /**
209
- * @param nextPageLink The NextLink from the previous successful call to List operation.
210
- * @param callback The callback
316
+ * Queries policy tracked resources under the resource.
317
+ * @param resourceId Resource ID.
318
+ * @param options The options parameters.
211
319
  */
212
- 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
+
213
330
  /**
214
- * @param nextPageLink The NextLink from the previous successful call to List operation.
215
- * @param options The optional parameters
216
- * @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.
217
336
  */
218
- listQueryResultsForResourceGroupNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
219
- 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
+ > {
220
344
  return this.client.sendOperationRequest(
221
- {
222
- nextPageLink,
223
- options
224
- },
225
- listQueryResultsForResourceGroupNextOperationSpec,
226
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceGroupNextResponse>;
345
+ { managementGroupName, nextLink, options },
346
+ listQueryResultsForManagementGroupNextOperationSpec
347
+ );
227
348
  }
228
349
 
229
350
  /**
230
- * Queries policy tracked resources under the resource.
231
- * @param nextPageLink The NextLink from the previous successful call to List operation.
232
- * @param [options] The optional parameters
233
- * @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.
234
355
  */
235
- 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
+
236
368
  /**
237
- * @param nextPageLink The NextLink from the previous successful call to List operation.
238
- * @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.
239
374
  */
240
- 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
+
241
388
  /**
242
- * @param nextPageLink The NextLink from the previous successful call to List operation.
243
- * @param options The optional parameters
244
- * @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.
245
394
  */
246
- listQueryResultsForResourceNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.PolicyTrackedResourcesQueryResults>): void;
247
- 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> {
248
400
  return this.client.sendOperationRequest(
249
- {
250
- nextPageLink,
251
- options
252
- },
253
- listQueryResultsForResourceNextOperationSpec,
254
- callback) as Promise<Models.PolicyTrackedResourcesListQueryResultsForResourceNextResponse>;
401
+ { resourceId, nextLink, options },
402
+ listQueryResultsForResourceNextOperationSpec
403
+ );
255
404
  }
256
405
  }
257
-
258
406
  // Operation Specifications
259
- const serializer = new msRest.Serializer(Mappers);
260
- 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",
261
412
  httpMethod: "POST",
262
- path: "providers/{managementGroupsNamespace}/managementGroups/{managementGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
263
- urlParameters: [
264
- Parameters.managementGroupsNamespace,
265
- Parameters.managementGroupName,
266
- Parameters.policyTrackedResourcesResource
267
- ],
268
- queryParameters: [
269
- Parameters.apiVersion0,
270
- Parameters.top,
271
- Parameters.filter
272
- ],
273
- headerParameters: [
274
- Parameters.acceptLanguage
275
- ],
276
413
  responses: {
277
414
  200: {
278
415
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -281,24 +418,20 @@ const listQueryResultsForManagementGroupOperationSpec: msRest.OperationSpec = {
281
418
  bodyMapper: Mappers.QueryFailure
282
419
  }
283
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],
284
429
  serializer
285
430
  };
286
-
287
- const listQueryResultsForSubscriptionOperationSpec: msRest.OperationSpec = {
431
+ const listQueryResultsForSubscriptionOperationSpec: coreClient.OperationSpec = {
432
+ path:
433
+ "/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
288
434
  httpMethod: "POST",
289
- path: "subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
290
- urlParameters: [
291
- Parameters.policyTrackedResourcesResource,
292
- Parameters.subscriptionId
293
- ],
294
- queryParameters: [
295
- Parameters.apiVersion0,
296
- Parameters.top,
297
- Parameters.filter
298
- ],
299
- headerParameters: [
300
- Parameters.acceptLanguage
301
- ],
302
435
  responses: {
303
436
  200: {
304
437
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -307,25 +440,19 @@ const listQueryResultsForSubscriptionOperationSpec: msRest.OperationSpec = {
307
440
  bodyMapper: Mappers.QueryFailure
308
441
  }
309
442
  },
310
- serializer
311
- };
312
-
313
- const listQueryResultsForResourceGroupOperationSpec: msRest.OperationSpec = {
314
- httpMethod: "POST",
315
- path: "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
443
+ queryParameters: [Parameters.top, Parameters.filter, Parameters.apiVersion],
316
444
  urlParameters: [
317
- Parameters.resourceGroupName,
445
+ Parameters.$host,
318
446
  Parameters.policyTrackedResourcesResource,
319
447
  Parameters.subscriptionId
320
448
  ],
321
- queryParameters: [
322
- Parameters.apiVersion0,
323
- Parameters.top,
324
- Parameters.filter
325
- ],
326
- headerParameters: [
327
- Parameters.acceptLanguage
328
- ],
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",
329
456
  responses: {
330
457
  200: {
331
458
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -334,24 +461,20 @@ const listQueryResultsForResourceGroupOperationSpec: msRest.OperationSpec = {
334
461
  bodyMapper: Mappers.QueryFailure
335
462
  }
336
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],
337
472
  serializer
338
473
  };
339
-
340
- const listQueryResultsForResourceOperationSpec: msRest.OperationSpec = {
474
+ const listQueryResultsForResourceOperationSpec: coreClient.OperationSpec = {
475
+ path:
476
+ "/{resourceId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
341
477
  httpMethod: "POST",
342
- path: "{resourceId}/providers/Microsoft.PolicyInsights/policyTrackedResources/{policyTrackedResourcesResource}/queryResults",
343
- urlParameters: [
344
- Parameters.resourceId,
345
- Parameters.policyTrackedResourcesResource
346
- ],
347
- queryParameters: [
348
- Parameters.apiVersion0,
349
- Parameters.top,
350
- Parameters.filter
351
- ],
352
- headerParameters: [
353
- Parameters.acceptLanguage
354
- ],
355
478
  responses: {
356
479
  200: {
357
480
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -360,19 +483,18 @@ const listQueryResultsForResourceOperationSpec: msRest.OperationSpec = {
360
483
  bodyMapper: Mappers.QueryFailure
361
484
  }
362
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],
363
493
  serializer
364
494
  };
365
-
366
- const listQueryResultsForManagementGroupNextOperationSpec: msRest.OperationSpec = {
367
- httpMethod: "POST",
368
- baseUrl: "https://management.azure.com",
495
+ const listQueryResultsForManagementGroupNextOperationSpec: coreClient.OperationSpec = {
369
496
  path: "{nextLink}",
370
- urlParameters: [
371
- Parameters.nextPageLink
372
- ],
373
- headerParameters: [
374
- Parameters.acceptLanguage
375
- ],
497
+ httpMethod: "GET",
376
498
  responses: {
377
499
  200: {
378
500
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -381,19 +503,20 @@ const listQueryResultsForManagementGroupNextOperationSpec: msRest.OperationSpec
381
503
  bodyMapper: Mappers.QueryFailure
382
504
  }
383
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],
384
515
  serializer
385
516
  };
386
-
387
- const listQueryResultsForSubscriptionNextOperationSpec: msRest.OperationSpec = {
388
- httpMethod: "POST",
389
- baseUrl: "https://management.azure.com",
517
+ const listQueryResultsForSubscriptionNextOperationSpec: coreClient.OperationSpec = {
390
518
  path: "{nextLink}",
391
- urlParameters: [
392
- Parameters.nextPageLink
393
- ],
394
- headerParameters: [
395
- Parameters.acceptLanguage
396
- ],
519
+ httpMethod: "GET",
397
520
  responses: {
398
521
  200: {
399
522
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -402,19 +525,19 @@ const listQueryResultsForSubscriptionNextOperationSpec: msRest.OperationSpec = {
402
525
  bodyMapper: Mappers.QueryFailure
403
526
  }
404
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],
405
536
  serializer
406
537
  };
407
-
408
- const listQueryResultsForResourceGroupNextOperationSpec: msRest.OperationSpec = {
409
- httpMethod: "POST",
410
- baseUrl: "https://management.azure.com",
538
+ const listQueryResultsForResourceGroupNextOperationSpec: coreClient.OperationSpec = {
411
539
  path: "{nextLink}",
412
- urlParameters: [
413
- Parameters.nextPageLink
414
- ],
415
- headerParameters: [
416
- Parameters.acceptLanguage
417
- ],
540
+ httpMethod: "GET",
418
541
  responses: {
419
542
  200: {
420
543
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -423,19 +546,20 @@ const listQueryResultsForResourceGroupNextOperationSpec: msRest.OperationSpec =
423
546
  bodyMapper: Mappers.QueryFailure
424
547
  }
425
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],
426
558
  serializer
427
559
  };
428
-
429
- const listQueryResultsForResourceNextOperationSpec: msRest.OperationSpec = {
430
- httpMethod: "POST",
431
- baseUrl: "https://management.azure.com",
560
+ const listQueryResultsForResourceNextOperationSpec: coreClient.OperationSpec = {
432
561
  path: "{nextLink}",
433
- urlParameters: [
434
- Parameters.nextPageLink
435
- ],
436
- headerParameters: [
437
- Parameters.acceptLanguage
438
- ],
562
+ httpMethod: "GET",
439
563
  responses: {
440
564
  200: {
441
565
  bodyMapper: Mappers.PolicyTrackedResourcesQueryResults
@@ -444,5 +568,13 @@ const listQueryResultsForResourceNextOperationSpec: msRest.OperationSpec = {
444
568
  bodyMapper: Mappers.QueryFailure
445
569
  }
446
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],
447
579
  serializer
448
580
  };