@azure/arm-resourceconnector 1.0.0-beta.1 → 1.0.0-beta.3
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 +1 -1
- package/LICENSE +1 -1
- package/README.md +2 -2
- package/dist/index.js +370 -164
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js +12 -4
- package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesDeleteSample.js +12 -4
- package/dist-esm/samples-dev/appliancesDeleteSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesGetSample.js +12 -4
- package/dist-esm/samples-dev/appliancesGetSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.d.ts +2 -0
- package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.js +37 -0
- package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.js.map +1 -0
- package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js +12 -4
- package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js +24 -9
- package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js +23 -8
- package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js +12 -4
- package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesListKeysSample.d.ts +2 -0
- package/dist-esm/samples-dev/appliancesListKeysSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/{appliancesListClusterCustomerUserCredentialSample.js → appliancesListKeysSample.js} +17 -9
- package/dist-esm/samples-dev/appliancesListKeysSample.js.map +1 -0
- package/dist-esm/samples-dev/appliancesListOperationsSample.js +23 -8
- package/dist-esm/samples-dev/appliancesListOperationsSample.js.map +1 -1
- package/dist-esm/samples-dev/appliancesUpdateSample.js +12 -4
- package/dist-esm/samples-dev/appliancesUpdateSample.js.map +1 -1
- package/dist-esm/src/index.d.ts +1 -0
- package/dist-esm/src/index.d.ts.map +1 -1
- package/dist-esm/src/index.js +1 -0
- package/dist-esm/src/index.js.map +1 -1
- package/dist-esm/src/lroImpl.d.ts +6 -11
- package/dist-esm/src/lroImpl.d.ts.map +1 -1
- package/dist-esm/src/lroImpl.js +12 -20
- package/dist-esm/src/lroImpl.js.map +1 -1
- package/dist-esm/src/models/index.d.ts +170 -72
- package/dist-esm/src/models/index.d.ts.map +1 -1
- package/dist-esm/src/models/index.js +30 -0
- package/dist-esm/src/models/index.js.map +1 -1
- package/dist-esm/src/models/mappers.d.ts +6 -4
- package/dist-esm/src/models/mappers.d.ts.map +1 -1
- package/dist-esm/src/models/mappers.js +125 -63
- package/dist-esm/src/models/mappers.js.map +1 -1
- package/dist-esm/src/models/parameters.js +1 -1
- package/dist-esm/src/models/parameters.js.map +1 -1
- package/dist-esm/src/operations/appliances.d.ts +13 -8
- package/dist-esm/src/operations/appliances.d.ts.map +1 -1
- package/dist-esm/src/operations/appliances.js +146 -63
- package/dist-esm/src/operations/appliances.js.map +1 -1
- package/dist-esm/src/operationsInterfaces/appliances.d.ts +13 -8
- package/dist-esm/src/operationsInterfaces/appliances.d.ts.map +1 -1
- package/dist-esm/src/pagingHelper.d.ts +13 -0
- package/dist-esm/src/pagingHelper.d.ts.map +1 -0
- package/dist-esm/src/pagingHelper.js +32 -0
- package/dist-esm/src/pagingHelper.js.map +1 -0
- package/dist-esm/src/resourceConnectorManagementClient.d.ts.map +1 -1
- package/dist-esm/src/resourceConnectorManagementClient.js +21 -16
- package/dist-esm/src/resourceConnectorManagementClient.js.map +1 -1
- package/dist-esm/test/resourceconnnector__operations_test.spec.d.ts +4 -0
- package/dist-esm/test/resourceconnnector__operations_test.spec.d.ts.map +1 -0
- package/dist-esm/test/resourceconnnector__operations_test.spec.js +123 -0
- package/dist-esm/test/resourceconnnector__operations_test.spec.js.map +1 -0
- package/package.json +15 -13
- package/review/arm-resourceconnector.api.md +65 -18
- package/src/index.ts +1 -0
- package/src/lroImpl.ts +31 -23
- package/src/models/index.ts +156 -54
- package/src/models/mappers.ts +127 -64
- package/src/models/parameters.ts +1 -1
- package/src/operations/appliances.ts +145 -68
- package/src/operationsInterfaces/appliances.ts +23 -14
- package/src/pagingHelper.ts +39 -0
- package/src/resourceConnectorManagementClient.ts +27 -18
- package/types/arm-resourceconnector.d.ts +155 -37
- package/types/tsdoc-metadata.json +1 -1
- package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.d.ts +0 -2
- package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.d.ts.map +0 -1
- package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.js.map +0 -1
- package/dist-esm/test/sampleTest.d.ts +0 -2
- package/dist-esm/test/sampleTest.d.ts.map +0 -1
- package/dist-esm/test/sampleTest.js +0 -38
- package/dist-esm/test/sampleTest.js.map +0 -1
|
@@ -6,26 +6,33 @@
|
|
|
6
6
|
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
9
|
+
import { PagedAsyncIterableIterator, PageSettings } from "@azure/core-paging";
|
|
10
|
+
import { setContinuationToken } from "../pagingHelper";
|
|
10
11
|
import { Appliances } from "../operationsInterfaces";
|
|
11
12
|
import * as coreClient from "@azure/core-client";
|
|
12
13
|
import * as Mappers from "../models/mappers";
|
|
13
14
|
import * as Parameters from "../models/parameters";
|
|
14
15
|
import { ResourceConnectorManagementClient } from "../resourceConnectorManagementClient";
|
|
15
|
-
import {
|
|
16
|
-
|
|
16
|
+
import {
|
|
17
|
+
SimplePollerLike,
|
|
18
|
+
OperationState,
|
|
19
|
+
createHttpPoller
|
|
20
|
+
} from "@azure/core-lro";
|
|
21
|
+
import { createLroSpec } from "../lroImpl";
|
|
17
22
|
import {
|
|
18
23
|
ApplianceOperation,
|
|
19
24
|
AppliancesListOperationsNextOptionalParams,
|
|
20
25
|
AppliancesListOperationsOptionalParams,
|
|
26
|
+
AppliancesListOperationsResponse,
|
|
21
27
|
Appliance,
|
|
22
28
|
AppliancesListBySubscriptionNextOptionalParams,
|
|
23
29
|
AppliancesListBySubscriptionOptionalParams,
|
|
30
|
+
AppliancesListBySubscriptionResponse,
|
|
24
31
|
AppliancesListByResourceGroupNextOptionalParams,
|
|
25
32
|
AppliancesListByResourceGroupOptionalParams,
|
|
26
|
-
AppliancesListOperationsResponse,
|
|
27
|
-
AppliancesListBySubscriptionResponse,
|
|
28
33
|
AppliancesListByResourceGroupResponse,
|
|
34
|
+
AppliancesGetTelemetryConfigOptionalParams,
|
|
35
|
+
AppliancesGetTelemetryConfigResponse,
|
|
29
36
|
AppliancesGetOptionalParams,
|
|
30
37
|
AppliancesGetResponse,
|
|
31
38
|
AppliancesCreateOrUpdateOptionalParams,
|
|
@@ -33,10 +40,10 @@ import {
|
|
|
33
40
|
AppliancesDeleteOptionalParams,
|
|
34
41
|
AppliancesUpdateOptionalParams,
|
|
35
42
|
AppliancesUpdateResponse,
|
|
36
|
-
AppliancesListClusterCustomerUserCredentialOptionalParams,
|
|
37
|
-
AppliancesListClusterCustomerUserCredentialResponse,
|
|
38
43
|
AppliancesListClusterUserCredentialOptionalParams,
|
|
39
44
|
AppliancesListClusterUserCredentialResponse,
|
|
45
|
+
AppliancesListKeysOptionalParams,
|
|
46
|
+
AppliancesListKeysResponse,
|
|
40
47
|
AppliancesGetUpgradeGraphOptionalParams,
|
|
41
48
|
AppliancesGetUpgradeGraphResponse,
|
|
42
49
|
AppliancesListOperationsNextResponse,
|
|
@@ -72,22 +79,34 @@ export class AppliancesImpl implements Appliances {
|
|
|
72
79
|
[Symbol.asyncIterator]() {
|
|
73
80
|
return this;
|
|
74
81
|
},
|
|
75
|
-
byPage: () => {
|
|
76
|
-
|
|
82
|
+
byPage: (settings?: PageSettings) => {
|
|
83
|
+
if (settings?.maxPageSize) {
|
|
84
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
85
|
+
}
|
|
86
|
+
return this.listOperationsPagingPage(options, settings);
|
|
77
87
|
}
|
|
78
88
|
};
|
|
79
89
|
}
|
|
80
90
|
|
|
81
91
|
private async *listOperationsPagingPage(
|
|
82
|
-
options?: AppliancesListOperationsOptionalParams
|
|
92
|
+
options?: AppliancesListOperationsOptionalParams,
|
|
93
|
+
settings?: PageSettings
|
|
83
94
|
): AsyncIterableIterator<ApplianceOperation[]> {
|
|
84
|
-
let result
|
|
85
|
-
|
|
86
|
-
|
|
95
|
+
let result: AppliancesListOperationsResponse;
|
|
96
|
+
let continuationToken = settings?.continuationToken;
|
|
97
|
+
if (!continuationToken) {
|
|
98
|
+
result = await this._listOperations(options);
|
|
99
|
+
let page = result.value || [];
|
|
100
|
+
continuationToken = result.nextLink;
|
|
101
|
+
setContinuationToken(page, continuationToken);
|
|
102
|
+
yield page;
|
|
103
|
+
}
|
|
87
104
|
while (continuationToken) {
|
|
88
105
|
result = await this._listOperationsNext(continuationToken, options);
|
|
89
106
|
continuationToken = result.nextLink;
|
|
90
|
-
|
|
107
|
+
let page = result.value || [];
|
|
108
|
+
setContinuationToken(page, continuationToken);
|
|
109
|
+
yield page;
|
|
91
110
|
}
|
|
92
111
|
}
|
|
93
112
|
|
|
@@ -115,22 +134,34 @@ export class AppliancesImpl implements Appliances {
|
|
|
115
134
|
[Symbol.asyncIterator]() {
|
|
116
135
|
return this;
|
|
117
136
|
},
|
|
118
|
-
byPage: () => {
|
|
119
|
-
|
|
137
|
+
byPage: (settings?: PageSettings) => {
|
|
138
|
+
if (settings?.maxPageSize) {
|
|
139
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
140
|
+
}
|
|
141
|
+
return this.listBySubscriptionPagingPage(options, settings);
|
|
120
142
|
}
|
|
121
143
|
};
|
|
122
144
|
}
|
|
123
145
|
|
|
124
146
|
private async *listBySubscriptionPagingPage(
|
|
125
|
-
options?: AppliancesListBySubscriptionOptionalParams
|
|
147
|
+
options?: AppliancesListBySubscriptionOptionalParams,
|
|
148
|
+
settings?: PageSettings
|
|
126
149
|
): AsyncIterableIterator<Appliance[]> {
|
|
127
|
-
let result
|
|
128
|
-
|
|
129
|
-
|
|
150
|
+
let result: AppliancesListBySubscriptionResponse;
|
|
151
|
+
let continuationToken = settings?.continuationToken;
|
|
152
|
+
if (!continuationToken) {
|
|
153
|
+
result = await this._listBySubscription(options);
|
|
154
|
+
let page = result.value || [];
|
|
155
|
+
continuationToken = result.nextLink;
|
|
156
|
+
setContinuationToken(page, continuationToken);
|
|
157
|
+
yield page;
|
|
158
|
+
}
|
|
130
159
|
while (continuationToken) {
|
|
131
160
|
result = await this._listBySubscriptionNext(continuationToken, options);
|
|
132
161
|
continuationToken = result.nextLink;
|
|
133
|
-
|
|
162
|
+
let page = result.value || [];
|
|
163
|
+
setContinuationToken(page, continuationToken);
|
|
164
|
+
yield page;
|
|
134
165
|
}
|
|
135
166
|
}
|
|
136
167
|
|
|
@@ -160,19 +191,33 @@ export class AppliancesImpl implements Appliances {
|
|
|
160
191
|
[Symbol.asyncIterator]() {
|
|
161
192
|
return this;
|
|
162
193
|
},
|
|
163
|
-
byPage: () => {
|
|
164
|
-
|
|
194
|
+
byPage: (settings?: PageSettings) => {
|
|
195
|
+
if (settings?.maxPageSize) {
|
|
196
|
+
throw new Error("maxPageSize is not supported by this operation.");
|
|
197
|
+
}
|
|
198
|
+
return this.listByResourceGroupPagingPage(
|
|
199
|
+
resourceGroupName,
|
|
200
|
+
options,
|
|
201
|
+
settings
|
|
202
|
+
);
|
|
165
203
|
}
|
|
166
204
|
};
|
|
167
205
|
}
|
|
168
206
|
|
|
169
207
|
private async *listByResourceGroupPagingPage(
|
|
170
208
|
resourceGroupName: string,
|
|
171
|
-
options?: AppliancesListByResourceGroupOptionalParams
|
|
209
|
+
options?: AppliancesListByResourceGroupOptionalParams,
|
|
210
|
+
settings?: PageSettings
|
|
172
211
|
): AsyncIterableIterator<Appliance[]> {
|
|
173
|
-
let result
|
|
174
|
-
|
|
175
|
-
|
|
212
|
+
let result: AppliancesListByResourceGroupResponse;
|
|
213
|
+
let continuationToken = settings?.continuationToken;
|
|
214
|
+
if (!continuationToken) {
|
|
215
|
+
result = await this._listByResourceGroup(resourceGroupName, options);
|
|
216
|
+
let page = result.value || [];
|
|
217
|
+
continuationToken = result.nextLink;
|
|
218
|
+
setContinuationToken(page, continuationToken);
|
|
219
|
+
yield page;
|
|
220
|
+
}
|
|
176
221
|
while (continuationToken) {
|
|
177
222
|
result = await this._listByResourceGroupNext(
|
|
178
223
|
resourceGroupName,
|
|
@@ -180,7 +225,9 @@ export class AppliancesImpl implements Appliances {
|
|
|
180
225
|
options
|
|
181
226
|
);
|
|
182
227
|
continuationToken = result.nextLink;
|
|
183
|
-
|
|
228
|
+
let page = result.value || [];
|
|
229
|
+
setContinuationToken(page, continuationToken);
|
|
230
|
+
yield page;
|
|
184
231
|
}
|
|
185
232
|
}
|
|
186
233
|
|
|
@@ -223,6 +270,19 @@ export class AppliancesImpl implements Appliances {
|
|
|
223
270
|
);
|
|
224
271
|
}
|
|
225
272
|
|
|
273
|
+
/**
|
|
274
|
+
* Gets the telemetry config.
|
|
275
|
+
* @param options The options parameters.
|
|
276
|
+
*/
|
|
277
|
+
getTelemetryConfig(
|
|
278
|
+
options?: AppliancesGetTelemetryConfigOptionalParams
|
|
279
|
+
): Promise<AppliancesGetTelemetryConfigResponse> {
|
|
280
|
+
return this.client.sendOperationRequest(
|
|
281
|
+
{ options },
|
|
282
|
+
getTelemetryConfigOperationSpec
|
|
283
|
+
);
|
|
284
|
+
}
|
|
285
|
+
|
|
226
286
|
/**
|
|
227
287
|
* Gets a list of Appliances in the specified subscription and resource group. The operation returns
|
|
228
288
|
* properties of each Appliance.
|
|
@@ -269,8 +329,8 @@ export class AppliancesImpl implements Appliances {
|
|
|
269
329
|
parameters: Appliance,
|
|
270
330
|
options?: AppliancesCreateOrUpdateOptionalParams
|
|
271
331
|
): Promise<
|
|
272
|
-
|
|
273
|
-
|
|
332
|
+
SimplePollerLike<
|
|
333
|
+
OperationState<AppliancesCreateOrUpdateResponse>,
|
|
274
334
|
AppliancesCreateOrUpdateResponse
|
|
275
335
|
>
|
|
276
336
|
> {
|
|
@@ -280,7 +340,7 @@ export class AppliancesImpl implements Appliances {
|
|
|
280
340
|
): Promise<AppliancesCreateOrUpdateResponse> => {
|
|
281
341
|
return this.client.sendOperationRequest(args, spec);
|
|
282
342
|
};
|
|
283
|
-
const
|
|
343
|
+
const sendOperationFn = async (
|
|
284
344
|
args: coreClient.OperationArguments,
|
|
285
345
|
spec: coreClient.OperationSpec
|
|
286
346
|
) => {
|
|
@@ -313,15 +373,18 @@ export class AppliancesImpl implements Appliances {
|
|
|
313
373
|
};
|
|
314
374
|
};
|
|
315
375
|
|
|
316
|
-
const lro =
|
|
317
|
-
|
|
318
|
-
{ resourceGroupName, resourceName, parameters, options },
|
|
319
|
-
createOrUpdateOperationSpec
|
|
320
|
-
);
|
|
321
|
-
const poller =
|
|
322
|
-
|
|
376
|
+
const lro = createLroSpec({
|
|
377
|
+
sendOperationFn,
|
|
378
|
+
args: { resourceGroupName, resourceName, parameters, options },
|
|
379
|
+
spec: createOrUpdateOperationSpec
|
|
380
|
+
});
|
|
381
|
+
const poller = await createHttpPoller<
|
|
382
|
+
AppliancesCreateOrUpdateResponse,
|
|
383
|
+
OperationState<AppliancesCreateOrUpdateResponse>
|
|
384
|
+
>(lro, {
|
|
385
|
+
restoreFrom: options?.resumeFrom,
|
|
323
386
|
intervalInMs: options?.updateIntervalInMs,
|
|
324
|
-
|
|
387
|
+
resourceLocationConfig: "azure-async-operation"
|
|
325
388
|
});
|
|
326
389
|
await poller.poll();
|
|
327
390
|
return poller;
|
|
@@ -359,14 +422,14 @@ export class AppliancesImpl implements Appliances {
|
|
|
359
422
|
resourceGroupName: string,
|
|
360
423
|
resourceName: string,
|
|
361
424
|
options?: AppliancesDeleteOptionalParams
|
|
362
|
-
): Promise<
|
|
425
|
+
): Promise<SimplePollerLike<OperationState<void>, void>> {
|
|
363
426
|
const directSendOperation = async (
|
|
364
427
|
args: coreClient.OperationArguments,
|
|
365
428
|
spec: coreClient.OperationSpec
|
|
366
429
|
): Promise<void> => {
|
|
367
430
|
return this.client.sendOperationRequest(args, spec);
|
|
368
431
|
};
|
|
369
|
-
const
|
|
432
|
+
const sendOperationFn = async (
|
|
370
433
|
args: coreClient.OperationArguments,
|
|
371
434
|
spec: coreClient.OperationSpec
|
|
372
435
|
) => {
|
|
@@ -399,15 +462,15 @@ export class AppliancesImpl implements Appliances {
|
|
|
399
462
|
};
|
|
400
463
|
};
|
|
401
464
|
|
|
402
|
-
const lro =
|
|
403
|
-
|
|
404
|
-
{ resourceGroupName, resourceName, options },
|
|
405
|
-
deleteOperationSpec
|
|
406
|
-
);
|
|
407
|
-
const poller =
|
|
408
|
-
|
|
465
|
+
const lro = createLroSpec({
|
|
466
|
+
sendOperationFn,
|
|
467
|
+
args: { resourceGroupName, resourceName, options },
|
|
468
|
+
spec: deleteOperationSpec
|
|
469
|
+
});
|
|
470
|
+
const poller = await createHttpPoller<void, OperationState<void>>(lro, {
|
|
471
|
+
restoreFrom: options?.resumeFrom,
|
|
409
472
|
intervalInMs: options?.updateIntervalInMs,
|
|
410
|
-
|
|
473
|
+
resourceLocationConfig: "azure-async-operation"
|
|
411
474
|
});
|
|
412
475
|
await poller.poll();
|
|
413
476
|
return poller;
|
|
@@ -451,36 +514,36 @@ export class AppliancesImpl implements Appliances {
|
|
|
451
514
|
}
|
|
452
515
|
|
|
453
516
|
/**
|
|
454
|
-
* Returns the cluster
|
|
517
|
+
* Returns the cluster user credentials for the dedicated appliance.
|
|
455
518
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
456
519
|
* @param resourceName Appliances name.
|
|
457
520
|
* @param options The options parameters.
|
|
458
521
|
*/
|
|
459
|
-
|
|
522
|
+
listClusterUserCredential(
|
|
460
523
|
resourceGroupName: string,
|
|
461
524
|
resourceName: string,
|
|
462
|
-
options?:
|
|
463
|
-
): Promise<
|
|
525
|
+
options?: AppliancesListClusterUserCredentialOptionalParams
|
|
526
|
+
): Promise<AppliancesListClusterUserCredentialResponse> {
|
|
464
527
|
return this.client.sendOperationRequest(
|
|
465
528
|
{ resourceGroupName, resourceName, options },
|
|
466
|
-
|
|
529
|
+
listClusterUserCredentialOperationSpec
|
|
467
530
|
);
|
|
468
531
|
}
|
|
469
532
|
|
|
470
533
|
/**
|
|
471
|
-
* Returns the cluster
|
|
534
|
+
* Returns the cluster customer credentials for the dedicated appliance.
|
|
472
535
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
473
536
|
* @param resourceName Appliances name.
|
|
474
537
|
* @param options The options parameters.
|
|
475
538
|
*/
|
|
476
|
-
|
|
539
|
+
listKeys(
|
|
477
540
|
resourceGroupName: string,
|
|
478
541
|
resourceName: string,
|
|
479
|
-
options?:
|
|
480
|
-
): Promise<
|
|
542
|
+
options?: AppliancesListKeysOptionalParams
|
|
543
|
+
): Promise<AppliancesListKeysResponse> {
|
|
481
544
|
return this.client.sendOperationRequest(
|
|
482
545
|
{ resourceGroupName, resourceName, options },
|
|
483
|
-
|
|
546
|
+
listKeysOperationSpec
|
|
484
547
|
);
|
|
485
548
|
}
|
|
486
549
|
|
|
@@ -587,6 +650,23 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
|
|
|
587
650
|
headerParameters: [Parameters.accept],
|
|
588
651
|
serializer
|
|
589
652
|
};
|
|
653
|
+
const getTelemetryConfigOperationSpec: coreClient.OperationSpec = {
|
|
654
|
+
path:
|
|
655
|
+
"/subscriptions/{subscriptionId}/providers/Microsoft.ResourceConnector/telemetryconfig",
|
|
656
|
+
httpMethod: "GET",
|
|
657
|
+
responses: {
|
|
658
|
+
200: {
|
|
659
|
+
bodyMapper: Mappers.ApplianceGetTelemetryConfigResult
|
|
660
|
+
},
|
|
661
|
+
default: {
|
|
662
|
+
bodyMapper: Mappers.ErrorResponse
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
queryParameters: [Parameters.apiVersion],
|
|
666
|
+
urlParameters: [Parameters.$host, Parameters.subscriptionId],
|
|
667
|
+
headerParameters: [Parameters.accept],
|
|
668
|
+
serializer
|
|
669
|
+
};
|
|
590
670
|
const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
|
|
591
671
|
path:
|
|
592
672
|
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances",
|
|
@@ -713,13 +793,13 @@ const updateOperationSpec: coreClient.OperationSpec = {
|
|
|
713
793
|
mediaType: "json",
|
|
714
794
|
serializer
|
|
715
795
|
};
|
|
716
|
-
const
|
|
796
|
+
const listClusterUserCredentialOperationSpec: coreClient.OperationSpec = {
|
|
717
797
|
path:
|
|
718
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/
|
|
798
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential",
|
|
719
799
|
httpMethod: "POST",
|
|
720
800
|
responses: {
|
|
721
801
|
200: {
|
|
722
|
-
bodyMapper: Mappers.
|
|
802
|
+
bodyMapper: Mappers.ApplianceListCredentialResults
|
|
723
803
|
},
|
|
724
804
|
default: {
|
|
725
805
|
bodyMapper: Mappers.ErrorResponse
|
|
@@ -735,13 +815,13 @@ const listClusterCustomerUserCredentialOperationSpec: coreClient.OperationSpec =
|
|
|
735
815
|
headerParameters: [Parameters.accept],
|
|
736
816
|
serializer
|
|
737
817
|
};
|
|
738
|
-
const
|
|
818
|
+
const listKeysOperationSpec: coreClient.OperationSpec = {
|
|
739
819
|
path:
|
|
740
|
-
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/
|
|
820
|
+
"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listkeys",
|
|
741
821
|
httpMethod: "POST",
|
|
742
822
|
responses: {
|
|
743
823
|
200: {
|
|
744
|
-
bodyMapper: Mappers.
|
|
824
|
+
bodyMapper: Mappers.ApplianceListKeysResults
|
|
745
825
|
},
|
|
746
826
|
default: {
|
|
747
827
|
bodyMapper: Mappers.ErrorResponse
|
|
@@ -791,7 +871,6 @@ const listOperationsNextOperationSpec: coreClient.OperationSpec = {
|
|
|
791
871
|
bodyMapper: Mappers.ErrorResponse
|
|
792
872
|
}
|
|
793
873
|
},
|
|
794
|
-
queryParameters: [Parameters.apiVersion],
|
|
795
874
|
urlParameters: [Parameters.$host, Parameters.nextLink],
|
|
796
875
|
headerParameters: [Parameters.accept],
|
|
797
876
|
serializer
|
|
@@ -807,7 +886,6 @@ const listBySubscriptionNextOperationSpec: coreClient.OperationSpec = {
|
|
|
807
886
|
bodyMapper: Mappers.ErrorResponse
|
|
808
887
|
}
|
|
809
888
|
},
|
|
810
|
-
queryParameters: [Parameters.apiVersion],
|
|
811
889
|
urlParameters: [
|
|
812
890
|
Parameters.$host,
|
|
813
891
|
Parameters.subscriptionId,
|
|
@@ -827,7 +905,6 @@ const listByResourceGroupNextOperationSpec: coreClient.OperationSpec = {
|
|
|
827
905
|
bodyMapper: Mappers.ErrorResponse
|
|
828
906
|
}
|
|
829
907
|
},
|
|
830
|
-
queryParameters: [Parameters.apiVersion],
|
|
831
908
|
urlParameters: [
|
|
832
909
|
Parameters.$host,
|
|
833
910
|
Parameters.subscriptionId,
|
|
@@ -7,13 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { PagedAsyncIterableIterator } from "@azure/core-paging";
|
|
10
|
-
import {
|
|
10
|
+
import { SimplePollerLike, OperationState } from "@azure/core-lro";
|
|
11
11
|
import {
|
|
12
12
|
ApplianceOperation,
|
|
13
13
|
AppliancesListOperationsOptionalParams,
|
|
14
14
|
Appliance,
|
|
15
15
|
AppliancesListBySubscriptionOptionalParams,
|
|
16
16
|
AppliancesListByResourceGroupOptionalParams,
|
|
17
|
+
AppliancesGetTelemetryConfigOptionalParams,
|
|
18
|
+
AppliancesGetTelemetryConfigResponse,
|
|
17
19
|
AppliancesGetOptionalParams,
|
|
18
20
|
AppliancesGetResponse,
|
|
19
21
|
AppliancesCreateOrUpdateOptionalParams,
|
|
@@ -21,10 +23,10 @@ import {
|
|
|
21
23
|
AppliancesDeleteOptionalParams,
|
|
22
24
|
AppliancesUpdateOptionalParams,
|
|
23
25
|
AppliancesUpdateResponse,
|
|
24
|
-
AppliancesListClusterCustomerUserCredentialOptionalParams,
|
|
25
|
-
AppliancesListClusterCustomerUserCredentialResponse,
|
|
26
26
|
AppliancesListClusterUserCredentialOptionalParams,
|
|
27
27
|
AppliancesListClusterUserCredentialResponse,
|
|
28
|
+
AppliancesListKeysOptionalParams,
|
|
29
|
+
AppliancesListKeysResponse,
|
|
28
30
|
AppliancesGetUpgradeGraphOptionalParams,
|
|
29
31
|
AppliancesGetUpgradeGraphResponse
|
|
30
32
|
} from "../models";
|
|
@@ -57,6 +59,13 @@ export interface Appliances {
|
|
|
57
59
|
resourceGroupName: string,
|
|
58
60
|
options?: AppliancesListByResourceGroupOptionalParams
|
|
59
61
|
): PagedAsyncIterableIterator<Appliance>;
|
|
62
|
+
/**
|
|
63
|
+
* Gets the telemetry config.
|
|
64
|
+
* @param options The options parameters.
|
|
65
|
+
*/
|
|
66
|
+
getTelemetryConfig(
|
|
67
|
+
options?: AppliancesGetTelemetryConfigOptionalParams
|
|
68
|
+
): Promise<AppliancesGetTelemetryConfigResponse>;
|
|
60
69
|
/**
|
|
61
70
|
* Gets the details of an Appliance with a specified resource group and name.
|
|
62
71
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
@@ -81,8 +90,8 @@ export interface Appliances {
|
|
|
81
90
|
parameters: Appliance,
|
|
82
91
|
options?: AppliancesCreateOrUpdateOptionalParams
|
|
83
92
|
): Promise<
|
|
84
|
-
|
|
85
|
-
|
|
93
|
+
SimplePollerLike<
|
|
94
|
+
OperationState<AppliancesCreateOrUpdateResponse>,
|
|
86
95
|
AppliancesCreateOrUpdateResponse
|
|
87
96
|
>
|
|
88
97
|
>;
|
|
@@ -109,7 +118,7 @@ export interface Appliances {
|
|
|
109
118
|
resourceGroupName: string,
|
|
110
119
|
resourceName: string,
|
|
111
120
|
options?: AppliancesDeleteOptionalParams
|
|
112
|
-
): Promise<
|
|
121
|
+
): Promise<SimplePollerLike<OperationState<void>, void>>;
|
|
113
122
|
/**
|
|
114
123
|
* Deletes an Appliance with the specified Resource Name, Resource Group, and Subscription Id.
|
|
115
124
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
@@ -134,27 +143,27 @@ export interface Appliances {
|
|
|
134
143
|
options?: AppliancesUpdateOptionalParams
|
|
135
144
|
): Promise<AppliancesUpdateResponse>;
|
|
136
145
|
/**
|
|
137
|
-
* Returns the cluster
|
|
146
|
+
* Returns the cluster user credentials for the dedicated appliance.
|
|
138
147
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
139
148
|
* @param resourceName Appliances name.
|
|
140
149
|
* @param options The options parameters.
|
|
141
150
|
*/
|
|
142
|
-
|
|
151
|
+
listClusterUserCredential(
|
|
143
152
|
resourceGroupName: string,
|
|
144
153
|
resourceName: string,
|
|
145
|
-
options?:
|
|
146
|
-
): Promise<
|
|
154
|
+
options?: AppliancesListClusterUserCredentialOptionalParams
|
|
155
|
+
): Promise<AppliancesListClusterUserCredentialResponse>;
|
|
147
156
|
/**
|
|
148
|
-
* Returns the cluster
|
|
157
|
+
* Returns the cluster customer credentials for the dedicated appliance.
|
|
149
158
|
* @param resourceGroupName The name of the resource group. The name is case insensitive.
|
|
150
159
|
* @param resourceName Appliances name.
|
|
151
160
|
* @param options The options parameters.
|
|
152
161
|
*/
|
|
153
|
-
|
|
162
|
+
listKeys(
|
|
154
163
|
resourceGroupName: string,
|
|
155
164
|
resourceName: string,
|
|
156
|
-
options?:
|
|
157
|
-
): Promise<
|
|
165
|
+
options?: AppliancesListKeysOptionalParams
|
|
166
|
+
): Promise<AppliancesListKeysResponse>;
|
|
158
167
|
/**
|
|
159
168
|
* Gets the upgrade graph of an Appliance with a specified resource group and name and specific release
|
|
160
169
|
* train.
|
|
@@ -0,0 +1,39 @@
|
|
|
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 interface PageInfo {
|
|
10
|
+
continuationToken?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const pageMap = new WeakMap<object, PageInfo>();
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Given the last `.value` produced by the `byPage` iterator,
|
|
17
|
+
* returns a continuation token that can be used to begin paging from
|
|
18
|
+
* that point later.
|
|
19
|
+
* @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
|
|
20
|
+
* @returns The continuation token that can be passed into byPage() during future calls.
|
|
21
|
+
*/
|
|
22
|
+
export function getContinuationToken(page: unknown): string | undefined {
|
|
23
|
+
if (typeof page !== "object" || page === null) {
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
return pageMap.get(page)?.continuationToken;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function setContinuationToken(
|
|
30
|
+
page: unknown,
|
|
31
|
+
continuationToken: string | undefined
|
|
32
|
+
): void {
|
|
33
|
+
if (typeof page !== "object" || page === null || !continuationToken) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const pageInfo = pageMap.get(page) ?? {};
|
|
37
|
+
pageInfo.continuationToken = continuationToken;
|
|
38
|
+
pageMap.set(page, pageInfo);
|
|
39
|
+
}
|
|
@@ -50,7 +50,7 @@ export class ResourceConnectorManagementClient extends coreClient.ServiceClient
|
|
|
50
50
|
credential: credentials
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
-
const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0-beta.
|
|
53
|
+
const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0-beta.3`;
|
|
54
54
|
const userAgentPrefix =
|
|
55
55
|
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
56
56
|
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
@@ -62,39 +62,48 @@ export class ResourceConnectorManagementClient extends coreClient.ServiceClient
|
|
|
62
62
|
userAgentOptions: {
|
|
63
63
|
userAgentPrefix
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
endpoint:
|
|
66
66
|
options.endpoint ?? options.baseUri ?? "https://management.azure.com"
|
|
67
67
|
};
|
|
68
68
|
super(optionsWithDefaults);
|
|
69
69
|
|
|
70
|
+
let bearerTokenAuthenticationPolicyFound: boolean = false;
|
|
70
71
|
if (options?.pipeline && options.pipeline.getOrderedPolicies().length > 0) {
|
|
71
72
|
const pipelinePolicies: coreRestPipeline.PipelinePolicy[] = options.pipeline.getOrderedPolicies();
|
|
72
|
-
|
|
73
|
+
bearerTokenAuthenticationPolicyFound = pipelinePolicies.some(
|
|
73
74
|
(pipelinePolicy) =>
|
|
74
75
|
pipelinePolicy.name ===
|
|
75
76
|
coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
76
77
|
);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
78
|
+
}
|
|
79
|
+
if (
|
|
80
|
+
!options ||
|
|
81
|
+
!options.pipeline ||
|
|
82
|
+
options.pipeline.getOrderedPolicies().length == 0 ||
|
|
83
|
+
!bearerTokenAuthenticationPolicyFound
|
|
84
|
+
) {
|
|
85
|
+
this.pipeline.removePolicy({
|
|
86
|
+
name: coreRestPipeline.bearerTokenAuthenticationPolicyName
|
|
87
|
+
});
|
|
88
|
+
this.pipeline.addPolicy(
|
|
89
|
+
coreRestPipeline.bearerTokenAuthenticationPolicy({
|
|
90
|
+
credential: credentials,
|
|
91
|
+
scopes:
|
|
92
|
+
optionsWithDefaults.credentialScopes ??
|
|
93
|
+
`${optionsWithDefaults.endpoint}/.default`,
|
|
94
|
+
challengeCallbacks: {
|
|
95
|
+
authorizeRequestOnChallenge:
|
|
96
|
+
coreClient.authorizeRequestOnClaimChallenge
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
);
|
|
91
100
|
}
|
|
92
101
|
// Parameter assignments
|
|
93
102
|
this.subscriptionId = subscriptionId;
|
|
94
103
|
|
|
95
104
|
// Assigning values to Constant parameters
|
|
96
105
|
this.$host = options.$host || "https://management.azure.com";
|
|
97
|
-
this.apiVersion = options.apiVersion || "2022-
|
|
106
|
+
this.apiVersion = options.apiVersion || "2022-10-27";
|
|
98
107
|
this.appliances = new AppliancesImpl(this);
|
|
99
108
|
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
100
109
|
}
|