@azure/arm-networkfunction 1.0.1-alpha.20221128.1 → 2.0.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 (90) hide show
  1. package/CHANGELOG.md +21 -8
  2. package/dist/index.js +368 -251
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.min.js +1 -1
  5. package/dist/index.min.js.map +1 -1
  6. package/dist-esm/samples-dev/azureTrafficCollectorsByResourceGroupListSample.js +1 -1
  7. package/dist-esm/samples-dev/azureTrafficCollectorsBySubscriptionListSample.js +1 -1
  8. package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.js +3 -6
  9. package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.js.map +1 -1
  10. package/dist-esm/samples-dev/azureTrafficCollectorsDeleteSample.js +1 -1
  11. package/dist-esm/samples-dev/azureTrafficCollectorsGetSample.js +1 -1
  12. package/dist-esm/samples-dev/azureTrafficCollectorsUpdateTagsSample.js +1 -1
  13. package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.js +3 -2
  14. package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.js.map +1 -1
  15. package/dist-esm/samples-dev/collectorPoliciesDeleteSample.js +1 -1
  16. package/dist-esm/samples-dev/collectorPoliciesGetSample.js +1 -1
  17. package/dist-esm/samples-dev/collectorPoliciesListSample.js +1 -1
  18. package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.d.ts +2 -0
  19. package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.d.ts.map +1 -0
  20. package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.js +33 -0
  21. package/dist-esm/samples-dev/collectorPoliciesUpdateTagsSample.js.map +1 -0
  22. package/dist-esm/samples-dev/networkFunctionListOperationsSample.js +1 -1
  23. package/dist-esm/src/azureTrafficCollectorClient.d.ts.map +1 -1
  24. package/dist-esm/src/azureTrafficCollectorClient.js +21 -19
  25. package/dist-esm/src/azureTrafficCollectorClient.js.map +1 -1
  26. package/dist-esm/src/index.d.ts +1 -0
  27. package/dist-esm/src/index.d.ts.map +1 -1
  28. package/dist-esm/src/index.js +1 -0
  29. package/dist-esm/src/index.js.map +1 -1
  30. package/dist-esm/src/models/index.d.ts +138 -119
  31. package/dist-esm/src/models/index.d.ts.map +1 -1
  32. package/dist-esm/src/models/index.js +34 -24
  33. package/dist-esm/src/models/index.js.map +1 -1
  34. package/dist-esm/src/models/mappers.d.ts +7 -8
  35. package/dist-esm/src/models/mappers.d.ts.map +1 -1
  36. package/dist-esm/src/models/mappers.js +152 -163
  37. package/dist-esm/src/models/mappers.js.map +1 -1
  38. package/dist-esm/src/models/parameters.d.ts +2 -1
  39. package/dist-esm/src/models/parameters.d.ts.map +1 -1
  40. package/dist-esm/src/models/parameters.js +10 -6
  41. package/dist-esm/src/models/parameters.js.map +1 -1
  42. package/dist-esm/src/operations/azureTrafficCollectors.d.ts +4 -2
  43. package/dist-esm/src/operations/azureTrafficCollectors.d.ts.map +1 -1
  44. package/dist-esm/src/operations/azureTrafficCollectors.js +7 -6
  45. package/dist-esm/src/operations/azureTrafficCollectors.js.map +1 -1
  46. package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.d.ts.map +1 -1
  47. package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.js +19 -7
  48. package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.js.map +1 -1
  49. package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.d.ts.map +1 -1
  50. package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.js +19 -7
  51. package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.js.map +1 -1
  52. package/dist-esm/src/operations/collectorPolicies.d.ts +14 -3
  53. package/dist-esm/src/operations/collectorPolicies.d.ts.map +1 -1
  54. package/dist-esm/src/operations/collectorPolicies.js +68 -10
  55. package/dist-esm/src/operations/collectorPolicies.js.map +1 -1
  56. package/dist-esm/src/operations/networkFunction.d.ts.map +1 -1
  57. package/dist-esm/src/operations/networkFunction.js +8 -4
  58. package/dist-esm/src/operations/networkFunction.js.map +1 -1
  59. package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.d.ts +4 -2
  60. package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.d.ts.map +1 -1
  61. package/dist-esm/src/operationsInterfaces/collectorPolicies.d.ts +14 -3
  62. package/dist-esm/src/operationsInterfaces/collectorPolicies.d.ts.map +1 -1
  63. package/dist-esm/src/pagingHelper.d.ts +13 -0
  64. package/dist-esm/src/pagingHelper.d.ts.map +1 -0
  65. package/dist-esm/src/pagingHelper.js +32 -0
  66. package/dist-esm/src/pagingHelper.js.map +1 -0
  67. package/dist-esm/test/networkfunction_examples.spec.d.ts +4 -0
  68. package/dist-esm/test/networkfunction_examples.spec.d.ts.map +1 -0
  69. package/dist-esm/test/networkfunction_examples.spec.js +69 -0
  70. package/dist-esm/test/networkfunction_examples.spec.js.map +1 -0
  71. package/package.json +7 -6
  72. package/review/arm-networkfunction.api.md +31 -14
  73. package/src/azureTrafficCollectorClient.ts +27 -21
  74. package/src/index.ts +1 -0
  75. package/src/models/index.ts +148 -127
  76. package/src/models/mappers.ts +157 -172
  77. package/src/models/parameters.ts +12 -7
  78. package/src/operations/azureTrafficCollectors.ts +7 -3
  79. package/src/operations/azureTrafficCollectorsByResourceGroup.ts +21 -8
  80. package/src/operations/azureTrafficCollectorsBySubscription.ts +21 -8
  81. package/src/operations/collectorPolicies.ts +89 -12
  82. package/src/operations/networkFunction.ts +10 -5
  83. package/src/operationsInterfaces/azureTrafficCollectors.ts +4 -0
  84. package/src/operationsInterfaces/collectorPolicies.ts +23 -1
  85. package/src/pagingHelper.ts +39 -0
  86. package/types/arm-networkfunction.d.ts +65 -21
  87. package/dist-esm/test/sampleTest.d.ts +0 -2
  88. package/dist-esm/test/sampleTest.d.ts.map +0 -1
  89. package/dist-esm/test/sampleTest.js +0 -38
  90. package/dist-esm/test/sampleTest.js.map +0 -1
@@ -6,7 +6,8 @@
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 { CollectorPolicies } from "../operationsInterfaces";
11
12
  import * as coreClient from "@azure/core-client";
12
13
  import * as Mappers from "../models/mappers";
@@ -24,6 +25,9 @@ import {
24
25
  CollectorPoliciesCreateOrUpdateOptionalParams,
25
26
  CollectorPoliciesCreateOrUpdateResponse,
26
27
  CollectorPoliciesDeleteOptionalParams,
28
+ TagsObject,
29
+ CollectorPoliciesUpdateTagsOptionalParams,
30
+ CollectorPoliciesUpdateTagsResponse,
27
31
  CollectorPoliciesListNextResponse
28
32
  } from "../models";
29
33
 
@@ -63,11 +67,15 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
63
67
  [Symbol.asyncIterator]() {
64
68
  return this;
65
69
  },
66
- byPage: () => {
70
+ byPage: (settings?: PageSettings) => {
71
+ if (settings?.maxPageSize) {
72
+ throw new Error("maxPageSize is not supported by this operation.");
73
+ }
67
74
  return this.listPagingPage(
68
75
  resourceGroupName,
69
76
  azureTrafficCollectorName,
70
- options
77
+ options,
78
+ settings
71
79
  );
72
80
  }
73
81
  };
@@ -76,15 +84,22 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
76
84
  private async *listPagingPage(
77
85
  resourceGroupName: string,
78
86
  azureTrafficCollectorName: string,
79
- options?: CollectorPoliciesListOptionalParams
87
+ options?: CollectorPoliciesListOptionalParams,
88
+ settings?: PageSettings
80
89
  ): AsyncIterableIterator<CollectorPolicy[]> {
81
- let result = await this._list(
82
- resourceGroupName,
83
- azureTrafficCollectorName,
84
- options
85
- );
86
- yield result.value || [];
87
- let continuationToken = result.nextLink;
90
+ let result: CollectorPoliciesListResponse;
91
+ let continuationToken = settings?.continuationToken;
92
+ if (!continuationToken) {
93
+ result = await this._list(
94
+ resourceGroupName,
95
+ azureTrafficCollectorName,
96
+ options
97
+ );
98
+ let page = result.value || [];
99
+ continuationToken = result.nextLink;
100
+ setContinuationToken(page, continuationToken);
101
+ yield page;
102
+ }
88
103
  while (continuationToken) {
89
104
  result = await this._listNext(
90
105
  resourceGroupName,
@@ -93,7 +108,9 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
93
108
  options
94
109
  );
95
110
  continuationToken = result.nextLink;
96
- yield result.value || [];
111
+ let page = result.value || [];
112
+ setContinuationToken(page, continuationToken);
113
+ yield page;
97
114
  }
98
115
  }
99
116
 
@@ -157,12 +174,14 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
157
174
  * @param resourceGroupName The name of the resource group.
158
175
  * @param azureTrafficCollectorName Azure Traffic Collector name
159
176
  * @param collectorPolicyName Collector Policy Name
177
+ * @param location Resource location.
160
178
  * @param options The options parameters.
161
179
  */
162
180
  async beginCreateOrUpdate(
163
181
  resourceGroupName: string,
164
182
  azureTrafficCollectorName: string,
165
183
  collectorPolicyName: string,
184
+ location: string,
166
185
  options?: CollectorPoliciesCreateOrUpdateOptionalParams
167
186
  ): Promise<
168
187
  PollerLike<
@@ -215,6 +234,7 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
215
234
  resourceGroupName,
216
235
  azureTrafficCollectorName,
217
236
  collectorPolicyName,
237
+ location,
218
238
  options
219
239
  },
220
240
  createOrUpdateOperationSpec
@@ -233,18 +253,21 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
233
253
  * @param resourceGroupName The name of the resource group.
234
254
  * @param azureTrafficCollectorName Azure Traffic Collector name
235
255
  * @param collectorPolicyName Collector Policy Name
256
+ * @param location Resource location.
236
257
  * @param options The options parameters.
237
258
  */
238
259
  async beginCreateOrUpdateAndWait(
239
260
  resourceGroupName: string,
240
261
  azureTrafficCollectorName: string,
241
262
  collectorPolicyName: string,
263
+ location: string,
242
264
  options?: CollectorPoliciesCreateOrUpdateOptionalParams
243
265
  ): Promise<CollectorPoliciesCreateOrUpdateResponse> {
244
266
  const poller = await this.beginCreateOrUpdate(
245
267
  resourceGroupName,
246
268
  azureTrafficCollectorName,
247
269
  collectorPolicyName,
270
+ location,
248
271
  options
249
272
  );
250
273
  return poller.pollUntilDone();
@@ -343,6 +366,33 @@ export class CollectorPoliciesImpl implements CollectorPolicies {
343
366
  return poller.pollUntilDone();
344
367
  }
345
368
 
369
+ /**
370
+ * Updates the specified Collector Policy tags.
371
+ * @param resourceGroupName The name of the resource group.
372
+ * @param azureTrafficCollectorName Azure Traffic Collector name
373
+ * @param collectorPolicyName Collector Policy Name
374
+ * @param parameters Parameters supplied to update Collector Policy tags.
375
+ * @param options The options parameters.
376
+ */
377
+ updateTags(
378
+ resourceGroupName: string,
379
+ azureTrafficCollectorName: string,
380
+ collectorPolicyName: string,
381
+ parameters: TagsObject,
382
+ options?: CollectorPoliciesUpdateTagsOptionalParams
383
+ ): Promise<CollectorPoliciesUpdateTagsResponse> {
384
+ return this.client.sendOperationRequest(
385
+ {
386
+ resourceGroupName,
387
+ azureTrafficCollectorName,
388
+ collectorPolicyName,
389
+ parameters,
390
+ options
391
+ },
392
+ updateTagsOperationSpec
393
+ );
394
+ }
395
+
346
396
  /**
347
397
  * ListNext
348
398
  * @param resourceGroupName The name of the resource group.
@@ -433,6 +483,8 @@ const createOrUpdateOperationSpec: coreClient.OperationSpec = {
433
483
  },
434
484
  requestBody: {
435
485
  parameterPath: {
486
+ location: ["location"],
487
+ tags: ["options", "tags"],
436
488
  ingestionPolicy: ["options", "ingestionPolicy"],
437
489
  emissionPolicies: ["options", "emissionPolicies"]
438
490
  },
@@ -474,6 +526,31 @@ const deleteOperationSpec: coreClient.OperationSpec = {
474
526
  headerParameters: [Parameters.accept],
475
527
  serializer
476
528
  };
529
+ const updateTagsOperationSpec: coreClient.OperationSpec = {
530
+ path:
531
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
532
+ httpMethod: "PATCH",
533
+ responses: {
534
+ 200: {
535
+ bodyMapper: Mappers.CollectorPolicy
536
+ },
537
+ default: {
538
+ bodyMapper: Mappers.CloudError
539
+ }
540
+ },
541
+ requestBody: Parameters.parameters1,
542
+ queryParameters: [Parameters.apiVersion],
543
+ urlParameters: [
544
+ Parameters.$host,
545
+ Parameters.subscriptionId,
546
+ Parameters.resourceGroupName,
547
+ Parameters.azureTrafficCollectorName,
548
+ Parameters.collectorPolicyName
549
+ ],
550
+ headerParameters: [Parameters.accept, Parameters.contentType],
551
+ mediaType: "json",
552
+ serializer
553
+ };
477
554
  const listNextOperationSpec: coreClient.OperationSpec = {
478
555
  path: "{nextLink}",
479
556
  httpMethod: "GET",
@@ -6,7 +6,7 @@
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
10
  import { NetworkFunction } from "../operationsInterfaces";
11
11
  import * as coreClient from "@azure/core-client";
12
12
  import * as Mappers from "../models/mappers";
@@ -46,16 +46,21 @@ export class NetworkFunctionImpl implements NetworkFunction {
46
46
  [Symbol.asyncIterator]() {
47
47
  return this;
48
48
  },
49
- byPage: () => {
50
- return this.listOperationsPagingPage(options);
49
+ byPage: (settings?: PageSettings) => {
50
+ if (settings?.maxPageSize) {
51
+ throw new Error("maxPageSize is not supported by this operation.");
52
+ }
53
+ return this.listOperationsPagingPage(options, settings);
51
54
  }
52
55
  };
53
56
  }
54
57
 
55
58
  private async *listOperationsPagingPage(
56
- options?: NetworkFunctionListOperationsOptionalParams
59
+ options?: NetworkFunctionListOperationsOptionalParams,
60
+ _settings?: PageSettings
57
61
  ): AsyncIterableIterator<Operation[]> {
58
- let result = await this._listOperations(options);
62
+ let result: NetworkFunctionListOperationsResponse;
63
+ result = await this._listOperations(options);
59
64
  yield result.value || [];
60
65
  }
61
66
 
@@ -35,11 +35,13 @@ export interface AzureTrafficCollectors {
35
35
  * Creates or updates a Azure Traffic Collector resource
36
36
  * @param resourceGroupName The name of the resource group.
37
37
  * @param azureTrafficCollectorName Azure Traffic Collector name
38
+ * @param location Resource location.
38
39
  * @param options The options parameters.
39
40
  */
40
41
  beginCreateOrUpdate(
41
42
  resourceGroupName: string,
42
43
  azureTrafficCollectorName: string,
44
+ location: string,
43
45
  options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams
44
46
  ): Promise<
45
47
  PollerLike<
@@ -51,11 +53,13 @@ export interface AzureTrafficCollectors {
51
53
  * Creates or updates a Azure Traffic Collector resource
52
54
  * @param resourceGroupName The name of the resource group.
53
55
  * @param azureTrafficCollectorName Azure Traffic Collector name
56
+ * @param location Resource location.
54
57
  * @param options The options parameters.
55
58
  */
56
59
  beginCreateOrUpdateAndWait(
57
60
  resourceGroupName: string,
58
61
  azureTrafficCollectorName: string,
62
+ location: string,
59
63
  options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams
60
64
  ): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
61
65
  /**
@@ -15,7 +15,10 @@ import {
15
15
  CollectorPoliciesGetResponse,
16
16
  CollectorPoliciesCreateOrUpdateOptionalParams,
17
17
  CollectorPoliciesCreateOrUpdateResponse,
18
- CollectorPoliciesDeleteOptionalParams
18
+ CollectorPoliciesDeleteOptionalParams,
19
+ TagsObject,
20
+ CollectorPoliciesUpdateTagsOptionalParams,
21
+ CollectorPoliciesUpdateTagsResponse
19
22
  } from "../models";
20
23
 
21
24
  /// <reference lib="esnext.asynciterable" />
@@ -50,12 +53,14 @@ export interface CollectorPolicies {
50
53
  * @param resourceGroupName The name of the resource group.
51
54
  * @param azureTrafficCollectorName Azure Traffic Collector name
52
55
  * @param collectorPolicyName Collector Policy Name
56
+ * @param location Resource location.
53
57
  * @param options The options parameters.
54
58
  */
55
59
  beginCreateOrUpdate(
56
60
  resourceGroupName: string,
57
61
  azureTrafficCollectorName: string,
58
62
  collectorPolicyName: string,
63
+ location: string,
59
64
  options?: CollectorPoliciesCreateOrUpdateOptionalParams
60
65
  ): Promise<
61
66
  PollerLike<
@@ -68,12 +73,14 @@ export interface CollectorPolicies {
68
73
  * @param resourceGroupName The name of the resource group.
69
74
  * @param azureTrafficCollectorName Azure Traffic Collector name
70
75
  * @param collectorPolicyName Collector Policy Name
76
+ * @param location Resource location.
71
77
  * @param options The options parameters.
72
78
  */
73
79
  beginCreateOrUpdateAndWait(
74
80
  resourceGroupName: string,
75
81
  azureTrafficCollectorName: string,
76
82
  collectorPolicyName: string,
83
+ location: string,
77
84
  options?: CollectorPoliciesCreateOrUpdateOptionalParams
78
85
  ): Promise<CollectorPoliciesCreateOrUpdateResponse>;
79
86
  /**
@@ -102,4 +109,19 @@ export interface CollectorPolicies {
102
109
  collectorPolicyName: string,
103
110
  options?: CollectorPoliciesDeleteOptionalParams
104
111
  ): Promise<void>;
112
+ /**
113
+ * Updates the specified Collector Policy tags.
114
+ * @param resourceGroupName The name of the resource group.
115
+ * @param azureTrafficCollectorName Azure Traffic Collector name
116
+ * @param collectorPolicyName Collector Policy Name
117
+ * @param parameters Parameters supplied to update Collector Policy tags.
118
+ * @param options The options parameters.
119
+ */
120
+ updateTags(
121
+ resourceGroupName: string,
122
+ azureTrafficCollectorName: string,
123
+ collectorPolicyName: string,
124
+ parameters: TagsObject,
125
+ options?: CollectorPoliciesUpdateTagsOptionalParams
126
+ ): Promise<CollectorPoliciesUpdateTagsResponse>;
105
127
  }
@@ -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 a result page from a pageable operation, returns a
17
+ * continuation token that can be used to begin paging from
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().
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
+ }
@@ -4,6 +4,17 @@ import { PagedAsyncIterableIterator } from '@azure/core-paging';
4
4
  import { PollerLike } from '@azure/core-lro';
5
5
  import { PollOperationState } from '@azure/core-lro';
6
6
 
7
+ /**
8
+ * Defines values for ApiVersionParameter. \
9
+ * {@link KnownApiVersionParameter} can be used interchangeably with ApiVersionParameter,
10
+ * this enum contains the known values that the service supports.
11
+ * ### Known values supported by the service
12
+ * **2022-05-01** \
13
+ * **2022-08-01** \
14
+ * **2022-11-01**
15
+ */
16
+ export declare type ApiVersionParameter = string;
17
+
7
18
  /** Azure Traffic Collector resource. */
8
19
  export declare interface AzureTrafficCollector extends TrackedResource {
9
20
  /**
@@ -11,8 +22,11 @@ export declare interface AzureTrafficCollector extends TrackedResource {
11
22
  * NOTE: This property will not be serialized. It can only be populated by the server.
12
23
  */
13
24
  readonly etag?: string;
14
- /** Collector Policies for Azure Traffic Collector. */
15
- collectorPolicies?: CollectorPolicy[];
25
+ /**
26
+ * Collector Policies for Azure Traffic Collector.
27
+ * NOTE: This property will not be serialized. It can only be populated by the server.
28
+ */
29
+ readonly collectorPolicies?: ResourceReference[];
16
30
  /** The virtualHub to which the Azure Traffic Collector belongs. */
17
31
  virtualHub?: ResourceReference;
18
32
  /**
@@ -76,16 +90,18 @@ export declare interface AzureTrafficCollectors {
76
90
  * Creates or updates a Azure Traffic Collector resource
77
91
  * @param resourceGroupName The name of the resource group.
78
92
  * @param azureTrafficCollectorName Azure Traffic Collector name
93
+ * @param location Resource location.
79
94
  * @param options The options parameters.
80
95
  */
81
- beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
96
+ beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<AzureTrafficCollectorsCreateOrUpdateResponse>, AzureTrafficCollectorsCreateOrUpdateResponse>>;
82
97
  /**
83
98
  * Creates or updates a Azure Traffic Collector resource
84
99
  * @param resourceGroupName The name of the resource group.
85
100
  * @param azureTrafficCollectorName Azure Traffic Collector name
101
+ * @param location Resource location.
86
102
  * @param options The options parameters.
87
103
  */
88
- beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
104
+ beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, location: string, options?: AzureTrafficCollectorsCreateOrUpdateOptionalParams): Promise<AzureTrafficCollectorsCreateOrUpdateResponse>;
89
105
  /**
90
106
  * Deletes a specified Azure Traffic Collector resource.
91
107
  * @param resourceGroupName The name of the resource group.
@@ -159,14 +175,10 @@ export declare type AzureTrafficCollectorsBySubscriptionListResponse = AzureTraf
159
175
 
160
176
  /** Optional parameters. */
161
177
  export declare interface AzureTrafficCollectorsCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
162
- /** Resource location. */
163
- location?: string;
164
178
  /** Resource tags. */
165
179
  tags?: {
166
180
  [propertyName: string]: string;
167
181
  };
168
- /** Collector Policies for Azure Traffic Collector. */
169
- collectorPolicies?: CollectorPolicy[];
170
182
  /** The virtualHub to which the Azure Traffic Collector belongs. */
171
183
  virtualHub?: ResourceReference;
172
184
  /** Delay to wait until next poll, in milliseconds. */
@@ -240,17 +252,19 @@ export declare interface CollectorPolicies {
240
252
  * @param resourceGroupName The name of the resource group.
241
253
  * @param azureTrafficCollectorName Azure Traffic Collector name
242
254
  * @param collectorPolicyName Collector Policy Name
255
+ * @param location Resource location.
243
256
  * @param options The options parameters.
244
257
  */
245
- beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
258
+ beginCreateOrUpdate(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<PollerLike<PollOperationState<CollectorPoliciesCreateOrUpdateResponse>, CollectorPoliciesCreateOrUpdateResponse>>;
246
259
  /**
247
260
  * Creates or updates a Collector Policy resource
248
261
  * @param resourceGroupName The name of the resource group.
249
262
  * @param azureTrafficCollectorName Azure Traffic Collector name
250
263
  * @param collectorPolicyName Collector Policy Name
264
+ * @param location Resource location.
251
265
  * @param options The options parameters.
252
266
  */
253
- beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
267
+ beginCreateOrUpdateAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, location: string, options?: CollectorPoliciesCreateOrUpdateOptionalParams): Promise<CollectorPoliciesCreateOrUpdateResponse>;
254
268
  /**
255
269
  * Deletes a specified Collector Policy resource.
256
270
  * @param resourceGroupName The name of the resource group.
@@ -267,10 +281,23 @@ export declare interface CollectorPolicies {
267
281
  * @param options The options parameters.
268
282
  */
269
283
  beginDeleteAndWait(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, options?: CollectorPoliciesDeleteOptionalParams): Promise<void>;
284
+ /**
285
+ * Updates the specified Collector Policy tags.
286
+ * @param resourceGroupName The name of the resource group.
287
+ * @param azureTrafficCollectorName Azure Traffic Collector name
288
+ * @param collectorPolicyName Collector Policy Name
289
+ * @param parameters Parameters supplied to update Collector Policy tags.
290
+ * @param options The options parameters.
291
+ */
292
+ updateTags(resourceGroupName: string, azureTrafficCollectorName: string, collectorPolicyName: string, parameters: TagsObject, options?: CollectorPoliciesUpdateTagsOptionalParams): Promise<CollectorPoliciesUpdateTagsResponse>;
270
293
  }
271
294
 
272
295
  /** Optional parameters. */
273
296
  export declare interface CollectorPoliciesCreateOrUpdateOptionalParams extends coreClient.OperationOptions {
297
+ /** Resource tags. */
298
+ tags?: {
299
+ [propertyName: string]: string;
300
+ };
274
301
  /** Ingestion policies. */
275
302
  ingestionPolicy?: IngestionPolicyPropertiesFormat;
276
303
  /** Emission policies. */
@@ -313,18 +340,20 @@ export declare interface CollectorPoliciesListOptionalParams extends coreClient.
313
340
  /** Contains response data for the list operation. */
314
341
  export declare type CollectorPoliciesListResponse = CollectorPolicyListResult;
315
342
 
343
+ /** Optional parameters. */
344
+ export declare interface CollectorPoliciesUpdateTagsOptionalParams extends coreClient.OperationOptions {
345
+ }
346
+
347
+ /** Contains response data for the updateTags operation. */
348
+ export declare type CollectorPoliciesUpdateTagsResponse = CollectorPolicy;
349
+
316
350
  /** Collector policy resource. */
317
- export declare interface CollectorPolicy extends ProxyResource {
351
+ export declare interface CollectorPolicy extends TrackedResource {
318
352
  /**
319
353
  * A unique read-only string that changes whenever the resource is updated.
320
354
  * NOTE: This property will not be serialized. It can only be populated by the server.
321
355
  */
322
356
  readonly etag?: string;
323
- /**
324
- * Metadata pertaining to creation and last modification of the resource.
325
- * NOTE: This property will not be serialized. It can only be populated by the server.
326
- */
327
- readonly systemData?: CollectorPolicySystemData;
328
357
  /** Ingestion policies. */
329
358
  ingestionPolicy?: IngestionPolicyPropertiesFormat;
330
359
  /** Emission policies. */
@@ -347,10 +376,6 @@ export declare interface CollectorPolicyListResult {
347
376
  readonly nextLink?: string;
348
377
  }
349
378
 
350
- /** Metadata pertaining to creation and last modification of the resource. */
351
- export declare interface CollectorPolicySystemData extends SystemData {
352
- }
353
-
354
379
  /**
355
380
  * Defines values for CreatedByType. \
356
381
  * {@link KnownCreatedByType} can be used interchangeably with CreatedByType,
@@ -395,6 +420,15 @@ export declare interface EmissionPolicyDestination {
395
420
  */
396
421
  export declare type EmissionType = string;
397
422
 
423
+ /**
424
+ * Given a result page from a pageable operation, returns a
425
+ * continuation token that can be used to begin paging from
426
+ * that point later.
427
+ * @param page A result object from calling .byPage() on a paged operation.
428
+ * @returns The continuation token that can be passed into byPage().
429
+ */
430
+ export declare function getContinuationToken(page: unknown): string | undefined;
431
+
398
432
  /** Ingestion Policy properties. */
399
433
  export declare interface IngestionPolicyPropertiesFormat {
400
434
  /** The ingestion type. */
@@ -420,6 +454,16 @@ export declare interface IngestionSourcesPropertiesFormat {
420
454
  */
421
455
  export declare type IngestionType = string;
422
456
 
457
+ /** Known values of {@link ApiVersionParameter} that the service accepts. */
458
+ export declare enum KnownApiVersionParameter {
459
+ /** TwoThousandTwentyTwo0501 */
460
+ TwoThousandTwentyTwo0501 = "2022-05-01",
461
+ /** TwoThousandTwentyTwo0801 */
462
+ TwoThousandTwentyTwo0801 = "2022-08-01",
463
+ /** TwoThousandTwentyTwo1101 */
464
+ TwoThousandTwentyTwo1101 = "2022-11-01"
465
+ }
466
+
423
467
  /** Known values of {@link CreatedByType} that the service accepts. */
424
468
  export declare enum KnownCreatedByType {
425
469
  /** User */
@@ -605,7 +649,7 @@ export declare interface TrackedResource {
605
649
  */
606
650
  readonly type?: string;
607
651
  /** Resource location. */
608
- location?: string;
652
+ location: string;
609
653
  /** Resource tags. */
610
654
  tags?: {
611
655
  [propertyName: string]: string;
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=sampleTest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sampleTest.d.ts","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":""}
@@ -1,38 +0,0 @@
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
- import { __awaiter } from "tslib";
9
- import { Recorder } from "@azure-tools/test-recorder";
10
- const replaceableVariables = {
11
- AZURE_CLIENT_ID: "azure_client_id",
12
- AZURE_CLIENT_SECRET: "azure_client_secret",
13
- AZURE_TENANT_ID: "88888888-8888-8888-8888-888888888888",
14
- SUBSCRIPTION_ID: "azure_subscription_id"
15
- };
16
- const recorderOptions = {
17
- envSetupForPlayback: replaceableVariables
18
- };
19
- describe("My test", () => {
20
- let recorder;
21
- beforeEach(function () {
22
- return __awaiter(this, void 0, void 0, function* () {
23
- recorder = new Recorder(this.currentTest);
24
- yield recorder.start(recorderOptions);
25
- });
26
- });
27
- afterEach(function () {
28
- return __awaiter(this, void 0, void 0, function* () {
29
- yield recorder.stop();
30
- });
31
- });
32
- it("sample test", function () {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- console.log("Hi, I'm a test!");
35
- });
36
- });
37
- });
38
- //# sourceMappingURL=sampleTest.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sampleTest.js","sourceRoot":"","sources":["../../test/sampleTest.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AAEH,OAAO,EACL,QAAQ,EAGT,MAAM,4BAA4B,CAAC;AAIpC,MAAM,oBAAoB,GAA2B;IACnD,eAAe,EAAE,iBAAiB;IAClC,mBAAmB,EAAE,qBAAqB;IAC1C,eAAe,EAAE,sCAAsC;IACvD,eAAe,EAAE,uBAAuB;CACzC,CAAC;AAEF,MAAM,eAAe,GAAyB;IAC5C,mBAAmB,EAAE,oBAAoB;CAC1C,CAAC;AAEF,QAAQ,CAAC,SAAS,EAAE,GAAG,EAAE;IACvB,IAAI,QAAkB,CAAC;IAEvB,UAAU,CAAC;;YACT,QAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC1C,MAAM,QAAQ,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;QACxC,CAAC;KAAA,CAAC,CAAC;IAEH,SAAS,CAAC;;YACR,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA,CAAC,CAAC;IAEH,EAAE,CAAC,aAAa,EAAE;;YAChB,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;QACjC,CAAC;KAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}