@azure/arm-trafficmanager 6.1.0-beta.1 → 6.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +60 -17
  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/endpointsCreateOrUpdateSample.js +32 -20
  9. package/dist-esm/samples-dev/endpointsCreateOrUpdateSample.js.map +1 -1
  10. package/dist-esm/samples-dev/endpointsDeleteSample.js +12 -4
  11. package/dist-esm/samples-dev/endpointsDeleteSample.js.map +1 -1
  12. package/dist-esm/samples-dev/endpointsGetSample.js +22 -12
  13. package/dist-esm/samples-dev/endpointsGetSample.js.map +1 -1
  14. package/dist-esm/samples-dev/endpointsUpdateSample.js +12 -4
  15. package/dist-esm/samples-dev/endpointsUpdateSample.js.map +1 -1
  16. package/dist-esm/samples-dev/geographicHierarchiesGetDefaultSample.js +11 -3
  17. package/dist-esm/samples-dev/geographicHierarchiesGetDefaultSample.js.map +1 -1
  18. package/dist-esm/samples-dev/heatMapGetSample.js +22 -12
  19. package/dist-esm/samples-dev/heatMapGetSample.js.map +1 -1
  20. package/dist-esm/samples-dev/profilesCheckTrafficManagerNameAvailabilityV2Sample.d.ts +2 -0
  21. package/dist-esm/samples-dev/profilesCheckTrafficManagerNameAvailabilityV2Sample.d.ts.map +1 -0
  22. package/dist-esm/samples-dev/profilesCheckTrafficManagerNameAvailabilityV2Sample.js +60 -0
  23. package/dist-esm/samples-dev/profilesCheckTrafficManagerNameAvailabilityV2Sample.js.map +1 -0
  24. package/dist-esm/samples-dev/profilesCheckTrafficManagerRelativeDnsNameAvailabilitySample.js +15 -6
  25. package/dist-esm/samples-dev/profilesCheckTrafficManagerRelativeDnsNameAvailabilitySample.js.map +1 -1
  26. package/dist-esm/samples-dev/profilesCreateOrUpdateSample.js +36 -24
  27. package/dist-esm/samples-dev/profilesCreateOrUpdateSample.js.map +1 -1
  28. package/dist-esm/samples-dev/profilesDeleteSample.js +12 -4
  29. package/dist-esm/samples-dev/profilesDeleteSample.js.map +1 -1
  30. package/dist-esm/samples-dev/profilesGetSample.js +22 -12
  31. package/dist-esm/samples-dev/profilesGetSample.js.map +1 -1
  32. package/dist-esm/samples-dev/profilesListByResourceGroupSample.js +24 -9
  33. package/dist-esm/samples-dev/profilesListByResourceGroupSample.js.map +1 -1
  34. package/dist-esm/samples-dev/profilesListBySubscriptionSample.js +22 -8
  35. package/dist-esm/samples-dev/profilesListBySubscriptionSample.js.map +1 -1
  36. package/dist-esm/samples-dev/profilesUpdateSample.js +12 -4
  37. package/dist-esm/samples-dev/profilesUpdateSample.js.map +1 -1
  38. package/dist-esm/samples-dev/trafficManagerUserMetricsKeysCreateOrUpdateSample.js +10 -3
  39. package/dist-esm/samples-dev/trafficManagerUserMetricsKeysCreateOrUpdateSample.js.map +1 -1
  40. package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDeleteSample.js +10 -3
  41. package/dist-esm/samples-dev/trafficManagerUserMetricsKeysDeleteSample.js.map +1 -1
  42. package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGetSample.js +10 -3
  43. package/dist-esm/samples-dev/trafficManagerUserMetricsKeysGetSample.js.map +1 -1
  44. package/dist-esm/src/models/index.d.ts +36 -28
  45. package/dist-esm/src/models/index.d.ts.map +1 -1
  46. package/dist-esm/src/models/index.js +2 -0
  47. package/dist-esm/src/models/index.js.map +1 -1
  48. package/dist-esm/src/models/parameters.js +1 -1
  49. package/dist-esm/src/models/parameters.js.map +1 -1
  50. package/dist-esm/src/operations/profiles.d.ts +8 -1
  51. package/dist-esm/src/operations/profiles.d.ts.map +1 -1
  52. package/dist-esm/src/operations/profiles.js +51 -10
  53. package/dist-esm/src/operations/profiles.js.map +1 -1
  54. package/dist-esm/src/operationsInterfaces/profiles.d.ts +8 -1
  55. package/dist-esm/src/operationsInterfaces/profiles.d.ts.map +1 -1
  56. package/dist-esm/src/pagingHelper.d.ts +4 -4
  57. package/dist-esm/src/pagingHelper.js +4 -4
  58. package/dist-esm/src/trafficManagerManagementClient.js +2 -2
  59. package/dist-esm/src/trafficManagerManagementClient.js.map +1 -1
  60. package/dist-esm/test/trafficmanager_examples.spec.js +24 -10
  61. package/dist-esm/test/trafficmanager_examples.spec.js.map +1 -1
  62. package/package.json +10 -9
  63. package/review/arm-trafficmanager.api.md +10 -1
  64. package/src/models/index.ts +12 -2
  65. package/src/models/parameters.ts +1 -1
  66. package/src/operations/profiles.ts +37 -0
  67. package/src/operationsInterfaces/profiles.ts +12 -0
  68. package/src/pagingHelper.ts +4 -4
  69. package/src/trafficManagerManagementClient.ts +2 -2
  70. package/types/arm-trafficmanager.d.ts +23 -6
  71. package/types/tsdoc-metadata.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,18 +1,23 @@
1
1
  # Release History
2
2
 
3
- ## 6.1.0-beta.1 (2022-11-15)
3
+ ## 6.1.0 (2023-06-02)
4
4
 
5
5
  **Features**
6
6
 
7
+ - Added operation Profiles.checkTrafficManagerNameAvailabilityV2
7
8
  - Added Interface Endpoint
8
9
  - Added Interface HeatMapModel
9
10
  - Added Interface Profile
11
+ - Added Interface ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams
10
12
  - Added Interface ProxyResource
11
13
  - Added Interface TrackedResource
12
14
  - Added Interface TrafficManagerGeographicHierarchy
13
15
  - Added Interface UserMetricsModel
14
16
  - Added Type Alias AlwaysServe
17
+ - Added Type Alias ProfilesCheckTrafficManagerNameAvailabilityV2Response
15
18
  - Added Enum KnownAlwaysServe
19
+ - Enum KnownEndpointMonitorStatus has a new value Unmonitored
20
+ - Added function getContinuationToken
16
21
 
17
22
  ## 6.0.1 (2022-05-05)
18
23
 
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 Microsoft
3
+ Copyright (c) 2023 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
@@ -6,7 +6,7 @@ This package contains an isomorphic SDK (runs both in Node.js and in browsers) f
6
6
 
7
7
  [Source code](https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/trafficmanager/arm-trafficmanager) |
8
8
  [Package (NPM)](https://www.npmjs.com/package/@azure/arm-trafficmanager) |
9
- [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-trafficmanager?view=azure-node-preview) |
9
+ [API reference documentation](https://docs.microsoft.com/javascript/api/@azure/arm-trafficmanager) |
10
10
  [Samples](https://github.com/Azure-Samples/azure-samples-js-management)
11
11
 
12
12
  ## Getting started
package/dist/index.js CHANGED
@@ -36,11 +36,11 @@ var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipelin
36
36
  */
37
37
  const pageMap = new WeakMap();
38
38
  /**
39
- * Given a result page from a pageable operation, returns a
40
- * continuation token that can be used to begin paging from
39
+ * Given the last `.value` produced by the `byPage` iterator,
40
+ * returns a continuation token that can be used to begin paging from
41
41
  * that point later.
42
- * @param page A result object from calling .byPage() on a paged operation.
43
- * @returns The continuation token that can be passed into byPage().
42
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
43
+ * @returns The continuation token that can be passed into byPage() during future calls.
44
44
  */
45
45
  function getContinuationToken(page) {
46
46
  var _a;
@@ -80,6 +80,8 @@ exports.KnownEndpointMonitorStatus = void 0;
80
80
  KnownEndpointMonitorStatus["Inactive"] = "Inactive";
81
81
  /** Stopped */
82
82
  KnownEndpointMonitorStatus["Stopped"] = "Stopped";
83
+ /** Unmonitored */
84
+ KnownEndpointMonitorStatus["Unmonitored"] = "Unmonitored";
83
85
  })(exports.KnownEndpointMonitorStatus || (exports.KnownEndpointMonitorStatus = {}));
84
86
  /** Known values of {@link AlwaysServe} that the service accepts. */
85
87
  exports.KnownAlwaysServe = void 0;
@@ -1006,7 +1008,7 @@ const endpointName = {
1006
1008
  const apiVersion = {
1007
1009
  parameterPath: "apiVersion",
1008
1010
  mapper: {
1009
- defaultValue: "2022-04-01-preview",
1011
+ defaultValue: "2022-04-01",
1010
1012
  isConstant: true,
1011
1013
  serializedName: "api-version",
1012
1014
  type: {
@@ -1313,17 +1315,24 @@ class ProfilesImpl {
1313
1315
  }
1314
1316
  listByResourceGroupPagingAll(resourceGroupName, options) {
1315
1317
  return tslib.__asyncGenerator(this, arguments, function* listByResourceGroupPagingAll_1() {
1316
- var e_1, _a;
1318
+ var _a, e_1, _b, _c;
1317
1319
  try {
1318
- for (var _b = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1319
- const page = _c.value;
1320
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1320
+ for (var _d = true, _e = tslib.__asyncValues(this.listByResourceGroupPagingPage(resourceGroupName, options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1321
+ _c = _f.value;
1322
+ _d = false;
1323
+ try {
1324
+ const page = _c;
1325
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1326
+ }
1327
+ finally {
1328
+ _d = true;
1329
+ }
1321
1330
  }
1322
1331
  }
1323
1332
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
1324
1333
  finally {
1325
1334
  try {
1326
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1335
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1327
1336
  }
1328
1337
  finally { if (e_1) throw e_1.error; }
1329
1338
  }
@@ -1359,17 +1368,24 @@ class ProfilesImpl {
1359
1368
  }
1360
1369
  listBySubscriptionPagingAll(options) {
1361
1370
  return tslib.__asyncGenerator(this, arguments, function* listBySubscriptionPagingAll_1() {
1362
- var e_2, _a;
1371
+ var _a, e_2, _b, _c;
1363
1372
  try {
1364
- for (var _b = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
1365
- const page = _c.value;
1366
- yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1373
+ for (var _d = true, _e = tslib.__asyncValues(this.listBySubscriptionPagingPage(options)), _f; _f = yield tslib.__await(_e.next()), _a = _f.done, !_a;) {
1374
+ _c = _f.value;
1375
+ _d = false;
1376
+ try {
1377
+ const page = _c;
1378
+ yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
1379
+ }
1380
+ finally {
1381
+ _d = true;
1382
+ }
1367
1383
  }
1368
1384
  }
1369
1385
  catch (e_2_1) { e_2 = { error: e_2_1 }; }
1370
1386
  finally {
1371
1387
  try {
1372
- if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
1388
+ if (!_d && !_a && (_b = _e.return)) yield tslib.__await(_b.call(_e));
1373
1389
  }
1374
1390
  finally { if (e_2) throw e_2.error; }
1375
1391
  }
@@ -1384,6 +1400,15 @@ class ProfilesImpl {
1384
1400
  checkTrafficManagerRelativeDnsNameAvailability(parameters, options) {
1385
1401
  return this.client.sendOperationRequest({ parameters, options }, checkTrafficManagerRelativeDnsNameAvailabilityOperationSpec);
1386
1402
  }
1403
+ /**
1404
+ * Checks the availability of a Traffic Manager Relative DNS name.
1405
+ * @param parameters The Traffic Manager name parameters supplied to the
1406
+ * CheckTrafficManagerNameAvailability operation.
1407
+ * @param options The options parameters.
1408
+ */
1409
+ checkTrafficManagerNameAvailabilityV2(parameters, options) {
1410
+ return this.client.sendOperationRequest({ parameters, options }, checkTrafficManagerNameAvailabilityV2OperationSpec);
1411
+ }
1387
1412
  /**
1388
1413
  * Lists all Traffic Manager profiles within a resource group.
1389
1414
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -1458,6 +1483,24 @@ const checkTrafficManagerRelativeDnsNameAvailabilityOperationSpec = {
1458
1483
  mediaType: "json",
1459
1484
  serializer: serializer$3
1460
1485
  };
1486
+ const checkTrafficManagerNameAvailabilityV2OperationSpec = {
1487
+ path: "/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkTrafficManagerNameAvailabilityV2",
1488
+ httpMethod: "POST",
1489
+ responses: {
1490
+ 200: {
1491
+ bodyMapper: TrafficManagerNameAvailability
1492
+ },
1493
+ default: {
1494
+ bodyMapper: CloudError
1495
+ }
1496
+ },
1497
+ requestBody: parameters1,
1498
+ queryParameters: [apiVersion],
1499
+ urlParameters: [$host, subscriptionId],
1500
+ headerParameters: [contentType, accept],
1501
+ mediaType: "json",
1502
+ serializer: serializer$3
1503
+ };
1461
1504
  const listByResourceGroupOperationSpec = {
1462
1505
  path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles",
1463
1506
  httpMethod: "GET",
@@ -1804,7 +1847,7 @@ class TrafficManagerManagementClient extends coreClient__namespace.ServiceClient
1804
1847
  requestContentType: "application/json; charset=utf-8",
1805
1848
  credential: credentials
1806
1849
  };
1807
- const packageDetails = `azsdk-js-arm-trafficmanager/6.1.0-beta.1`;
1850
+ const packageDetails = `azsdk-js-arm-trafficmanager/6.1.0`;
1808
1851
  const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
1809
1852
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
1810
1853
  : `${packageDetails}`;
@@ -1837,7 +1880,7 @@ class TrafficManagerManagementClient extends coreClient__namespace.ServiceClient
1837
1880
  this.subscriptionId = subscriptionId;
1838
1881
  // Assigning values to Constant parameters
1839
1882
  this.$host = options.$host || "https://management.azure.com";
1840
- this.apiVersion = options.apiVersion || "2022-04-01-preview";
1883
+ this.apiVersion = options.apiVersion || "2022-04-01";
1841
1884
  this.endpoints = new EndpointsImpl(this);
1842
1885
  this.profiles = new ProfilesImpl(this);
1843
1886
  this.geographicHierarchies = new GeographicHierarchiesImpl(this);