@azure/arm-resourceconnector 1.0.0-alpha.20230303.1 → 1.0.0-alpha.20230417.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +2 -22
  2. package/README.md +1 -1
  3. package/dist/index.js +228 -111
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +1 -1
  6. package/dist/index.min.js.map +1 -1
  7. package/dist-esm/samples-dev/appliancesCreateOrUpdateSample.js +1 -1
  8. package/dist-esm/samples-dev/appliancesDeleteSample.js +1 -1
  9. package/dist-esm/samples-dev/appliancesGetSample.js +1 -1
  10. package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.d.ts +2 -0
  11. package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.d.ts.map +1 -0
  12. package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.js +37 -0
  13. package/dist-esm/samples-dev/appliancesGetTelemetryConfigSample.js.map +1 -0
  14. package/dist-esm/samples-dev/appliancesGetUpgradeGraphSample.js +1 -1
  15. package/dist-esm/samples-dev/appliancesListByResourceGroupSample.js +1 -1
  16. package/dist-esm/samples-dev/appliancesListBySubscriptionSample.js +1 -1
  17. package/dist-esm/samples-dev/appliancesListClusterUserCredentialSample.js +1 -1
  18. package/dist-esm/samples-dev/appliancesListKeysSample.d.ts +2 -0
  19. package/dist-esm/samples-dev/appliancesListKeysSample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/{appliancesListClusterCustomerUserCredentialSample.js → appliancesListKeysSample.js} +7 -7
  21. package/dist-esm/samples-dev/appliancesListKeysSample.js.map +1 -0
  22. package/dist-esm/samples-dev/appliancesListOperationsSample.js +1 -1
  23. package/dist-esm/samples-dev/appliancesUpdateSample.js +1 -1
  24. package/dist-esm/src/lroImpl.d.ts +6 -11
  25. package/dist-esm/src/lroImpl.d.ts.map +1 -1
  26. package/dist-esm/src/lroImpl.js +12 -20
  27. package/dist-esm/src/lroImpl.js.map +1 -1
  28. package/dist-esm/src/models/index.d.ts +152 -54
  29. package/dist-esm/src/models/index.d.ts.map +1 -1
  30. package/dist-esm/src/models/index.js +30 -0
  31. package/dist-esm/src/models/index.js.map +1 -1
  32. package/dist-esm/src/models/mappers.d.ts +6 -4
  33. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  34. package/dist-esm/src/models/mappers.js +125 -63
  35. package/dist-esm/src/models/mappers.js.map +1 -1
  36. package/dist-esm/src/models/parameters.js +1 -1
  37. package/dist-esm/src/models/parameters.js.map +1 -1
  38. package/dist-esm/src/operations/appliances.d.ts +13 -8
  39. package/dist-esm/src/operations/appliances.d.ts.map +1 -1
  40. package/dist-esm/src/operations/appliances.js +55 -24
  41. package/dist-esm/src/operations/appliances.js.map +1 -1
  42. package/dist-esm/src/operationsInterfaces/appliances.d.ts +13 -8
  43. package/dist-esm/src/operationsInterfaces/appliances.d.ts.map +1 -1
  44. package/dist-esm/src/resourceConnectorManagementClient.js +2 -2
  45. package/dist-esm/src/resourceConnectorManagementClient.js.map +1 -1
  46. package/package.json +6 -6
  47. package/review/arm-resourceconnector.api.md +62 -18
  48. package/src/lroImpl.ts +31 -23
  49. package/src/models/index.ts +156 -54
  50. package/src/models/mappers.ts +127 -64
  51. package/src/models/parameters.ts +1 -1
  52. package/src/operations/appliances.ts +80 -41
  53. package/src/operationsInterfaces/appliances.ts +23 -14
  54. package/src/resourceConnectorManagementClient.ts +2 -2
  55. package/types/arm-resourceconnector.d.ts +146 -37
  56. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.d.ts +0 -2
  57. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.d.ts.map +0 -1
  58. package/dist-esm/samples-dev/appliancesListClusterCustomerUserCredentialSample.js.map +0 -1
@@ -13,8 +13,12 @@ import * as coreClient from "@azure/core-client";
13
13
  import * as Mappers from "../models/mappers";
14
14
  import * as Parameters from "../models/parameters";
15
15
  import { ResourceConnectorManagementClient } from "../resourceConnectorManagementClient";
16
- import { PollerLike, PollOperationState, LroEngine } from "@azure/core-lro";
17
- import { LroImpl } from "../lroImpl";
16
+ import {
17
+ SimplePollerLike,
18
+ OperationState,
19
+ createHttpPoller
20
+ } from "@azure/core-lro";
21
+ import { createLroSpec } from "../lroImpl";
18
22
  import {
19
23
  ApplianceOperation,
20
24
  AppliancesListOperationsNextOptionalParams,
@@ -27,6 +31,8 @@ import {
27
31
  AppliancesListByResourceGroupNextOptionalParams,
28
32
  AppliancesListByResourceGroupOptionalParams,
29
33
  AppliancesListByResourceGroupResponse,
34
+ AppliancesGetTelemetryConfigOptionalParams,
35
+ AppliancesGetTelemetryConfigResponse,
30
36
  AppliancesGetOptionalParams,
31
37
  AppliancesGetResponse,
32
38
  AppliancesCreateOrUpdateOptionalParams,
@@ -34,10 +40,10 @@ import {
34
40
  AppliancesDeleteOptionalParams,
35
41
  AppliancesUpdateOptionalParams,
36
42
  AppliancesUpdateResponse,
37
- AppliancesListClusterCustomerUserCredentialOptionalParams,
38
- AppliancesListClusterCustomerUserCredentialResponse,
39
43
  AppliancesListClusterUserCredentialOptionalParams,
40
44
  AppliancesListClusterUserCredentialResponse,
45
+ AppliancesListKeysOptionalParams,
46
+ AppliancesListKeysResponse,
41
47
  AppliancesGetUpgradeGraphOptionalParams,
42
48
  AppliancesGetUpgradeGraphResponse,
43
49
  AppliancesListOperationsNextResponse,
@@ -264,6 +270,19 @@ export class AppliancesImpl implements Appliances {
264
270
  );
265
271
  }
266
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
+
267
286
  /**
268
287
  * Gets a list of Appliances in the specified subscription and resource group. The operation returns
269
288
  * properties of each Appliance.
@@ -310,8 +329,8 @@ export class AppliancesImpl implements Appliances {
310
329
  parameters: Appliance,
311
330
  options?: AppliancesCreateOrUpdateOptionalParams
312
331
  ): Promise<
313
- PollerLike<
314
- PollOperationState<AppliancesCreateOrUpdateResponse>,
332
+ SimplePollerLike<
333
+ OperationState<AppliancesCreateOrUpdateResponse>,
315
334
  AppliancesCreateOrUpdateResponse
316
335
  >
317
336
  > {
@@ -321,7 +340,7 @@ export class AppliancesImpl implements Appliances {
321
340
  ): Promise<AppliancesCreateOrUpdateResponse> => {
322
341
  return this.client.sendOperationRequest(args, spec);
323
342
  };
324
- const sendOperation = async (
343
+ const sendOperationFn = async (
325
344
  args: coreClient.OperationArguments,
326
345
  spec: coreClient.OperationSpec
327
346
  ) => {
@@ -354,15 +373,18 @@ export class AppliancesImpl implements Appliances {
354
373
  };
355
374
  };
356
375
 
357
- const lro = new LroImpl(
358
- sendOperation,
359
- { resourceGroupName, resourceName, parameters, options },
360
- createOrUpdateOperationSpec
361
- );
362
- const poller = new LroEngine(lro, {
363
- resumeFrom: options?.resumeFrom,
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,
364
386
  intervalInMs: options?.updateIntervalInMs,
365
- lroResourceLocationConfig: "azure-async-operation"
387
+ resourceLocationConfig: "azure-async-operation"
366
388
  });
367
389
  await poller.poll();
368
390
  return poller;
@@ -400,14 +422,14 @@ export class AppliancesImpl implements Appliances {
400
422
  resourceGroupName: string,
401
423
  resourceName: string,
402
424
  options?: AppliancesDeleteOptionalParams
403
- ): Promise<PollerLike<PollOperationState<void>, void>> {
425
+ ): Promise<SimplePollerLike<OperationState<void>, void>> {
404
426
  const directSendOperation = async (
405
427
  args: coreClient.OperationArguments,
406
428
  spec: coreClient.OperationSpec
407
429
  ): Promise<void> => {
408
430
  return this.client.sendOperationRequest(args, spec);
409
431
  };
410
- const sendOperation = async (
432
+ const sendOperationFn = async (
411
433
  args: coreClient.OperationArguments,
412
434
  spec: coreClient.OperationSpec
413
435
  ) => {
@@ -440,15 +462,15 @@ export class AppliancesImpl implements Appliances {
440
462
  };
441
463
  };
442
464
 
443
- const lro = new LroImpl(
444
- sendOperation,
445
- { resourceGroupName, resourceName, options },
446
- deleteOperationSpec
447
- );
448
- const poller = new LroEngine(lro, {
449
- resumeFrom: options?.resumeFrom,
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,
450
472
  intervalInMs: options?.updateIntervalInMs,
451
- lroResourceLocationConfig: "azure-async-operation"
473
+ resourceLocationConfig: "azure-async-operation"
452
474
  });
453
475
  await poller.poll();
454
476
  return poller;
@@ -492,36 +514,36 @@ export class AppliancesImpl implements Appliances {
492
514
  }
493
515
 
494
516
  /**
495
- * Returns the cluster customer user credentials for the dedicated appliance.
517
+ * Returns the cluster user credentials for the dedicated appliance.
496
518
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
497
519
  * @param resourceName Appliances name.
498
520
  * @param options The options parameters.
499
521
  */
500
- listClusterCustomerUserCredential(
522
+ listClusterUserCredential(
501
523
  resourceGroupName: string,
502
524
  resourceName: string,
503
- options?: AppliancesListClusterCustomerUserCredentialOptionalParams
504
- ): Promise<AppliancesListClusterCustomerUserCredentialResponse> {
525
+ options?: AppliancesListClusterUserCredentialOptionalParams
526
+ ): Promise<AppliancesListClusterUserCredentialResponse> {
505
527
  return this.client.sendOperationRequest(
506
528
  { resourceGroupName, resourceName, options },
507
- listClusterCustomerUserCredentialOperationSpec
529
+ listClusterUserCredentialOperationSpec
508
530
  );
509
531
  }
510
532
 
511
533
  /**
512
- * Returns the cluster user credentials for the dedicated appliance.
534
+ * Returns the cluster customer credentials for the dedicated appliance.
513
535
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
514
536
  * @param resourceName Appliances name.
515
537
  * @param options The options parameters.
516
538
  */
517
- listClusterUserCredential(
539
+ listKeys(
518
540
  resourceGroupName: string,
519
541
  resourceName: string,
520
- options?: AppliancesListClusterUserCredentialOptionalParams
521
- ): Promise<AppliancesListClusterUserCredentialResponse> {
542
+ options?: AppliancesListKeysOptionalParams
543
+ ): Promise<AppliancesListKeysResponse> {
522
544
  return this.client.sendOperationRequest(
523
545
  { resourceGroupName, resourceName, options },
524
- listClusterUserCredentialOperationSpec
546
+ listKeysOperationSpec
525
547
  );
526
548
  }
527
549
 
@@ -628,6 +650,23 @@ const listBySubscriptionOperationSpec: coreClient.OperationSpec = {
628
650
  headerParameters: [Parameters.accept],
629
651
  serializer
630
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
+ };
631
670
  const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
632
671
  path:
633
672
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances",
@@ -754,13 +793,13 @@ const updateOperationSpec: coreClient.OperationSpec = {
754
793
  mediaType: "json",
755
794
  serializer
756
795
  };
757
- const listClusterCustomerUserCredentialOperationSpec: coreClient.OperationSpec = {
796
+ const listClusterUserCredentialOperationSpec: coreClient.OperationSpec = {
758
797
  path:
759
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterCustomerUserCredential",
798
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential",
760
799
  httpMethod: "POST",
761
800
  responses: {
762
801
  200: {
763
- bodyMapper: Mappers.ApplianceListClusterCustomerUserCredentialResults
802
+ bodyMapper: Mappers.ApplianceListCredentialResults
764
803
  },
765
804
  default: {
766
805
  bodyMapper: Mappers.ErrorResponse
@@ -776,13 +815,13 @@ const listClusterCustomerUserCredentialOperationSpec: coreClient.OperationSpec =
776
815
  headerParameters: [Parameters.accept],
777
816
  serializer
778
817
  };
779
- const listClusterUserCredentialOperationSpec: coreClient.OperationSpec = {
818
+ const listKeysOperationSpec: coreClient.OperationSpec = {
780
819
  path:
781
- "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listClusterUserCredential",
820
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ResourceConnector/appliances/{resourceName}/listkeys",
782
821
  httpMethod: "POST",
783
822
  responses: {
784
823
  200: {
785
- bodyMapper: Mappers.ApplianceListCredentialResults
824
+ bodyMapper: Mappers.ApplianceListKeysResults
786
825
  },
787
826
  default: {
788
827
  bodyMapper: Mappers.ErrorResponse
@@ -7,13 +7,15 @@
7
7
  */
8
8
 
9
9
  import { PagedAsyncIterableIterator } from "@azure/core-paging";
10
- import { PollerLike, PollOperationState } from "@azure/core-lro";
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
- PollerLike<
85
- PollOperationState<AppliancesCreateOrUpdateResponse>,
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<PollerLike<PollOperationState<void>, void>>;
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 customer user credentials for the dedicated appliance.
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
- listClusterCustomerUserCredential(
151
+ listClusterUserCredential(
143
152
  resourceGroupName: string,
144
153
  resourceName: string,
145
- options?: AppliancesListClusterCustomerUserCredentialOptionalParams
146
- ): Promise<AppliancesListClusterCustomerUserCredentialResponse>;
154
+ options?: AppliancesListClusterUserCredentialOptionalParams
155
+ ): Promise<AppliancesListClusterUserCredentialResponse>;
147
156
  /**
148
- * Returns the cluster user credentials for the dedicated appliance.
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
- listClusterUserCredential(
162
+ listKeys(
154
163
  resourceGroupName: string,
155
164
  resourceName: string,
156
- options?: AppliancesListClusterUserCredentialOptionalParams
157
- ): Promise<AppliancesListClusterUserCredentialResponse>;
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.
@@ -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.3`;
53
+ const packageDetails = `azsdk-js-arm-resourceconnector/1.0.0`;
54
54
  const userAgentPrefix =
55
55
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
56
56
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -103,7 +103,7 @@ export class ResourceConnectorManagementClient extends coreClient.ServiceClient
103
103
 
104
104
  // Assigning values to Constant parameters
105
105
  this.$host = options.$host || "https://management.azure.com";
106
- this.apiVersion = options.apiVersion || "2022-04-15-preview";
106
+ this.apiVersion = options.apiVersion || "2022-10-27";
107
107
  this.appliances = new AppliancesImpl(this);
108
108
  this.addCustomApiVersionPolicy(options.apiVersion);
109
109
  }