@azure/arm-resourcegraph 4.2.1 → 5.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/LICENSE +21 -0
  3. package/README.md +69 -80
  4. package/{esm/models/mappers.js → dist/index.js} +544 -548
  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/samples-dev/accessAPropertiesField.d.ts +2 -0
  9. package/dist-esm/samples-dev/accessAPropertiesField.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/accessAPropertiesField.js +32 -0
  11. package/dist-esm/samples-dev/accessAPropertiesField.js.map +1 -0
  12. package/dist-esm/samples-dev/basicManagementGroupQuery.d.ts +2 -0
  13. package/dist-esm/samples-dev/basicManagementGroupQuery.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/basicManagementGroupQuery.js +32 -0
  15. package/dist-esm/samples-dev/basicManagementGroupQuery.js.map +1 -0
  16. package/dist-esm/samples-dev/basicQuery.d.ts +2 -0
  17. package/dist-esm/samples-dev/basicQuery.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/basicQuery.js +32 -0
  19. package/dist-esm/samples-dev/basicQuery.js.map +1 -0
  20. package/dist-esm/samples-dev/basicTenantQuery.d.ts +2 -0
  21. package/dist-esm/samples-dev/basicTenantQuery.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/basicTenantQuery.js +31 -0
  23. package/dist-esm/samples-dev/basicTenantQuery.js.map +1 -0
  24. package/dist-esm/samples-dev/complexQuery.d.ts +2 -0
  25. package/dist-esm/samples-dev/complexQuery.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/complexQuery.js +32 -0
  27. package/dist-esm/samples-dev/complexQuery.js.map +1 -0
  28. package/dist-esm/samples-dev/filterResources.d.ts +2 -0
  29. package/dist-esm/samples-dev/filterResources.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/filterResources.js +32 -0
  31. package/dist-esm/samples-dev/filterResources.js.map +1 -0
  32. package/dist-esm/samples-dev/firstPageQuery.d.ts +2 -0
  33. package/dist-esm/samples-dev/firstPageQuery.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/firstPageQuery.js +33 -0
  35. package/dist-esm/samples-dev/firstPageQuery.js.map +1 -0
  36. package/dist-esm/samples-dev/nextPageQuery.d.ts +2 -0
  37. package/dist-esm/samples-dev/nextPageQuery.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/nextPageQuery.js +35 -0
  39. package/dist-esm/samples-dev/nextPageQuery.js.map +1 -0
  40. package/dist-esm/samples-dev/operationsList.d.ts +2 -0
  41. package/dist-esm/samples-dev/operationsList.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/operationsList.js +42 -0
  43. package/dist-esm/samples-dev/operationsList.js.map +1 -0
  44. package/dist-esm/samples-dev/queryWithAFacetRequest.d.ts +2 -0
  45. package/dist-esm/samples-dev/queryWithAFacetRequest.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/queryWithAFacetRequest.js +51 -0
  47. package/dist-esm/samples-dev/queryWithAFacetRequest.js.map +1 -0
  48. package/dist-esm/samples-dev/randomPageQuery.d.ts +2 -0
  49. package/dist-esm/samples-dev/randomPageQuery.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/randomPageQuery.js +33 -0
  51. package/dist-esm/samples-dev/randomPageQuery.js.map +1 -0
  52. package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.d.ts +2 -0
  53. package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.js +38 -0
  55. package/dist-esm/samples-dev/resourceHistoryManagementGroupScopeQuery.js.map +1 -0
  56. package/dist-esm/samples-dev/resourceHistoryQuery.d.ts +2 -0
  57. package/dist-esm/samples-dev/resourceHistoryQuery.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/resourceHistoryQuery.js +38 -0
  59. package/dist-esm/samples-dev/resourceHistoryQuery.js.map +1 -0
  60. package/dist-esm/samples-dev/summarizeResourcesByLocation.d.ts +2 -0
  61. package/dist-esm/samples-dev/summarizeResourcesByLocation.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/summarizeResourcesByLocation.js +32 -0
  63. package/dist-esm/samples-dev/summarizeResourcesByLocation.js.map +1 -0
  64. package/dist-esm/src/index.d.ts +5 -0
  65. package/dist-esm/src/index.d.ts.map +1 -0
  66. package/dist-esm/src/index.js +12 -0
  67. package/dist-esm/src/index.js.map +1 -0
  68. package/dist-esm/src/models/index.d.ts +216 -0
  69. package/dist-esm/src/models/index.d.ts.map +1 -0
  70. package/{src/models/operationsMappers.ts → dist-esm/src/models/index.js} +2 -10
  71. package/dist-esm/src/models/index.js.map +1 -0
  72. package/dist-esm/src/models/mappers.d.ts +26 -0
  73. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  74. package/dist-esm/src/models/mappers.js +655 -0
  75. package/dist-esm/src/models/mappers.js.map +1 -0
  76. package/dist-esm/src/models/parameters.d.ts +8 -0
  77. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  78. package/dist-esm/src/models/parameters.js +61 -0
  79. package/dist-esm/src/models/parameters.js.map +1 -0
  80. package/{esm → dist-esm/src}/operations/index.d.ts +0 -0
  81. package/dist-esm/src/operations/index.d.ts.map +1 -0
  82. package/{esm → dist-esm/src}/operations/index.js +1 -2
  83. package/dist-esm/src/operations/index.js.map +1 -0
  84. package/dist-esm/src/operations/operations.d.ts +26 -0
  85. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  86. package/dist-esm/src/operations/operations.js +90 -0
  87. package/dist-esm/src/operations/operations.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/index.d.ts +2 -0
  89. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  90. package/{esm/models/operationsMappers.js → dist-esm/src/operationsInterfaces/index.js} +2 -2
  91. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  92. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  93. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  94. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  95. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  96. package/dist-esm/src/resourceGraphClient.d.ts +28 -0
  97. package/dist-esm/src/resourceGraphClient.d.ts.map +1 -0
  98. package/dist-esm/src/resourceGraphClient.js +103 -0
  99. package/dist-esm/src/resourceGraphClient.js.map +1 -0
  100. package/dist-esm/test/sampleTest.d.ts +2 -0
  101. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  102. package/dist-esm/test/sampleTest.js +40 -0
  103. package/dist-esm/test/sampleTest.js.map +1 -0
  104. package/package.json +75 -33
  105. package/review/arm-resourcegraph.api.md +214 -0
  106. package/rollup.config.js +181 -30
  107. package/src/index.ts +12 -0
  108. package/src/models/index.ts +192 -644
  109. package/src/models/mappers.ts +276 -573
  110. package/src/models/parameters.ts +39 -21
  111. package/src/operations/index.ts +1 -2
  112. package/src/operations/operations.ts +64 -42
  113. package/{esm/models/index.js → src/operationsInterfaces/index.ts} +2 -1
  114. package/src/operationsInterfaces/operations.ts +22 -0
  115. package/src/resourceGraphClient.ts +88 -269
  116. package/tsconfig.json +5 -4
  117. package/types/arm-resourcegraph.d.ts +284 -0
  118. package/types/tsdoc-metadata.json +11 -0
  119. package/dist/arm-resourcegraph.js +0 -1359
  120. package/dist/arm-resourcegraph.js.map +0 -1
  121. package/dist/arm-resourcegraph.min.js +0 -1
  122. package/dist/arm-resourcegraph.min.js.map +0 -1
  123. package/esm/models/index.d.ts +0 -659
  124. package/esm/models/index.d.ts.map +0 -1
  125. package/esm/models/index.js.map +0 -1
  126. package/esm/models/mappers.d.ts +0 -37
  127. package/esm/models/mappers.d.ts.map +0 -1
  128. package/esm/models/mappers.js.map +0 -1
  129. package/esm/models/operationsMappers.d.ts +0 -2
  130. package/esm/models/operationsMappers.d.ts.map +0 -1
  131. package/esm/models/operationsMappers.js.map +0 -1
  132. package/esm/models/parameters.d.ts +0 -6
  133. package/esm/models/parameters.d.ts.map +0 -1
  134. package/esm/models/parameters.js +0 -55
  135. package/esm/models/parameters.js.map +0 -1
  136. package/esm/operations/index.d.ts.map +0 -1
  137. package/esm/operations/index.js.map +0 -1
  138. package/esm/operations/operations.d.ts +0 -28
  139. package/esm/operations/operations.d.ts.map +0 -1
  140. package/esm/operations/operations.js +0 -46
  141. package/esm/operations/operations.js.map +0 -1
  142. package/esm/resourceGraphClient.d.ts +0 -95
  143. package/esm/resourceGraphClient.d.ts.map +0 -1
  144. package/esm/resourceGraphClient.js +0 -155
  145. package/esm/resourceGraphClient.js.map +0 -1
  146. package/esm/resourceGraphClientContext.d.ts +0 -19
  147. package/esm/resourceGraphClientContext.d.ts.map +0 -1
  148. package/esm/resourceGraphClientContext.js +0 -55
  149. package/esm/resourceGraphClientContext.js.map +0 -1
  150. package/src/resourceGraphClientContext.ts +0 -65
@@ -6,707 +6,255 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
 
9
- import { BaseResource, CloudError, AzureServiceClientOptions } from "@azure/ms-rest-azure-js";
10
- import * as msRest from "@azure/ms-rest-js";
9
+ import * as coreClient from "@azure/core-client";
11
10
 
12
- export { BaseResource, CloudError };
13
-
14
- /**
15
- * An interval in time specifying the date and time for the inclusive start and exclusive end, i.e.
16
- * `[start, end)`.
17
- */
18
- export interface DateTimeInterval {
19
- /**
20
- * A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`,
21
- * end)`. Specifying a `start` that occurs chronologically after `end` will result in an error.
22
- */
23
- start: Date;
24
- /**
25
- * A datetime indicating the exclusive/open end of the time interval, i.e. `[start,
26
- * `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in
27
- * an error.
28
- */
29
- end: Date;
30
- }
31
-
32
- /**
33
- * Specifies the date and time interval for a changes request.
34
- */
35
- export interface ResourceChangesRequestParametersInterval extends DateTimeInterval {}
36
-
37
- /**
38
- * The parameters for a specific changes request.
39
- */
40
- export interface ResourceChangesRequestParameters {
41
- /**
42
- * Specifies the list of resources for a changes request.
43
- */
44
- resourceIds?: string[];
45
- /**
46
- * The subscription id of resources to query the changes from.
47
- */
48
- subscriptionId?: string;
49
- /**
50
- * Specifies the date and time interval for a changes request.
51
- */
52
- interval: ResourceChangesRequestParametersInterval;
53
- /**
54
- * Acts as the continuation token for paged responses.
55
- */
56
- skipToken?: string;
57
- /**
58
- * The maximum number of changes the client can accept in a paged response.
59
- */
60
- top?: number;
61
- /**
62
- * The table name to query resources from.
63
- */
64
- table?: string;
65
- /**
66
- * The flag if set to true will fetch property changes
67
- */
68
- fetchPropertyChanges?: boolean;
69
- /**
70
- * The flag if set to true will fetch change snapshots
71
- */
72
- fetchSnapshots?: boolean;
73
- }
74
-
75
- /**
76
- * Data on a specific resource snapshot.
77
- */
78
- export interface ResourceSnapshotData {
79
- /**
80
- * The ID of the snapshot.
81
- */
82
- snapshotId?: string;
83
- /**
84
- * The time when the snapshot was created.
85
- * The snapshot timestamp provides an approximation as to when a modification to a resource was
86
- * detected. There can be a difference between the actual modification time and the detection
87
- * time. This is due to differences in how operations that modify a resource are processed,
88
- * versus how operation that record resource snapshots are processed.
89
- */
90
- timestamp: Date;
91
- /**
92
- * The resource snapshot content (in resourceChangeDetails response only).
93
- */
94
- content?: any;
95
- }
96
-
97
- /**
98
- * The snapshot before the change.
99
- */
100
- export interface ResourceChangeDataBeforeSnapshot extends ResourceSnapshotData {}
101
-
102
- /**
103
- * The snapshot after the change.
104
- */
105
- export interface ResourceChangeDataAfterSnapshot extends ResourceSnapshotData {}
106
-
107
- /**
108
- * The resource property change
109
- */
110
- export interface ResourcePropertyChange {
111
- /**
112
- * The property name
113
- */
114
- propertyName: string;
115
- /**
116
- * The property value in before snapshot
117
- */
118
- beforeValue?: string;
119
- /**
120
- * The property value in after snapshot
121
- */
122
- afterValue?: string;
123
- /**
124
- * The change category. Possible values include: 'User', 'System'
125
- */
126
- changeCategory: ChangeCategory;
127
- /**
128
- * The property change Type. Possible values include: 'Insert', 'Update', 'Remove'
129
- */
130
- propertyChangeType: PropertyChangeType;
131
- }
132
-
133
- /**
134
- * Data on a specific change, represented by a pair of before and after resource snapshots.
135
- */
136
- export interface ResourceChangeData {
137
- /**
138
- * The resource for a change.
139
- */
140
- resourceId?: string;
141
- /**
142
- * The change ID. Valid and unique within the specified resource only.
143
- */
144
- changeId: string;
145
- /**
146
- * The snapshot before the change.
147
- */
148
- beforeSnapshot: ResourceChangeDataBeforeSnapshot;
149
- /**
150
- * The snapshot after the change.
151
- */
152
- afterSnapshot: ResourceChangeDataAfterSnapshot;
153
- /**
154
- * The change type for snapshot. PropertyChanges will be provided in case of Update change type.
155
- * Possible values include: 'Create', 'Update', 'Delete'
156
- */
157
- changeType?: ChangeType;
158
- /**
159
- * An array of resource property change
160
- */
161
- propertyChanges?: ResourcePropertyChange[];
162
- }
163
-
164
- /**
165
- * A list of changes associated with a resource over a specific time interval.
166
- */
167
- export interface ResourceChangeList {
168
- /**
169
- * The pageable value returned by the operation, i.e. a list of changes to the resource.
170
- *
171
- * - The list is ordered from the most recent changes to the least recent changes.
172
- * - This list will be empty if there were no changes during the requested interval.
173
- * - The `Before` snapshot timestamp value of the oldest change can be outside of the specified
174
- * time interval.
175
- */
176
- changes?: ResourceChangeData[];
177
- /**
178
- * Skip token that encodes the skip information while executing the current request
179
- */
180
- skipToken?: any;
181
- }
182
-
183
- /**
184
- * The parameters for a specific change details request.
185
- */
186
- export interface ResourceChangeDetailsRequestParameters {
187
- /**
188
- * Specifies the list of resources for a change details request.
189
- */
190
- resourceIds: string[];
191
- /**
192
- * Specifies the list of change IDs for a change details request.
193
- */
194
- changeIds: string[];
195
- }
196
-
197
- /**
198
- * An interface representing ErrorDetails.
199
- * @summary Error details.
200
- */
201
- export interface ErrorDetails {
202
- /**
203
- * Error code identifying the specific error.
204
- */
205
- code: string;
206
- /**
207
- * A human readable error message.
208
- */
209
- message: string;
210
- /**
211
- * Describes unknown properties. The value of an unknown property can be of "any" type.
212
- */
213
- [property: string]: any;
214
- }
215
-
216
- /**
217
- * Error details.
218
- * @summary Error info.
219
- */
220
- export interface ErrorModel {
221
- /**
222
- * Error code identifying the specific error.
223
- */
224
- code: string;
225
- /**
226
- * A human readable error message.
227
- */
228
- message: string;
229
- /**
230
- * Error details
231
- */
232
- details?: ErrorDetails[];
233
- }
11
+ export type FacetUnion = Facet | FacetResult | FacetError;
234
12
 
235
- /**
236
- * An error response from the API.
237
- * @summary Error response.
238
- */
239
- export interface ErrorResponse {
240
- /**
241
- * Error information.
242
- */
243
- error: ErrorModel;
13
+ /** Describes a query to be executed. */
14
+ export interface QueryRequest {
15
+ /** Azure subscriptions against which to execute the query. */
16
+ subscriptions?: string[];
17
+ /** Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ] */
18
+ managementGroups?: string[];
19
+ /** The resources query. */
20
+ query: string;
21
+ /** The query evaluation options */
22
+ options?: QueryRequestOptions;
23
+ /** An array of facet requests to be computed against the query result. */
24
+ facets?: FacetRequest[];
244
25
  }
245
26
 
246
- /**
247
- * The options for query evaluation
248
- */
27
+ /** The options for query evaluation */
249
28
  export interface QueryRequestOptions {
250
- /**
251
- * Continuation token for pagination, capturing the next page size and offset, as well as the
252
- * context of the query.
253
- */
29
+ /** Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. */
254
30
  skipToken?: string;
255
- /**
256
- * The maximum number of rows that the query should return. Overrides the page size when
257
- * ```$skipToken``` property is present.
258
- */
31
+ /** The maximum number of rows that the query should return. Overrides the page size when ```$skipToken``` property is present. */
259
32
  top?: number;
260
- /**
261
- * The number of rows to skip from the beginning of the results. Overrides the next page offset
262
- * when ```$skipToken``` property is present.
263
- */
33
+ /** The number of rows to skip from the beginning of the results. Overrides the next page offset when ```$skipToken``` property is present. */
264
34
  skip?: number;
265
- /**
266
- * Defines in which format query result returned. Possible values include: 'table',
267
- * 'objectArray'. Default value: 'objectArray'.
268
- */
35
+ /** Defines in which format query result returned. */
269
36
  resultFormat?: ResultFormat;
270
- /**
271
- * Only applicable for tenant and management group level queries to decide whether to allow
272
- * partial scopes for result in case the number of subscriptions exceed allowed limits. Default
273
- * value: false.
274
- */
37
+ /** Only applicable for tenant and management group level queries to decide whether to allow partial scopes for result in case the number of subscriptions exceed allowed limits. */
275
38
  allowPartialScopes?: boolean;
39
+ /** Defines what level of authorization resources should be returned based on the which subscriptions and management groups are passed as scopes. */
40
+ authorizationScopeFilter?: AuthorizationScopeFilter;
276
41
  }
277
42
 
278
- /**
279
- * The options for facet evaluation
280
- */
281
- export interface FacetRequestOptions {
282
- /**
283
- * The column name or query expression to sort on. Defaults to count if not present.
284
- */
285
- sortBy?: string;
286
- /**
287
- * The sorting order by the selected column (count by default). Possible values include: 'asc',
288
- * 'desc'. Default value: 'desc'.
289
- */
290
- sortOrder?: FacetSortOrder;
291
- /**
292
- * Specifies the filter condition for the 'where' clause which will be run on main query's
293
- * result, just before the actual faceting.
294
- */
295
- filter?: string;
296
- /**
297
- * The maximum number of facet rows that should be returned.
298
- */
299
- top?: number;
300
- }
301
-
302
- /**
303
- * A request to compute additional statistics (facets) over the query results.
304
- */
43
+ /** A request to compute additional statistics (facets) over the query results. */
305
44
  export interface FacetRequest {
306
- /**
307
- * The column or list of columns to summarize by
308
- */
45
+ /** The column or list of columns to summarize by */
309
46
  expression: string;
310
- /**
311
- * The options for facet evaluation
312
- */
47
+ /** The options for facet evaluation */
313
48
  options?: FacetRequestOptions;
314
49
  }
315
50
 
316
- /**
317
- * Describes a query to be executed.
318
- */
319
- export interface QueryRequest {
320
- /**
321
- * Azure subscriptions against which to execute the query.
322
- */
323
- subscriptions?: string[];
324
- /**
325
- * Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ]
326
- */
327
- managementGroups?: string[];
328
- /**
329
- * The resources query.
330
- */
331
- query: string;
332
- /**
333
- * The query evaluation options
334
- */
335
- options?: QueryRequestOptions;
336
- /**
337
- * An array of facet requests to be computed against the query result.
338
- */
339
- facets?: FacetRequest[];
340
- }
341
-
342
- /**
343
- * Contains the possible cases for Facet.
344
- */
345
- export type FacetUnion = Facet | FacetResult | FacetError;
346
-
347
- /**
348
- * A facet containing additional statistics on the response of a query. Can be either FacetResult
349
- * or FacetError.
350
- */
351
- export interface Facet {
352
- /**
353
- * Polymorphic Discriminator
354
- */
355
- resultType: "Facet";
356
- /**
357
- * Facet expression, same as in the corresponding facet request.
358
- */
359
- expression: string;
51
+ /** The options for facet evaluation */
52
+ export interface FacetRequestOptions {
53
+ /** The column name or query expression to sort on. Defaults to count if not present. */
54
+ sortBy?: string;
55
+ /** The sorting order by the selected column (count by default). */
56
+ sortOrder?: FacetSortOrder;
57
+ /** Specifies the filter condition for the 'where' clause which will be run on main query's result, just before the actual faceting. */
58
+ filter?: string;
59
+ /** The maximum number of facet rows that should be returned. */
60
+ top?: number;
360
61
  }
361
62
 
362
- /**
363
- * Query result.
364
- */
63
+ /** Query result. */
365
64
  export interface QueryResponse {
366
- /**
367
- * Number of total records matching the query.
368
- */
65
+ /** Number of total records matching the query. */
369
66
  totalRecords: number;
370
- /**
371
- * Number of records returned in the current response. In the case of paging, this is the number
372
- * of records in the current page.
373
- */
67
+ /** Number of records returned in the current response. In the case of paging, this is the number of records in the current page. */
374
68
  count: number;
375
- /**
376
- * Indicates whether the query results are truncated. Possible values include: 'true', 'false'
377
- */
69
+ /** Indicates whether the query results are truncated. */
378
70
  resultTruncated: ResultTruncated;
379
- /**
380
- * When present, the value can be passed to a subsequent query call (together with the same query
381
- * and scopes used in the current request) to retrieve the next page of data.
382
- */
71
+ /** When present, the value can be passed to a subsequent query call (together with the same query and scopes used in the current request) to retrieve the next page of data. */
383
72
  skipToken?: string;
384
- /**
385
- * Query output in JObject array or Table format.
386
- */
387
- data: any;
388
- /**
389
- * Query facets.
390
- */
73
+ /** Query output in JObject array or Table format. */
74
+ data: Record<string, unknown>;
75
+ /** Query facets. */
391
76
  facets?: FacetUnion[];
392
77
  }
393
78
 
394
- /**
395
- * Query result column descriptor.
396
- */
397
- export interface Column {
398
- /**
399
- * Column name.
400
- */
401
- name: string;
402
- /**
403
- * Column data type. Possible values include: 'string', 'integer', 'number', 'boolean', 'object'
404
- */
405
- type: ColumnDataType;
79
+ /** A facet containing additional statistics on the response of a query. Can be either FacetResult or FacetError. */
80
+ export interface Facet {
81
+ /** Polymorphic discriminator, which specifies the different types this object can be */
82
+ resultType: "FacetResult" | "FacetError";
83
+ /** Facet expression, same as in the corresponding facet request. */
84
+ expression: string;
406
85
  }
407
86
 
408
- /**
409
- * Query output in tabular format.
410
- */
411
- export interface Table {
412
- /**
413
- * Query result column descriptors.
414
- */
415
- columns: Column[];
416
- /**
417
- * Query result rows.
418
- */
419
- rows: any[][];
87
+ /** An error response from the API. */
88
+ export interface ErrorResponse {
89
+ /** Error information. */
90
+ error: ErrorModel;
420
91
  }
421
92
 
422
- /**
423
- * Successfully executed facet containing additional statistics on the response of a query.
424
- */
425
- export interface FacetResult {
426
- /**
427
- * Polymorphic Discriminator
428
- */
429
- resultType: "FacetResult";
430
- /**
431
- * Facet expression, same as in the corresponding facet request.
432
- */
433
- expression: string;
434
- /**
435
- * Number of total records in the facet results.
436
- */
437
- totalRecords: number;
438
- /**
439
- * Number of records returned in the facet response.
440
- */
441
- count: number;
442
- /**
443
- * A JObject array or Table containing the desired facets. Only present if the facet is valid.
444
- */
445
- data: any;
93
+ /** Error details. */
94
+ export interface ErrorModel {
95
+ /** Error code identifying the specific error. */
96
+ code: string;
97
+ /** A human readable error message. */
98
+ message: string;
99
+ /** Error details */
100
+ details?: ErrorDetails[];
446
101
  }
447
102
 
448
- /**
449
- * A facet whose execution resulted in an error.
450
- */
451
- export interface FacetError {
452
- /**
453
- * Polymorphic Discriminator
454
- */
455
- resultType: "FacetError";
456
- /**
457
- * Facet expression, same as in the corresponding facet request.
458
- */
459
- expression: string;
460
- /**
461
- * An array containing detected facet errors with details.
462
- */
463
- errors: ErrorDetails[];
103
+ /** Error details. */
104
+ export interface ErrorDetails {
105
+ /** Describes unknown properties. The value of an unknown property can be of "any" type. */
106
+ [property: string]: any;
107
+ /** Error code identifying the specific error. */
108
+ code: string;
109
+ /** A human readable error message. */
110
+ message: string;
464
111
  }
465
112
 
466
- /**
467
- * Display metadata associated with the operation.
468
- */
469
- export interface OperationDisplay {
470
- /**
471
- * Service provider: Microsoft Resource Graph.
472
- */
473
- provider?: string;
474
- /**
475
- * Resource on which the operation is performed etc.
476
- */
477
- resource?: string;
478
- /**
479
- * Type of operation: get, read, delete, etc.
480
- */
481
- operation?: string;
482
- /**
483
- * Description for the operation.
484
- */
485
- description?: string;
113
+ /** Result of the request to list Resource Graph operations. It contains a list of operations and a URL link to get the next set of results. */
114
+ export interface OperationListResult {
115
+ /** List of Resource Graph operations supported by the Resource Graph resource provider. */
116
+ value?: Operation[];
486
117
  }
487
118
 
488
- /**
489
- * Resource Graph REST API operation definition.
490
- */
119
+ /** Resource Graph REST API operation definition. */
491
120
  export interface Operation {
492
- /**
493
- * Operation name: {provider}/{resource}/{operation}
494
- */
121
+ /** Operation name: {provider}/{resource}/{operation} */
495
122
  name?: string;
496
- /**
497
- * Display metadata associated with the operation.
498
- */
123
+ /** Display metadata associated with the operation. */
499
124
  display?: OperationDisplay;
500
- /**
501
- * The origin of operations.
502
- */
125
+ /** The origin of operations. */
503
126
  origin?: string;
504
127
  }
505
128
 
506
- /**
507
- * An interface representing ResourcesHistoryRequestOptions.
508
- */
509
- export interface ResourcesHistoryRequestOptions {
510
- interval?: DateTimeInterval;
511
- top?: number;
512
- skip?: number;
513
- skipToken?: string;
514
- /**
515
- * Possible values include: 'table', 'objectArray'
516
- */
517
- resultFormat?: ResultFormat1;
129
+ /** Display metadata associated with the operation. */
130
+ export interface OperationDisplay {
131
+ /** Service provider: Microsoft Resource Graph. */
132
+ provider?: string;
133
+ /** Resource on which the operation is performed etc. */
134
+ resource?: string;
135
+ /** Type of operation: get, read, delete, etc. */
136
+ operation?: string;
137
+ /** Description for the operation. */
138
+ description?: string;
518
139
  }
519
140
 
520
- /**
521
- * An interface representing ResourcesHistoryRequest.
522
- */
141
+ /** Describes a history request to be executed. */
523
142
  export interface ResourcesHistoryRequest {
143
+ /** Azure subscriptions against which to execute the query. */
524
144
  subscriptions?: string[];
145
+ /** The resources query. */
525
146
  query?: string;
147
+ /** The history request evaluation options */
526
148
  options?: ResourcesHistoryRequestOptions;
527
- managementGroupId?: string;
149
+ /** Azure management groups against which to execute the query. Example: [ 'mg1', 'mg2' ] */
150
+ managementGroups?: string[];
528
151
  }
529
152
 
530
- /**
531
- * An interface representing ResourceGraphClientOptions.
532
- */
533
- export interface ResourceGraphClientOptions extends AzureServiceClientOptions {
534
- baseUri?: string;
153
+ /** The options for history request evaluation */
154
+ export interface ResourcesHistoryRequestOptions {
155
+ /** The time interval used to fetch history. */
156
+ interval?: DateTimeInterval;
157
+ /** The maximum number of rows that the query should return. Overrides the page size when ```$skipToken``` property is present. */
158
+ top?: number;
159
+ /** The number of rows to skip from the beginning of the results. Overrides the next page offset when ```$skipToken``` property is present. */
160
+ skip?: number;
161
+ /** Continuation token for pagination, capturing the next page size and offset, as well as the context of the query. */
162
+ skipToken?: string;
163
+ /** Defines in which format query result returned. */
164
+ resultFormat?: ResultFormat;
535
165
  }
536
166
 
537
- /**
538
- * @interface
539
- * Result of the request to list Resource Graph operations. It contains a list of operations and a
540
- * URL link to get the next set of results.
541
- * @extends Array<Operation>
542
- */
543
- export interface OperationListResult extends Array<Operation> {}
167
+ /** An interval in time specifying the date and time for the inclusive start and exclusive end, i.e. `[start, end)`. */
168
+ export interface DateTimeInterval {
169
+ /** A datetime indicating the inclusive/closed start of the time interval, i.e. `[`**`start`**`, end)`. Specifying a `start` that occurs chronologically after `end` will result in an error. */
170
+ start: Date;
171
+ /** A datetime indicating the exclusive/open end of the time interval, i.e. `[start, `**`end`**`)`. Specifying an `end` that occurs chronologically before `start` will result in an error. */
172
+ end: Date;
173
+ }
544
174
 
545
- /**
546
- * Defines values for ChangeType.
547
- * Possible values include: 'Create', 'Update', 'Delete'
548
- * @readonly
549
- * @enum {string}
550
- */
551
- export type ChangeType = "Create" | "Update" | "Delete";
175
+ /** Query output in tabular format. */
176
+ export interface Table {
177
+ /** Query result column descriptors. */
178
+ columns: Column[];
179
+ /** Query result rows. */
180
+ rows: Record<string, unknown>[][];
181
+ }
552
182
 
553
- /**
554
- * Defines values for ChangeCategory.
555
- * Possible values include: 'User', 'System'
556
- * @readonly
557
- * @enum {string}
558
- */
559
- export type ChangeCategory = "User" | "System";
183
+ /** Query result column descriptor. */
184
+ export interface Column {
185
+ /** Column name. */
186
+ name: string;
187
+ /** Column data type. */
188
+ type: ColumnDataType;
189
+ }
560
190
 
561
- /**
562
- * Defines values for PropertyChangeType.
563
- * Possible values include: 'Insert', 'Update', 'Remove'
564
- * @readonly
565
- * @enum {string}
566
- */
567
- export type PropertyChangeType = "Insert" | "Update" | "Remove";
191
+ /** Successfully executed facet containing additional statistics on the response of a query. */
192
+ export type FacetResult = Facet & {
193
+ /** Polymorphic discriminator, which specifies the different types this object can be */
194
+ resultType: "FacetResult";
195
+ /** Number of total records in the facet results. */
196
+ totalRecords: number;
197
+ /** Number of records returned in the facet response. */
198
+ count: number;
199
+ /** A JObject array or Table containing the desired facets. Only present if the facet is valid. */
200
+ data: Record<string, unknown>;
201
+ };
568
202
 
569
- /**
570
- * Defines values for ResultFormat.
571
- * Possible values include: 'table', 'objectArray'
572
- * @readonly
573
- * @enum {string}
574
- */
203
+ /** A facet whose execution resulted in an error. */
204
+ export type FacetError = Facet & {
205
+ /** Polymorphic discriminator, which specifies the different types this object can be */
206
+ resultType: "FacetError";
207
+ /** An array containing detected facet errors with details. */
208
+ errors: ErrorDetails[];
209
+ };
210
+ /** Defines values for ResultFormat. */
575
211
  export type ResultFormat = "table" | "objectArray";
576
-
577
- /**
578
- * Defines values for FacetSortOrder.
579
- * Possible values include: 'asc', 'desc'
580
- * @readonly
581
- * @enum {string}
582
- */
212
+ /** Defines values for AuthorizationScopeFilter. */
213
+ export type AuthorizationScopeFilter =
214
+ | "AtScopeAndBelow"
215
+ | "AtScopeAndAbove"
216
+ | "AtScopeExact"
217
+ | "AtScopeAboveAndBelow";
218
+ /** Defines values for FacetSortOrder. */
583
219
  export type FacetSortOrder = "asc" | "desc";
584
-
585
- /**
586
- * Defines values for ResultTruncated.
587
- * Possible values include: 'true', 'false'
588
- * @readonly
589
- * @enum {string}
590
- */
220
+ /** Defines values for ResultTruncated. */
591
221
  export type ResultTruncated = "true" | "false";
592
-
593
- /**
594
- * Defines values for ColumnDataType.
595
- * Possible values include: 'string', 'integer', 'number', 'boolean', 'object'
596
- * @readonly
597
- * @enum {string}
598
- */
599
- export type ColumnDataType = "string" | "integer" | "number" | "boolean" | "object";
600
-
601
- /**
602
- * Defines values for ResultFormat1.
603
- * Possible values include: 'table', 'objectArray'
604
- * @readonly
605
- * @enum {string}
606
- */
607
- export type ResultFormat1 = "table" | "objectArray";
608
-
609
- /**
610
- * Contains response data for the resourceChanges operation.
611
- */
612
- export type ResourceChangesResponse = ResourceChangeList & {
613
- /**
614
- * The underlying HTTP response.
615
- */
616
- _response: msRest.HttpResponse & {
617
- /**
618
- * The response body as text (string format)
619
- */
620
- bodyAsText: string;
621
-
622
- /**
623
- * The response body as parsed JSON or XML
624
- */
625
- parsedBody: ResourceChangeList;
626
- };
627
- };
628
-
629
- /**
630
- * Contains response data for the resourceChangeDetails operation.
631
- */
632
- export type ResourceChangeDetailsResponse = Array<ResourceChangeData> & {
633
- /**
634
- * The underlying HTTP response.
635
- */
636
- _response: msRest.HttpResponse & {
637
- /**
638
- * The response body as text (string format)
639
- */
640
- bodyAsText: string;
641
-
642
- /**
643
- * The response body as parsed JSON or XML
644
- */
645
- parsedBody: ResourceChangeData[];
646
- };
647
- };
648
-
649
- /**
650
- * Contains response data for the resources operation.
651
- */
652
- export type ResourcesResponse = QueryResponse & {
653
- /**
654
- * The underlying HTTP response.
655
- */
656
- _response: msRest.HttpResponse & {
657
- /**
658
- * The response body as text (string format)
659
- */
660
- bodyAsText: string;
661
-
662
- /**
663
- * The response body as parsed JSON or XML
664
- */
665
- parsedBody: QueryResponse;
666
- };
667
- };
668
-
669
- /**
670
- * Contains response data for the resourcesHistory operation.
671
- */
672
- export type ResourcesHistoryResponse = {
673
- /**
674
- * The parsed response body.
675
- */
676
- body: any;
677
-
678
- /**
679
- * The underlying HTTP response.
680
- */
681
- _response: msRest.HttpResponse & {
682
- /**
683
- * The response body as text (string format)
684
- */
685
- bodyAsText: string;
686
-
687
- /**
688
- * The response body as parsed JSON or XML
689
- */
690
- parsedBody: any;
691
- };
692
- };
693
-
694
- /**
695
- * Contains response data for the list operation.
696
- */
697
- export type OperationsListResponse = OperationListResult & {
698
- /**
699
- * The underlying HTTP response.
700
- */
701
- _response: msRest.HttpResponse & {
702
- /**
703
- * The response body as text (string format)
704
- */
705
- bodyAsText: string;
706
-
707
- /**
708
- * The response body as parsed JSON or XML
709
- */
710
- parsedBody: OperationListResult;
711
- };
712
- };
222
+ /** Defines values for ColumnDataType. */
223
+ export type ColumnDataType =
224
+ | "string"
225
+ | "integer"
226
+ | "number"
227
+ | "boolean"
228
+ | "object"
229
+ | "datetime";
230
+
231
+ /** Optional parameters. */
232
+ export interface ResourcesOptionalParams extends coreClient.OperationOptions {}
233
+
234
+ /** Contains response data for the resources operation. */
235
+ export type ResourcesResponse = QueryResponse;
236
+
237
+ /** Optional parameters. */
238
+ export interface ResourcesHistoryOptionalParams
239
+ extends coreClient.OperationOptions {}
240
+
241
+ /** Contains response data for the resourcesHistory operation. */
242
+ export type ResourcesHistoryResponse = Record<string, unknown>;
243
+
244
+ /** Optional parameters. */
245
+ export interface OperationsListOptionalParams
246
+ extends coreClient.OperationOptions {}
247
+
248
+ /** Contains response data for the list operation. */
249
+ export type OperationsListResponse = OperationListResult;
250
+
251
+ /** Optional parameters. */
252
+ export interface ResourceGraphClientOptionalParams
253
+ extends coreClient.ServiceClientOptions {
254
+ /** server parameter */
255
+ $host?: string;
256
+ /** Api Version */
257
+ apiVersion?: string;
258
+ /** Overrides client endpoint. */
259
+ endpoint?: string;
260
+ }