@azure/arm-trafficmanager 6.1.0-alpha.20230616.1 → 6.1.0-alpha.20230619.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 (69) hide show
  1. package/CHANGELOG.md +7 -12
  2. package/LICENSE +1 -1
  3. package/README.md +1 -1
  4. package/dist/index.js +36 -7
  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 +12 -4
  33. package/dist-esm/samples-dev/profilesListByResourceGroupSample.js.map +1 -1
  34. package/dist-esm/samples-dev/profilesListBySubscriptionSample.js +10 -3
  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 +10 -2
  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 +27 -0
  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/package.json +5 -4
  61. package/review/arm-trafficmanager.api.md +10 -1
  62. package/src/models/index.ts +12 -2
  63. package/src/models/parameters.ts +1 -1
  64. package/src/operations/profiles.ts +37 -0
  65. package/src/operationsInterfaces/profiles.ts +12 -0
  66. package/src/pagingHelper.ts +4 -4
  67. package/src/trafficManagerManagementClient.ts +2 -2
  68. package/types/arm-trafficmanager.d.ts +23 -6
  69. package/types/tsdoc-metadata.json +1 -1
package/package.json CHANGED
@@ -3,13 +3,13 @@
3
3
  "sdk-type": "mgmt",
4
4
  "author": "Microsoft Corporation",
5
5
  "description": "A generated SDK for TrafficManagerManagementClient.",
6
- "version": "6.1.0-alpha.20230616.1",
6
+ "version": "6.1.0-alpha.20230619.1",
7
7
  "engines": {
8
8
  "node": ">=14.0.0"
9
9
  },
10
10
  "dependencies": {
11
11
  "@azure/core-paging": "^1.2.0",
12
- "@azure/core-client": "^1.6.1",
12
+ "@azure/core-client": "^1.7.0",
13
13
  "@azure/core-auth": "^1.3.0",
14
14
  "@azure/core-rest-pipeline": "^1.8.0",
15
15
  "tslib": "^2.2.0"
@@ -31,12 +31,13 @@
31
31
  "@rollup/plugin-json": "^6.0.0",
32
32
  "@rollup/plugin-multi-entry": "^6.0.0",
33
33
  "@rollup/plugin-node-resolve": "^13.1.3",
34
- "mkdirp": "^1.0.4",
34
+ "mkdirp": "^2.1.2",
35
35
  "rollup": "^2.66.1",
36
36
  "rollup-plugin-sourcemaps": "^0.6.3",
37
37
  "typescript": "~5.0.0",
38
38
  "uglify-js": "^3.4.9",
39
39
  "rimraf": "^3.0.0",
40
+ "dotenv": "^16.0.0",
40
41
  "@azure/identity": "^2.0.1",
41
42
  "@azure-tools/test-recorder": "^3.0.0",
42
43
  "@azure-tools/test-credential": "^1.0.0",
@@ -47,7 +48,6 @@
47
48
  "@types/node": "^14.0.0",
48
49
  "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb"
49
50
  },
50
- "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/trafficmanager/arm-trafficmanager",
51
51
  "repository": {
52
52
  "type": "git",
53
53
  "url": "https://github.com/Azure/azure-sdk-for-js.git"
@@ -109,6 +109,7 @@
109
109
  ]
110
110
  },
111
111
  "autoPublish": true,
112
+ "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/trafficmanager/arm-trafficmanager",
112
113
  "//sampleConfiguration": {
113
114
  "productName": "",
114
115
  "productSlugs": [
@@ -185,7 +185,8 @@ export enum KnownEndpointMonitorStatus {
185
185
  Disabled = "Disabled",
186
186
  Inactive = "Inactive",
187
187
  Online = "Online",
188
- Stopped = "Stopped"
188
+ Stopped = "Stopped",
189
+ Unmonitored = "Unmonitored"
189
190
  }
190
191
 
191
192
  // @public
@@ -282,6 +283,7 @@ export type ProfileMonitorStatus = string;
282
283
 
283
284
  // @public
284
285
  export interface Profiles {
286
+ checkTrafficManagerNameAvailabilityV2(parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters, options?: ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams): Promise<ProfilesCheckTrafficManagerNameAvailabilityV2Response>;
285
287
  checkTrafficManagerRelativeDnsNameAvailability(parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters, options?: ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams): Promise<ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse>;
286
288
  createOrUpdate(resourceGroupName: string, profileName: string, parameters: Profile, options?: ProfilesCreateOrUpdateOptionalParams): Promise<ProfilesCreateOrUpdateResponse>;
287
289
  delete(resourceGroupName: string, profileName: string, options?: ProfilesDeleteOptionalParams): Promise<ProfilesDeleteResponse>;
@@ -291,6 +293,13 @@ export interface Profiles {
291
293
  update(resourceGroupName: string, profileName: string, parameters: Profile, options?: ProfilesUpdateOptionalParams): Promise<ProfilesUpdateResponse>;
292
294
  }
293
295
 
296
+ // @public
297
+ export interface ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams extends coreClient.OperationOptions {
298
+ }
299
+
300
+ // @public
301
+ export type ProfilesCheckTrafficManagerNameAvailabilityV2Response = TrafficManagerNameAvailability;
302
+
294
303
  // @public
295
304
  export interface ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams extends coreClient.OperationOptions {
296
305
  }
@@ -300,7 +300,9 @@ export enum KnownEndpointMonitorStatus {
300
300
  /** Inactive */
301
301
  Inactive = "Inactive",
302
302
  /** Stopped */
303
- Stopped = "Stopped"
303
+ Stopped = "Stopped",
304
+ /** Unmonitored */
305
+ Unmonitored = "Unmonitored"
304
306
  }
305
307
 
306
308
  /**
@@ -313,7 +315,8 @@ export enum KnownEndpointMonitorStatus {
313
315
  * **Degraded** \
314
316
  * **Disabled** \
315
317
  * **Inactive** \
316
- * **Stopped**
318
+ * **Stopped** \
319
+ * **Unmonitored**
317
320
  */
318
321
  export type EndpointMonitorStatus = string;
319
322
 
@@ -513,6 +516,13 @@ export interface ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalP
513
516
  /** Contains response data for the checkTrafficManagerRelativeDnsNameAvailability operation. */
514
517
  export type ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse = TrafficManagerNameAvailability;
515
518
 
519
+ /** Optional parameters. */
520
+ export interface ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams
521
+ extends coreClient.OperationOptions {}
522
+
523
+ /** Contains response data for the checkTrafficManagerNameAvailabilityV2 operation. */
524
+ export type ProfilesCheckTrafficManagerNameAvailabilityV2Response = TrafficManagerNameAvailability;
525
+
516
526
  /** Optional parameters. */
517
527
  export interface ProfilesListByResourceGroupOptionalParams
518
528
  extends coreClient.OperationOptions {}
@@ -110,7 +110,7 @@ export const endpointName: OperationURLParameter = {
110
110
  export const apiVersion: OperationQueryParameter = {
111
111
  parameterPath: "apiVersion",
112
112
  mapper: {
113
- defaultValue: "2022-04-01-preview",
113
+ defaultValue: "2022-04-01",
114
114
  isConstant: true,
115
115
  serializedName: "api-version",
116
116
  type: {
@@ -21,6 +21,8 @@ import {
21
21
  CheckTrafficManagerRelativeDnsNameAvailabilityParameters,
22
22
  ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams,
23
23
  ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse,
24
+ ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams,
25
+ ProfilesCheckTrafficManagerNameAvailabilityV2Response,
24
26
  ProfilesGetOptionalParams,
25
27
  ProfilesGetResponse,
26
28
  ProfilesCreateOrUpdateOptionalParams,
@@ -153,6 +155,22 @@ export class ProfilesImpl implements Profiles {
153
155
  );
154
156
  }
155
157
 
158
+ /**
159
+ * Checks the availability of a Traffic Manager Relative DNS name.
160
+ * @param parameters The Traffic Manager name parameters supplied to the
161
+ * CheckTrafficManagerNameAvailability operation.
162
+ * @param options The options parameters.
163
+ */
164
+ checkTrafficManagerNameAvailabilityV2(
165
+ parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters,
166
+ options?: ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams
167
+ ): Promise<ProfilesCheckTrafficManagerNameAvailabilityV2Response> {
168
+ return this.client.sendOperationRequest(
169
+ { parameters, options },
170
+ checkTrafficManagerNameAvailabilityV2OperationSpec
171
+ );
172
+ }
173
+
156
174
  /**
157
175
  * Lists all Traffic Manager profiles within a resource group.
158
176
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -274,6 +292,25 @@ const checkTrafficManagerRelativeDnsNameAvailabilityOperationSpec: coreClient.Op
274
292
  mediaType: "json",
275
293
  serializer
276
294
  };
295
+ const checkTrafficManagerNameAvailabilityV2OperationSpec: coreClient.OperationSpec = {
296
+ path:
297
+ "/subscriptions/{subscriptionId}/providers/Microsoft.Network/checkTrafficManagerNameAvailabilityV2",
298
+ httpMethod: "POST",
299
+ responses: {
300
+ 200: {
301
+ bodyMapper: Mappers.TrafficManagerNameAvailability
302
+ },
303
+ default: {
304
+ bodyMapper: Mappers.CloudError
305
+ }
306
+ },
307
+ requestBody: Parameters.parameters1,
308
+ queryParameters: [Parameters.apiVersion],
309
+ urlParameters: [Parameters.$host, Parameters.subscriptionId],
310
+ headerParameters: [Parameters.contentType, Parameters.accept],
311
+ mediaType: "json",
312
+ serializer
313
+ };
277
314
  const listByResourceGroupOperationSpec: coreClient.OperationSpec = {
278
315
  path:
279
316
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficmanagerprofiles",
@@ -14,6 +14,8 @@ import {
14
14
  CheckTrafficManagerRelativeDnsNameAvailabilityParameters,
15
15
  ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams,
16
16
  ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse,
17
+ ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams,
18
+ ProfilesCheckTrafficManagerNameAvailabilityV2Response,
17
19
  ProfilesGetOptionalParams,
18
20
  ProfilesGetResponse,
19
21
  ProfilesCreateOrUpdateOptionalParams,
@@ -53,6 +55,16 @@ export interface Profiles {
53
55
  parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters,
54
56
  options?: ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams
55
57
  ): Promise<ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse>;
58
+ /**
59
+ * Checks the availability of a Traffic Manager Relative DNS name.
60
+ * @param parameters The Traffic Manager name parameters supplied to the
61
+ * CheckTrafficManagerNameAvailability operation.
62
+ * @param options The options parameters.
63
+ */
64
+ checkTrafficManagerNameAvailabilityV2(
65
+ parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters,
66
+ options?: ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams
67
+ ): Promise<ProfilesCheckTrafficManagerNameAvailabilityV2Response>;
56
68
  /**
57
69
  * Gets a Traffic Manager profile.
58
70
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -13,11 +13,11 @@ export interface PageInfo {
13
13
  const pageMap = new WeakMap<object, PageInfo>();
14
14
 
15
15
  /**
16
- * Given a result page from a pageable operation, returns a
17
- * continuation token that can be used to begin paging from
16
+ * Given the last `.value` produced by the `byPage` iterator,
17
+ * returns a continuation token that can be used to begin paging from
18
18
  * that point later.
19
- * @param page A result object from calling .byPage() on a paged operation.
20
- * @returns The continuation token that can be passed into byPage().
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
21
  */
22
22
  export function getContinuationToken(page: unknown): string | undefined {
23
23
  if (typeof page !== "object" || page === null) {
@@ -62,7 +62,7 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
62
62
  credential: credentials
63
63
  };
64
64
 
65
- const packageDetails = `azsdk-js-arm-trafficmanager/6.1.0-beta.2`;
65
+ const packageDetails = `azsdk-js-arm-trafficmanager/6.1.0`;
66
66
  const userAgentPrefix =
67
67
  options.userAgentOptions && options.userAgentOptions.userAgentPrefix
68
68
  ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
@@ -115,7 +115,7 @@ export class TrafficManagerManagementClient extends coreClient.ServiceClient {
115
115
 
116
116
  // Assigning values to Constant parameters
117
117
  this.$host = options.$host || "https://management.azure.com";
118
- this.apiVersion = options.apiVersion || "2022-04-01-preview";
118
+ this.apiVersion = options.apiVersion || "2022-04-01";
119
119
  this.endpoints = new EndpointsImpl(this);
120
120
  this.profiles = new ProfilesImpl(this);
121
121
  this.geographicHierarchies = new GeographicHierarchiesImpl(this);
@@ -114,7 +114,8 @@ export declare interface Endpoint extends ProxyResource {
114
114
  * **Degraded** \
115
115
  * **Disabled** \
116
116
  * **Inactive** \
117
- * **Stopped**
117
+ * **Stopped** \
118
+ * **Unmonitored**
118
119
  */
119
120
  export declare type EndpointMonitorStatus = string;
120
121
 
@@ -236,11 +237,11 @@ export declare interface GeographicHierarchiesGetDefaultOptionalParams extends c
236
237
  export declare type GeographicHierarchiesGetDefaultResponse = TrafficManagerGeographicHierarchy;
237
238
 
238
239
  /**
239
- * Given a result page from a pageable operation, returns a
240
- * continuation token that can be used to begin paging from
240
+ * Given the last `.value` produced by the `byPage` iterator,
241
+ * returns a continuation token that can be used to begin paging from
241
242
  * that point later.
242
- * @param page A result object from calling .byPage() on a paged operation.
243
- * @returns The continuation token that can be passed into byPage().
243
+ * @param page An object from accessing `value` on the IteratorResult from a `byPage` iterator.
244
+ * @returns The continuation token that can be passed into byPage() during future calls.
244
245
  */
245
246
  export declare function getContinuationToken(page: unknown): string | undefined;
246
247
 
@@ -319,7 +320,9 @@ export declare enum KnownEndpointMonitorStatus {
319
320
  /** Inactive */
320
321
  Inactive = "Inactive",
321
322
  /** Stopped */
322
- Stopped = "Stopped"
323
+ Stopped = "Stopped",
324
+ /** Unmonitored */
325
+ Unmonitored = "Unmonitored"
323
326
  }
324
327
 
325
328
  /** Known values of {@link EndpointStatus} that the service accepts. */
@@ -494,6 +497,13 @@ export declare interface Profiles {
494
497
  * @param options The options parameters.
495
498
  */
496
499
  checkTrafficManagerRelativeDnsNameAvailability(parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters, options?: ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams): Promise<ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityResponse>;
500
+ /**
501
+ * Checks the availability of a Traffic Manager Relative DNS name.
502
+ * @param parameters The Traffic Manager name parameters supplied to the
503
+ * CheckTrafficManagerNameAvailability operation.
504
+ * @param options The options parameters.
505
+ */
506
+ checkTrafficManagerNameAvailabilityV2(parameters: CheckTrafficManagerRelativeDnsNameAvailabilityParameters, options?: ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams): Promise<ProfilesCheckTrafficManagerNameAvailabilityV2Response>;
497
507
  /**
498
508
  * Gets a Traffic Manager profile.
499
509
  * @param resourceGroupName The name of the resource group. The name is case insensitive.
@@ -526,6 +536,13 @@ export declare interface Profiles {
526
536
  update(resourceGroupName: string, profileName: string, parameters: Profile, options?: ProfilesUpdateOptionalParams): Promise<ProfilesUpdateResponse>;
527
537
  }
528
538
 
539
+ /** Optional parameters. */
540
+ export declare interface ProfilesCheckTrafficManagerNameAvailabilityV2OptionalParams extends coreClient.OperationOptions {
541
+ }
542
+
543
+ /** Contains response data for the checkTrafficManagerNameAvailabilityV2 operation. */
544
+ export declare type ProfilesCheckTrafficManagerNameAvailabilityV2Response = TrafficManagerNameAvailability;
545
+
529
546
  /** Optional parameters. */
530
547
  export declare interface ProfilesCheckTrafficManagerRelativeDnsNameAvailabilityOptionalParams extends coreClient.OperationOptions {
531
548
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.35.0"
8
+ "packageVersion": "7.35.4"
9
9
  }
10
10
  ]
11
11
  }