@azure/arm-azurestack 2.1.1 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/{LICENSE.txt → LICENSE} +2 -2
- package/README.md +69 -80
- package/dist/index.js +3000 -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/azureStackManagementClient.d.ts +24 -0
- package/dist-esm/src/azureStackManagementClient.d.ts.map +1 -0
- package/dist-esm/src/azureStackManagementClient.js +57 -0
- package/dist-esm/src/azureStackManagementClient.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/models/index.d.ts +854 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +55 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +37 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/{esm → dist-esm/src}/models/mappers.js +608 -394
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +20 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +163 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/cloudManifestFile.d.ts +24 -0
- package/dist-esm/src/operations/cloudManifestFile.d.ts.map +1 -0
- package/dist-esm/src/operations/cloudManifestFile.js +70 -0
- package/dist-esm/src/operations/cloudManifestFile.js.map +1 -0
- package/dist-esm/src/operations/customerSubscriptions.d.ts +63 -0
- package/dist-esm/src/operations/customerSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/customerSubscriptions.js +241 -0
- package/dist-esm/src/operations/customerSubscriptions.js.map +1 -0
- package/{esm → dist-esm/src}/operations/index.d.ts +3 -1
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/{esm → dist-esm/src}/operations/index.js +6 -6
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/linkedSubscriptions.d.ts +83 -0
- package/dist-esm/src/operations/linkedSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operations/linkedSubscriptions.js +359 -0
- package/dist-esm/src/operations/linkedSubscriptions.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/products.d.ts +78 -0
- package/dist-esm/src/operations/products.d.ts.map +1 -0
- package/dist-esm/src/operations/products.js +303 -0
- package/dist-esm/src/operations/products.js.map +1 -0
- package/dist-esm/src/operations/registrations.d.ts +97 -0
- package/dist-esm/src/operations/registrations.d.ts.map +1 -0
- package/dist-esm/src/operations/registrations.js +416 -0
- package/dist-esm/src/operations/registrations.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/cloudManifestFile.d.ts +16 -0
- package/dist-esm/src/operationsInterfaces/cloudManifestFile.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/cloudManifestFile.js +9 -0
- package/dist-esm/src/operationsInterfaces/cloudManifestFile.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/customerSubscriptions.d.ts +38 -0
- package/dist-esm/src/operationsInterfaces/customerSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/customerSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/customerSubscriptions.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +7 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +14 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedSubscriptions.d.ts +47 -0
- package/dist-esm/src/operationsInterfaces/linkedSubscriptions.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/linkedSubscriptions.js +9 -0
- package/dist-esm/src/operationsInterfaces/linkedSubscriptions.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/products.d.ts +53 -0
- package/dist-esm/src/operationsInterfaces/products.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/products.js +9 -0
- package/dist-esm/src/operationsInterfaces/products.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/registrations.d.ts +61 -0
- package/dist-esm/src/operationsInterfaces/registrations.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/registrations.js +9 -0
- package/dist-esm/src/operationsInterfaces/registrations.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +4 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +43 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +63 -32
- package/review/arm-azurestack.api.md +695 -0
- package/rollup.config.js +181 -30
- package/src/azureStackManagementClient.ts +88 -43
- package/src/index.ts +12 -0
- package/src/models/index.ts +725 -836
- package/src/models/mappers.ts +623 -384
- package/src/models/parameters.ts +130 -32
- package/src/operations/cloudManifestFile.ts +93 -0
- package/src/operations/customerSubscriptions.ts +191 -206
- package/src/operations/index.ts +6 -6
- package/src/operations/linkedSubscriptions.ts +450 -0
- package/src/operations/operations.ts +89 -75
- package/src/operations/products.ts +240 -299
- package/src/operations/registrations.ts +347 -266
- package/src/operationsInterfaces/cloudManifestFile.ts +34 -0
- package/src/operationsInterfaces/customerSubscriptions.ts +75 -0
- package/src/operationsInterfaces/index.ts +14 -0
- package/src/operationsInterfaces/linkedSubscriptions.ts +91 -0
- package/src/operationsInterfaces/operations.ts +22 -0
- package/src/operationsInterfaces/products.ts +104 -0
- package/src/operationsInterfaces/registrations.ts +116 -0
- package/tsconfig.json +3 -3
- package/types/arm-azurestack.d.ts +1206 -0
- package/types/tsdoc-metadata.json +11 -0
- package/dist/arm-azurestack.js +0 -2153
- package/dist/arm-azurestack.js.map +0 -1
- package/dist/arm-azurestack.min.js +0 -1
- package/dist/arm-azurestack.min.js.map +0 -1
- package/esm/azureStackManagementClient.d.ts +0 -28
- package/esm/azureStackManagementClient.d.ts.map +0 -1
- package/esm/azureStackManagementClient.js +0 -42
- package/esm/azureStackManagementClient.js.map +0 -1
- package/esm/azureStackManagementClientContext.d.ts +0 -23
- package/esm/azureStackManagementClientContext.d.ts.map +0 -1
- package/esm/azureStackManagementClientContext.js +0 -62
- package/esm/azureStackManagementClientContext.js.map +0 -1
- package/esm/models/customerSubscriptionsMappers.d.ts +0 -2
- package/esm/models/customerSubscriptionsMappers.d.ts.map +0 -1
- package/esm/models/customerSubscriptionsMappers.js +0 -9
- package/esm/models/customerSubscriptionsMappers.js.map +0 -1
- package/esm/models/index.d.ts +0 -1014
- 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 -31
- package/esm/models/mappers.d.ts.map +0 -1
- 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 -10
- package/esm/models/parameters.d.ts.map +0 -1
- package/esm/models/parameters.js +0 -92
- package/esm/models/parameters.js.map +0 -1
- package/esm/models/productsMappers.d.ts +0 -2
- package/esm/models/productsMappers.d.ts.map +0 -1
- package/esm/models/productsMappers.js +0 -9
- package/esm/models/productsMappers.js.map +0 -1
- package/esm/models/registrationsMappers.d.ts +0 -2
- package/esm/models/registrationsMappers.d.ts.map +0 -1
- package/esm/models/registrationsMappers.js +0 -9
- package/esm/models/registrationsMappers.js.map +0 -1
- package/esm/operations/customerSubscriptions.d.ts +0 -127
- package/esm/operations/customerSubscriptions.d.ts.map +0 -1
- package/esm/operations/customerSubscriptions.js +0 -188
- package/esm/operations/customerSubscriptions.js.map +0 -1
- package/esm/operations/index.d.ts.map +0 -1
- package/esm/operations/index.js.map +0 -1
- package/esm/operations/operations.d.ts +0 -46
- package/esm/operations/operations.d.ts.map +0 -1
- package/esm/operations/operations.js +0 -77
- package/esm/operations/operations.js.map +0 -1
- package/esm/operations/products.d.ts +0 -169
- package/esm/operations/products.d.ts.map +0 -1
- package/esm/operations/products.js +0 -268
- package/esm/operations/products.js.map +0 -1
- package/esm/operations/registrations.d.ts +0 -160
- package/esm/operations/registrations.d.ts.map +0 -1
- package/esm/operations/registrations.js +0 -250
- package/esm/operations/registrations.js.map +0 -1
- package/src/azureStackManagementClientContext.ts +0 -69
- package/src/models/customerSubscriptionsMappers.ts +0 -24
- package/src/models/operationsMappers.ts +0 -14
- package/src/models/productsMappers.ts +0 -30
- package/src/models/registrationsMappers.ts +0 -26
|
@@ -0,0 +1,450 @@
|
|
|
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 { LinkedSubscriptions } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
13
|
+
import * as Parameters from "../models/parameters";
|
|
14
|
+
import { AzureStackManagementClient } from "../azureStackManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
LinkedSubscription,
|
|
17
|
+
LinkedSubscriptionsListByResourceGroupNextOptionalParams,
|
|
18
|
+
LinkedSubscriptionsListByResourceGroupOptionalParams,
|
|
19
|
+
LinkedSubscriptionsListBySubscriptionNextOptionalParams,
|
|
20
|
+
LinkedSubscriptionsListBySubscriptionOptionalParams,
|
|
21
|
+
LinkedSubscriptionsListByResourceGroupResponse,
|
|
22
|
+
LinkedSubscriptionsListBySubscriptionResponse,
|
|
23
|
+
LinkedSubscriptionsGetOptionalParams,
|
|
24
|
+
LinkedSubscriptionsGetResponse,
|
|
25
|
+
LinkedSubscriptionsDeleteOptionalParams,
|
|
26
|
+
LinkedSubscriptionParameter,
|
|
27
|
+
LinkedSubscriptionsCreateOrUpdateOptionalParams,
|
|
28
|
+
LinkedSubscriptionsCreateOrUpdateResponse,
|
|
29
|
+
LinkedSubscriptionsUpdateOptionalParams,
|
|
30
|
+
LinkedSubscriptionsUpdateResponse,
|
|
31
|
+
LinkedSubscriptionsListByResourceGroupNextResponse,
|
|
32
|
+
LinkedSubscriptionsListBySubscriptionNextResponse
|
|
33
|
+
} from "../models";
|
|
34
|
+
|
|
35
|
+
/// <reference lib="esnext.asynciterable" />
|
|
36
|
+
/** Class containing LinkedSubscriptions operations. */
|
|
37
|
+
export class LinkedSubscriptionsImpl implements LinkedSubscriptions {
|
|
38
|
+
private readonly client: AzureStackManagementClient;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Initialize a new instance of the class LinkedSubscriptions class.
|
|
42
|
+
* @param client Reference to the service client
|
|
43
|
+
*/
|
|
44
|
+
constructor(client: AzureStackManagementClient) {
|
|
45
|
+
this.client = client;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Returns a list of all linked subscriptions under current resource group.
|
|
50
|
+
* @param resourceGroup Name of the resource group.
|
|
51
|
+
* @param options The options parameters.
|
|
52
|
+
*/
|
|
53
|
+
public listByResourceGroup(
|
|
54
|
+
resourceGroup: string,
|
|
55
|
+
options?: LinkedSubscriptionsListByResourceGroupOptionalParams
|
|
56
|
+
): PagedAsyncIterableIterator<LinkedSubscription> {
|
|
57
|
+
const iter = this.listByResourceGroupPagingAll(resourceGroup, options);
|
|
58
|
+
return {
|
|
59
|
+
next() {
|
|
60
|
+
return iter.next();
|
|
61
|
+
},
|
|
62
|
+
[Symbol.asyncIterator]() {
|
|
63
|
+
return this;
|
|
64
|
+
},
|
|
65
|
+
byPage: () => {
|
|
66
|
+
return this.listByResourceGroupPagingPage(resourceGroup, options);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
private async *listByResourceGroupPagingPage(
|
|
72
|
+
resourceGroup: string,
|
|
73
|
+
options?: LinkedSubscriptionsListByResourceGroupOptionalParams
|
|
74
|
+
): AsyncIterableIterator<LinkedSubscription[]> {
|
|
75
|
+
let result = await this._listByResourceGroup(resourceGroup, options);
|
|
76
|
+
yield result.value || [];
|
|
77
|
+
let continuationToken = result.nextLink;
|
|
78
|
+
while (continuationToken) {
|
|
79
|
+
result = await this._listByResourceGroupNext(
|
|
80
|
+
resourceGroup,
|
|
81
|
+
continuationToken,
|
|
82
|
+
options
|
|
83
|
+
);
|
|
84
|
+
continuationToken = result.nextLink;
|
|
85
|
+
yield result.value || [];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
private async *listByResourceGroupPagingAll(
|
|
90
|
+
resourceGroup: string,
|
|
91
|
+
options?: LinkedSubscriptionsListByResourceGroupOptionalParams
|
|
92
|
+
): AsyncIterableIterator<LinkedSubscription> {
|
|
93
|
+
for await (const page of this.listByResourceGroupPagingPage(
|
|
94
|
+
resourceGroup,
|
|
95
|
+
options
|
|
96
|
+
)) {
|
|
97
|
+
yield* page;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Returns a list of all linked subscriptions under current subscription.
|
|
103
|
+
* @param options The options parameters.
|
|
104
|
+
*/
|
|
105
|
+
public listBySubscription(
|
|
106
|
+
options?: LinkedSubscriptionsListBySubscriptionOptionalParams
|
|
107
|
+
): PagedAsyncIterableIterator<LinkedSubscription> {
|
|
108
|
+
const iter = this.listBySubscriptionPagingAll(options);
|
|
109
|
+
return {
|
|
110
|
+
next() {
|
|
111
|
+
return iter.next();
|
|
112
|
+
},
|
|
113
|
+
[Symbol.asyncIterator]() {
|
|
114
|
+
return this;
|
|
115
|
+
},
|
|
116
|
+
byPage: () => {
|
|
117
|
+
return this.listBySubscriptionPagingPage(options);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
private async *listBySubscriptionPagingPage(
|
|
123
|
+
options?: LinkedSubscriptionsListBySubscriptionOptionalParams
|
|
124
|
+
): AsyncIterableIterator<LinkedSubscription[]> {
|
|
125
|
+
let result = await this._listBySubscription(options);
|
|
126
|
+
yield result.value || [];
|
|
127
|
+
let continuationToken = result.nextLink;
|
|
128
|
+
while (continuationToken) {
|
|
129
|
+
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
130
|
+
continuationToken = result.nextLink;
|
|
131
|
+
yield result.value || [];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private async *listBySubscriptionPagingAll(
|
|
136
|
+
options?: LinkedSubscriptionsListBySubscriptionOptionalParams
|
|
137
|
+
): AsyncIterableIterator<LinkedSubscription> {
|
|
138
|
+
for await (const page of this.listBySubscriptionPagingPage(options)) {
|
|
139
|
+
yield* page;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Returns a list of all linked subscriptions under current resource group.
|
|
145
|
+
* @param resourceGroup Name of the resource group.
|
|
146
|
+
* @param options The options parameters.
|
|
147
|
+
*/
|
|
148
|
+
private _listByResourceGroup(
|
|
149
|
+
resourceGroup: string,
|
|
150
|
+
options?: LinkedSubscriptionsListByResourceGroupOptionalParams
|
|
151
|
+
): Promise<LinkedSubscriptionsListByResourceGroupResponse> {
|
|
152
|
+
return this.client.sendOperationRequest(
|
|
153
|
+
{ resourceGroup, options },
|
|
154
|
+
listByResourceGroupOperationSpec
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Returns a list of all linked subscriptions under current subscription.
|
|
160
|
+
* @param options The options parameters.
|
|
161
|
+
*/
|
|
162
|
+
private _listBySubscription(
|
|
163
|
+
options?: LinkedSubscriptionsListBySubscriptionOptionalParams
|
|
164
|
+
): Promise<LinkedSubscriptionsListBySubscriptionResponse> {
|
|
165
|
+
return this.client.sendOperationRequest(
|
|
166
|
+
{ options },
|
|
167
|
+
listBySubscriptionOperationSpec
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* Returns the properties of a Linked Subscription resource.
|
|
173
|
+
* @param resourceGroup Name of the resource group.
|
|
174
|
+
* @param linkedSubscriptionName Name of the Linked Subscription resource.
|
|
175
|
+
* @param options The options parameters.
|
|
176
|
+
*/
|
|
177
|
+
get(
|
|
178
|
+
resourceGroup: string,
|
|
179
|
+
linkedSubscriptionName: string,
|
|
180
|
+
options?: LinkedSubscriptionsGetOptionalParams
|
|
181
|
+
): Promise<LinkedSubscriptionsGetResponse> {
|
|
182
|
+
return this.client.sendOperationRequest(
|
|
183
|
+
{ resourceGroup, linkedSubscriptionName, options },
|
|
184
|
+
getOperationSpec
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Delete the requested Linked Subscription resource.
|
|
190
|
+
* @param resourceGroup Name of the resource group.
|
|
191
|
+
* @param linkedSubscriptionName Name of the Linked Subscription resource.
|
|
192
|
+
* @param options The options parameters.
|
|
193
|
+
*/
|
|
194
|
+
delete(
|
|
195
|
+
resourceGroup: string,
|
|
196
|
+
linkedSubscriptionName: string,
|
|
197
|
+
options?: LinkedSubscriptionsDeleteOptionalParams
|
|
198
|
+
): Promise<void> {
|
|
199
|
+
return this.client.sendOperationRequest(
|
|
200
|
+
{ resourceGroup, linkedSubscriptionName, options },
|
|
201
|
+
deleteOperationSpec
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Create or update a linked subscription resource.
|
|
207
|
+
* @param resourceGroup Name of the resource group.
|
|
208
|
+
* @param linkedSubscriptionName Name of the Linked Subscription resource.
|
|
209
|
+
* @param resource Linked subscription resource parameter.
|
|
210
|
+
* @param options The options parameters.
|
|
211
|
+
*/
|
|
212
|
+
createOrUpdate(
|
|
213
|
+
resourceGroup: string,
|
|
214
|
+
linkedSubscriptionName: string,
|
|
215
|
+
resource: LinkedSubscriptionParameter,
|
|
216
|
+
options?: LinkedSubscriptionsCreateOrUpdateOptionalParams
|
|
217
|
+
): Promise<LinkedSubscriptionsCreateOrUpdateResponse> {
|
|
218
|
+
return this.client.sendOperationRequest(
|
|
219
|
+
{ resourceGroup, linkedSubscriptionName, resource, options },
|
|
220
|
+
createOrUpdateOperationSpec
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Patch a Linked Subscription resource.
|
|
226
|
+
* @param resourceGroup Name of the resource group.
|
|
227
|
+
* @param linkedSubscriptionName Name of the Linked Subscription resource.
|
|
228
|
+
* @param resource Linked subscription resource parameter.
|
|
229
|
+
* @param options The options parameters.
|
|
230
|
+
*/
|
|
231
|
+
update(
|
|
232
|
+
resourceGroup: string,
|
|
233
|
+
linkedSubscriptionName: string,
|
|
234
|
+
resource: LinkedSubscriptionParameter,
|
|
235
|
+
options?: LinkedSubscriptionsUpdateOptionalParams
|
|
236
|
+
): Promise<LinkedSubscriptionsUpdateResponse> {
|
|
237
|
+
return this.client.sendOperationRequest(
|
|
238
|
+
{ resourceGroup, linkedSubscriptionName, resource, options },
|
|
239
|
+
updateOperationSpec
|
|
240
|
+
);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* ListByResourceGroupNext
|
|
245
|
+
* @param resourceGroup Name of the resource group.
|
|
246
|
+
* @param nextLink The nextLink from the previous successful call to the ListByResourceGroup method.
|
|
247
|
+
* @param options The options parameters.
|
|
248
|
+
*/
|
|
249
|
+
private _listByResourceGroupNext(
|
|
250
|
+
resourceGroup: string,
|
|
251
|
+
nextLink: string,
|
|
252
|
+
options?: LinkedSubscriptionsListByResourceGroupNextOptionalParams
|
|
253
|
+
): Promise<LinkedSubscriptionsListByResourceGroupNextResponse> {
|
|
254
|
+
return this.client.sendOperationRequest(
|
|
255
|
+
{ resourceGroup, nextLink, options },
|
|
256
|
+
listByResourceGroupNextOperationSpec
|
|
257
|
+
);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* ListBySubscriptionNext
|
|
262
|
+
* @param nextLink The nextLink from the previous successful call to the ListBySubscription method.
|
|
263
|
+
* @param options The options parameters.
|
|
264
|
+
*/
|
|
265
|
+
private _listBySubscriptionNext(
|
|
266
|
+
nextLink: string,
|
|
267
|
+
options?: LinkedSubscriptionsListBySubscriptionNextOptionalParams
|
|
268
|
+
): Promise<LinkedSubscriptionsListBySubscriptionNextResponse> {
|
|
269
|
+
return this.client.sendOperationRequest(
|
|
270
|
+
{ nextLink, options },
|
|
271
|
+
listBySubscriptionNextOperationSpec
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// Operation Specifications
|
|
276
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
277
|
+
|
|
278
|
+
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
279
|
+
path:
|
|
280
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions",
|
|
281
|
+
httpMethod: "GET",
|
|
282
|
+
responses: {
|
|
283
|
+
200: {
|
|
284
|
+
bodyMapper: Mappers.LinkedSubscriptionsList
|
|
285
|
+
},
|
|
286
|
+
default: {
|
|
287
|
+
bodyMapper: Mappers.ErrorResponse
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
queryParameters: [Parameters.apiVersion],
|
|
291
|
+
urlParameters: [
|
|
292
|
+
Parameters.$host,
|
|
293
|
+
Parameters.subscriptionId,
|
|
294
|
+
Parameters.resourceGroup
|
|
295
|
+
],
|
|
296
|
+
headerParameters: [Parameters.accept],
|
|
297
|
+
serializer
|
|
298
|
+
};
|
|
299
|
+
const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
300
|
+
path:
|
|
301
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.AzureStack/linkedSubscriptions",
|
|
302
|
+
httpMethod: "GET",
|
|
303
|
+
responses: {
|
|
304
|
+
200: {
|
|
305
|
+
bodyMapper: Mappers.LinkedSubscriptionsList
|
|
306
|
+
},
|
|
307
|
+
default: {
|
|
308
|
+
bodyMapper: Mappers.ErrorResponse
|
|
309
|
+
}
|
|
310
|
+
},
|
|
311
|
+
queryParameters: [Parameters.apiVersion],
|
|
312
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
313
|
+
headerParameters: [Parameters.accept],
|
|
314
|
+
serializer
|
|
315
|
+
};
|
|
316
|
+
const getOperationSpec: coreClient.OperationSpec = {
|
|
317
|
+
path:
|
|
318
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
|
|
319
|
+
httpMethod: "GET",
|
|
320
|
+
responses: {
|
|
321
|
+
200: {
|
|
322
|
+
bodyMapper: Mappers.LinkedSubscription
|
|
323
|
+
},
|
|
324
|
+
default: {
|
|
325
|
+
bodyMapper: Mappers.ErrorResponse
|
|
326
|
+
}
|
|
327
|
+
},
|
|
328
|
+
queryParameters: [Parameters.apiVersion],
|
|
329
|
+
urlParameters: [
|
|
330
|
+
Parameters.$host,
|
|
331
|
+
Parameters.subscriptionId,
|
|
332
|
+
Parameters.resourceGroup,
|
|
333
|
+
Parameters.linkedSubscriptionName
|
|
334
|
+
],
|
|
335
|
+
headerParameters: [Parameters.accept],
|
|
336
|
+
serializer
|
|
337
|
+
};
|
|
338
|
+
const deleteOperationSpec: coreClient.OperationSpec = {
|
|
339
|
+
path:
|
|
340
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
|
|
341
|
+
httpMethod: "DELETE",
|
|
342
|
+
responses: {
|
|
343
|
+
200: {},
|
|
344
|
+
204: {},
|
|
345
|
+
default: {
|
|
346
|
+
bodyMapper: Mappers.ErrorResponse
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
queryParameters: [Parameters.apiVersion],
|
|
350
|
+
urlParameters: [
|
|
351
|
+
Parameters.$host,
|
|
352
|
+
Parameters.subscriptionId,
|
|
353
|
+
Parameters.resourceGroup,
|
|
354
|
+
Parameters.linkedSubscriptionName
|
|
355
|
+
],
|
|
356
|
+
headerParameters: [Parameters.accept],
|
|
357
|
+
serializer
|
|
358
|
+
};
|
|
359
|
+
const createOrUpdateOperationSpec: coreClient.OperationSpec = {
|
|
360
|
+
path:
|
|
361
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
|
|
362
|
+
httpMethod: "PUT",
|
|
363
|
+
responses: {
|
|
364
|
+
200: {
|
|
365
|
+
bodyMapper: Mappers.LinkedSubscription
|
|
366
|
+
},
|
|
367
|
+
201: {
|
|
368
|
+
bodyMapper: Mappers.LinkedSubscription
|
|
369
|
+
},
|
|
370
|
+
default: {
|
|
371
|
+
bodyMapper: Mappers.ErrorResponse
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
requestBody: Parameters.resource,
|
|
375
|
+
queryParameters: [Parameters.apiVersion],
|
|
376
|
+
urlParameters: [
|
|
377
|
+
Parameters.$host,
|
|
378
|
+
Parameters.subscriptionId,
|
|
379
|
+
Parameters.resourceGroup,
|
|
380
|
+
Parameters.linkedSubscriptionName
|
|
381
|
+
],
|
|
382
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
383
|
+
mediaType: "json",
|
|
384
|
+
serializer
|
|
385
|
+
};
|
|
386
|
+
const updateOperationSpec: coreClient.OperationSpec = {
|
|
387
|
+
path:
|
|
388
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AzureStack/linkedSubscriptions/{linkedSubscriptionName}",
|
|
389
|
+
httpMethod: "PATCH",
|
|
390
|
+
responses: {
|
|
391
|
+
200: {
|
|
392
|
+
bodyMapper: Mappers.LinkedSubscription
|
|
393
|
+
},
|
|
394
|
+
default: {
|
|
395
|
+
bodyMapper: Mappers.ErrorResponse
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
requestBody: Parameters.resource,
|
|
399
|
+
queryParameters: [Parameters.apiVersion],
|
|
400
|
+
urlParameters: [
|
|
401
|
+
Parameters.$host,
|
|
402
|
+
Parameters.subscriptionId,
|
|
403
|
+
Parameters.resourceGroup,
|
|
404
|
+
Parameters.linkedSubscriptionName
|
|
405
|
+
],
|
|
406
|
+
headerParameters: [Parameters.accept, Parameters.contentType],
|
|
407
|
+
mediaType: "json",
|
|
408
|
+
serializer
|
|
409
|
+
};
|
|
410
|
+
const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
411
|
+
path: "{nextLink}",
|
|
412
|
+
httpMethod: "GET",
|
|
413
|
+
responses: {
|
|
414
|
+
200: {
|
|
415
|
+
bodyMapper: Mappers.LinkedSubscriptionsList
|
|
416
|
+
},
|
|
417
|
+
default: {
|
|
418
|
+
bodyMapper: Mappers.ErrorResponse
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
queryParameters: [Parameters.apiVersion],
|
|
422
|
+
urlParameters: [
|
|
423
|
+
Parameters.$host,
|
|
424
|
+
Parameters.nextLink,
|
|
425
|
+
Parameters.subscriptionId,
|
|
426
|
+
Parameters.resourceGroup
|
|
427
|
+
],
|
|
428
|
+
headerParameters: [Parameters.accept],
|
|
429
|
+
serializer
|
|
430
|
+
};
|
|
431
|
+
const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
432
|
+
path: "{nextLink}",
|
|
433
|
+
httpMethod: "GET",
|
|
434
|
+
responses: {
|
|
435
|
+
200: {
|
|
436
|
+
bodyMapper: Mappers.LinkedSubscriptionsList
|
|
437
|
+
},
|
|
438
|
+
default: {
|
|
439
|
+
bodyMapper: Mappers.ErrorResponse
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
queryParameters: [Parameters.apiVersion],
|
|
443
|
+
urlParameters: [
|
|
444
|
+
Parameters.$host,
|
|
445
|
+
Parameters.nextLink,
|
|
446
|
+
Parameters.subscriptionId
|
|
447
|
+
],
|
|
448
|
+
headerParameters: [Parameters.accept],
|
|
449
|
+
serializer
|
|
450
|
+
};
|
|
@@ -1,123 +1,137 @@
|
|
|
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
|
|
12
|
-
import
|
|
13
|
-
import * as
|
|
9
|
+
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
+
import { Operations } from "../operationsInterfaces";
|
|
11
|
+
import * as coreClient from "@azure/core-client";
|
|
12
|
+
import * as Mappers from "../models/mappers";
|
|
14
13
|
import * as Parameters from "../models/parameters";
|
|
15
|
-
import {
|
|
14
|
+
import { AzureStackManagementClient } from "../azureStackManagementClient";
|
|
15
|
+
import {
|
|
16
|
+
Operation,
|
|
17
|
+
OperationsListNextOptionalParams,
|
|
18
|
+
OperationsListOptionalParams,
|
|
19
|
+
OperationsListResponse,
|
|
20
|
+
OperationsListNextResponse
|
|
21
|
+
} from "../models";
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
/// <reference lib="esnext.asynciterable" />
|
|
24
|
+
/** Class containing Operations operations. */
|
|
25
|
+
export class OperationsImpl implements Operations {
|
|
26
|
+
private readonly client: AzureStackManagementClient;
|
|
20
27
|
|
|
21
28
|
/**
|
|
22
|
-
*
|
|
23
|
-
* @param
|
|
29
|
+
* Initialize a new instance of the class Operations class.
|
|
30
|
+
* @param client Reference to the service client
|
|
24
31
|
*/
|
|
25
|
-
constructor(client:
|
|
32
|
+
constructor(client: AzureStackManagementClient) {
|
|
26
33
|
this.client = client;
|
|
27
34
|
}
|
|
28
35
|
|
|
29
36
|
/**
|
|
30
37
|
* Returns the list of supported REST operations.
|
|
31
|
-
* @param
|
|
32
|
-
* @returns Promise<Models.OperationsListResponse>
|
|
38
|
+
* @param options The options parameters.
|
|
33
39
|
*/
|
|
34
|
-
list(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
list(options?: msRest.RequestOptionsBase | msRest.ServiceCallback<Models.OperationList>, callback?: msRest.ServiceCallback<Models.OperationList>): Promise<Models.OperationsListResponse> {
|
|
45
|
-
return this.client.sendOperationRequest(
|
|
46
|
-
{
|
|
47
|
-
options
|
|
40
|
+
public list(
|
|
41
|
+
options?: OperationsListOptionalParams
|
|
42
|
+
): PagedAsyncIterableIterator<Operation> {
|
|
43
|
+
const iter = this.listPagingAll(options);
|
|
44
|
+
return {
|
|
45
|
+
next() {
|
|
46
|
+
return iter.next();
|
|
47
|
+
},
|
|
48
|
+
[Symbol.asyncIterator]() {
|
|
49
|
+
return this;
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
byPage: () => {
|
|
52
|
+
return this.listPagingPage(options);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
private async *listPagingPage(
|
|
58
|
+
options?: OperationsListOptionalParams
|
|
59
|
+
): AsyncIterableIterator<Operation[]> {
|
|
60
|
+
let result = await this._list(options);
|
|
61
|
+
yield result.value || [];
|
|
62
|
+
let continuationToken = result.nextLink;
|
|
63
|
+
while (continuationToken) {
|
|
64
|
+
result = await this._listNext(continuationToken, options);
|
|
65
|
+
continuationToken = result.nextLink;
|
|
66
|
+
yield result.value || [];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async *listPagingAll(
|
|
71
|
+
options?: OperationsListOptionalParams
|
|
72
|
+
): AsyncIterableIterator<Operation> {
|
|
73
|
+
for await (const page of this.listPagingPage(options)) {
|
|
74
|
+
yield* page;
|
|
75
|
+
}
|
|
51
76
|
}
|
|
52
77
|
|
|
53
78
|
/**
|
|
54
79
|
* Returns the list of supported REST operations.
|
|
55
|
-
* @param
|
|
56
|
-
* @param [options] The optional parameters
|
|
57
|
-
* @returns Promise<Models.OperationsListNextResponse>
|
|
58
|
-
*/
|
|
59
|
-
listNext(nextPageLink: string, options?: msRest.RequestOptionsBase): Promise<Models.OperationsListNextResponse>;
|
|
60
|
-
/**
|
|
61
|
-
* @param nextPageLink The NextLink from the previous successful call to List operation.
|
|
62
|
-
* @param callback The callback
|
|
80
|
+
* @param options The options parameters.
|
|
63
81
|
*/
|
|
64
|
-
|
|
82
|
+
private _list(
|
|
83
|
+
options?: OperationsListOptionalParams
|
|
84
|
+
): Promise<OperationsListResponse> {
|
|
85
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec);
|
|
86
|
+
}
|
|
87
|
+
|
|
65
88
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @param
|
|
68
|
-
* @param
|
|
89
|
+
* ListNext
|
|
90
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
91
|
+
* @param options The options parameters.
|
|
69
92
|
*/
|
|
70
|
-
|
|
71
|
-
|
|
93
|
+
private _listNext(
|
|
94
|
+
nextLink: string,
|
|
95
|
+
options?: OperationsListNextOptionalParams
|
|
96
|
+
): Promise<OperationsListNextResponse> {
|
|
72
97
|
return this.client.sendOperationRequest(
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
},
|
|
77
|
-
listNextOperationSpec,
|
|
78
|
-
callback) as Promise<Models.OperationsListNextResponse>;
|
|
98
|
+
{ nextLink, options },
|
|
99
|
+
listNextOperationSpec
|
|
100
|
+
);
|
|
79
101
|
}
|
|
80
102
|
}
|
|
81
|
-
|
|
82
103
|
// Operation Specifications
|
|
83
|
-
const serializer =
|
|
84
|
-
|
|
104
|
+
const serializer = coreClient.createSerializer(Mappers, /* isXml */ false);
|
|
105
|
+
|
|
106
|
+
const listOperationSpec: coreClient.OperationSpec = {
|
|
107
|
+
path: "/providers/Microsoft.AzureStack/operations",
|
|
85
108
|
httpMethod: "GET",
|
|
86
|
-
path: "providers/Microsoft.AzureStack/operations",
|
|
87
|
-
queryParameters: [
|
|
88
|
-
Parameters.apiVersion
|
|
89
|
-
],
|
|
90
|
-
headerParameters: [
|
|
91
|
-
Parameters.acceptLanguage
|
|
92
|
-
],
|
|
93
109
|
responses: {
|
|
94
110
|
200: {
|
|
95
111
|
bodyMapper: Mappers.OperationList
|
|
96
112
|
},
|
|
97
113
|
default: {
|
|
98
|
-
bodyMapper: Mappers.
|
|
114
|
+
bodyMapper: Mappers.ErrorResponse
|
|
99
115
|
}
|
|
100
116
|
},
|
|
117
|
+
queryParameters: [Parameters.apiVersion],
|
|
118
|
+
urlParameters: [Parameters.$host],
|
|
119
|
+
headerParameters: [Parameters.accept],
|
|
101
120
|
serializer
|
|
102
121
|
};
|
|
103
|
-
|
|
104
|
-
const listNextOperationSpec: msRest.OperationSpec = {
|
|
105
|
-
httpMethod: "GET",
|
|
106
|
-
baseUrl: "https://management.azure.com",
|
|
122
|
+
const listNextOperationSpec: coreClient.OperationSpec = {
|
|
107
123
|
path: "{nextLink}",
|
|
108
|
-
|
|
109
|
-
Parameters.nextPageLink
|
|
110
|
-
],
|
|
111
|
-
headerParameters: [
|
|
112
|
-
Parameters.acceptLanguage
|
|
113
|
-
],
|
|
124
|
+
httpMethod: "GET",
|
|
114
125
|
responses: {
|
|
115
126
|
200: {
|
|
116
127
|
bodyMapper: Mappers.OperationList
|
|
117
128
|
},
|
|
118
129
|
default: {
|
|
119
|
-
bodyMapper: Mappers.
|
|
130
|
+
bodyMapper: Mappers.ErrorResponse
|
|
120
131
|
}
|
|
121
132
|
},
|
|
133
|
+
queryParameters: [Parameters.apiVersion],
|
|
134
|
+
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
135
|
+
headerParameters: [Parameters.accept],
|
|
122
136
|
serializer
|
|
123
137
|
};
|