@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
|
@@ -1,194 +0,0 @@
|
|
|
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.
|
|
5
|
-
*
|
|
6
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import * as msRest from "@azure/ms-rest-js";
|
|
12
|
-
import * as Models from "../models";
|
|
13
|
-
import * as Mappers from "../models/subscriptionOperationsMappers";
|
|
14
|
-
import * as Parameters from "../models/parameters";
|
|
15
|
-
import { SubscriptionClientContext } from "../subscriptionClientContext";
|
|
16
|
-
|
|
17
|
-
/** Class representing a SubscriptionOperations. */
|
|
18
|
-
export class SubscriptionOperations {
|
|
19
|
-
private readonly client: SubscriptionClientContext;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Create a SubscriptionOperations.
|
|
23
|
-
* @param {SubscriptionClientContext} client Reference to the service client.
|
|
24
|
-
*/
|
|
25
|
-
constructor(client: SubscriptionClientContext) {
|
|
26
|
-
this.client = client;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The operation to cancel a subscription
|
|
31
|
-
* @param subscriptionId Subscription Id.
|
|
32
|
-
* @param [options] The optional parameters
|
|
33
|
-
* @returns Promise<Models.SubscriptionCancelResponse>
|
|
34
|
-
*/
|
|
35
|
-
cancel(subscriptionId: string, options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionCancelResponse>;
|
|
36
|
-
/**
|
|
37
|
-
* @param subscriptionId Subscription Id.
|
|
38
|
-
* @param callback The callback
|
|
39
|
-
*/
|
|
40
|
-
cancel(subscriptionId: string, callback: msRest.ServiceCallback<Models.CanceledSubscriptionId>): void;
|
|
41
|
-
/**
|
|
42
|
-
* @param subscriptionId Subscription Id.
|
|
43
|
-
* @param options The optional parameters
|
|
44
|
-
* @param callback The callback
|
|
45
|
-
*/
|
|
46
|
-
cancel(subscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.CanceledSubscriptionId>): void;
|
|
47
|
-
cancel(subscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.CanceledSubscriptionId>, callback?: msRest.ServiceCallback<Models.CanceledSubscriptionId>): Promise<Models.SubscriptionCancelResponse> {
|
|
48
|
-
return this.client.sendOperationRequest(
|
|
49
|
-
{
|
|
50
|
-
subscriptionId,
|
|
51
|
-
options
|
|
52
|
-
},
|
|
53
|
-
cancelOperationSpec,
|
|
54
|
-
callback) as Promise<Models.SubscriptionCancelResponse>;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* The operation to rename a subscription
|
|
59
|
-
* @param subscriptionId Subscription Id.
|
|
60
|
-
* @param body Subscription Name
|
|
61
|
-
* @param [options] The optional parameters
|
|
62
|
-
* @returns Promise<Models.SubscriptionRenameResponse>
|
|
63
|
-
*/
|
|
64
|
-
rename(subscriptionId: string, body: Models.SubscriptionName, options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionRenameResponse>;
|
|
65
|
-
/**
|
|
66
|
-
* @param subscriptionId Subscription Id.
|
|
67
|
-
* @param body Subscription Name
|
|
68
|
-
* @param callback The callback
|
|
69
|
-
*/
|
|
70
|
-
rename(subscriptionId: string, body: Models.SubscriptionName, callback: msRest.ServiceCallback<Models.RenamedSubscriptionId>): void;
|
|
71
|
-
/**
|
|
72
|
-
* @param subscriptionId Subscription Id.
|
|
73
|
-
* @param body Subscription Name
|
|
74
|
-
* @param options The optional parameters
|
|
75
|
-
* @param callback The callback
|
|
76
|
-
*/
|
|
77
|
-
rename(subscriptionId: string, body: Models.SubscriptionName, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.RenamedSubscriptionId>): void;
|
|
78
|
-
rename(subscriptionId: string, body: Models.SubscriptionName, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.RenamedSubscriptionId>, callback?: msRest.ServiceCallback<Models.RenamedSubscriptionId>): Promise<Models.SubscriptionRenameResponse> {
|
|
79
|
-
return this.client.sendOperationRequest(
|
|
80
|
-
{
|
|
81
|
-
subscriptionId,
|
|
82
|
-
body,
|
|
83
|
-
options
|
|
84
|
-
},
|
|
85
|
-
renameOperationSpec,
|
|
86
|
-
callback) as Promise<Models.SubscriptionRenameResponse>;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* The operation to enable a subscription
|
|
91
|
-
* @param subscriptionId Subscription Id.
|
|
92
|
-
* @param [options] The optional parameters
|
|
93
|
-
* @returns Promise<Models.SubscriptionEnableResponse>
|
|
94
|
-
*/
|
|
95
|
-
enable(subscriptionId: string, options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionEnableResponse>;
|
|
96
|
-
/**
|
|
97
|
-
* @param subscriptionId Subscription Id.
|
|
98
|
-
* @param callback The callback
|
|
99
|
-
*/
|
|
100
|
-
enable(subscriptionId: string, callback: msRest.ServiceCallback<Models.EnabledSubscriptionId>): void;
|
|
101
|
-
/**
|
|
102
|
-
* @param subscriptionId Subscription Id.
|
|
103
|
-
* @param options The optional parameters
|
|
104
|
-
* @param callback The callback
|
|
105
|
-
*/
|
|
106
|
-
enable(subscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.EnabledSubscriptionId>): void;
|
|
107
|
-
enable(subscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.EnabledSubscriptionId>, callback?: msRest.ServiceCallback<Models.EnabledSubscriptionId>): Promise<Models.SubscriptionEnableResponse> {
|
|
108
|
-
return this.client.sendOperationRequest(
|
|
109
|
-
{
|
|
110
|
-
subscriptionId,
|
|
111
|
-
options
|
|
112
|
-
},
|
|
113
|
-
enableOperationSpec,
|
|
114
|
-
callback) as Promise<Models.SubscriptionEnableResponse>;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// Operation Specifications
|
|
119
|
-
const serializer = new msRest.Serializer(Mappers);
|
|
120
|
-
const cancelOperationSpec: msRest.OperationSpec = {
|
|
121
|
-
httpMethod: "POST",
|
|
122
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.Subscription/cancel",
|
|
123
|
-
urlParameters: [
|
|
124
|
-
Parameters.subscriptionId
|
|
125
|
-
],
|
|
126
|
-
queryParameters: [
|
|
127
|
-
Parameters.apiVersion1
|
|
128
|
-
],
|
|
129
|
-
headerParameters: [
|
|
130
|
-
Parameters.acceptLanguage
|
|
131
|
-
],
|
|
132
|
-
responses: {
|
|
133
|
-
200: {
|
|
134
|
-
bodyMapper: Mappers.CanceledSubscriptionId
|
|
135
|
-
},
|
|
136
|
-
default: {
|
|
137
|
-
bodyMapper: Mappers.ErrorResponse
|
|
138
|
-
}
|
|
139
|
-
},
|
|
140
|
-
serializer
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
const renameOperationSpec: msRest.OperationSpec = {
|
|
144
|
-
httpMethod: "POST",
|
|
145
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.Subscription/rename",
|
|
146
|
-
urlParameters: [
|
|
147
|
-
Parameters.subscriptionId
|
|
148
|
-
],
|
|
149
|
-
queryParameters: [
|
|
150
|
-
Parameters.apiVersion1
|
|
151
|
-
],
|
|
152
|
-
headerParameters: [
|
|
153
|
-
Parameters.acceptLanguage
|
|
154
|
-
],
|
|
155
|
-
requestBody: {
|
|
156
|
-
parameterPath: "body",
|
|
157
|
-
mapper: {
|
|
158
|
-
...Mappers.SubscriptionName,
|
|
159
|
-
required: true
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
responses: {
|
|
163
|
-
200: {
|
|
164
|
-
bodyMapper: Mappers.RenamedSubscriptionId
|
|
165
|
-
},
|
|
166
|
-
default: {
|
|
167
|
-
bodyMapper: Mappers.ErrorResponse
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
serializer
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
const enableOperationSpec: msRest.OperationSpec = {
|
|
174
|
-
httpMethod: "POST",
|
|
175
|
-
path: "subscriptions/{subscriptionId}/providers/Microsoft.Subscription/enable",
|
|
176
|
-
urlParameters: [
|
|
177
|
-
Parameters.subscriptionId
|
|
178
|
-
],
|
|
179
|
-
queryParameters: [
|
|
180
|
-
Parameters.apiVersion1
|
|
181
|
-
],
|
|
182
|
-
headerParameters: [
|
|
183
|
-
Parameters.acceptLanguage
|
|
184
|
-
],
|
|
185
|
-
responses: {
|
|
186
|
-
200: {
|
|
187
|
-
bodyMapper: Mappers.EnabledSubscriptionId
|
|
188
|
-
},
|
|
189
|
-
default: {
|
|
190
|
-
bodyMapper: Mappers.ErrorResponse
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
serializer
|
|
194
|
-
};
|
|
@@ -1,227 +0,0 @@
|
|
|
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.
|
|
5
|
-
*
|
|
6
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import * as msRest from "@azure/ms-rest-js";
|
|
12
|
-
import * as Models from "../models";
|
|
13
|
-
import * as Mappers from "../models/subscriptionsMappers";
|
|
14
|
-
import * as Parameters from "../models/parameters";
|
|
15
|
-
import { SubscriptionClientContext } from "../subscriptionClientContext";
|
|
16
|
-
|
|
17
|
-
/** Class representing a Subscriptions. */
|
|
18
|
-
export class Subscriptions {
|
|
19
|
-
private readonly client: SubscriptionClientContext;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Create a Subscriptions.
|
|
23
|
-
* @param {SubscriptionClientContext} client Reference to the service client.
|
|
24
|
-
*/
|
|
25
|
-
constructor(client: SubscriptionClientContext) {
|
|
26
|
-
this.client = client;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* This operation provides all the locations that are available for resource providers; however,
|
|
31
|
-
* each resource provider may support a subset of this list.
|
|
32
|
-
* @summary Gets all available geo-locations.
|
|
33
|
-
* @param subscriptionId The ID of the target subscription.
|
|
34
|
-
* @param [options] The optional parameters
|
|
35
|
-
* @returns Promise<Models.SubscriptionsListLocationsResponse>
|
|
36
|
-
*/
|
|
37
|
-
listLocations(subscriptionId: string, options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionsListLocationsResponse>;
|
|
38
|
-
/**
|
|
39
|
-
* @param subscriptionId The ID of the target subscription.
|
|
40
|
-
* @param callback The callback
|
|
41
|
-
*/
|
|
42
|
-
listLocations(subscriptionId: string, callback: msRest.ServiceCallback<Models.LocationListResult>): void;
|
|
43
|
-
/**
|
|
44
|
-
* @param subscriptionId The ID of the target subscription.
|
|
45
|
-
* @param options The optional parameters
|
|
46
|
-
* @param callback The callback
|
|
47
|
-
*/
|
|
48
|
-
listLocations(subscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.LocationListResult>): void;
|
|
49
|
-
listLocations(subscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.LocationListResult>, callback?: msRest.ServiceCallback<Models.LocationListResult>): Promise<Models.SubscriptionsListLocationsResponse> {
|
|
50
|
-
return this.client.sendOperationRequest(
|
|
51
|
-
{
|
|
52
|
-
subscriptionId,
|
|
53
|
-
options
|
|
54
|
-
},
|
|
55
|
-
listLocationsOperationSpec,
|
|
56
|
-
callback) as Promise<Models.SubscriptionsListLocationsResponse>;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Gets details about a specified subscription.
|
|
61
|
-
* @param subscriptionId The ID of the target subscription.
|
|
62
|
-
* @param [options] The optional parameters
|
|
63
|
-
* @returns Promise<Models.SubscriptionsGetResponse>
|
|
64
|
-
*/
|
|
65
|
-
get(subscriptionId: string, options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionsGetResponse>;
|
|
66
|
-
/**
|
|
67
|
-
* @param subscriptionId The ID of the target subscription.
|
|
68
|
-
* @param callback The callback
|
|
69
|
-
*/
|
|
70
|
-
get(subscriptionId: string, callback: msRest.ServiceCallback<Models.Subscription>): void;
|
|
71
|
-
/**
|
|
72
|
-
* @param subscriptionId The ID of the target subscription.
|
|
73
|
-
* @param options The optional parameters
|
|
74
|
-
* @param callback The callback
|
|
75
|
-
*/
|
|
76
|
-
get(subscriptionId: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.Subscription>): void;
|
|
77
|
-
get(subscriptionId: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.Subscription>, callback?: msRest.ServiceCallback<Models.Subscription>): Promise<Models.SubscriptionsGetResponse> {
|
|
78
|
-
return this.client.sendOperationRequest(
|
|
79
|
-
{
|
|
80
|
-
subscriptionId,
|
|
81
|
-
options
|
|
82
|
-
},
|
|
83
|
-
getOperationSpec,
|
|
84
|
-
callback) as Promise<Models.SubscriptionsGetResponse>;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Gets all subscriptions for a tenant.
|
|
89
|
-
* @param [options] The optional parameters
|
|
90
|
-
* @returns Promise<Models.SubscriptionsListResponse>
|
|
91
|
-
*/
|
|
92
|
-
list(options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionsListResponse>;
|
|
93
|
-
/**
|
|
94
|
-
* @param callback The callback
|
|
95
|
-
*/
|
|
96
|
-
list(callback: msRest.ServiceCallback<Models.SubscriptionListResult>): void;
|
|
97
|
-
/**
|
|
98
|
-
* @param options The optional parameters
|
|
99
|
-
* @param callback The callback
|
|
100
|
-
*/
|
|
101
|
-
list(options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SubscriptionListResult>): void;
|
|
102
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SubscriptionListResult>, callback?: msRest.ServiceCallback<Models.SubscriptionListResult>): Promise<Models.SubscriptionsListResponse> {
|
|
103
|
-
return this.client.sendOperationRequest(
|
|
104
|
-
{
|
|
105
|
-
options
|
|
106
|
-
},
|
|
107
|
-
listOperationSpec,
|
|
108
|
-
callback) as Promise<Models.SubscriptionsListResponse>;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Gets all subscriptions for a tenant.
|
|
113
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
114
|
-
* @param [options] The optional parameters
|
|
115
|
-
* @returns Promise<Models.SubscriptionsListNextResponse>
|
|
116
|
-
*/
|
|
117
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.SubscriptionsListNextResponse>;
|
|
118
|
-
/**
|
|
119
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
120
|
-
* @param callback The callback
|
|
121
|
-
*/
|
|
122
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.SubscriptionListResult>): void;
|
|
123
|
-
/**
|
|
124
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
125
|
-
* @param options The optional parameters
|
|
126
|
-
* @param callback The callback
|
|
127
|
-
*/
|
|
128
|
-
listNext(nextPageLink: string, options: msRest.RequestOptionsBase, callback: msRest.ServiceCallback<Models.SubscriptionListResult>): void;
|
|
129
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.SubscriptionListResult>, callback?: msRest.ServiceCallback<Models.SubscriptionListResult>): Promise<Models.SubscriptionsListNextResponse> {
|
|
130
|
-
return this.client.sendOperationRequest(
|
|
131
|
-
{
|
|
132
|
-
nextPageLink,
|
|
133
|
-
options
|
|
134
|
-
},
|
|
135
|
-
listNextOperationSpec,
|
|
136
|
-
callback) as Promise<Models.SubscriptionsListNextResponse>;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
// Operation Specifications
|
|
141
|
-
const serializer = new msRest.Serializer(Mappers);
|
|
142
|
-
const listLocationsOperationSpec: msRest.OperationSpec = {
|
|
143
|
-
httpMethod: "GET",
|
|
144
|
-
path: "subscriptions/{subscriptionId}/locations",
|
|
145
|
-
urlParameters: [
|
|
146
|
-
Parameters.subscriptionId
|
|
147
|
-
],
|
|
148
|
-
queryParameters: [
|
|
149
|
-
Parameters.apiVersion0
|
|
150
|
-
],
|
|
151
|
-
headerParameters: [
|
|
152
|
-
Parameters.acceptLanguage
|
|
153
|
-
],
|
|
154
|
-
responses: {
|
|
155
|
-
200: {
|
|
156
|
-
bodyMapper: Mappers.LocationListResult
|
|
157
|
-
},
|
|
158
|
-
default: {
|
|
159
|
-
bodyMapper: Mappers.CloudError
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
serializer
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
const getOperationSpec: msRest.OperationSpec = {
|
|
166
|
-
httpMethod: "GET",
|
|
167
|
-
path: "subscriptions/{subscriptionId}",
|
|
168
|
-
urlParameters: [
|
|
169
|
-
Parameters.subscriptionId
|
|
170
|
-
],
|
|
171
|
-
queryParameters: [
|
|
172
|
-
Parameters.apiVersion0
|
|
173
|
-
],
|
|
174
|
-
headerParameters: [
|
|
175
|
-
Parameters.acceptLanguage
|
|
176
|
-
],
|
|
177
|
-
responses: {
|
|
178
|
-
200: {
|
|
179
|
-
bodyMapper: Mappers.Subscription
|
|
180
|
-
},
|
|
181
|
-
default: {
|
|
182
|
-
bodyMapper: Mappers.CloudError
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
serializer
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
const listOperationSpec: msRest.OperationSpec = {
|
|
189
|
-
httpMethod: "GET",
|
|
190
|
-
path: "subscriptions",
|
|
191
|
-
queryParameters: [
|
|
192
|
-
Parameters.apiVersion0
|
|
193
|
-
],
|
|
194
|
-
headerParameters: [
|
|
195
|
-
Parameters.acceptLanguage
|
|
196
|
-
],
|
|
197
|
-
responses: {
|
|
198
|
-
200: {
|
|
199
|
-
bodyMapper: Mappers.SubscriptionListResult
|
|
200
|
-
},
|
|
201
|
-
default: {
|
|
202
|
-
bodyMapper: Mappers.CloudError
|
|
203
|
-
}
|
|
204
|
-
},
|
|
205
|
-
serializer
|
|
206
|
-
};
|
|
207
|
-
|
|
208
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
209
|
-
httpMethod: "GET",
|
|
210
|
-
baseUrl: "https://management.azure.com",
|
|
211
|
-
path: "{nextLink}",
|
|
212
|
-
urlParameters: [
|
|
213
|
-
Parameters.nextPageLink
|
|
214
|
-
],
|
|
215
|
-
headerParameters: [
|
|
216
|
-
Parameters.acceptLanguage
|
|
217
|
-
],
|
|
218
|
-
responses: {
|
|
219
|
-
200: {
|
|
220
|
-
bodyMapper: Mappers.SubscriptionListResult
|
|
221
|
-
},
|
|
222
|
-
default: {
|
|
223
|
-
bodyMapper: Mappers.CloudError
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
serializer
|
|
227
|
-
};
|
|
@@ -1,123 +0,0 @@
|
|
|
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.
|
|
5
|
-
*
|
|
6
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import * as msRest from "@azure/ms-rest-js";
|
|
12
|
-
import * as Models from "../models";
|
|
13
|
-
import * as Mappers from "../models/tenantsMappers";
|
|
14
|
-
import * as Parameters from "../models/parameters";
|
|
15
|
-
import { SubscriptionClientContext } from "../subscriptionClientContext";
|
|
16
|
-
|
|
17
|
-
/** Class representing a Tenants. */
|
|
18
|
-
export class Tenants {
|
|
19
|
-
private readonly client: SubscriptionClientContext;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Create a Tenants.
|
|
23
|
-
* @param {SubscriptionClientContext} client Reference to the service client.
|
|
24
|
-
*/
|
|
25
|
-
constructor(client: SubscriptionClientContext) {
|
|
26
|
-
this.client = client;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Gets the tenants for your account.
|
|
31
|
-
* @param [options] The optional parameters
|
|
32
|
-
* @returns Promise<Models.TenantsListResponse>
|
|
33
|
-
*/
|
|
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
|
|
48
|
-
},
|
|
49
|
-
listOperationSpec,
|
|
50
|
-
callback) as Promise<Models.TenantsListResponse>;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* 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
|
|
63
|
-
*/
|
|
64
|
-
listNext(nextPageLink: string, callback: msRest.ServiceCallback<Models.TenantListResult>): void;
|
|
65
|
-
/**
|
|
66
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
67
|
-
* @param options The optional parameters
|
|
68
|
-
* @param callback The callback
|
|
69
|
-
*/
|
|
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> {
|
|
72
|
-
return this.client.sendOperationRequest(
|
|
73
|
-
{
|
|
74
|
-
nextPageLink,
|
|
75
|
-
options
|
|
76
|
-
},
|
|
77
|
-
listNextOperationSpec,
|
|
78
|
-
callback) as Promise<Models.TenantsListNextResponse>;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Operation Specifications
|
|
83
|
-
const serializer = new msRest.Serializer(Mappers);
|
|
84
|
-
const listOperationSpec: msRest.OperationSpec = {
|
|
85
|
-
httpMethod: "GET",
|
|
86
|
-
path: "tenants",
|
|
87
|
-
queryParameters: [
|
|
88
|
-
Parameters.apiVersion0
|
|
89
|
-
],
|
|
90
|
-
headerParameters: [
|
|
91
|
-
Parameters.acceptLanguage
|
|
92
|
-
],
|
|
93
|
-
responses: {
|
|
94
|
-
200: {
|
|
95
|
-
bodyMapper: Mappers.TenantListResult
|
|
96
|
-
},
|
|
97
|
-
default: {
|
|
98
|
-
bodyMapper: Mappers.CloudError
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
serializer
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
105
|
-
httpMethod: "GET",
|
|
106
|
-
baseUrl: "https://management.azure.com",
|
|
107
|
-
path: "{nextLink}",
|
|
108
|
-
urlParameters: [
|
|
109
|
-
Parameters.nextPageLink
|
|
110
|
-
],
|
|
111
|
-
headerParameters: [
|
|
112
|
-
Parameters.acceptLanguage
|
|
113
|
-
],
|
|
114
|
-
responses: {
|
|
115
|
-
200: {
|
|
116
|
-
bodyMapper: Mappers.TenantListResult
|
|
117
|
-
},
|
|
118
|
-
default: {
|
|
119
|
-
bodyMapper: Mappers.CloudError
|
|
120
|
-
}
|
|
121
|
-
},
|
|
122
|
-
serializer
|
|
123
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
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.
|
|
5
|
-
*
|
|
6
|
-
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
7
|
-
* Changes may cause incorrect behavior and will be lost if the code is
|
|
8
|
-
* regenerated.
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import * as Models from "./models";
|
|
12
|
-
import * as msRest from "@azure/ms-rest-js";
|
|
13
|
-
import { TokenCredential } from "@azure/core-auth";
|
|
14
|
-
import * as msRestAzure from "@azure/ms-rest-azure-js";
|
|
15
|
-
|
|
16
|
-
const packageName = "@azure/arm-subscriptions";
|
|
17
|
-
const packageVersion = "3.1.2";
|
|
18
|
-
|
|
19
|
-
export class SubscriptionClientContext extends msRestAzure.AzureServiceClient {
|
|
20
|
-
credentials: msRest.ServiceClientCredentials | TokenCredential;
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Initializes a new instance of the SubscriptionClient class.
|
|
24
|
-
* @param credentials Credentials needed for the client to connect to Azure. Credentials
|
|
25
|
-
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
|
|
26
|
-
* more information about these credentials, see
|
|
27
|
-
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
|
|
28
|
-
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
|
|
29
|
-
* @azure/ms-rest-browserauth are also supported.
|
|
30
|
-
* @param [options] The parameter options
|
|
31
|
-
*/
|
|
32
|
-
constructor(credentials: msRest.ServiceClientCredentials | TokenCredential, options?: Models.SubscriptionClientOptions) {
|
|
33
|
-
if (credentials == undefined) {
|
|
34
|
-
throw new Error('\'credentials\' cannot be null.');
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
if (!options) {
|
|
38
|
-
options = {};
|
|
39
|
-
}
|
|
40
|
-
if (!options.userAgent) {
|
|
41
|
-
const defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
|
|
42
|
-
options.userAgent = `${packageName}/${packageVersion} ${defaultUserAgent}`;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
super(credentials, options);
|
|
46
|
-
|
|
47
|
-
this.acceptLanguage = 'en-US';
|
|
48
|
-
this.longRunningOperationRetryTimeout = 30;
|
|
49
|
-
this.baseUri = options.baseUri || this.baseUri || "https://management.azure.com";
|
|
50
|
-
this.requestContentType = "application/json; charset=utf-8";
|
|
51
|
-
this.credentials = credentials;
|
|
52
|
-
|
|
53
|
-
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
|
|
54
|
-
this.acceptLanguage = options.acceptLanguage;
|
|
55
|
-
}
|
|
56
|
-
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
|
|
57
|
-
this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|