@azure/arm-subscriptions 3.1.2 → 4.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.
- package/CHANGELOG.md +11 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +68 -79
- package/dist/index.js +1772 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +514 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +36 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +29 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +825 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +14 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +110 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/alias.d.ts +53 -0
- package/dist-esm/src/operations/alias.d.ts.map +1 -0
- package/dist-esm/src/operations/alias.js +180 -0
- package/dist-esm/src/operations/alias.js.map +1 -0
- package/dist-esm/src/operations/billingAccount.d.ts +19 -0
- package/dist-esm/src/operations/billingAccount.d.ts.map +1 -0
- package/dist-esm/src/operations/billingAccount.js +47 -0
- package/dist-esm/src/operations/billingAccount.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +13 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/operations.d.ts +32 -0
- package/dist-esm/src/operations/operations.d.ts.map +1 -0
- package/dist-esm/src/operations/operations.js +120 -0
- package/dist-esm/src/operations/operations.js.map +1 -0
- package/dist-esm/src/operations/subscription.d.ts +53 -0
- package/dist-esm/src/operations/subscription.d.ts.map +1 -0
- package/dist-esm/src/operations/subscription.js +201 -0
- package/dist-esm/src/operations/subscription.js.map +1 -0
- package/dist-esm/src/operations/subscriptionPolicy.d.ts +43 -0
- package/dist-esm/src/operations/subscriptionPolicy.d.ts.map +1 -0
- package/dist-esm/src/operations/subscriptionPolicy.js +169 -0
- package/dist-esm/src/operations/subscriptionPolicy.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/alias.d.ts +45 -0
- package/dist-esm/src/operationsInterfaces/alias.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/alias.js +9 -0
- package/dist-esm/src/operationsInterfaces/alias.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingAccount.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/billingAccount.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/billingAccount.js +9 -0
- package/dist-esm/src/operationsInterfaces/billingAccount.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/operations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/operations.js +9 -0
- package/dist-esm/src/operationsInterfaces/operations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/subscription.d.ts +45 -0
- package/dist-esm/src/operationsInterfaces/subscription.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/subscription.js +9 -0
- package/dist-esm/src/operationsInterfaces/subscription.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/subscriptionPolicy.d.ts +22 -0
- package/dist-esm/src/operationsInterfaces/subscriptionPolicy.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/subscriptionPolicy.js +9 -0
- package/dist-esm/src/operationsInterfaces/subscriptionPolicy.js.map +1 -0
- package/dist-esm/src/subscriptionClient.d.ts +20 -0
- package/dist-esm/src/subscriptionClient.d.ts.map +1 -0
- package/dist-esm/src/subscriptionClient.js +49 -0
- package/dist-esm/src/subscriptionClient.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +40 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +65 -32
- package/review/arm-subscriptions.api.md +446 -0
- package/rollup.config.js +181 -30
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +449 -555
- package/src/models/mappers.ts +506 -250
- package/src/models/parameters.ts +82 -27
- package/src/operations/alias.ts +170 -170
- package/src/operations/billingAccount.ts +65 -0
- package/src/operations/index.ts +6 -8
- package/src/operations/operations.ts +103 -40
- package/src/operations/subscription.ts +289 -0
- package/src/operations/subscriptionPolicy.ts +207 -0
- package/src/operationsInterfaces/alias.ts +75 -0
- package/src/operationsInterfaces/billingAccount.ts +25 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/subscription.ts +92 -0
- package/src/operationsInterfaces/subscriptionPolicy.ts +46 -0
- package/src/subscriptionClient.ts +75 -43
- package/tsconfig.json +3 -3
- package/types/arm-subscriptions.d.ts +727 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-subscriptions.js +0 -1442
- package/dist/arm-subscriptions.js.map +0 -1
- package/dist/arm-subscriptions.min.js +0 -1
- package/dist/arm-subscriptions.min.js.map +0 -1
- package/esm/models/aliasMappers.d.ts +0 -2
- package/esm/models/aliasMappers.d.ts.map +0 -1
- package/esm/models/aliasMappers.js +0 -9
- package/esm/models/aliasMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -624
- package/esm/models/index.d.ts.map +0 -1
- package/esm/models/index.js +0 -8
- package/esm/models/index.js.map +0 -1
- package/esm/models/mappers.d.ts +0 -25
- package/esm/models/mappers.d.ts.map +0 -1
- package/esm/models/mappers.js +0 -574
- package/esm/models/mappers.js.map +0 -1
- package/esm/models/operationsMappers.d.ts +0 -2
- package/esm/models/operationsMappers.d.ts.map +0 -1
- package/esm/models/operationsMappers.js +0 -9
- package/esm/models/operationsMappers.js.map +0 -1
- package/esm/models/parameters.d.ts +0 -8
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -75
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/subscriptionOperationsMappers.d.ts +0 -2
- package/esm/models/subscriptionOperationsMappers.d.ts.map +0 -1
- package/esm/models/subscriptionOperationsMappers.js +0 -9
- package/esm/models/subscriptionOperationsMappers.js.map +0 -1
- package/esm/models/subscriptionsMappers.d.ts +0 -2
- package/esm/models/subscriptionsMappers.d.ts.map +0 -1
- package/esm/models/subscriptionsMappers.js +0 -9
- package/esm/models/subscriptionsMappers.js.map +0 -1
- package/esm/models/tenantsMappers.d.ts +0 -2
- package/esm/models/tenantsMappers.d.ts.map +0 -1
- package/esm/models/tenantsMappers.js +0 -9
- package/esm/models/tenantsMappers.js.map +0 -1
- package/esm/operations/alias.d.ts +0 -81
- package/esm/operations/alias.d.ts.map +0 -1
- package/esm/operations/alias.js +0 -161
- package/esm/operations/alias.js.map +0 -1
- package/esm/operations/index.d.ts +0 -6
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js +0 -15
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -28
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -51
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/subscriptionOperations.d.ts +0 -70
- package/esm/operations/subscriptionOperations.d.ts.map +0 -1
- package/esm/operations/subscriptionOperations.js +0 -117
- package/esm/operations/subscriptionOperations.js.map +0 -1
- package/esm/operations/subscriptions.d.ts +0 -84
- package/esm/operations/subscriptions.d.ts.map +0 -1
- package/esm/operations/subscriptions.js +0 -133
- package/esm/operations/subscriptions.js.map +0 -1
- package/esm/operations/tenants.d.ts +0 -46
- package/esm/operations/tenants.d.ts.map +0 -1
- package/esm/operations/tenants.js +0 -77
- package/esm/operations/tenants.js.map +0 -1
- package/esm/subscriptionClient.d.ts +0 -27
- package/esm/subscriptionClient.d.ts.map +0 -1
- package/esm/subscriptionClient.js +0 -41
- package/esm/subscriptionClient.js.map +0 -1
- package/esm/subscriptionClientContext.d.ts +0 -19
- package/esm/subscriptionClientContext.d.ts.map +0 -1
- package/esm/subscriptionClientContext.js +0 -55
- package/esm/subscriptionClientContext.js.map +0 -1
- package/src/models/aliasMappers.ts +0 -18
- package/src/models/operationsMappers.ts +0 -14
- package/src/models/subscriptionOperationsMappers.ts +0 -15
- package/src/models/subscriptionsMappers.ts +0 -16
- package/src/models/tenantsMappers.ts +0 -13
- package/src/operations/subscriptionOperations.ts +0 -194
- package/src/operations/subscriptions.ts +0 -227
- package/src/operations/tenants.ts +0 -123
- package/src/subscriptionClientContext.ts +0 -60
|
@@ -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,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 "./subscription";
|
|
10
|
+
export * from "./operations";
|
|
11
|
+
export * from "./alias";
|
|
12
|
+
export * from "./subscriptionPolicy";
|
|
13
|
+
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 Subscription. */
|
|
26
|
+
export interface Subscription {
|
|
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
|
+
}
|
|
@@ -1,55 +1,87 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (c) Microsoft Corporation.
|
|
3
|
-
* Licensed under the MIT License.
|
|
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
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
import * as coreClient from "@azure/core-client";
|
|
10
|
+
import * as coreAuth from "@azure/core-auth";
|
|
11
|
+
import {
|
|
12
|
+
SubscriptionImpl,
|
|
13
|
+
OperationsImpl,
|
|
14
|
+
AliasImpl,
|
|
15
|
+
SubscriptionPolicyImpl,
|
|
16
|
+
BillingAccountImpl
|
|
17
|
+
} from "./operations";
|
|
18
|
+
import {
|
|
19
|
+
Subscription,
|
|
20
|
+
Operations,
|
|
21
|
+
Alias,
|
|
22
|
+
SubscriptionPolicy,
|
|
23
|
+
BillingAccount
|
|
24
|
+
} from "./operationsInterfaces";
|
|
25
|
+
import { SubscriptionClientOptionalParams } from "./models";
|
|
17
26
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
subscriptions: operations.Subscriptions;
|
|
22
|
-
tenants: operations.Tenants;
|
|
23
|
-
subscription: operations.SubscriptionOperations;
|
|
24
|
-
operations: operations.Operations;
|
|
25
|
-
alias: operations.Alias;
|
|
27
|
+
export class SubscriptionClient extends coreClient.ServiceClient {
|
|
28
|
+
$host: string;
|
|
29
|
+
apiVersion: string;
|
|
26
30
|
|
|
27
31
|
/**
|
|
28
32
|
* Initializes a new instance of the SubscriptionClient class.
|
|
29
|
-
* @param credentials
|
|
30
|
-
*
|
|
31
|
-
* more information about these credentials, see
|
|
32
|
-
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
|
33
|
-
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
|
34
|
-
* @azure/ms-rest-browserauth are also supported.
|
|
35
|
-
* @param [options] The parameter options
|
|
33
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
34
|
+
* @param options The parameter options
|
|
36
35
|
*/
|
|
37
|
-
constructor(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
36
|
+
constructor(
|
|
37
|
+
credentials: coreAuth.TokenCredential,
|
|
38
|
+
options?: SubscriptionClientOptionalParams
|
|
39
|
+
) {
|
|
40
|
+
if (credentials === undefined) {
|
|
41
|
+
throw new Error("'credentials' cannot be null");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Initializing default values for options
|
|
45
|
+
if (!options) {
|
|
46
|
+
options = {};
|
|
47
|
+
}
|
|
48
|
+
const defaults: SubscriptionClientOptionalParams = {
|
|
49
|
+
requestContentType: "application/json; charset=utf-8",
|
|
50
|
+
credential: credentials
|
|
51
|
+
};
|
|
46
52
|
|
|
47
|
-
|
|
53
|
+
const packageDetails = `azsdk-js-arm-subscriptions/4.0.0`;
|
|
54
|
+
const userAgentPrefix =
|
|
55
|
+
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
56
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
57
|
+
: `${packageDetails}`;
|
|
48
58
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
if (!options.credentialScopes) {
|
|
60
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
61
|
+
}
|
|
62
|
+
const optionsWithDefaults = {
|
|
63
|
+
...defaults,
|
|
64
|
+
...options,
|
|
65
|
+
userAgentOptions: {
|
|
66
|
+
userAgentPrefix
|
|
67
|
+
},
|
|
68
|
+
baseUri: options.endpoint || "https://management.azure.com"
|
|
69
|
+
};
|
|
70
|
+
super(optionsWithDefaults);
|
|
71
|
+
|
|
72
|
+
// Assigning values to Constant parameters
|
|
73
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
74
|
+
this.apiVersion = options.apiVersion || "2021-10-01";
|
|
75
|
+
this.subscription = new SubscriptionImpl(this);
|
|
76
|
+
this.operations = new OperationsImpl(this);
|
|
77
|
+
this.alias = new AliasImpl(this);
|
|
78
|
+
this.subscriptionPolicy = new SubscriptionPolicyImpl(this);
|
|
79
|
+
this.billingAccount = new BillingAccountImpl(this);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
subscription: Subscription;
|
|
83
|
+
operations: Operations;
|
|
84
|
+
alias: Alias;
|
|
85
|
+
subscriptionPolicy: SubscriptionPolicy;
|
|
86
|
+
billingAccount: BillingAccount;
|
|
87
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"module": "es6",
|
|
4
4
|
"moduleResolution": "node",
|
|
5
5
|
"strict": true,
|
|
6
|
-
"target": "
|
|
6
|
+
"target": "es6",
|
|
7
7
|
"sourceMap": true,
|
|
8
8
|
"declarationMap": true,
|
|
9
9
|
"esModuleInterop": true,
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
"forceConsistentCasingInFileNames": true,
|
|
12
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
|
}
|