@azure/arm-managementgroups 1.2.0 → 2.0.0-alpha.20211215.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 (173) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +72 -83
  4. package/dist/index.js +2881 -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 +6 -0
  9. package/dist-esm/src/index.d.ts.map +1 -0
  10. package/dist-esm/src/index.js +13 -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/managementGroupsAPI.d.ts +34 -0
  17. package/dist-esm/src/managementGroupsAPI.d.ts.map +1 -0
  18. package/dist-esm/src/managementGroupsAPI.js +102 -0
  19. package/dist-esm/src/managementGroupsAPI.js.map +1 -0
  20. package/dist-esm/src/managementGroupsAPIContext.d.ts +14 -0
  21. package/dist-esm/src/managementGroupsAPIContext.d.ts.map +1 -0
  22. package/dist-esm/src/managementGroupsAPIContext.js +43 -0
  23. package/dist-esm/src/managementGroupsAPIContext.js.map +1 -0
  24. package/dist-esm/src/models/index.d.ts +956 -0
  25. package/dist-esm/src/models/index.d.ts.map +1 -0
  26. package/dist-esm/src/models/index.js +46 -0
  27. package/dist-esm/src/models/index.js.map +1 -0
  28. package/dist-esm/src/models/mappers.d.ts +39 -0
  29. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  30. package/{esm → dist-esm/src}/models/mappers.js +776 -396
  31. package/dist-esm/src/models/mappers.js.map +1 -0
  32. package/dist-esm/src/models/parameters.d.ts +24 -0
  33. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  34. package/dist-esm/src/models/parameters.js +200 -0
  35. package/dist-esm/src/models/parameters.js.map +1 -0
  36. package/dist-esm/src/operations/entities.d.ts +34 -0
  37. package/dist-esm/src/operations/entities.d.ts.map +1 -0
  38. package/dist-esm/src/operations/entities.js +142 -0
  39. package/dist-esm/src/operations/entities.js.map +1 -0
  40. package/dist-esm/src/operations/hierarchySettingsOperations.d.ts +52 -0
  41. package/dist-esm/src/operations/hierarchySettingsOperations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/hierarchySettingsOperations.js +154 -0
  43. package/dist-esm/src/operations/hierarchySettingsOperations.js.map +1 -0
  44. package/{esm → dist-esm/src}/operations/index.d.ts +1 -0
  45. package/dist-esm/src/operations/index.d.ts.map +1 -0
  46. package/{esm → dist-esm/src}/operations/index.js +4 -5
  47. package/dist-esm/src/operations/index.js.map +1 -0
  48. package/dist-esm/src/operations/managementGroupSubscriptions.d.ts +62 -0
  49. package/dist-esm/src/operations/managementGroupSubscriptions.d.ts.map +1 -0
  50. package/dist-esm/src/operations/managementGroupSubscriptions.js +215 -0
  51. package/dist-esm/src/operations/managementGroupSubscriptions.js.map +1 -0
  52. package/dist-esm/src/operations/managementGroups.d.ts +109 -0
  53. package/dist-esm/src/operations/managementGroups.d.ts.map +1 -0
  54. package/dist-esm/src/operations/managementGroups.js +462 -0
  55. package/dist-esm/src/operations/managementGroups.js.map +1 -0
  56. package/dist-esm/src/operations/operations.d.ts +32 -0
  57. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  58. package/dist-esm/src/operations/operations.js +120 -0
  59. package/dist-esm/src/operations/operations.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/entities.d.ts +12 -0
  61. package/dist-esm/src/operationsInterfaces/entities.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/entities.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/entities.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.d.ts +44 -0
  65. package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/hierarchySettingsOperations.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
  69. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/index.js +13 -0
  71. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.d.ts +37 -0
  73. package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.d.ts.map +1 -0
  74. package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.js +9 -0
  75. package/dist-esm/src/operationsInterfaces/managementGroupSubscriptions.js.map +1 -0
  76. package/dist-esm/src/operationsInterfaces/managementGroups.d.ts +71 -0
  77. package/dist-esm/src/operationsInterfaces/managementGroups.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/managementGroups.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/managementGroups.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
  81. package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/operations.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
  84. package/dist-esm/test/sampleTest.d.ts +2 -0
  85. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  86. package/dist-esm/test/sampleTest.js +40 -0
  87. package/dist-esm/test/sampleTest.js.map +1 -0
  88. package/package.json +69 -24
  89. package/review/arm-managementgroups.api.md +667 -0
  90. package/rollup.config.js +184 -27
  91. package/src/index.ts +13 -0
  92. package/src/lroImpl.ts +34 -0
  93. package/src/managementGroupsAPI.ts +93 -130
  94. package/src/managementGroupsAPIContext.ts +45 -45
  95. package/src/models/index.ts +801 -1185
  96. package/src/models/mappers.ts +792 -400
  97. package/src/models/parameters.ts +130 -94
  98. package/src/operations/entities.ts +105 -79
  99. package/src/operations/hierarchySettingsOperations.ts +214 -0
  100. package/src/operations/index.ts +4 -5
  101. package/src/operations/managementGroupSubscriptions.ts +226 -72
  102. package/src/operations/managementGroups.ts +449 -222
  103. package/src/operations/operations.ts +84 -70
  104. package/src/operationsInterfaces/entities.ts +23 -0
  105. package/src/operationsInterfaces/hierarchySettingsOperations.ts +80 -0
  106. package/src/operationsInterfaces/index.ts +13 -0
  107. package/src/operationsInterfaces/managementGroupSubscriptions.ts +69 -0
  108. package/src/operationsInterfaces/managementGroups.ts +131 -0
  109. package/src/operationsInterfaces/operations.ts +22 -0
  110. package/tsconfig.json +4 -4
  111. package/types/arm-managementgroups.d.ts +1266 -0
  112. package/types/tsdoc-metadata.json +11 -0
  113. package/dist/arm-managementgroups.js +0 -2017
  114. package/dist/arm-managementgroups.js.map +0 -1
  115. package/dist/arm-managementgroups.min.js +0 -1
  116. package/dist/arm-managementgroups.min.js.map +0 -1
  117. package/esm/managementGroupsAPI.d.ts +0 -74
  118. package/esm/managementGroupsAPI.d.ts.map +0 -1
  119. package/esm/managementGroupsAPI.js +0 -120
  120. package/esm/managementGroupsAPI.js.map +0 -1
  121. package/esm/managementGroupsAPIContext.d.ts +0 -20
  122. package/esm/managementGroupsAPIContext.d.ts.map +0 -1
  123. package/esm/managementGroupsAPIContext.js +0 -56
  124. package/esm/managementGroupsAPIContext.js.map +0 -1
  125. package/esm/models/entitiesMappers.d.ts +0 -2
  126. package/esm/models/entitiesMappers.d.ts.map +0 -1
  127. package/esm/models/entitiesMappers.js +0 -11
  128. package/esm/models/entitiesMappers.js.map +0 -1
  129. package/esm/models/index.d.ts +0 -1390
  130. package/esm/models/index.d.ts.map +0 -1
  131. package/esm/models/index.js +0 -10
  132. package/esm/models/index.js.map +0 -1
  133. package/esm/models/managementGroupSubscriptionsMappers.d.ts +0 -2
  134. package/esm/models/managementGroupSubscriptionsMappers.d.ts.map +0 -1
  135. package/esm/models/managementGroupSubscriptionsMappers.js +0 -11
  136. package/esm/models/managementGroupSubscriptionsMappers.js.map +0 -1
  137. package/esm/models/managementGroupsMappers.d.ts +0 -2
  138. package/esm/models/managementGroupsMappers.d.ts.map +0 -1
  139. package/esm/models/managementGroupsMappers.js +0 -11
  140. package/esm/models/managementGroupsMappers.js.map +0 -1
  141. package/esm/models/mappers.d.ts +0 -28
  142. package/esm/models/mappers.d.ts.map +0 -1
  143. package/esm/models/mappers.js.map +0 -1
  144. package/esm/models/operationsMappers.d.ts +0 -2
  145. package/esm/models/operationsMappers.d.ts.map +0 -1
  146. package/esm/models/operationsMappers.js +0 -11
  147. package/esm/models/operationsMappers.js.map +0 -1
  148. package/esm/models/parameters.d.ts +0 -18
  149. package/esm/models/parameters.d.ts.map +0 -1
  150. package/esm/models/parameters.js +0 -194
  151. package/esm/models/parameters.js.map +0 -1
  152. package/esm/operations/entities.d.ts +0 -46
  153. package/esm/operations/entities.d.ts.map +0 -1
  154. package/esm/operations/entities.js +0 -87
  155. package/esm/operations/entities.js.map +0 -1
  156. package/esm/operations/index.d.ts.map +0 -1
  157. package/esm/operations/index.js.map +0 -1
  158. package/esm/operations/managementGroupSubscriptions.d.ts +0 -55
  159. package/esm/operations/managementGroupSubscriptions.d.ts.map +0 -1
  160. package/esm/operations/managementGroupSubscriptions.js +0 -85
  161. package/esm/operations/managementGroupSubscriptions.js.map +0 -1
  162. package/esm/operations/managementGroups.d.ts +0 -120
  163. package/esm/operations/managementGroups.d.ts.map +0 -1
  164. package/esm/operations/managementGroups.js +0 -252
  165. package/esm/operations/managementGroups.js.map +0 -1
  166. package/esm/operations/operations.d.ts +0 -46
  167. package/esm/operations/operations.d.ts.map +0 -1
  168. package/esm/operations/operations.js +0 -77
  169. package/esm/operations/operations.js.map +0 -1
  170. package/src/models/entitiesMappers.ts +0 -18
  171. package/src/models/managementGroupSubscriptionsMappers.ts +0 -15
  172. package/src/models/managementGroupsMappers.ts +0 -29
  173. package/src/models/operationsMappers.ts +0 -18
@@ -1,26 +1,33 @@
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/operationsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operations } 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
14
  import { ManagementGroupsAPIContext } from "../managementGroupsAPIContext";
15
+ import {
16
+ Operation,
17
+ OperationsListNextOptionalParams,
18
+ OperationsListOptionalParams,
19
+ OperationsListResponse,
20
+ OperationsListNextResponse
21
+ } from "../models";
16
22
 
17
- /** Class representing a Operations. */
18
- export class Operations {
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Operations operations. */
25
+ export class OperationsImpl implements Operations {
19
26
  private readonly client: ManagementGroupsAPIContext;
20
27
 
21
28
  /**
22
- * Create a Operations.
23
- * @param {ManagementGroupsAPIContext} client Reference to the service client.
29
+ * Initialize a new instance of the class Operations class.
30
+ * @param client Reference to the service client
24
31
  */
25
32
  constructor(client: ManagementGroupsAPIContext) {
26
33
  this.client = client;
@@ -28,68 +35,77 @@ export class Operations {
28
35
 
29
36
  /**
30
37
  * Lists all of the available Management REST API operations.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.OperationsListResponse>
38
+ * @param options The options parameters.
33
39
  */
34
- list(options?: msRest.RequestOptionsBase): Promise<Models.OperationsListResponse>;
35
- /**
36
- * @param callback The callback
37
- */
38
- list(callback: msRest.ServiceCallback<Models.OperationListResult>): void;
39
- /**
40
- * @param options The optional parameters
41
- * @param callback The callback
42
- */
43
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
44
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListResponse> {
45
- return this.client.sendOperationRequest(
46
- {
47
- options
40
+ public list(
41
+ options?: OperationsListOptionalParams
42
+ ): PagedAsyncIterableIterator<Operation> {
43
+ const iter = this.listPagingAll(options);
44
+ return {
45
+ next() {
46
+ return iter.next();
47
+ },
48
+ [Symbol.asyncIterator]() {
49
+ return this;
48
50
  },
49
- listOperationSpec,
50
- callback) as Promise<Models.OperationsListResponse>;
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: OperationsListOptionalParams
59
+ ): AsyncIterableIterator<Operation[]> {
60
+ let result = await this._list(options);
61
+ yield result.value || [];
62
+ let continuationToken = result.nextLink;
63
+ while (continuationToken) {
64
+ result = await this._listNext(continuationToken, options);
65
+ continuationToken = result.nextLink;
66
+ yield result.value || [];
67
+ }
68
+ }
69
+
70
+ private async *listPagingAll(
71
+ options?: OperationsListOptionalParams
72
+ ): AsyncIterableIterator<Operation> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
51
76
  }
52
77
 
53
78
  /**
54
79
  * Lists all of the available Management REST API operations.
55
- * @param nextPageLink The NextLink from the previous successful call to List operation.
56
- * @param [options] The optional parameters
57
- * @returns Promise<Models.OperationsListNextResponse>
58
- */
59
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
60
- /**
61
- * @param nextPageLink The NextLink from the previous successful call to List operation.
62
- * @param callback The callback
80
+ * @param options The options parameters.
63
81
  */
64
- listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
82
+ private _list(
83
+ options?: OperationsListOptionalParams
84
+ ): Promise<OperationsListResponse> {
85
+ return this.client.sendOperationRequest({ options }, listOperationSpec);
86
+ }
87
+
65
88
  /**
66
- * @param nextPageLink The NextLink from the previous successful call to List operation.
67
- * @param options The optional parameters
68
- * @param callback The callback
89
+ * ListNext
90
+ * @param nextLink The nextLink from the previous successful call to the List method.
91
+ * @param options The options parameters.
69
92
  */
70
- listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.OperationListResult>): void;
71
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationListResult>, callback?: msRest.ServiceCallback<Models.OperationListResult>): Promise<Models.OperationsListNextResponse> {
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: OperationsListNextOptionalParams
96
+ ): Promise<OperationsListNextResponse> {
72
97
  return this.client.sendOperationRequest(
73
- {
74
- nextPageLink,
75
- options
76
- },
77
- listNextOperationSpec,
78
- callback) as Promise<Models.OperationsListNextResponse>;
98
+ { nextLink, options },
99
+ listNextOperationSpec
100
+ );
79
101
  }
80
102
  }
81
-
82
103
  // Operation Specifications
83
- const serializer = new msRest.Serializer(Mappers);
84
- const listOperationSpec: msRest.OperationSpec = {
104
+ const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
105
+
106
+ const listOperationSpec: coreClient.OperationSpec = {
107
+ path: "/providers/Microsoft.Management/operations",
85
108
  httpMethod: "GET",
86
- path: "providers/Microsoft.Management/operations",
87
- queryParameters: [
88
- Parameters.apiVersion
89
- ],
90
- headerParameters: [
91
- Parameters.acceptLanguage
92
- ],
93
109
  responses: {
94
110
  200: {
95
111
  bodyMapper: Mappers.OperationListResult
@@ -98,19 +114,14 @@ const listOperationSpec: msRest.OperationSpec = {
98
114
  bodyMapper: Mappers.ErrorResponse
99
115
  }
100
116
  },
117
+ queryParameters: [Parameters.apiVersion],
118
+ urlParameters: [Parameters.$host],
119
+ headerParameters: [Parameters.accept],
101
120
  serializer
102
121
  };
103
-
104
- const listNextOperationSpec: msRest.OperationSpec = {
105
- httpMethod: "GET",
106
- baseUrl: "https://management.azure.com",
122
+ const listNextOperationSpec: coreClient.OperationSpec = {
107
123
  path: "{nextLink}",
108
- urlParameters: [
109
- Parameters.nextPageLink
110
- ],
111
- headerParameters: [
112
- Parameters.acceptLanguage
113
- ],
124
+ httpMethod: "GET",
114
125
  responses: {
115
126
  200: {
116
127
  bodyMapper: Mappers.OperationListResult
@@ -119,5 +130,8 @@ const listNextOperationSpec: msRest.OperationSpec = {
119
130
  bodyMapper: Mappers.ErrorResponse
120
131
  }
121
132
  },
133
+ queryParameters: [Parameters.apiVersion],
134
+ urlParameters: [Parameters.$host, Parameters.nextLink],
135
+ headerParameters: [Parameters.accept],
122
136
  serializer
123
137
  };
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { EntityInfo, EntitiesListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Entities. */
14
+ export interface Entities {
15
+ /**
16
+ * List all entities (Management Groups, Subscriptions, etc.) for the authenticated user.
17
+ *
18
+ * @param options The options parameters.
19
+ */
20
+ list(
21
+ options?: EntitiesListOptionalParams
22
+ ): PagedAsyncIterableIterator<EntityInfo>;
23
+ }
@@ -0,0 +1,80 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import {
10
+ HierarchySettingsListOptionalParams,
11
+ HierarchySettingsListResponse,
12
+ HierarchySettingsGetOptionalParams,
13
+ HierarchySettingsGetResponse,
14
+ CreateOrUpdateSettingsRequest,
15
+ HierarchySettingsCreateOrUpdateOptionalParams,
16
+ HierarchySettingsCreateOrUpdateResponse,
17
+ HierarchySettingsUpdateOptionalParams,
18
+ HierarchySettingsUpdateResponse,
19
+ HierarchySettingsDeleteOptionalParams
20
+ } from "../models";
21
+
22
+ /** Interface representing a HierarchySettingsOperations. */
23
+ export interface HierarchySettingsOperations {
24
+ /**
25
+ * Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on
26
+ * the root Management Group of the hierarchy.
27
+ *
28
+ * @param groupId Management Group ID.
29
+ * @param options The options parameters.
30
+ */
31
+ list(
32
+ groupId: string,
33
+ options?: HierarchySettingsListOptionalParams
34
+ ): Promise<HierarchySettingsListResponse>;
35
+ /**
36
+ * Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the
37
+ * root Management Group of the hierarchy.
38
+ *
39
+ * @param groupId Management Group ID.
40
+ * @param options The options parameters.
41
+ */
42
+ get(
43
+ groupId: string,
44
+ options?: HierarchySettingsGetOptionalParams
45
+ ): Promise<HierarchySettingsGetResponse>;
46
+ /**
47
+ * Creates or updates the hierarchy settings defined at the Management Group level.
48
+ *
49
+ * @param groupId Management Group ID.
50
+ * @param createTenantSettingsRequest Tenant level settings request parameter.
51
+ * @param options The options parameters.
52
+ */
53
+ createOrUpdate(
54
+ groupId: string,
55
+ createTenantSettingsRequest: CreateOrUpdateSettingsRequest,
56
+ options?: HierarchySettingsCreateOrUpdateOptionalParams
57
+ ): Promise<HierarchySettingsCreateOrUpdateResponse>;
58
+ /**
59
+ * Updates the hierarchy settings defined at the Management Group level.
60
+ *
61
+ * @param groupId Management Group ID.
62
+ * @param createTenantSettingsRequest Tenant level settings request parameter.
63
+ * @param options The options parameters.
64
+ */
65
+ update(
66
+ groupId: string,
67
+ createTenantSettingsRequest: CreateOrUpdateSettingsRequest,
68
+ options?: HierarchySettingsUpdateOptionalParams
69
+ ): Promise<HierarchySettingsUpdateResponse>;
70
+ /**
71
+ * Deletes the hierarchy settings defined at the Management Group level.
72
+ *
73
+ * @param groupId Management Group ID.
74
+ * @param options The options parameters.
75
+ */
76
+ delete(
77
+ groupId: string,
78
+ options?: HierarchySettingsDeleteOptionalParams
79
+ ): Promise<void>;
80
+ }
@@ -0,0 +1,13 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ export * from "./managementGroups";
10
+ export * from "./managementGroupSubscriptions";
11
+ export * from "./hierarchySettingsOperations";
12
+ export * from "./operations";
13
+ export * from "./entities";
@@ -0,0 +1,69 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import {
11
+ SubscriptionUnderManagementGroup,
12
+ ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupOptionalParams,
13
+ ManagementGroupSubscriptionsCreateOptionalParams,
14
+ ManagementGroupSubscriptionsCreateResponse,
15
+ ManagementGroupSubscriptionsDeleteOptionalParams,
16
+ ManagementGroupSubscriptionsGetSubscriptionOptionalParams,
17
+ ManagementGroupSubscriptionsGetSubscriptionResponse
18
+ } from "../models";
19
+
20
+ /// <reference lib="esnext.asynciterable" />
21
+ /** Interface representing a ManagementGroupSubscriptions. */
22
+ export interface ManagementGroupSubscriptions {
23
+ /**
24
+ * Retrieves details about all subscriptions which are associated with the management group.
25
+ *
26
+ * @param groupId Management Group ID.
27
+ * @param options The options parameters.
28
+ */
29
+ listSubscriptionsUnderManagementGroup(
30
+ groupId: string,
31
+ options?: ManagementGroupSubscriptionsGetSubscriptionsUnderManagementGroupOptionalParams
32
+ ): PagedAsyncIterableIterator<SubscriptionUnderManagementGroup>;
33
+ /**
34
+ * Associates existing subscription with the management group.
35
+ *
36
+ * @param groupId Management Group ID.
37
+ * @param subscriptionId Subscription ID.
38
+ * @param options The options parameters.
39
+ */
40
+ create(
41
+ groupId: string,
42
+ subscriptionId: string,
43
+ options?: ManagementGroupSubscriptionsCreateOptionalParams
44
+ ): Promise<ManagementGroupSubscriptionsCreateResponse>;
45
+ /**
46
+ * De-associates subscription from the management group.
47
+ *
48
+ * @param groupId Management Group ID.
49
+ * @param subscriptionId Subscription ID.
50
+ * @param options The options parameters.
51
+ */
52
+ delete(
53
+ groupId: string,
54
+ subscriptionId: string,
55
+ options?: ManagementGroupSubscriptionsDeleteOptionalParams
56
+ ): Promise<void>;
57
+ /**
58
+ * Retrieves details about given subscription which is associated with the management group.
59
+ *
60
+ * @param groupId Management Group ID.
61
+ * @param subscriptionId Subscription ID.
62
+ * @param options The options parameters.
63
+ */
64
+ getSubscription(
65
+ groupId: string,
66
+ subscriptionId: string,
67
+ options?: ManagementGroupSubscriptionsGetSubscriptionOptionalParams
68
+ ): Promise<ManagementGroupSubscriptionsGetSubscriptionResponse>;
69
+ }
@@ -0,0 +1,131 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { PollerLike, PollOperationState } from "@azure/core-lro";
11
+ import {
12
+ ManagementGroupInfo,
13
+ ManagementGroupsListOptionalParams,
14
+ DescendantInfo,
15
+ ManagementGroupsGetDescendantsOptionalParams,
16
+ ManagementGroupsGetOptionalParams,
17
+ ManagementGroupsGetResponse,
18
+ CreateManagementGroupRequest,
19
+ ManagementGroupsCreateOrUpdateOptionalParams,
20
+ ManagementGroupsCreateOrUpdateResponse,
21
+ PatchManagementGroupRequest,
22
+ ManagementGroupsUpdateOptionalParams,
23
+ ManagementGroupsUpdateResponse,
24
+ ManagementGroupsDeleteOptionalParams,
25
+ ManagementGroupsDeleteResponse
26
+ } from "../models";
27
+
28
+ /// <reference lib="esnext.asynciterable" />
29
+ /** Interface representing a ManagementGroups. */
30
+ export interface ManagementGroups {
31
+ /**
32
+ * List management groups for the authenticated user.
33
+ *
34
+ * @param options The options parameters.
35
+ */
36
+ list(
37
+ options?: ManagementGroupsListOptionalParams
38
+ ): PagedAsyncIterableIterator<ManagementGroupInfo>;
39
+ /**
40
+ * List all entities that descend from a management group.
41
+ *
42
+ * @param groupId Management Group ID.
43
+ * @param options The options parameters.
44
+ */
45
+ listDescendants(
46
+ groupId: string,
47
+ options?: ManagementGroupsGetDescendantsOptionalParams
48
+ ): PagedAsyncIterableIterator<DescendantInfo>;
49
+ /**
50
+ * Get the details of the management group.
51
+ *
52
+ * @param groupId Management Group ID.
53
+ * @param options The options parameters.
54
+ */
55
+ get(
56
+ groupId: string,
57
+ options?: ManagementGroupsGetOptionalParams
58
+ ): Promise<ManagementGroupsGetResponse>;
59
+ /**
60
+ * Create or update a management group.
61
+ * If a management group is already created and a subsequent create request is issued with different
62
+ * properties, the management group properties will be updated.
63
+ *
64
+ * @param groupId Management Group ID.
65
+ * @param createManagementGroupRequest Management group creation parameters.
66
+ * @param options The options parameters.
67
+ */
68
+ beginCreateOrUpdate(
69
+ groupId: string,
70
+ createManagementGroupRequest: CreateManagementGroupRequest,
71
+ options?: ManagementGroupsCreateOrUpdateOptionalParams
72
+ ): Promise<
73
+ PollerLike<
74
+ PollOperationState<ManagementGroupsCreateOrUpdateResponse>,
75
+ ManagementGroupsCreateOrUpdateResponse
76
+ >
77
+ >;
78
+ /**
79
+ * Create or update a management group.
80
+ * If a management group is already created and a subsequent create request is issued with different
81
+ * properties, the management group properties will be updated.
82
+ *
83
+ * @param groupId Management Group ID.
84
+ * @param createManagementGroupRequest Management group creation parameters.
85
+ * @param options The options parameters.
86
+ */
87
+ beginCreateOrUpdateAndWait(
88
+ groupId: string,
89
+ createManagementGroupRequest: CreateManagementGroupRequest,
90
+ options?: ManagementGroupsCreateOrUpdateOptionalParams
91
+ ): Promise<ManagementGroupsCreateOrUpdateResponse>;
92
+ /**
93
+ * Update a management group.
94
+ *
95
+ * @param groupId Management Group ID.
96
+ * @param patchGroupRequest Management group patch parameters.
97
+ * @param options The options parameters.
98
+ */
99
+ update(
100
+ groupId: string,
101
+ patchGroupRequest: PatchManagementGroupRequest,
102
+ options?: ManagementGroupsUpdateOptionalParams
103
+ ): Promise<ManagementGroupsUpdateResponse>;
104
+ /**
105
+ * Delete management group.
106
+ * If a management group contains child resources, the request will fail.
107
+ *
108
+ * @param groupId Management Group ID.
109
+ * @param options The options parameters.
110
+ */
111
+ beginDelete(
112
+ groupId: string,
113
+ options?: ManagementGroupsDeleteOptionalParams
114
+ ): Promise<
115
+ PollerLike<
116
+ PollOperationState<ManagementGroupsDeleteResponse>,
117
+ ManagementGroupsDeleteResponse
118
+ >
119
+ >;
120
+ /**
121
+ * Delete management group.
122
+ * If a management group contains child resources, the request will fail.
123
+ *
124
+ * @param groupId Management Group ID.
125
+ * @param options The options parameters.
126
+ */
127
+ beginDeleteAndWait(
128
+ groupId: string,
129
+ options?: ManagementGroupsDeleteOptionalParams
130
+ ): Promise<ManagementGroupsDeleteResponse>;
131
+ }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Copyright (c) Microsoft Corporation.
3
+ * Licensed under the MIT License.
4
+ *
5
+ * Code generated by Microsoft (R) AutoRest Code Generator.
6
+ * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
+ */
8
+
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Operation, OperationsListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Operations. */
14
+ export interface Operations {
15
+ /**
16
+ * Lists all of the available Management REST API operations.
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: OperationsListOptionalParams
21
+ ): PagedAsyncIterableIterator<Operation>;
22
+ }
package/tsconfig.json CHANGED
@@ -3,17 +3,17 @@
3
3
  "module": "es6",
4
4
  "moduleResolution": "node",
5
5
  "strict": true,
6
- "target": "es5",
6
+ "target": "es6",
7
7
  "sourceMap": true,
8
8
  "declarationMap": true,
9
9
  "esModuleInterop": true,
10
10
  "allowSyntheticDefaultImports": true,
11
11
  "forceConsistentCasingInFileNames": true,
12
- "lib": ["es6"],
12
+ "lib": ["es6", "dom"],
13
13
  "declaration": true,
14
- "outDir": "./esm",
14
+ "outDir": "./dist-esm",
15
15
  "importHelpers": true
16
16
  },
17
- "include": ["./src/**/*.ts"],
17
+ "include": ["./src/**/*.ts", "./test/**/*.ts"],
18
18
  "exclude": ["node_modules"]
19
19
  }