@azure/arm-subscriptions 3.1.2 → 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 (199) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/{LICENSE.txt → LICENSE} +2 -2
  3. package/README.md +69 -79
  4. package/dist/index.js +2330 -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 +658 -0
  17. package/dist-esm/src/models/index.d.ts.map +1 -0
  18. package/dist-esm/src/models/index.js +36 -0
  19. package/dist-esm/src/models/index.js.map +1 -0
  20. package/dist-esm/src/models/mappers.d.ts +36 -0
  21. package/dist-esm/src/models/mappers.d.ts.map +1 -0
  22. package/dist-esm/src/models/mappers.js +1057 -0
  23. package/dist-esm/src/models/mappers.js.map +1 -0
  24. package/dist-esm/src/models/parameters.d.ts +15 -0
  25. package/dist-esm/src/models/parameters.d.ts.map +1 -0
  26. package/dist-esm/src/models/parameters.js +121 -0
  27. package/dist-esm/src/models/parameters.js.map +1 -0
  28. package/dist-esm/src/operations/alias.d.ts +53 -0
  29. package/dist-esm/src/operations/alias.d.ts.map +1 -0
  30. package/dist-esm/src/operations/alias.js +180 -0
  31. package/dist-esm/src/operations/alias.js.map +1 -0
  32. package/dist-esm/src/operations/billingAccount.d.ts +19 -0
  33. package/dist-esm/src/operations/billingAccount.d.ts.map +1 -0
  34. package/dist-esm/src/operations/billingAccount.js +47 -0
  35. package/dist-esm/src/operations/billingAccount.js.map +1 -0
  36. package/{esm → dist-esm/src}/operations/index.d.ts +2 -0
  37. package/dist-esm/src/operations/index.d.ts.map +1 -0
  38. package/{esm → dist-esm/src}/operations/index.js +5 -5
  39. package/dist-esm/src/operations/index.js.map +1 -0
  40. package/dist-esm/src/operations/operations.d.ts +32 -0
  41. package/dist-esm/src/operations/operations.d.ts.map +1 -0
  42. package/dist-esm/src/operations/operations.js +120 -0
  43. package/dist-esm/src/operations/operations.js.map +1 -0
  44. package/dist-esm/src/operations/subscriptionOperations.d.ts +53 -0
  45. package/dist-esm/src/operations/subscriptionOperations.d.ts.map +1 -0
  46. package/dist-esm/src/operations/subscriptionOperations.js +201 -0
  47. package/dist-esm/src/operations/subscriptionOperations.js.map +1 -0
  48. package/dist-esm/src/operations/subscriptionPolicy.d.ts +43 -0
  49. package/dist-esm/src/operations/subscriptionPolicy.d.ts.map +1 -0
  50. package/dist-esm/src/operations/subscriptionPolicy.js +169 -0
  51. package/dist-esm/src/operations/subscriptionPolicy.js.map +1 -0
  52. package/dist-esm/src/operations/subscriptions.d.ts +54 -0
  53. package/dist-esm/src/operations/subscriptions.d.ts.map +1 -0
  54. package/dist-esm/src/operations/subscriptions.js +201 -0
  55. package/dist-esm/src/operations/subscriptions.js.map +1 -0
  56. package/dist-esm/src/operations/tenants.d.ts +32 -0
  57. package/dist-esm/src/operations/tenants.d.ts.map +1 -0
  58. package/dist-esm/src/operations/tenants.js +114 -0
  59. package/dist-esm/src/operations/tenants.js.map +1 -0
  60. package/dist-esm/src/operationsInterfaces/alias.d.ts +45 -0
  61. package/dist-esm/src/operationsInterfaces/alias.d.ts.map +1 -0
  62. package/dist-esm/src/operationsInterfaces/alias.js +9 -0
  63. package/dist-esm/src/operationsInterfaces/alias.js.map +1 -0
  64. package/dist-esm/src/operationsInterfaces/billingAccount.d.ts +11 -0
  65. package/dist-esm/src/operationsInterfaces/billingAccount.d.ts.map +1 -0
  66. package/dist-esm/src/operationsInterfaces/billingAccount.js +9 -0
  67. package/dist-esm/src/operationsInterfaces/billingAccount.js.map +1 -0
  68. package/dist-esm/src/operationsInterfaces/index.d.ts +8 -0
  69. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
  70. package/dist-esm/src/operationsInterfaces/index.js +15 -0
  71. package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
  72. package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -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/subscriptionOperations.d.ts +45 -0
  77. package/dist-esm/src/operationsInterfaces/subscriptionOperations.d.ts.map +1 -0
  78. package/dist-esm/src/operationsInterfaces/subscriptionOperations.js +9 -0
  79. package/dist-esm/src/operationsInterfaces/subscriptionOperations.js.map +1 -0
  80. package/dist-esm/src/operationsInterfaces/subscriptionPolicy.d.ts +22 -0
  81. package/dist-esm/src/operationsInterfaces/subscriptionPolicy.d.ts.map +1 -0
  82. package/dist-esm/src/operationsInterfaces/subscriptionPolicy.js +9 -0
  83. package/dist-esm/src/operationsInterfaces/subscriptionPolicy.js.map +1 -0
  84. package/dist-esm/src/operationsInterfaces/subscriptions.d.ts +24 -0
  85. package/dist-esm/src/operationsInterfaces/subscriptions.d.ts.map +1 -0
  86. package/dist-esm/src/operationsInterfaces/subscriptions.js +9 -0
  87. package/dist-esm/src/operationsInterfaces/subscriptions.js.map +1 -0
  88. package/dist-esm/src/operationsInterfaces/tenants.d.ts +11 -0
  89. package/dist-esm/src/operationsInterfaces/tenants.d.ts.map +1 -0
  90. package/dist-esm/src/operationsInterfaces/tenants.js +9 -0
  91. package/dist-esm/src/operationsInterfaces/tenants.js.map +1 -0
  92. package/dist-esm/src/subscriptionClient.d.ts +21 -0
  93. package/dist-esm/src/subscriptionClient.d.ts.map +1 -0
  94. package/dist-esm/src/subscriptionClient.js +50 -0
  95. package/dist-esm/src/subscriptionClient.js.map +1 -0
  96. package/dist-esm/test/sampleTest.d.ts +2 -0
  97. package/dist-esm/test/sampleTest.d.ts.map +1 -0
  98. package/dist-esm/test/sampleTest.js +40 -0
  99. package/dist-esm/test/sampleTest.js.map +1 -0
  100. package/package.json +65 -32
  101. package/review/arm-subscriptions.api.md +559 -0
  102. package/rollup.config.js +181 -30
  103. package/src/index.ts +12 -0
  104. package/src/lroImpl.ts +34 -0
  105. package/src/models/index.ts +551 -489
  106. package/src/models/mappers.ts +685 -190
  107. package/src/models/parameters.ts +94 -27
  108. package/src/operations/alias.ts +170 -170
  109. package/src/operations/billingAccount.ts +65 -0
  110. package/src/operations/index.ts +5 -5
  111. package/src/operations/operations.ts +103 -40
  112. package/src/operations/subscriptionOperations.ts +216 -120
  113. package/src/operations/subscriptionPolicy.ts +207 -0
  114. package/src/operations/subscriptions.ts +163 -153
  115. package/src/operations/tenants.ts +87 -79
  116. package/src/operationsInterfaces/alias.ts +75 -0
  117. package/src/operationsInterfaces/billingAccount.ts +25 -0
  118. package/src/operationsInterfaces/index.ts +15 -0
  119. package/src/operationsInterfaces/operations.ts +22 -0
  120. package/src/operationsInterfaces/subscriptionOperations.ts +92 -0
  121. package/src/operationsInterfaces/subscriptionPolicy.ts +46 -0
  122. package/src/operationsInterfaces/subscriptions.ts +48 -0
  123. package/src/operationsInterfaces/tenants.ts +22 -0
  124. package/src/subscriptionClient.ts +81 -43
  125. package/tsconfig.json +3 -3
  126. package/types/arm-subscriptions.d.ts +925 -0
  127. package/types/tsdoc-metadata.json +11 -0
  128. package/dist/arm-subscriptions.js +0 -1442
  129. package/dist/arm-subscriptions.js.map +0 -1
  130. package/dist/arm-subscriptions.min.js +0 -1
  131. package/dist/arm-subscriptions.min.js.map +0 -1
  132. package/esm/models/aliasMappers.d.ts +0 -2
  133. package/esm/models/aliasMappers.d.ts.map +0 -1
  134. package/esm/models/aliasMappers.js +0 -9
  135. package/esm/models/aliasMappers.js.map +0 -1
  136. package/esm/models/index.d.ts +0 -624
  137. package/esm/models/index.d.ts.map +0 -1
  138. package/esm/models/index.js +0 -8
  139. package/esm/models/index.js.map +0 -1
  140. package/esm/models/mappers.d.ts +0 -25
  141. package/esm/models/mappers.d.ts.map +0 -1
  142. package/esm/models/mappers.js +0 -574
  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 -9
  147. package/esm/models/operationsMappers.js.map +0 -1
  148. package/esm/models/parameters.d.ts +0 -8
  149. package/esm/models/parameters.d.ts.map +0 -1
  150. package/esm/models/parameters.js +0 -75
  151. package/esm/models/parameters.js.map +0 -1
  152. package/esm/models/subscriptionOperationsMappers.d.ts +0 -2
  153. package/esm/models/subscriptionOperationsMappers.d.ts.map +0 -1
  154. package/esm/models/subscriptionOperationsMappers.js +0 -9
  155. package/esm/models/subscriptionOperationsMappers.js.map +0 -1
  156. package/esm/models/subscriptionsMappers.d.ts +0 -2
  157. package/esm/models/subscriptionsMappers.d.ts.map +0 -1
  158. package/esm/models/subscriptionsMappers.js +0 -9
  159. package/esm/models/subscriptionsMappers.js.map +0 -1
  160. package/esm/models/tenantsMappers.d.ts +0 -2
  161. package/esm/models/tenantsMappers.d.ts.map +0 -1
  162. package/esm/models/tenantsMappers.js +0 -9
  163. package/esm/models/tenantsMappers.js.map +0 -1
  164. package/esm/operations/alias.d.ts +0 -81
  165. package/esm/operations/alias.d.ts.map +0 -1
  166. package/esm/operations/alias.js +0 -161
  167. package/esm/operations/alias.js.map +0 -1
  168. package/esm/operations/index.d.ts.map +0 -1
  169. package/esm/operations/index.js.map +0 -1
  170. package/esm/operations/operations.d.ts +0 -28
  171. package/esm/operations/operations.d.ts.map +0 -1
  172. package/esm/operations/operations.js +0 -51
  173. package/esm/operations/operations.js.map +0 -1
  174. package/esm/operations/subscriptionOperations.d.ts +0 -70
  175. package/esm/operations/subscriptionOperations.d.ts.map +0 -1
  176. package/esm/operations/subscriptionOperations.js +0 -117
  177. package/esm/operations/subscriptionOperations.js.map +0 -1
  178. package/esm/operations/subscriptions.d.ts +0 -84
  179. package/esm/operations/subscriptions.d.ts.map +0 -1
  180. package/esm/operations/subscriptions.js +0 -133
  181. package/esm/operations/subscriptions.js.map +0 -1
  182. package/esm/operations/tenants.d.ts +0 -46
  183. package/esm/operations/tenants.d.ts.map +0 -1
  184. package/esm/operations/tenants.js +0 -77
  185. package/esm/operations/tenants.js.map +0 -1
  186. package/esm/subscriptionClient.d.ts +0 -27
  187. package/esm/subscriptionClient.d.ts.map +0 -1
  188. package/esm/subscriptionClient.js +0 -41
  189. package/esm/subscriptionClient.js.map +0 -1
  190. package/esm/subscriptionClientContext.d.ts +0 -19
  191. package/esm/subscriptionClientContext.d.ts.map +0 -1
  192. package/esm/subscriptionClientContext.js +0 -55
  193. package/esm/subscriptionClientContext.js.map +0 -1
  194. package/src/models/aliasMappers.ts +0 -18
  195. package/src/models/operationsMappers.ts +0 -14
  196. package/src/models/subscriptionOperationsMappers.ts +0 -15
  197. package/src/models/subscriptionsMappers.ts +0 -16
  198. package/src/models/tenantsMappers.ts +0 -13
  199. package/src/subscriptionClientContext.ts +0 -60
@@ -1,123 +1,131 @@
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/tenantsMappers";
9
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
+ import { Tenants } 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 { SubscriptionClientContext } from "../subscriptionClientContext";
14
+ import { SubscriptionClient } from "../subscriptionClient";
15
+ import {
16
+ TenantIdDescription,
17
+ TenantsListNextOptionalParams,
18
+ TenantsListOptionalParams,
19
+ TenantsListResponse,
20
+ TenantsListNextResponse
21
+ } from "../models";
16
22
 
17
- /** Class representing a Tenants. */
18
- export class Tenants {
19
- private readonly client: SubscriptionClientContext;
23
+ /// <reference lib="esnext.asynciterable" />
24
+ /** Class containing Tenants operations. */
25
+ export class TenantsImpl implements Tenants {
26
+ private readonly client: SubscriptionClient;
20
27
 
21
28
  /**
22
- * Create a Tenants.
23
- * @param {SubscriptionClientContext} client Reference to the service client.
29
+ * Initialize a new instance of the class Tenants class.
30
+ * @param client Reference to the service client
24
31
  */
25
- constructor(client: SubscriptionClientContext) {
32
+ constructor(client: SubscriptionClient) {
26
33
  this.client = client;
27
34
  }
28
35
 
29
36
  /**
30
37
  * Gets the tenants for your account.
31
- * @param [options] The optional parameters
32
- * @returns Promise<Models.TenantsListResponse>
38
+ * @param options The options parameters.
33
39
  */
34
- list(options?: msRest.RequestOptionsBase): Promise<Models.TenantsListResponse>;
35
- /**
36
- * @param callback The callback
37
- */
38
- list(callback: msRest.ServiceCallback<Models.TenantListResult>): void;
39
- /**
40
- * @param options The optional parameters
41
- * @param callback The callback
42
- */
43
- list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.TenantListResult>): void;
44
- list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.TenantListResult>, callback?: msRest.ServiceCallback<Models.TenantListResult>): Promise<Models.TenantsListResponse> {
45
- return this.client.sendOperationRequest(
46
- {
47
- options
40
+ public list(
41
+ options?: TenantsListOptionalParams
42
+ ): PagedAsyncIterableIterator<TenantIdDescription> {
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.TenantsListResponse>;
51
+ byPage: () => {
52
+ return this.listPagingPage(options);
53
+ }
54
+ };
55
+ }
56
+
57
+ private async *listPagingPage(
58
+ options?: TenantsListOptionalParams
59
+ ): AsyncIterableIterator<TenantIdDescription[]> {
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?: TenantsListOptionalParams
72
+ ): AsyncIterableIterator<TenantIdDescription> {
73
+ for await (const page of this.listPagingPage(options)) {
74
+ yield* page;
75
+ }
51
76
  }
52
77
 
53
78
  /**
54
79
  * Gets the tenants for your account.
55
- * @param nextPageLink The NextLink from the previous successful call to List operation.
56
- * @param [options] The optional parameters
57
- * @returns Promise<Models.TenantsListNextResponse>
58
- */
59
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.TenantsListNextResponse>;
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.TenantListResult>): void;
82
+ private _list(
83
+ options?: TenantsListOptionalParams
84
+ ): Promise<TenantsListResponse> {
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.TenantListResult>): void;
71
- listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.TenantListResult>, callback?: msRest.ServiceCallback<Models.TenantListResult>): Promise<Models.TenantsListNextResponse> {
93
+ private _listNext(
94
+ nextLink: string,
95
+ options?: TenantsListNextOptionalParams
96
+ ): Promise<TenantsListNextResponse> {
72
97
  return this.client.sendOperationRequest(
73
- {
74
- nextPageLink,
75
- options
76
- },
77
- listNextOperationSpec,
78
- callback) as Promise<Models.TenantsListNextResponse>;
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: "/tenants",
85
108
  httpMethod: "GET",
86
- path: "tenants",
87
- queryParameters: [
88
- Parameters.apiVersion0
89
- ],
90
- headerParameters: [
91
- Parameters.acceptLanguage
92
- ],
93
109
  responses: {
94
110
  200: {
95
111
  bodyMapper: Mappers.TenantListResult
96
- },
97
- default: {
98
- bodyMapper: Mappers.CloudError
99
112
  }
100
113
  },
114
+ queryParameters: [Parameters.apiVersion],
115
+ urlParameters: [Parameters.$host],
116
+ headerParameters: [Parameters.accept],
101
117
  serializer
102
118
  };
103
-
104
- const listNextOperationSpec: msRest.OperationSpec = {
105
- httpMethod: "GET",
106
- baseUrl: "https://management.azure.com",
119
+ const listNextOperationSpec: coreClient.OperationSpec = {
107
120
  path: "{nextLink}",
108
- urlParameters: [
109
- Parameters.nextPageLink
110
- ],
111
- headerParameters: [
112
- Parameters.acceptLanguage
113
- ],
121
+ httpMethod: "GET",
114
122
  responses: {
115
123
  200: {
116
124
  bodyMapper: Mappers.TenantListResult
117
- },
118
- default: {
119
- bodyMapper: Mappers.CloudError
120
125
  }
121
126
  },
127
+ queryParameters: [Parameters.apiVersion],
128
+ urlParameters: [Parameters.$host, Parameters.nextLink],
129
+ headerParameters: [Parameters.accept],
122
130
  serializer
123
131
  };
@@ -0,0 +1,75 @@
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 { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import {
11
+ PutAliasRequest,
12
+ AliasCreateOptionalParams,
13
+ AliasCreateResponse,
14
+ AliasGetOptionalParams,
15
+ AliasGetResponse,
16
+ AliasDeleteOptionalParams,
17
+ AliasListOptionalParams,
18
+ AliasListResponse
19
+ } from "../models";
20
+
21
+ /** Interface representing a Alias. */
22
+ export interface Alias {
23
+ /**
24
+ * Create Alias Subscription.
25
+ * @param aliasName AliasName is the name for the subscription creation request. Note that this is not
26
+ * the same as subscription name and this doesn’t have any other lifecycle need beyond the request for
27
+ * subscription creation.
28
+ * @param body The parameters required to create a new subscription.
29
+ * @param options The options parameters.
30
+ */
31
+ beginCreate(
32
+ aliasName: string,
33
+ body: PutAliasRequest,
34
+ options?: AliasCreateOptionalParams
35
+ ): Promise<
36
+ PollerLike<PollOperationState<AliasCreateResponse>, AliasCreateResponse>
37
+ >;
38
+ /**
39
+ * Create Alias Subscription.
40
+ * @param aliasName AliasName is the name for the subscription creation request. Note that this is not
41
+ * the same as subscription name and this doesn’t have any other lifecycle need beyond the request for
42
+ * subscription creation.
43
+ * @param body The parameters required to create a new subscription.
44
+ * @param options The options parameters.
45
+ */
46
+ beginCreateAndWait(
47
+ aliasName: string,
48
+ body: PutAliasRequest,
49
+ options?: AliasCreateOptionalParams
50
+ ): Promise<AliasCreateResponse>;
51
+ /**
52
+ * Get Alias Subscription.
53
+ * @param aliasName AliasName is the name for the subscription creation request. Note that this is not
54
+ * the same as subscription name and this doesn’t have any other lifecycle need beyond the request for
55
+ * subscription creation.
56
+ * @param options The options parameters.
57
+ */
58
+ get(
59
+ aliasName: string,
60
+ options?: AliasGetOptionalParams
61
+ ): Promise<AliasGetResponse>;
62
+ /**
63
+ * Delete Alias.
64
+ * @param aliasName AliasName is the name for the subscription creation request. Note that this is not
65
+ * the same as subscription name and this doesn’t have any other lifecycle need beyond the request for
66
+ * subscription creation.
67
+ * @param options The options parameters.
68
+ */
69
+ delete(aliasName: string, options?: AliasDeleteOptionalParams): Promise<void>;
70
+ /**
71
+ * List Alias Subscription.
72
+ * @param options The options parameters.
73
+ */
74
+ list(options?: AliasListOptionalParams): Promise<AliasListResponse>;
75
+ }
@@ -0,0 +1,25 @@
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
+ BillingAccountGetPolicyOptionalParams,
11
+ BillingAccountGetPolicyResponse
12
+ } from "../models";
13
+
14
+ /** Interface representing a BillingAccount. */
15
+ export interface BillingAccount {
16
+ /**
17
+ * Get Billing Account Policy.
18
+ * @param billingAccountId Billing Account Id.
19
+ * @param options The options parameters.
20
+ */
21
+ getPolicy(
22
+ billingAccountId: string,
23
+ options?: BillingAccountGetPolicyOptionalParams
24
+ ): Promise<BillingAccountGetPolicyResponse>;
25
+ }
@@ -0,0 +1,15 @@
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 "./subscriptions";
10
+ export * from "./tenants";
11
+ export * from "./subscriptionOperations";
12
+ export * from "./operations";
13
+ export * from "./alias";
14
+ export * from "./subscriptionPolicy";
15
+ export * from "./billingAccount";
@@ -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 Microsoft.Subscription API operations.
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: OperationsListOptionalParams
21
+ ): PagedAsyncIterableIterator<Operation>;
22
+ }
@@ -0,0 +1,92 @@
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 { PollerLike, PollOperationState } from "@azure/core-lro";
10
+ import {
11
+ SubscriptionCancelOptionalParams,
12
+ SubscriptionCancelResponse,
13
+ SubscriptionName,
14
+ SubscriptionRenameOptionalParams,
15
+ SubscriptionRenameResponse,
16
+ SubscriptionEnableOptionalParams,
17
+ SubscriptionEnableResponse,
18
+ AcceptOwnershipRequest,
19
+ SubscriptionAcceptOwnershipOptionalParams,
20
+ SubscriptionAcceptOwnershipResponse,
21
+ SubscriptionAcceptOwnershipStatusOptionalParams,
22
+ SubscriptionAcceptOwnershipStatusResponse
23
+ } from "../models";
24
+
25
+ /** Interface representing a SubscriptionOperations. */
26
+ export interface SubscriptionOperations {
27
+ /**
28
+ * The operation to cancel a subscription
29
+ * @param subscriptionId Subscription Id.
30
+ * @param options The options parameters.
31
+ */
32
+ cancel(
33
+ subscriptionId: string,
34
+ options?: SubscriptionCancelOptionalParams
35
+ ): Promise<SubscriptionCancelResponse>;
36
+ /**
37
+ * The operation to rename a subscription
38
+ * @param subscriptionId Subscription Id.
39
+ * @param body Subscription Name
40
+ * @param options The options parameters.
41
+ */
42
+ rename(
43
+ subscriptionId: string,
44
+ body: SubscriptionName,
45
+ options?: SubscriptionRenameOptionalParams
46
+ ): Promise<SubscriptionRenameResponse>;
47
+ /**
48
+ * The operation to enable a subscription
49
+ * @param subscriptionId Subscription Id.
50
+ * @param options The options parameters.
51
+ */
52
+ enable(
53
+ subscriptionId: string,
54
+ options?: SubscriptionEnableOptionalParams
55
+ ): Promise<SubscriptionEnableResponse>;
56
+ /**
57
+ * Accept subscription ownership.
58
+ * @param subscriptionId Subscription Id.
59
+ * @param body The parameters required to accept subscription ownership.
60
+ * @param options The options parameters.
61
+ */
62
+ beginAcceptOwnership(
63
+ subscriptionId: string,
64
+ body: AcceptOwnershipRequest,
65
+ options?: SubscriptionAcceptOwnershipOptionalParams
66
+ ): Promise<
67
+ PollerLike<
68
+ PollOperationState<SubscriptionAcceptOwnershipResponse>,
69
+ SubscriptionAcceptOwnershipResponse
70
+ >
71
+ >;
72
+ /**
73
+ * Accept subscription ownership.
74
+ * @param subscriptionId Subscription Id.
75
+ * @param body The parameters required to accept subscription ownership.
76
+ * @param options The options parameters.
77
+ */
78
+ beginAcceptOwnershipAndWait(
79
+ subscriptionId: string,
80
+ body: AcceptOwnershipRequest,
81
+ options?: SubscriptionAcceptOwnershipOptionalParams
82
+ ): Promise<SubscriptionAcceptOwnershipResponse>;
83
+ /**
84
+ * Accept subscription ownership status.
85
+ * @param subscriptionId Subscription Id.
86
+ * @param options The options parameters.
87
+ */
88
+ acceptOwnershipStatus(
89
+ subscriptionId: string,
90
+ options?: SubscriptionAcceptOwnershipStatusOptionalParams
91
+ ): Promise<SubscriptionAcceptOwnershipStatusResponse>;
92
+ }
@@ -0,0 +1,46 @@
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
+ GetTenantPolicyResponse,
12
+ SubscriptionPolicyListPolicyForTenantOptionalParams,
13
+ PutTenantPolicyRequestProperties,
14
+ SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams,
15
+ SubscriptionPolicyAddUpdatePolicyForTenantResponse,
16
+ SubscriptionPolicyGetPolicyForTenantOptionalParams,
17
+ SubscriptionPolicyGetPolicyForTenantResponse
18
+ } from "../models";
19
+
20
+ /// <reference lib="esnext.asynciterable" />
21
+ /** Interface representing a SubscriptionPolicy. */
22
+ export interface SubscriptionPolicy {
23
+ /**
24
+ * Get the subscription tenant policy for the user's tenant.
25
+ * @param options The options parameters.
26
+ */
27
+ listPolicyForTenant(
28
+ options?: SubscriptionPolicyListPolicyForTenantOptionalParams
29
+ ): PagedAsyncIterableIterator<GetTenantPolicyResponse>;
30
+ /**
31
+ * Create or Update Subscription tenant policy for user's tenant.
32
+ * @param body Put tenant policy request properties.
33
+ * @param options The options parameters.
34
+ */
35
+ addUpdatePolicyForTenant(
36
+ body: PutTenantPolicyRequestProperties,
37
+ options?: SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams
38
+ ): Promise<SubscriptionPolicyAddUpdatePolicyForTenantResponse>;
39
+ /**
40
+ * Get the subscription tenant policy for the user's tenant.
41
+ * @param options The options parameters.
42
+ */
43
+ getPolicyForTenant(
44
+ options?: SubscriptionPolicyGetPolicyForTenantOptionalParams
45
+ ): Promise<SubscriptionPolicyGetPolicyForTenantResponse>;
46
+ }
@@ -0,0 +1,48 @@
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
+ Location,
12
+ SubscriptionsListLocationsOptionalParams,
13
+ Subscription,
14
+ SubscriptionsListOptionalParams,
15
+ SubscriptionsGetOptionalParams,
16
+ SubscriptionsGetResponse
17
+ } from "../models";
18
+
19
+ /// <reference lib="esnext.asynciterable" />
20
+ /** Interface representing a Subscriptions. */
21
+ export interface Subscriptions {
22
+ /**
23
+ * This operation provides all the locations that are available for resource providers; however, each
24
+ * resource provider may support a subset of this list.
25
+ * @param subscriptionId The ID of the target subscription.
26
+ * @param options The options parameters.
27
+ */
28
+ listLocations(
29
+ subscriptionId: string,
30
+ options?: SubscriptionsListLocationsOptionalParams
31
+ ): PagedAsyncIterableIterator<Location>;
32
+ /**
33
+ * Gets all subscriptions for a tenant.
34
+ * @param options The options parameters.
35
+ */
36
+ list(
37
+ options?: SubscriptionsListOptionalParams
38
+ ): PagedAsyncIterableIterator<Subscription>;
39
+ /**
40
+ * Gets details about a specified subscription.
41
+ * @param subscriptionId The ID of the target subscription.
42
+ * @param options The options parameters.
43
+ */
44
+ get(
45
+ subscriptionId: string,
46
+ options?: SubscriptionsGetOptionalParams
47
+ ): Promise<SubscriptionsGetResponse>;
48
+ }
@@ -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 { TenantIdDescription, TenantsListOptionalParams } from "../models";
11
+
12
+ /// <reference lib="esnext.asynciterable" />
13
+ /** Interface representing a Tenants. */
14
+ export interface Tenants {
15
+ /**
16
+ * Gets the tenants for your account.
17
+ * @param options The options parameters.
18
+ */
19
+ list(
20
+ options?: TenantsListOptionalParams
21
+ ): PagedAsyncIterableIterator<TenantIdDescription>;
22
+ }