@azure/arm-operations 4.0.0-alpha.20220420.2 → 4.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.
Files changed (89) hide show
  1. package/CHANGELOG.md +3 -13
  2. package/LICENSE +1 -1
  3. package/README.md +11 -0
  4. package/dist/index.js +68 -27
  5. package/dist/index.js.map +1 -1
  6. package/dist/index.min.js +1 -1
  7. package/dist/index.min.js.map +1 -1
  8. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts +2 -0
  9. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.d.ts.map +1 -0
  10. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js +40 -0
  11. package/dist-esm/samples-dev/managementAssociationsCreateOrUpdateSample.js.map +1 -0
  12. package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts +2 -0
  13. package/dist-esm/samples-dev/managementAssociationsDeleteSample.d.ts.map +1 -0
  14. package/dist-esm/samples-dev/managementAssociationsDeleteSample.js +34 -0
  15. package/dist-esm/samples-dev/managementAssociationsDeleteSample.js.map +1 -0
  16. package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts +2 -0
  17. package/dist-esm/samples-dev/managementAssociationsGetSample.d.ts.map +1 -0
  18. package/dist-esm/samples-dev/managementAssociationsGetSample.js +34 -0
  19. package/dist-esm/samples-dev/managementAssociationsGetSample.js.map +1 -0
  20. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts +2 -0
  21. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js +29 -0
  23. package/dist-esm/samples-dev/managementAssociationsListBySubscriptionSample.js.map +1 -0
  24. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts +2 -0
  25. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.d.ts.map +1 -0
  26. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js +32 -0
  27. package/dist-esm/samples-dev/managementConfigurationsCreateOrUpdateSample.js.map +1 -0
  28. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts +2 -0
  29. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.d.ts.map +1 -0
  30. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js +31 -0
  31. package/dist-esm/samples-dev/managementConfigurationsDeleteSample.js.map +1 -0
  32. package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts +2 -0
  33. package/dist-esm/samples-dev/managementConfigurationsGetSample.d.ts.map +1 -0
  34. package/dist-esm/samples-dev/managementConfigurationsGetSample.js +31 -0
  35. package/dist-esm/samples-dev/managementConfigurationsGetSample.js.map +1 -0
  36. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts +2 -0
  37. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.d.ts.map +1 -0
  38. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js +29 -0
  39. package/dist-esm/samples-dev/managementConfigurationsListBySubscriptionSample.js.map +1 -0
  40. package/dist-esm/samples-dev/operationsListSample.d.ts +2 -0
  41. package/dist-esm/samples-dev/operationsListSample.d.ts.map +1 -0
  42. package/dist-esm/samples-dev/operationsListSample.js +43 -0
  43. package/dist-esm/samples-dev/operationsListSample.js.map +1 -0
  44. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts +2 -0
  45. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.d.ts.map +1 -0
  46. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js +51 -0
  47. package/dist-esm/samples-dev/solutionsCreateOrUpdateSample.js.map +1 -0
  48. package/dist-esm/samples-dev/solutionsDeleteSample.d.ts +2 -0
  49. package/dist-esm/samples-dev/solutionsDeleteSample.d.ts.map +1 -0
  50. package/dist-esm/samples-dev/solutionsDeleteSample.js +31 -0
  51. package/dist-esm/samples-dev/solutionsDeleteSample.js.map +1 -0
  52. package/dist-esm/samples-dev/solutionsGetSample.d.ts +2 -0
  53. package/dist-esm/samples-dev/solutionsGetSample.d.ts.map +1 -0
  54. package/dist-esm/samples-dev/solutionsGetSample.js +31 -0
  55. package/dist-esm/samples-dev/solutionsGetSample.js.map +1 -0
  56. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts +2 -0
  57. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.d.ts.map +1 -0
  58. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js +30 -0
  59. package/dist-esm/samples-dev/solutionsListByResourceGroupSample.js.map +1 -0
  60. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts +2 -0
  61. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.d.ts.map +1 -0
  62. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js +29 -0
  63. package/dist-esm/samples-dev/solutionsListBySubscriptionSample.js.map +1 -0
  64. package/dist-esm/samples-dev/solutionsUpdateSample.d.ts +2 -0
  65. package/dist-esm/samples-dev/solutionsUpdateSample.d.ts.map +1 -0
  66. package/dist-esm/samples-dev/solutionsUpdateSample.js +34 -0
  67. package/dist-esm/samples-dev/solutionsUpdateSample.js.map +1 -0
  68. package/dist-esm/src/operations/managementAssociations.d.ts +12 -3
  69. package/dist-esm/src/operations/managementAssociations.d.ts.map +1 -1
  70. package/dist-esm/src/operations/managementAssociations.js +37 -6
  71. package/dist-esm/src/operations/managementAssociations.js.map +1 -1
  72. package/dist-esm/src/operations/solutions.d.ts.map +1 -1
  73. package/dist-esm/src/operations/solutions.js +9 -3
  74. package/dist-esm/src/operations/solutions.js.map +1 -1
  75. package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts +12 -3
  76. package/dist-esm/src/operationsInterfaces/managementAssociations.d.ts.map +1 -1
  77. package/dist-esm/src/operationsManagementClient.d.ts +1 -7
  78. package/dist-esm/src/operationsManagementClient.d.ts.map +1 -1
  79. package/dist-esm/src/operationsManagementClient.js +21 -18
  80. package/dist-esm/src/operationsManagementClient.js.map +1 -1
  81. package/package.json +25 -9
  82. package/review/arm-operations.api.md +4 -10
  83. package/rollup.config.js +6 -72
  84. package/src/operations/managementAssociations.ts +43 -3
  85. package/src/operations/solutions.ts +9 -3
  86. package/src/operationsInterfaces/managementAssociations.ts +18 -0
  87. package/src/operationsManagementClient.ts +27 -23
  88. package/tsconfig.json +19 -5
  89. package/types/arm-operations.d.ts +13 -10
package/CHANGELOG.md CHANGED
@@ -1,18 +1,8 @@
1
1
  # Release History
2
+
3
+ ## 4.0.0-beta.3 (2022-05-11)
2
4
 
3
- ## 4.0.0-beta.3 (Unreleased)
4
-
5
- ### Features Added
6
-
7
- ### Breaking Changes
8
-
9
- ### Bugs Fixed
10
-
11
- ### Other Changes
12
-
13
- ## 4.0.0-beta.2 (2021-12-21)
14
-
15
- The package of @azure/arm-operations is using our next generation design principles since version 4.0.0-beta.2, which contains breaking changes.
5
+ The package of @azure/arm-operations is using our next generation design principles since version 4.0.0-beta.3, which contains breaking changes.
16
6
 
17
7
  To understand the detail of the change, please refer to [Changelog](https://aka.ms/js-track2-changelog).
18
8
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2021 Microsoft
3
+ Copyright (c) 2022 Microsoft
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -16,6 +16,8 @@ Operations Management Client
16
16
  - [LTS versions of Node.js](https://nodejs.org/about/releases/)
17
17
  - Latest versions of Safari, Chrome, Edge and Firefox.
18
18
 
19
+ See our [support policy](https://github.com/Azure/azure-sdk-for-js/blob/main/SUPPORT.md) for more details.
20
+
19
21
  ### Prerequisites
20
22
 
21
23
  - An [Azure subscription][azure_sub].
@@ -49,8 +51,17 @@ For more information about how to create an Azure AD Application check out [this
49
51
  ```javascript
50
52
  const { OperationsManagementClient } = require("@azure/arm-operations");
51
53
  const { DefaultAzureCredential } = require("@azure/identity");
54
+ // For client-side applications running in the browser, use InteractiveBrowserCredential instead of DefaultAzureCredential. See https://aka.ms/azsdk/js/identity/examples for more details.
55
+
52
56
  const subscriptionId = "00000000-0000-0000-0000-000000000000";
53
57
  const client = new OperationsManagementClient(new DefaultAzureCredential(), subscriptionId);
58
+
59
+ // For client-side applications running in the browser, use this code instead:
60
+ // const credential = new InteractiveBrowserCredential({
61
+ // tenantId: "<YOUR_TENANT_ID>",
62
+ // clientId: "<YOUR_CLIENT_ID>"
63
+ // });
64
+ // const client = new OperationsManagementClient(credential, subscriptionId);
54
65
  ```
55
66
 
56
67
 
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var coreClient = require('@azure/core-client');
6
+ var coreRestPipeline = require('@azure/core-rest-pipeline');
6
7
  var tslib = require('tslib');
7
8
  var coreLro = require('@azure/core-lro');
8
9
 
@@ -25,6 +26,7 @@ function _interopNamespace(e) {
25
26
  }
26
27
 
27
28
  var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
29
+ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
28
30
 
29
31
  /*
30
32
  * Copyright (c) Microsoft Corporation.
@@ -761,10 +763,12 @@ class SolutionsImpl {
761
763
  };
762
764
  });
763
765
  const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, parameters, options }, createOrUpdateOperationSpec$2);
764
- return new coreLro.LroEngine(lro, {
766
+ const poller = new coreLro.LroEngine(lro, {
765
767
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
766
768
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
767
769
  });
770
+ yield poller.poll();
771
+ return poller;
768
772
  });
769
773
  }
770
774
  /**
@@ -812,10 +816,12 @@ class SolutionsImpl {
812
816
  };
813
817
  });
814
818
  const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, parameters, options }, updateOperationSpec);
815
- return new coreLro.LroEngine(lro, {
819
+ const poller = new coreLro.LroEngine(lro, {
816
820
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
817
821
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
818
822
  });
823
+ yield poller.poll();
824
+ return poller;
819
825
  });
820
826
  }
821
827
  /**
@@ -862,10 +868,12 @@ class SolutionsImpl {
862
868
  };
863
869
  });
864
870
  const lro = new LroImpl(sendOperation, { resourceGroupName, solutionName, options }, deleteOperationSpec$2);
865
- return new coreLro.LroEngine(lro, {
871
+ const poller = new coreLro.LroEngine(lro, {
866
872
  resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
867
873
  intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs
868
874
  });
875
+ yield poller.poll();
876
+ return poller;
869
877
  });
870
878
  }
871
879
  /**
@@ -1077,30 +1085,61 @@ class ManagementAssociationsImpl {
1077
1085
  /**
1078
1086
  * Creates or updates the ManagementAssociation.
1079
1087
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
1088
+ * @param providerName Provider name for the parent resource.
1089
+ * @param resourceType Resource type for the parent resource
1090
+ * @param resourceName Parent resource name.
1080
1091
  * @param managementAssociationName User ManagementAssociation Name.
1081
1092
  * @param parameters The parameters required to create ManagementAssociation extension.
1082
1093
  * @param options The options parameters.
1083
1094
  */
1084
- createOrUpdate(resourceGroupName, managementAssociationName, parameters, options) {
1085
- return this.client.sendOperationRequest({ resourceGroupName, managementAssociationName, parameters, options }, createOrUpdateOperationSpec$1);
1095
+ createOrUpdate(resourceGroupName, providerName, resourceType, resourceName, managementAssociationName, parameters, options) {
1096
+ return this.client.sendOperationRequest({
1097
+ resourceGroupName,
1098
+ providerName,
1099
+ resourceType,
1100
+ resourceName,
1101
+ managementAssociationName,
1102
+ parameters,
1103
+ options
1104
+ }, createOrUpdateOperationSpec$1);
1086
1105
  }
1087
1106
  /**
1088
1107
  * Deletes the ManagementAssociation in the subscription.
1089
1108
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
1109
+ * @param providerName Provider name for the parent resource.
1110
+ * @param resourceType Resource type for the parent resource
1111
+ * @param resourceName Parent resource name.
1090
1112
  * @param managementAssociationName User ManagementAssociation Name.
1091
1113
  * @param options The options parameters.
1092
1114
  */
1093
- delete(resourceGroupName, managementAssociationName, options) {
1094
- return this.client.sendOperationRequest({ resourceGroupName, managementAssociationName, options }, deleteOperationSpec$1);
1115
+ delete(resourceGroupName, providerName, resourceType, resourceName, managementAssociationName, options) {
1116
+ return this.client.sendOperationRequest({
1117
+ resourceGroupName,
1118
+ providerName,
1119
+ resourceType,
1120
+ resourceName,
1121
+ managementAssociationName,
1122
+ options
1123
+ }, deleteOperationSpec$1);
1095
1124
  }
1096
1125
  /**
1097
1126
  * Retrieves the user ManagementAssociation.
1098
1127
  * @param resourceGroupName The name of the resource group to get. The name is case insensitive.
1128
+ * @param providerName Provider name for the parent resource.
1129
+ * @param resourceType Resource type for the parent resource
1130
+ * @param resourceName Parent resource name.
1099
1131
  * @param managementAssociationName User ManagementAssociation Name.
1100
1132
  * @param options The options parameters.
1101
1133
  */
1102
- get(resourceGroupName, managementAssociationName, options) {
1103
- return this.client.sendOperationRequest({ resourceGroupName, managementAssociationName, options }, getOperationSpec$1);
1134
+ get(resourceGroupName, providerName, resourceType, resourceName, managementAssociationName, options) {
1135
+ return this.client.sendOperationRequest({
1136
+ resourceGroupName,
1137
+ providerName,
1138
+ resourceType,
1139
+ resourceName,
1140
+ managementAssociationName,
1141
+ options
1142
+ }, getOperationSpec$1);
1104
1143
  }
1105
1144
  }
1106
1145
  // Operation Specifications
@@ -1424,27 +1463,16 @@ class OperationsManagementClient extends coreClient__namespace.ServiceClient {
1424
1463
  * @param credentials Subscription credentials which uniquely identify client subscription.
1425
1464
  * @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
1426
1465
  * subscription. The subscription ID forms part of the URI for every service call.
1427
- * @param providerName Provider name for the parent resource.
1428
- * @param resourceType Resource type for the parent resource
1429
- * @param resourceName Parent resource name.
1430
1466
  * @param options The parameter options
1431
1467
  */
1432
- constructor(credentials, subscriptionId, providerName, resourceType, resourceName, options) {
1468
+ constructor(credentials, subscriptionId, options) {
1469
+ var _a, _b;
1433
1470
  if (credentials === undefined) {
1434
1471
  throw new Error("'credentials' cannot be null");
1435
1472
  }
1436
1473
  if (subscriptionId === undefined) {
1437
1474
  throw new Error("'subscriptionId' cannot be null");
1438
1475
  }
1439
- if (providerName === undefined) {
1440
- throw new Error("'providerName' cannot be null");
1441
- }
1442
- if (resourceType === undefined) {
1443
- throw new Error("'resourceType' cannot be null");
1444
- }
1445
- if (resourceName === undefined) {
1446
- throw new Error("'resourceName' cannot be null");
1447
- }
1448
1476
  // Initializing default values for options
1449
1477
  if (!options) {
1450
1478
  options = {};
@@ -1453,7 +1481,7 @@ class OperationsManagementClient extends coreClient__namespace.ServiceClient {
1453
1481
  requestContentType: "application/json; charset=utf-8",
1454
1482
  credential: credentials
1455
1483
  };
1456
- const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.2`;
1484
+ const packageDetails = `azsdk-js-arm-operations/4.0.0-beta.3`;
1457
1485
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1458
1486
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1459
1487
  : `${packageDetails}`;
@@ -1462,13 +1490,26 @@ class OperationsManagementClient extends coreClient__namespace.ServiceClient {
1462
1490
  }
1463
1491
  const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
1464
1492
  userAgentPrefix
1465
- }, baseUri: options.endpoint || "https://management.azure.com" });
1493
+ }, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
1466
1494
  super(optionsWithDefaults);
1495
+ if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
1496
+ const pipelinePolicies = options.pipeline.getOrderedPolicies();
1497
+ const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
1498
+ coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
1499
+ if (!bearerTokenAuthenticationPolicyFound) {
1500
+ this.pipeline.removePolicy({
1501
+ name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
1502
+ });
1503
+ this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
1504
+ scopes: `${optionsWithDefaults.baseUri}/.default`,
1505
+ challengeCallbacks: {
1506
+ authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
1507
+ }
1508
+ }));
1509
+ }
1510
+ }
1467
1511
  // Parameter assignments
1468
1512
  this.subscriptionId = subscriptionId;
1469
- this.providerName = providerName;
1470
- this.resourceType = resourceType;
1471
- this.resourceName = resourceName;
1472
1513
  // Assigning values to Constant parameters
1473
1514
  this.$host = options.$host || "https://management.azure.com";
1474
1515
  this.apiVersion = options.apiVersion || "2015-11-01-preview";