@azure/arm-subscriptions 4.0.0 → 5.0.1-alpha.20220117.2

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 (85) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/LICENSE +1 -1
  3. package/README.md +2 -1
  4. package/dist/index.js +644 -86
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/src/models/index.d.ts +149 -5
  9. package/dist-esm/src/models/index.d.ts.map +1 -1
  10. package/dist-esm/src/models/index.js.map +1 -1
  11. package/dist-esm/src/models/mappers.d.ts +7 -0
  12. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  13. package/dist-esm/src/models/mappers.js +238 -6
  14. package/dist-esm/src/models/mappers.js.map +1 -1
  15. package/dist-esm/src/models/parameters.d.ts +2 -1
  16. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  17. package/dist-esm/src/models/parameters.js +22 -11
  18. package/dist-esm/src/models/parameters.js.map +1 -1
  19. package/dist-esm/src/operations/alias.js +4 -4
  20. package/dist-esm/src/operations/alias.js.map +1 -1
  21. package/dist-esm/src/operations/billingAccount.js +1 -1
  22. package/dist-esm/src/operations/billingAccount.js.map +1 -1
  23. package/dist-esm/src/operations/index.d.ts +3 -1
  24. package/dist-esm/src/operations/index.d.ts.map +1 -1
  25. package/dist-esm/src/operations/index.js +3 -1
  26. package/dist-esm/src/operations/index.js.map +1 -1
  27. package/dist-esm/src/operations/operations.js +2 -2
  28. package/dist-esm/src/operations/operations.js.map +1 -1
  29. package/dist-esm/src/operations/{subscription.d.ts → subscriptionOperations.d.ts} +5 -5
  30. package/dist-esm/src/operations/subscriptionOperations.d.ts.map +1 -0
  31. package/dist-esm/src/operations/{subscription.js → subscriptionOperations.js} +11 -11
  32. package/dist-esm/src/operations/subscriptionOperations.js.map +1 -0
  33. package/dist-esm/src/operations/subscriptionPolicy.js +5 -5
  34. package/dist-esm/src/operations/subscriptionPolicy.js.map +1 -1
  35. package/dist-esm/src/operations/subscriptions.d.ts +54 -0
  36. package/dist-esm/src/operations/subscriptions.d.ts.map +1 -0
  37. package/dist-esm/src/operations/subscriptions.js +201 -0
  38. package/dist-esm/src/operations/subscriptions.js.map +1 -0
  39. package/dist-esm/src/operations/tenants.d.ts +32 -0
  40. package/dist-esm/src/operations/tenants.d.ts.map +1 -0
  41. package/dist-esm/src/operations/tenants.js +114 -0
  42. package/dist-esm/src/operations/tenants.js.map +1 -0
  43. package/dist-esm/src/operationsInterfaces/index.d.ts +3 -1
  44. package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -1
  45. package/dist-esm/src/operationsInterfaces/index.js +3 -1
  46. package/dist-esm/src/operationsInterfaces/index.js.map +1 -1
  47. package/dist-esm/src/operationsInterfaces/{subscription.d.ts → subscriptionOperations.d.ts} +3 -3
  48. package/dist-esm/src/operationsInterfaces/subscriptionOperations.d.ts.map +1 -0
  49. package/dist-esm/src/operationsInterfaces/subscriptionOperations.js +9 -0
  50. package/dist-esm/src/operationsInterfaces/subscriptionOperations.js.map +1 -0
  51. package/dist-esm/src/operationsInterfaces/subscriptions.d.ts +24 -0
  52. package/dist-esm/src/operationsInterfaces/subscriptions.d.ts.map +1 -0
  53. package/dist-esm/src/operationsInterfaces/subscriptions.js +9 -0
  54. package/dist-esm/src/operationsInterfaces/subscriptions.js.map +1 -0
  55. package/dist-esm/src/operationsInterfaces/tenants.d.ts +11 -0
  56. package/dist-esm/src/operationsInterfaces/tenants.d.ts.map +1 -0
  57. package/dist-esm/src/operationsInterfaces/{subscription.js → tenants.js} +1 -1
  58. package/dist-esm/src/operationsInterfaces/tenants.js.map +1 -0
  59. package/dist-esm/src/subscriptionClient.d.ts +4 -3
  60. package/dist-esm/src/subscriptionClient.d.ts.map +1 -1
  61. package/dist-esm/src/subscriptionClient.js +5 -4
  62. package/dist-esm/src/subscriptionClient.js.map +1 -1
  63. package/package.json +14 -4
  64. package/review/arm-subscriptions.api.md +126 -13
  65. package/src/models/index.ts +173 -5
  66. package/src/models/mappers.ts +245 -6
  67. package/src/models/parameters.ts +24 -12
  68. package/src/operations/alias.ts +4 -4
  69. package/src/operations/billingAccount.ts +1 -1
  70. package/src/operations/index.ts +3 -1
  71. package/src/operations/operations.ts +2 -2
  72. package/src/operations/{subscription.ts → subscriptionOperations.ts} +12 -11
  73. package/src/operations/subscriptionPolicy.ts +5 -5
  74. package/src/operations/subscriptions.ts +237 -0
  75. package/src/operations/tenants.ts +131 -0
  76. package/src/operationsInterfaces/index.ts +3 -1
  77. package/src/operationsInterfaces/{subscription.ts → subscriptionOperations.ts} +2 -2
  78. package/src/operationsInterfaces/subscriptions.ts +48 -0
  79. package/src/operationsInterfaces/tenants.ts +22 -0
  80. package/src/subscriptionClient.ts +13 -7
  81. package/types/arm-subscriptions.d.ts +237 -39
  82. package/dist-esm/src/operations/subscription.d.ts.map +0 -1
  83. package/dist-esm/src/operations/subscription.js.map +0 -1
  84. package/dist-esm/src/operationsInterfaces/subscription.d.ts.map +0 -1
  85. package/dist-esm/src/operationsInterfaces/subscription.js.map +0 -1
@@ -0,0 +1,24 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { Location, SubscriptionsListLocationsOptionalParams, Subscription, SubscriptionsListOptionalParams, SubscriptionsGetOptionalParams, SubscriptionsGetResponse } from "../models";
3
+ /** Interface representing a Subscriptions. */
4
+ export interface Subscriptions {
5
+ /**
6
+ * This operation provides all the locations that are available for resource providers; however, each
7
+ * resource provider may support a subset of this list.
8
+ * @param subscriptionId The ID of the target subscription.
9
+ * @param options The options parameters.
10
+ */
11
+ listLocations(subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams): PagedAsyncIterableIterator<Location>;
12
+ /**
13
+ * Gets all subscriptions for a tenant.
14
+ * @param options The options parameters.
15
+ */
16
+ list(options?: SubscriptionsListOptionalParams): PagedAsyncIterableIterator<Subscription>;
17
+ /**
18
+ * Gets details about a specified subscription.
19
+ * @param subscriptionId The ID of the target subscription.
20
+ * @param options The options parameters.
21
+ */
22
+ get(subscriptionId: string, options?: SubscriptionsGetOptionalParams): Promise<SubscriptionsGetResponse>;
23
+ }
24
+ //# sourceMappingURL=subscriptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscriptions.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptions.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EACL,QAAQ,EACR,wCAAwC,EACxC,YAAY,EACZ,+BAA+B,EAC/B,8BAA8B,EAC9B,wBAAwB,EACzB,MAAM,WAAW,CAAC;AAGnB,8CAA8C;AAC9C,MAAM,WAAW,aAAa;IAC5B;;;;;OAKG;IACH,aAAa,CACX,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,wCAAwC,GACjD,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IACxC;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,+BAA+B,GACxC,0BAA0B,CAAC,YAAY,CAAC,CAAC;IAC5C;;;;OAIG;IACH,GAAG,CACD,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,8BAA8B,GACvC,OAAO,CAAC,wBAAwB,CAAC,CAAC;CACtC"}
@@ -0,0 +1,9 @@
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
+ export {};
9
+ //# sourceMappingURL=subscriptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subscriptions.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/subscriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -0,0 +1,11 @@
1
+ import { PagedAsyncIterableIterator } from "@azure/core-paging";
2
+ import { TenantIdDescription, TenantsListOptionalParams } from "../models";
3
+ /** Interface representing a Tenants. */
4
+ export interface Tenants {
5
+ /**
6
+ * Gets the tenants for your account.
7
+ * @param options The options parameters.
8
+ */
9
+ list(options?: TenantsListOptionalParams): PagedAsyncIterableIterator<TenantIdDescription>;
10
+ }
11
+ //# sourceMappingURL=tenants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.d.ts","sourceRoot":"","sources":["../../../src/operationsInterfaces/tenants.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAG3E,wCAAwC;AACxC,MAAM,WAAW,OAAO;IACtB;;;OAGG;IACH,IAAI,CACF,OAAO,CAAC,EAAE,yBAAyB,GAClC,0BAA0B,CAAC,mBAAmB,CAAC,CAAC;CACpD"}
@@ -6,4 +6,4 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  export {};
9
- //# sourceMappingURL=subscription.js.map
9
+ //# sourceMappingURL=tenants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tenants.js","sourceRoot":"","sources":["../../../src/operationsInterfaces/tenants.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
@@ -1,17 +1,18 @@
1
1
  import * as coreClient from "@azure/core-client";
2
2
  import * as coreAuth from "@azure/core-auth";
3
- import { Subscription, Operations, Alias, SubscriptionPolicy, BillingAccount } from "./operationsInterfaces";
3
+ import { Subscriptions, Tenants, SubscriptionOperations, Operations, Alias, SubscriptionPolicy, BillingAccount } from "./operationsInterfaces";
4
4
  import { SubscriptionClientOptionalParams } from "./models";
5
5
  export declare class SubscriptionClient extends coreClient.ServiceClient {
6
6
  $host: string;
7
- apiVersion: string;
8
7
  /**
9
8
  * Initializes a new instance of the SubscriptionClient class.
10
9
  * @param credentials Subscription credentials which uniquely identify client subscription.
11
10
  * @param options The parameter options
12
11
  */
13
12
  constructor(credentials: coreAuth.TokenCredential, options?: SubscriptionClientOptionalParams);
14
- subscription: Subscription;
13
+ subscriptions: Subscriptions;
14
+ tenants: Tenants;
15
+ subscriptionOperations: SubscriptionOperations;
15
16
  operations: Operations;
16
17
  alias: Alias;
17
18
  subscriptionPolicy: SubscriptionPolicy;
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptionClient.d.ts","sourceRoot":"","sources":["../../src/subscriptionClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAQ7C,OAAO,EACL,YAAY,EACZ,UAAU,EACV,KAAK,EACL,kBAAkB,EAClB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,OAAO,CAAC,EAAE,gCAAgC;IA4C5C,YAAY,EAAE,YAAY,CAAC;IAC3B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,cAAc,EAAE,cAAc,CAAC;CAChC"}
1
+ {"version":3,"file":"subscriptionClient.d.ts","sourceRoot":"","sources":["../../src/subscriptionClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAU7C,OAAO,EACL,aAAa,EACb,OAAO,EACP,sBAAsB,EACtB,UAAU,EACV,KAAK,EACL,kBAAkB,EAClB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAE5D,qBAAa,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAC9D,KAAK,EAAE,MAAM,CAAC;IAEd;;;;OAIG;gBAED,WAAW,EAAE,QAAQ,CAAC,eAAe,EACrC,OAAO,CAAC,EAAE,gCAAgC;IA6C5C,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,sBAAsB,EAAE,sBAAsB,CAAC;IAC/C,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,kBAAkB,EAAE,kBAAkB,CAAC;IACvC,cAAc,EAAE,cAAc,CAAC;CAChC"}
@@ -6,7 +6,7 @@
6
6
  * Changes may cause incorrect behavior and will be lost if the code is regenerated.
7
7
  */
8
8
  import * as coreClient from "@azure/core-client";
9
- import { SubscriptionImpl, OperationsImpl, AliasImpl, SubscriptionPolicyImpl, BillingAccountImpl } from "./operations";
9
+ import { SubscriptionsImpl, TenantsImpl, SubscriptionOperationsImpl, OperationsImpl, AliasImpl, SubscriptionPolicyImpl, BillingAccountImpl } from "./operations";
10
10
  export class SubscriptionClient extends coreClient.ServiceClient {
11
11
  /**
12
12
  * Initializes a new instance of the SubscriptionClient class.
@@ -25,7 +25,7 @@ export class SubscriptionClient extends coreClient.ServiceClient {
25
25
  requestContentType: "application/json; charset=utf-8",
26
26
  credential: credentials
27
27
  };
28
- const packageDetails = `azsdk-js-arm-subscriptions/4.0.0`;
28
+ const packageDetails = `azsdk-js-arm-subscriptions/5.0.0`;
29
29
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
30
30
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
31
31
  : `${packageDetails}`;
@@ -38,8 +38,9 @@ export class SubscriptionClient extends coreClient.ServiceClient {
38
38
  super(optionsWithDefaults);
39
39
  // Assigning values to Constant parameters
40
40
  this.$host = options.$host || "https://management.azure.com";
41
- this.apiVersion = options.apiVersion || "2021-10-01";
42
- this.subscription = new SubscriptionImpl(this);
41
+ this.subscriptions = new SubscriptionsImpl(this);
42
+ this.tenants = new TenantsImpl(this);
43
+ this.subscriptionOperations = new SubscriptionOperationsImpl(this);
43
44
  this.operations = new OperationsImpl(this);
44
45
  this.alias = new AliasImpl(this);
45
46
  this.subscriptionPolicy = new SubscriptionPolicyImpl(this);
@@ -1 +1 @@
1
- {"version":3,"file":"subscriptionClient.js","sourceRoot":"","sources":["../../src/subscriptionClient.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AAEjD,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,sBAAsB,EACtB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAUtB,MAAM,OAAO,kBAAmB,SAAQ,UAAU,CAAC,aAAa;IAI9D;;;;OAIG;IACH,YACE,WAAqC,EACrC,OAA0C;QAE1C,IAAI,WAAW,KAAK,SAAS,EAAE;YAC7B,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;SACjD;QAED,0CAA0C;QAC1C,IAAI,CAAC,OAAO,EAAE;YACZ,OAAO,GAAG,EAAE,CAAC;SACd;QACD,MAAM,QAAQ,GAAqC;YACjD,kBAAkB,EAAE,iCAAiC;YACrD,UAAU,EAAE,WAAW;SACxB,CAAC;QAEF,MAAM,cAAc,GAAG,kCAAkC,CAAC;QAC1D,MAAM,eAAe,GACnB,OAAO,CAAC,gBAAgB,IAAI,OAAO,CAAC,gBAAgB,CAAC,eAAe;YAClE,CAAC,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC,eAAe,IAAI,cAAc,EAAE;YACjE,CAAC,CAAC,GAAG,cAAc,EAAE,CAAC;QAE1B,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;YAC7B,OAAO,CAAC,gBAAgB,GAAG,CAAC,uCAAuC,CAAC,CAAC;SACtE;QACD,MAAM,mBAAmB,iDACpB,QAAQ,GACR,OA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mt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for SubscriptionClient.",
6
- "version": "4.0.0",
7
- "engines": { "node": ">=12.0.0" },
6
+ "version": "5.0.1-alpha.20220117.2",
7
+ "engines": {
8
+ "node": ">=12.0.0"
9
+ },
8
10
  "dependencies": {
9
11
  "@azure/core-lro": "^2.2.0",
10
12
  "@azure/abort-controller": "^1.0.0",
@@ -14,7 +16,13 @@
14
16
  "@azure/core-rest-pipeline": "^1.1.0",
15
17
  "tslib": "^2.2.0"
16
18
  },
17
- "keywords": ["node", "azure", "typescript", "browser", "isomorphic"],
19
+ "keywords": [
20
+ "node",
21
+ "azure",
22
+ "typescript",
23
+ "browser",
24
+ "isomorphic"
25
+ ],
18
26
  "license": "MIT",
19
27
  "main": "./dist/index.js",
20
28
  "module": "./dist-esm/src/index.js",
@@ -41,7 +49,9 @@
41
49
  "type": "git",
42
50
  "url": "https://github.com/Azure/azure-sdk-for-js.git"
43
51
  },
44
- "bugs": { "url": "https://github.com/Azure/azure-sdk-for-js/issues" },
52
+ "bugs": {
53
+ "url": "https://github.com/Azure/azure-sdk-for-js/issues"
54
+ },
45
55
  "files": [
46
56
  "dist/**/*.js",
47
57
  "dist/**/*.js.map",
@@ -104,7 +104,7 @@ export interface BillingAccountPoliciesResponseProperties {
104
104
 
105
105
  // @public
106
106
  export interface CanceledSubscriptionId {
107
- readonly value?: string;
107
+ readonly subscriptionId?: string;
108
108
  }
109
109
 
110
110
  // @public
@@ -112,7 +112,7 @@ export type CreatedByType = string;
112
112
 
113
113
  // @public
114
114
  export interface EnabledSubscriptionId {
115
- readonly value?: string;
115
+ readonly subscriptionId?: string;
116
116
  }
117
117
 
118
118
  // @public
@@ -183,6 +183,22 @@ export enum KnownWorkload {
183
183
  Production = "Production"
184
184
  }
185
185
 
186
+ // @public
187
+ interface Location_2 {
188
+ readonly displayName?: string;
189
+ readonly id?: string;
190
+ readonly latitude?: string;
191
+ readonly longitude?: string;
192
+ readonly name?: string;
193
+ readonly subscriptionId?: string;
194
+ }
195
+ export { Location_2 as Location }
196
+
197
+ // @public
198
+ export interface LocationListResult {
199
+ value?: Location_2[];
200
+ }
201
+
186
202
  // @public
187
203
  export interface Operation {
188
204
  display?: OperationDisplay;
@@ -260,7 +276,7 @@ export interface PutTenantPolicyRequestProperties {
260
276
 
261
277
  // @public
262
278
  export interface RenamedSubscriptionId {
263
- readonly value?: string;
279
+ readonly subscriptionId?: string;
264
280
  }
265
281
 
266
282
  // @public
@@ -269,14 +285,17 @@ export interface ServiceTenantResponse {
269
285
  tenantName?: string;
270
286
  }
271
287
 
288
+ // @public
289
+ export type SpendingLimit = "On" | "Off" | "CurrentPeriodOff";
290
+
272
291
  // @public
273
292
  export interface Subscription {
274
- acceptOwnershipStatus(subscriptionId: string, options?: SubscriptionAcceptOwnershipStatusOptionalParams): Promise<SubscriptionAcceptOwnershipStatusResponse>;
275
- beginAcceptOwnership(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<PollerLike<PollOperationState<SubscriptionAcceptOwnershipResponse>, SubscriptionAcceptOwnershipResponse>>;
276
- beginAcceptOwnershipAndWait(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<SubscriptionAcceptOwnershipResponse>;
277
- cancel(subscriptionId: string, options?: SubscriptionCancelOptionalParams): Promise<SubscriptionCancelResponse>;
278
- enable(subscriptionId: string, options?: SubscriptionEnableOptionalParams): Promise<SubscriptionEnableResponse>;
279
- rename(subscriptionId: string, body: SubscriptionName, options?: SubscriptionRenameOptionalParams): Promise<SubscriptionRenameResponse>;
293
+ authorizationSource?: string;
294
+ readonly displayName?: string;
295
+ readonly id?: string;
296
+ readonly state?: SubscriptionState;
297
+ readonly subscriptionId?: string;
298
+ subscriptionPolicies?: SubscriptionPolicies;
280
299
  }
281
300
 
282
301
  // @public
@@ -321,6 +340,7 @@ export interface SubscriptionAliasResponseProperties {
321
340
  readonly acceptOwnershipState?: AcceptOwnership;
322
341
  readonly acceptOwnershipUrl?: string;
323
342
  billingScope?: string;
343
+ createdTime?: string;
324
344
  displayName?: string;
325
345
  managementGroupId?: string;
326
346
  provisioningState?: ProvisioningState;
@@ -348,21 +368,22 @@ export class SubscriptionClient extends coreClient.ServiceClient {
348
368
  // (undocumented)
349
369
  alias: Alias;
350
370
  // (undocumented)
351
- apiVersion: string;
352
- // (undocumented)
353
371
  billingAccount: BillingAccount;
354
372
  // (undocumented)
355
373
  operations: Operations;
356
374
  // (undocumented)
357
- subscription: Subscription;
375
+ subscriptionOperations: SubscriptionOperations;
358
376
  // (undocumented)
359
377
  subscriptionPolicy: SubscriptionPolicy;
378
+ // (undocumented)
379
+ subscriptions: Subscriptions;
380
+ // (undocumented)
381
+ tenants: Tenants;
360
382
  }
361
383
 
362
384
  // @public
363
385
  export interface SubscriptionClientOptionalParams extends coreClient.ServiceClientOptions {
364
386
  $host?: string;
365
- apiVersion?: string;
366
387
  endpoint?: string;
367
388
  }
368
389
 
@@ -373,11 +394,34 @@ export interface SubscriptionEnableOptionalParams extends coreClient.OperationOp
373
394
  // @public
374
395
  export type SubscriptionEnableResponse = EnabledSubscriptionId;
375
396
 
397
+ // @public
398
+ export interface SubscriptionListResult {
399
+ nextLink: string;
400
+ value?: Subscription[];
401
+ }
402
+
376
403
  // @public
377
404
  export interface SubscriptionName {
378
405
  subscriptionName?: string;
379
406
  }
380
407
 
408
+ // @public
409
+ export interface SubscriptionOperations {
410
+ acceptOwnershipStatus(subscriptionId: string, options?: SubscriptionAcceptOwnershipStatusOptionalParams): Promise<SubscriptionAcceptOwnershipStatusResponse>;
411
+ beginAcceptOwnership(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<PollerLike<PollOperationState<SubscriptionAcceptOwnershipResponse>, SubscriptionAcceptOwnershipResponse>>;
412
+ beginAcceptOwnershipAndWait(subscriptionId: string, body: AcceptOwnershipRequest, options?: SubscriptionAcceptOwnershipOptionalParams): Promise<SubscriptionAcceptOwnershipResponse>;
413
+ cancel(subscriptionId: string, options?: SubscriptionCancelOptionalParams): Promise<SubscriptionCancelResponse>;
414
+ enable(subscriptionId: string, options?: SubscriptionEnableOptionalParams): Promise<SubscriptionEnableResponse>;
415
+ rename(subscriptionId: string, body: SubscriptionName, options?: SubscriptionRenameOptionalParams): Promise<SubscriptionRenameResponse>;
416
+ }
417
+
418
+ // @public
419
+ export interface SubscriptionPolicies {
420
+ readonly locationPlacementId?: string;
421
+ readonly quotaId?: string;
422
+ readonly spendingLimit?: SpendingLimit;
423
+ }
424
+
381
425
  // @public
382
426
  export interface SubscriptionPolicy {
383
427
  addUpdatePolicyForTenant(body: PutTenantPolicyRequestProperties, options?: SubscriptionPolicyAddUpdatePolicyForTenantOptionalParams): Promise<SubscriptionPolicyAddUpdatePolicyForTenantResponse>;
@@ -420,6 +464,44 @@ export interface SubscriptionRenameOptionalParams extends coreClient.OperationOp
420
464
  // @public
421
465
  export type SubscriptionRenameResponse = RenamedSubscriptionId;
422
466
 
467
+ // @public
468
+ export interface Subscriptions {
469
+ get(subscriptionId: string, options?: SubscriptionsGetOptionalParams): Promise<SubscriptionsGetResponse>;
470
+ list(options?: SubscriptionsListOptionalParams): PagedAsyncIterableIterator<Subscription>;
471
+ listLocations(subscriptionId: string, options?: SubscriptionsListLocationsOptionalParams): PagedAsyncIterableIterator<Location_2>;
472
+ }
473
+
474
+ // @public
475
+ export interface SubscriptionsGetOptionalParams extends coreClient.OperationOptions {
476
+ }
477
+
478
+ // @public
479
+ export type SubscriptionsGetResponse = Subscription;
480
+
481
+ // @public
482
+ export interface SubscriptionsListLocationsOptionalParams extends coreClient.OperationOptions {
483
+ }
484
+
485
+ // @public
486
+ export type SubscriptionsListLocationsResponse = LocationListResult;
487
+
488
+ // @public
489
+ export interface SubscriptionsListNextOptionalParams extends coreClient.OperationOptions {
490
+ }
491
+
492
+ // @public
493
+ export type SubscriptionsListNextResponse = SubscriptionListResult;
494
+
495
+ // @public
496
+ export interface SubscriptionsListOptionalParams extends coreClient.OperationOptions {
497
+ }
498
+
499
+ // @public
500
+ export type SubscriptionsListResponse = SubscriptionListResult;
501
+
502
+ // @public
503
+ export type SubscriptionState = "Enabled" | "Warned" | "PastDue" | "Disabled" | "Deleted";
504
+
423
505
  // @public
424
506
  export interface SystemData {
425
507
  createdAt?: Date;
@@ -430,6 +512,18 @@ export interface SystemData {
430
512
  lastModifiedByType?: CreatedByType;
431
513
  }
432
514
 
515
+ // @public
516
+ export interface TenantIdDescription {
517
+ readonly id?: string;
518
+ readonly tenantId?: string;
519
+ }
520
+
521
+ // @public
522
+ export interface TenantListResult {
523
+ nextLink: string;
524
+ value?: TenantIdDescription[];
525
+ }
526
+
433
527
  // @public
434
528
  export interface TenantPolicy {
435
529
  blockSubscriptionsIntoTenant?: boolean;
@@ -438,6 +532,25 @@ export interface TenantPolicy {
438
532
  readonly policyId?: string;
439
533
  }
440
534
 
535
+ // @public
536
+ export interface Tenants {
537
+ list(options?: TenantsListOptionalParams): PagedAsyncIterableIterator<TenantIdDescription>;
538
+ }
539
+
540
+ // @public
541
+ export interface TenantsListNextOptionalParams extends coreClient.OperationOptions {
542
+ }
543
+
544
+ // @public
545
+ export type TenantsListNextResponse = TenantListResult;
546
+
547
+ // @public
548
+ export interface TenantsListOptionalParams extends coreClient.OperationOptions {
549
+ }
550
+
551
+ // @public
552
+ export type TenantsListResponse = TenantListResult;
553
+
441
554
  // @public
442
555
  export type Workload = string;
443
556
 
@@ -8,13 +8,130 @@
8
8
 
9
9
  import * as coreClient from "@azure/core-client";
10
10
 
11
+ /** Location list operation response. */
12
+ export interface LocationListResult {
13
+ /** An array of locations. */
14
+ value?: Location[];
15
+ }
16
+
17
+ /** Location information. */
18
+ export interface Location {
19
+ /**
20
+ * The fully qualified ID of the location. For example, /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus.
21
+ * NOTE: This property will not be serialized. It can only be populated by the server.
22
+ */
23
+ readonly id?: string;
24
+ /**
25
+ * The subscription ID.
26
+ * NOTE: This property will not be serialized. It can only be populated by the server.
27
+ */
28
+ readonly subscriptionId?: string;
29
+ /**
30
+ * The location name.
31
+ * NOTE: This property will not be serialized. It can only be populated by the server.
32
+ */
33
+ readonly name?: string;
34
+ /**
35
+ * The display name of the location.
36
+ * NOTE: This property will not be serialized. It can only be populated by the server.
37
+ */
38
+ readonly displayName?: string;
39
+ /**
40
+ * The latitude of the location.
41
+ * NOTE: This property will not be serialized. It can only be populated by the server.
42
+ */
43
+ readonly latitude?: string;
44
+ /**
45
+ * The longitude of the location.
46
+ * NOTE: This property will not be serialized. It can only be populated by the server.
47
+ */
48
+ readonly longitude?: string;
49
+ }
50
+
51
+ /** Subscription information. */
52
+ export interface Subscription {
53
+ /**
54
+ * The fully qualified ID for the subscription. For example, /subscriptions/00000000-0000-0000-0000-000000000000.
55
+ * NOTE: This property will not be serialized. It can only be populated by the server.
56
+ */
57
+ readonly id?: string;
58
+ /**
59
+ * The subscription ID.
60
+ * NOTE: This property will not be serialized. It can only be populated by the server.
61
+ */
62
+ readonly subscriptionId?: string;
63
+ /**
64
+ * The subscription display name.
65
+ * NOTE: This property will not be serialized. It can only be populated by the server.
66
+ */
67
+ readonly displayName?: string;
68
+ /**
69
+ * The subscription state. Possible values are Enabled, Warned, PastDue, Disabled, and Deleted.
70
+ * NOTE: This property will not be serialized. It can only be populated by the server.
71
+ */
72
+ readonly state?: SubscriptionState;
73
+ /** The subscription policies. */
74
+ subscriptionPolicies?: SubscriptionPolicies;
75
+ /** The authorization source of the request. Valid values are one or more combinations of Legacy, RoleBased, Bypassed, Direct and Management. For example, 'Legacy, RoleBased'. */
76
+ authorizationSource?: string;
77
+ }
78
+
79
+ /** Subscription policies. */
80
+ export interface SubscriptionPolicies {
81
+ /**
82
+ * The subscription location placement ID. The ID indicates which regions are visible for a subscription. For example, a subscription with a location placement Id of Public_2014-09-01 has access to Azure public regions.
83
+ * NOTE: This property will not be serialized. It can only be populated by the server.
84
+ */
85
+ readonly locationPlacementId?: string;
86
+ /**
87
+ * The subscription quota ID.
88
+ * NOTE: This property will not be serialized. It can only be populated by the server.
89
+ */
90
+ readonly quotaId?: string;
91
+ /**
92
+ * The subscription spending limit.
93
+ * NOTE: This property will not be serialized. It can only be populated by the server.
94
+ */
95
+ readonly spendingLimit?: SpendingLimit;
96
+ }
97
+
98
+ /** Subscription list operation response. */
99
+ export interface SubscriptionListResult {
100
+ /** An array of subscriptions. */
101
+ value?: Subscription[];
102
+ /** The URL to get the next set of results. */
103
+ nextLink: string;
104
+ }
105
+
106
+ /** Tenant Ids information. */
107
+ export interface TenantListResult {
108
+ /** An array of tenants. */
109
+ value?: TenantIdDescription[];
110
+ /** The URL to use for getting the next set of results. */
111
+ nextLink: string;
112
+ }
113
+
114
+ /** Tenant Id information. */
115
+ export interface TenantIdDescription {
116
+ /**
117
+ * The fully qualified ID of the tenant. For example, /tenants/00000000-0000-0000-0000-000000000000.
118
+ * NOTE: This property will not be serialized. It can only be populated by the server.
119
+ */
120
+ readonly id?: string;
121
+ /**
122
+ * The tenant ID. For example, 00000000-0000-0000-0000-000000000000.
123
+ * NOTE: This property will not be serialized. It can only be populated by the server.
124
+ */
125
+ readonly tenantId?: string;
126
+ }
127
+
11
128
  /** The ID of the canceled subscription */
12
129
  export interface CanceledSubscriptionId {
13
130
  /**
14
131
  * The ID of the canceled subscription
15
132
  * NOTE: This property will not be serialized. It can only be populated by the server.
16
133
  */
17
- readonly value?: string;
134
+ readonly subscriptionId?: string;
18
135
  }
19
136
 
20
137
  /** Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message. */
@@ -47,7 +164,7 @@ export interface RenamedSubscriptionId {
47
164
  * The ID of the subscriptions that is being renamed
48
165
  * NOTE: This property will not be serialized. It can only be populated by the server.
49
166
  */
50
- readonly value?: string;
167
+ readonly subscriptionId?: string;
51
168
  }
52
169
 
53
170
  /** The ID of the subscriptions that is being enabled */
@@ -56,7 +173,7 @@ export interface EnabledSubscriptionId {
56
173
  * The ID of the subscriptions that is being enabled
57
174
  * NOTE: This property will not be serialized. It can only be populated by the server.
58
175
  */
59
- readonly value?: string;
176
+ readonly subscriptionId?: string;
60
177
  }
61
178
 
62
179
  /** Result of the request to list operations. It contains a list of operations and a URL link to get the next set of results. */
@@ -190,6 +307,8 @@ export interface SubscriptionAliasResponseProperties {
190
307
  subscriptionOwnerId?: string;
191
308
  /** The Management Group Id. */
192
309
  managementGroupId?: string;
310
+ /** Created Time */
311
+ createdTime?: string;
193
312
  /** Tags for the subscription */
194
313
  tags?: { [propertyName: string]: string };
195
314
  }
@@ -451,6 +570,57 @@ export enum KnownCreatedByType {
451
570
  * **Key**
452
571
  */
453
572
  export type CreatedByType = string;
573
+ /** Defines values for SubscriptionState. */
574
+ export type SubscriptionState =
575
+ | "Enabled"
576
+ | "Warned"
577
+ | "PastDue"
578
+ | "Disabled"
579
+ | "Deleted";
580
+ /** Defines values for SpendingLimit. */
581
+ export type SpendingLimit = "On" | "Off" | "CurrentPeriodOff";
582
+
583
+ /** Optional parameters. */
584
+ export interface SubscriptionsListLocationsOptionalParams
585
+ extends coreClient.OperationOptions {}
586
+
587
+ /** Contains response data for the listLocations operation. */
588
+ export type SubscriptionsListLocationsResponse = LocationListResult;
589
+
590
+ /** Optional parameters. */
591
+ export interface SubscriptionsGetOptionalParams
592
+ extends coreClient.OperationOptions {}
593
+
594
+ /** Contains response data for the get operation. */
595
+ export type SubscriptionsGetResponse = Subscription;
596
+
597
+ /** Optional parameters. */
598
+ export interface SubscriptionsListOptionalParams
599
+ extends coreClient.OperationOptions {}
600
+
601
+ /** Contains response data for the list operation. */
602
+ export type SubscriptionsListResponse = SubscriptionListResult;
603
+
604
+ /** Optional parameters. */
605
+ export interface SubscriptionsListNextOptionalParams
606
+ extends coreClient.OperationOptions {}
607
+
608
+ /** Contains response data for the listNext operation. */
609
+ export type SubscriptionsListNextResponse = SubscriptionListResult;
610
+
611
+ /** Optional parameters. */
612
+ export interface TenantsListOptionalParams
613
+ extends coreClient.OperationOptions {}
614
+
615
+ /** Contains response data for the list operation. */
616
+ export type TenantsListResponse = TenantListResult;
617
+
618
+ /** Optional parameters. */
619
+ export interface TenantsListNextOptionalParams
620
+ extends coreClient.OperationOptions {}
621
+
622
+ /** Contains response data for the listNext operation. */
623
+ export type TenantsListNextResponse = TenantListResult;
454
624
 
455
625
  /** Optional parameters. */
456
626
  export interface SubscriptionCancelOptionalParams
@@ -573,8 +743,6 @@ export interface SubscriptionClientOptionalParams
573
743
  extends coreClient.ServiceClientOptions {
574
744
  /** server parameter */
575
745
  $host?: string;
576
- /** Api Version */
577
- apiVersion?: string;
578
746
  /** Overrides client endpoint. */
579
747
  endpoint?: string;
580
748
  }