@azure/arm-networkfunction 1.0.0-alpha.20220714.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.
- package/CHANGELOG.md +5 -0
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/dist/index.js +1809 -0
- package/dist/index.js.map +1 -0
- package/dist/index.min.js +1 -0
- package/dist/index.min.js.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsByResourceGroupListSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsByResourceGroupListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsByResourceGroupListSample.js +44 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsByResourceGroupListSample.js.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsBySubscriptionListSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsBySubscriptionListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsBySubscriptionListSample.js +43 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsBySubscriptionListSample.js.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.js +37 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsDeleteSample.js +31 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsGetSample.js +31 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsGetSample.js.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsUpdateTagsSample.d.ts +2 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsUpdateTagsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsUpdateTagsSample.js +32 -0
- package/dist-esm/samples-dev/azureTrafficCollectorsUpdateTagsSample.js.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.d.ts +2 -0
- package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.js +32 -0
- package/dist-esm/samples-dev/collectorPoliciesCreateOrUpdateSample.js.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesDeleteSample.d.ts +2 -0
- package/dist-esm/samples-dev/collectorPoliciesDeleteSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesDeleteSample.js +32 -0
- package/dist-esm/samples-dev/collectorPoliciesDeleteSample.js.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesGetSample.d.ts +2 -0
- package/dist-esm/samples-dev/collectorPoliciesGetSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesGetSample.js +32 -0
- package/dist-esm/samples-dev/collectorPoliciesGetSample.js.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesListSample.d.ts +2 -0
- package/dist-esm/samples-dev/collectorPoliciesListSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/collectorPoliciesListSample.js +45 -0
- package/dist-esm/samples-dev/collectorPoliciesListSample.js.map +1 -0
- package/dist-esm/samples-dev/networkFunctionListOperationsSample.d.ts +2 -0
- package/dist-esm/samples-dev/networkFunctionListOperationsSample.d.ts.map +1 -0
- package/dist-esm/samples-dev/networkFunctionListOperationsSample.js +43 -0
- package/dist-esm/samples-dev/networkFunctionListOperationsSample.js.map +1 -0
- package/dist-esm/src/azureTrafficCollectorClient.d.ts +24 -0
- package/dist-esm/src/azureTrafficCollectorClient.d.ts.map +1 -0
- package/dist-esm/src/azureTrafficCollectorClient.js +102 -0
- package/dist-esm/src/azureTrafficCollectorClient.js.map +1 -0
- package/dist-esm/src/index.d.ts +5 -0
- package/dist-esm/src/index.d.ts.map +1 -0
- package/dist-esm/src/index.js +12 -0
- package/dist-esm/src/index.js.map +1 -0
- package/dist-esm/src/lroImpl.d.ts +16 -0
- package/dist-esm/src/lroImpl.d.ts.map +1 -0
- package/dist-esm/src/lroImpl.js +29 -0
- package/dist-esm/src/lroImpl.js.map +1 -0
- package/dist-esm/src/models/index.d.ts +414 -0
- package/dist-esm/src/models/index.d.ts.map +1 -0
- package/dist-esm/src/models/index.js +56 -0
- package/dist-esm/src/models/index.js.map +1 -0
- package/dist-esm/src/models/mappers.d.ts +22 -0
- package/dist-esm/src/models/mappers.d.ts.map +1 -0
- package/dist-esm/src/models/mappers.js +531 -0
- package/dist-esm/src/models/mappers.js.map +1 -0
- package/dist-esm/src/models/parameters.d.ts +18 -0
- package/dist-esm/src/models/parameters.d.ts.map +1 -0
- package/dist-esm/src/models/parameters.js +132 -0
- package/dist-esm/src/models/parameters.js.map +1 -0
- package/dist-esm/src/operations/azureTrafficCollectors.d.ts +57 -0
- package/dist-esm/src/operations/azureTrafficCollectors.d.ts.map +1 -0
- package/dist-esm/src/operations/azureTrafficCollectors.js +255 -0
- package/dist-esm/src/operations/azureTrafficCollectors.js.map +1 -0
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.d.ts +35 -0
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.d.ts.map +1 -0
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.js +132 -0
- package/dist-esm/src/operations/azureTrafficCollectorsByResourceGroup.js.map +1 -0
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.d.ts +32 -0
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.d.ts.map +1 -0
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.js +124 -0
- package/dist-esm/src/operations/azureTrafficCollectorsBySubscription.js.map +1 -0
- package/dist-esm/src/operations/collectorPolicies.d.ts +79 -0
- package/dist-esm/src/operations/collectorPolicies.d.ts.map +1 -0
- package/dist-esm/src/operations/collectorPolicies.js +356 -0
- package/dist-esm/src/operations/collectorPolicies.js.map +1 -0
- package/dist-esm/src/operations/index.d.ts +6 -0
- package/dist-esm/src/operations/index.d.ts.map +1 -0
- package/dist-esm/src/operations/index.js +13 -0
- package/dist-esm/src/operations/index.js.map +1 -0
- package/dist-esm/src/operations/networkFunction.d.ts +26 -0
- package/dist-esm/src/operations/networkFunction.d.ts.map +1 -0
- package/dist-esm/src/operations/networkFunction.js +90 -0
- package/dist-esm/src/operations/networkFunction.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.d.ts +49 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.js +9 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectors.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsByResourceGroup.d.ts +12 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsByResourceGroup.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js +9 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsByResourceGroup.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsBySubscription.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsBySubscription.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsBySubscription.js +9 -0
- package/dist-esm/src/operationsInterfaces/azureTrafficCollectorsBySubscription.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/collectorPolicies.d.ts +54 -0
- package/dist-esm/src/operationsInterfaces/collectorPolicies.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/collectorPolicies.js +9 -0
- package/dist-esm/src/operationsInterfaces/collectorPolicies.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts +6 -0
- package/dist-esm/src/operationsInterfaces/index.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/index.js +13 -0
- package/dist-esm/src/operationsInterfaces/index.js.map +1 -0
- package/dist-esm/src/operationsInterfaces/networkFunction.d.ts +11 -0
- package/dist-esm/src/operationsInterfaces/networkFunction.d.ts.map +1 -0
- package/dist-esm/src/operationsInterfaces/networkFunction.js +9 -0
- package/dist-esm/src/operationsInterfaces/networkFunction.js.map +1 -0
- package/dist-esm/test/sampleTest.d.ts +2 -0
- package/dist-esm/test/sampleTest.d.ts.map +1 -0
- package/dist-esm/test/sampleTest.js +38 -0
- package/dist-esm/test/sampleTest.js.map +1 -0
- package/package.json +121 -0
- package/review/arm-networkfunction.api.md +375 -0
- package/rollup.config.js +122 -0
- package/src/azureTrafficCollectorClient.ts +158 -0
- package/src/index.ts +12 -0
- package/src/lroImpl.ts +34 -0
- package/src/models/index.ts +477 -0
- package/src/models/mappers.ts +569 -0
- package/src/models/parameters.ts +157 -0
- package/src/operations/azureTrafficCollectors.ts +358 -0
- package/src/operations/azureTrafficCollectorsByResourceGroup.ts +163 -0
- package/src/operations/azureTrafficCollectorsBySubscription.ts +143 -0
- package/src/operations/collectorPolicies.ts +498 -0
- package/src/operations/index.ts +13 -0
- package/src/operations/networkFunction.ts +101 -0
- package/src/operationsInterfaces/azureTrafficCollectors.ts +96 -0
- package/src/operationsInterfaces/azureTrafficCollectorsByResourceGroup.ts +27 -0
- package/src/operationsInterfaces/azureTrafficCollectorsBySubscription.ts +25 -0
- package/src/operationsInterfaces/collectorPolicies.ts +105 -0
- package/src/operationsInterfaces/index.ts +13 -0
- package/src/operationsInterfaces/networkFunction.ts +25 -0
- package/tsconfig.json +33 -0
- package/types/arm-networkfunction.d.ts +624 -0
- package/types/tsdoc-metadata.json +11 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,1809 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib = require('tslib');
|
|
6
|
+
var coreClient = require('@azure/core-client');
|
|
7
|
+
var coreRestPipeline = require('@azure/core-rest-pipeline');
|
|
8
|
+
var coreLro = require('@azure/core-lro');
|
|
9
|
+
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n["default"] = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var coreClient__namespace = /*#__PURE__*/_interopNamespace(coreClient);
|
|
29
|
+
var coreRestPipeline__namespace = /*#__PURE__*/_interopNamespace(coreRestPipeline);
|
|
30
|
+
|
|
31
|
+
/*
|
|
32
|
+
* Copyright (c) Microsoft Corporation.
|
|
33
|
+
* Licensed under the MIT License.
|
|
34
|
+
*
|
|
35
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
36
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
37
|
+
*/
|
|
38
|
+
/** Known values of {@link IngestionType} that the service accepts. */
|
|
39
|
+
exports.KnownIngestionType = void 0;
|
|
40
|
+
(function (KnownIngestionType) {
|
|
41
|
+
/** Ipfix */
|
|
42
|
+
KnownIngestionType["Ipfix"] = "IPFIX";
|
|
43
|
+
})(exports.KnownIngestionType || (exports.KnownIngestionType = {}));
|
|
44
|
+
/** Known values of {@link SourceType} that the service accepts. */
|
|
45
|
+
exports.KnownSourceType = void 0;
|
|
46
|
+
(function (KnownSourceType) {
|
|
47
|
+
/** Resource */
|
|
48
|
+
KnownSourceType["Resource"] = "Resource";
|
|
49
|
+
})(exports.KnownSourceType || (exports.KnownSourceType = {}));
|
|
50
|
+
/** Known values of {@link EmissionType} that the service accepts. */
|
|
51
|
+
exports.KnownEmissionType = void 0;
|
|
52
|
+
(function (KnownEmissionType) {
|
|
53
|
+
/** Ipfix */
|
|
54
|
+
KnownEmissionType["Ipfix"] = "IPFIX";
|
|
55
|
+
})(exports.KnownEmissionType || (exports.KnownEmissionType = {}));
|
|
56
|
+
/** Known values of {@link DestinationType} that the service accepts. */
|
|
57
|
+
exports.KnownDestinationType = void 0;
|
|
58
|
+
(function (KnownDestinationType) {
|
|
59
|
+
/** AzureMonitor */
|
|
60
|
+
KnownDestinationType["AzureMonitor"] = "AzureMonitor";
|
|
61
|
+
})(exports.KnownDestinationType || (exports.KnownDestinationType = {}));
|
|
62
|
+
/** Known values of {@link ProvisioningState} that the service accepts. */
|
|
63
|
+
exports.KnownProvisioningState = void 0;
|
|
64
|
+
(function (KnownProvisioningState) {
|
|
65
|
+
/** Succeeded */
|
|
66
|
+
KnownProvisioningState["Succeeded"] = "Succeeded";
|
|
67
|
+
/** Updating */
|
|
68
|
+
KnownProvisioningState["Updating"] = "Updating";
|
|
69
|
+
/** Deleting */
|
|
70
|
+
KnownProvisioningState["Deleting"] = "Deleting";
|
|
71
|
+
/** Failed */
|
|
72
|
+
KnownProvisioningState["Failed"] = "Failed";
|
|
73
|
+
})(exports.KnownProvisioningState || (exports.KnownProvisioningState = {}));
|
|
74
|
+
/** Known values of {@link CreatedByType} that the service accepts. */
|
|
75
|
+
exports.KnownCreatedByType = void 0;
|
|
76
|
+
(function (KnownCreatedByType) {
|
|
77
|
+
/** User */
|
|
78
|
+
KnownCreatedByType["User"] = "User";
|
|
79
|
+
/** Application */
|
|
80
|
+
KnownCreatedByType["Application"] = "Application";
|
|
81
|
+
/** ManagedIdentity */
|
|
82
|
+
KnownCreatedByType["ManagedIdentity"] = "ManagedIdentity";
|
|
83
|
+
/** Key */
|
|
84
|
+
KnownCreatedByType["Key"] = "Key";
|
|
85
|
+
})(exports.KnownCreatedByType || (exports.KnownCreatedByType = {}));
|
|
86
|
+
|
|
87
|
+
/*
|
|
88
|
+
* Copyright (c) Microsoft Corporation.
|
|
89
|
+
* Licensed under the MIT License.
|
|
90
|
+
*
|
|
91
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
92
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
93
|
+
*/
|
|
94
|
+
const OperationListResult = {
|
|
95
|
+
type: {
|
|
96
|
+
name: "Composite",
|
|
97
|
+
className: "OperationListResult",
|
|
98
|
+
modelProperties: {
|
|
99
|
+
value: {
|
|
100
|
+
serializedName: "value",
|
|
101
|
+
type: {
|
|
102
|
+
name: "Sequence",
|
|
103
|
+
element: {
|
|
104
|
+
type: {
|
|
105
|
+
name: "Composite",
|
|
106
|
+
className: "Operation"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
nextLink: {
|
|
112
|
+
serializedName: "nextLink",
|
|
113
|
+
type: {
|
|
114
|
+
name: "String"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
const Operation = {
|
|
121
|
+
type: {
|
|
122
|
+
name: "Composite",
|
|
123
|
+
className: "Operation",
|
|
124
|
+
modelProperties: {
|
|
125
|
+
name: {
|
|
126
|
+
serializedName: "name",
|
|
127
|
+
type: {
|
|
128
|
+
name: "String"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
isDataAction: {
|
|
132
|
+
defaultValue: false,
|
|
133
|
+
serializedName: "isDataAction",
|
|
134
|
+
type: {
|
|
135
|
+
name: "Boolean"
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
display: {
|
|
139
|
+
serializedName: "display",
|
|
140
|
+
type: {
|
|
141
|
+
name: "Composite",
|
|
142
|
+
className: "OperationDisplay"
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
origin: {
|
|
146
|
+
serializedName: "origin",
|
|
147
|
+
type: {
|
|
148
|
+
name: "String"
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const OperationDisplay = {
|
|
155
|
+
type: {
|
|
156
|
+
name: "Composite",
|
|
157
|
+
className: "OperationDisplay",
|
|
158
|
+
modelProperties: {
|
|
159
|
+
provider: {
|
|
160
|
+
serializedName: "provider",
|
|
161
|
+
type: {
|
|
162
|
+
name: "String"
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
resource: {
|
|
166
|
+
serializedName: "resource",
|
|
167
|
+
type: {
|
|
168
|
+
name: "String"
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
operation: {
|
|
172
|
+
serializedName: "operation",
|
|
173
|
+
type: {
|
|
174
|
+
name: "String"
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
description: {
|
|
178
|
+
serializedName: "description",
|
|
179
|
+
type: {
|
|
180
|
+
name: "String"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
};
|
|
186
|
+
const CloudError = {
|
|
187
|
+
type: {
|
|
188
|
+
name: "Composite",
|
|
189
|
+
className: "CloudError",
|
|
190
|
+
modelProperties: {
|
|
191
|
+
error: {
|
|
192
|
+
serializedName: "error",
|
|
193
|
+
type: {
|
|
194
|
+
name: "Composite",
|
|
195
|
+
className: "CloudErrorBody"
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
const CloudErrorBody = {
|
|
202
|
+
type: {
|
|
203
|
+
name: "Composite",
|
|
204
|
+
className: "CloudErrorBody",
|
|
205
|
+
modelProperties: {
|
|
206
|
+
code: {
|
|
207
|
+
serializedName: "code",
|
|
208
|
+
type: {
|
|
209
|
+
name: "String"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
message: {
|
|
213
|
+
serializedName: "message",
|
|
214
|
+
type: {
|
|
215
|
+
name: "String"
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
target: {
|
|
219
|
+
serializedName: "target",
|
|
220
|
+
type: {
|
|
221
|
+
name: "String"
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
details: {
|
|
225
|
+
serializedName: "details",
|
|
226
|
+
type: {
|
|
227
|
+
name: "Sequence",
|
|
228
|
+
element: {
|
|
229
|
+
type: {
|
|
230
|
+
name: "Composite",
|
|
231
|
+
className: "CloudErrorBody"
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
const AzureTrafficCollectorListResult = {
|
|
240
|
+
type: {
|
|
241
|
+
name: "Composite",
|
|
242
|
+
className: "AzureTrafficCollectorListResult",
|
|
243
|
+
modelProperties: {
|
|
244
|
+
value: {
|
|
245
|
+
serializedName: "value",
|
|
246
|
+
type: {
|
|
247
|
+
name: "Sequence",
|
|
248
|
+
element: {
|
|
249
|
+
type: {
|
|
250
|
+
name: "Composite",
|
|
251
|
+
className: "AzureTrafficCollector"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
nextLink: {
|
|
257
|
+
serializedName: "nextLink",
|
|
258
|
+
readOnly: true,
|
|
259
|
+
type: {
|
|
260
|
+
name: "String"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
const IngestionPolicyPropertiesFormat = {
|
|
267
|
+
type: {
|
|
268
|
+
name: "Composite",
|
|
269
|
+
className: "IngestionPolicyPropertiesFormat",
|
|
270
|
+
modelProperties: {
|
|
271
|
+
ingestionType: {
|
|
272
|
+
serializedName: "ingestionType",
|
|
273
|
+
type: {
|
|
274
|
+
name: "String"
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
ingestionSources: {
|
|
278
|
+
serializedName: "ingestionSources",
|
|
279
|
+
type: {
|
|
280
|
+
name: "Sequence",
|
|
281
|
+
element: {
|
|
282
|
+
type: {
|
|
283
|
+
name: "Composite",
|
|
284
|
+
className: "IngestionSourcesPropertiesFormat"
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
const IngestionSourcesPropertiesFormat = {
|
|
293
|
+
type: {
|
|
294
|
+
name: "Composite",
|
|
295
|
+
className: "IngestionSourcesPropertiesFormat",
|
|
296
|
+
modelProperties: {
|
|
297
|
+
sourceType: {
|
|
298
|
+
serializedName: "sourceType",
|
|
299
|
+
type: {
|
|
300
|
+
name: "String"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
resourceId: {
|
|
304
|
+
serializedName: "resourceId",
|
|
305
|
+
type: {
|
|
306
|
+
name: "String"
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
};
|
|
312
|
+
const EmissionPoliciesPropertiesFormat = {
|
|
313
|
+
type: {
|
|
314
|
+
name: "Composite",
|
|
315
|
+
className: "EmissionPoliciesPropertiesFormat",
|
|
316
|
+
modelProperties: {
|
|
317
|
+
emissionType: {
|
|
318
|
+
serializedName: "emissionType",
|
|
319
|
+
type: {
|
|
320
|
+
name: "String"
|
|
321
|
+
}
|
|
322
|
+
},
|
|
323
|
+
emissionDestinations: {
|
|
324
|
+
serializedName: "emissionDestinations",
|
|
325
|
+
type: {
|
|
326
|
+
name: "Sequence",
|
|
327
|
+
element: {
|
|
328
|
+
type: {
|
|
329
|
+
name: "Composite",
|
|
330
|
+
className: "EmissionPolicyDestination"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
const EmissionPolicyDestination = {
|
|
339
|
+
type: {
|
|
340
|
+
name: "Composite",
|
|
341
|
+
className: "EmissionPolicyDestination",
|
|
342
|
+
modelProperties: {
|
|
343
|
+
destinationType: {
|
|
344
|
+
serializedName: "destinationType",
|
|
345
|
+
type: {
|
|
346
|
+
name: "String"
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
const SystemData = {
|
|
353
|
+
type: {
|
|
354
|
+
name: "Composite",
|
|
355
|
+
className: "SystemData",
|
|
356
|
+
modelProperties: {
|
|
357
|
+
createdBy: {
|
|
358
|
+
serializedName: "createdBy",
|
|
359
|
+
type: {
|
|
360
|
+
name: "String"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
createdByType: {
|
|
364
|
+
serializedName: "createdByType",
|
|
365
|
+
type: {
|
|
366
|
+
name: "String"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
createdAt: {
|
|
370
|
+
serializedName: "createdAt",
|
|
371
|
+
type: {
|
|
372
|
+
name: "DateTime"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
lastModifiedBy: {
|
|
376
|
+
serializedName: "lastModifiedBy",
|
|
377
|
+
type: {
|
|
378
|
+
name: "String"
|
|
379
|
+
}
|
|
380
|
+
},
|
|
381
|
+
lastModifiedByType: {
|
|
382
|
+
serializedName: "lastModifiedByType",
|
|
383
|
+
type: {
|
|
384
|
+
name: "String"
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
};
|
|
390
|
+
const ProxyResource = {
|
|
391
|
+
type: {
|
|
392
|
+
name: "Composite",
|
|
393
|
+
className: "ProxyResource",
|
|
394
|
+
modelProperties: {
|
|
395
|
+
id: {
|
|
396
|
+
serializedName: "id",
|
|
397
|
+
readOnly: true,
|
|
398
|
+
type: {
|
|
399
|
+
name: "String"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
type: {
|
|
403
|
+
serializedName: "type",
|
|
404
|
+
readOnly: true,
|
|
405
|
+
type: {
|
|
406
|
+
name: "String"
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
name: {
|
|
410
|
+
serializedName: "name",
|
|
411
|
+
readOnly: true,
|
|
412
|
+
type: {
|
|
413
|
+
name: "String"
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
};
|
|
419
|
+
const ResourceReference = {
|
|
420
|
+
type: {
|
|
421
|
+
name: "Composite",
|
|
422
|
+
className: "ResourceReference",
|
|
423
|
+
modelProperties: {
|
|
424
|
+
id: {
|
|
425
|
+
serializedName: "id",
|
|
426
|
+
readOnly: true,
|
|
427
|
+
type: {
|
|
428
|
+
name: "String"
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
};
|
|
434
|
+
const TrackedResource = {
|
|
435
|
+
type: {
|
|
436
|
+
name: "Composite",
|
|
437
|
+
className: "TrackedResource",
|
|
438
|
+
modelProperties: {
|
|
439
|
+
id: {
|
|
440
|
+
serializedName: "id",
|
|
441
|
+
readOnly: true,
|
|
442
|
+
type: {
|
|
443
|
+
name: "String"
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
name: {
|
|
447
|
+
serializedName: "name",
|
|
448
|
+
readOnly: true,
|
|
449
|
+
type: {
|
|
450
|
+
name: "String"
|
|
451
|
+
}
|
|
452
|
+
},
|
|
453
|
+
type: {
|
|
454
|
+
serializedName: "type",
|
|
455
|
+
readOnly: true,
|
|
456
|
+
type: {
|
|
457
|
+
name: "String"
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
location: {
|
|
461
|
+
serializedName: "location",
|
|
462
|
+
type: {
|
|
463
|
+
name: "String"
|
|
464
|
+
}
|
|
465
|
+
},
|
|
466
|
+
tags: {
|
|
467
|
+
serializedName: "tags",
|
|
468
|
+
type: {
|
|
469
|
+
name: "Dictionary",
|
|
470
|
+
value: { type: { name: "String" } }
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
systemData: {
|
|
474
|
+
serializedName: "systemData",
|
|
475
|
+
type: {
|
|
476
|
+
name: "Composite",
|
|
477
|
+
className: "TrackedResourceSystemData"
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
const TagsObject = {
|
|
484
|
+
type: {
|
|
485
|
+
name: "Composite",
|
|
486
|
+
className: "TagsObject",
|
|
487
|
+
modelProperties: {
|
|
488
|
+
tags: {
|
|
489
|
+
serializedName: "tags",
|
|
490
|
+
type: {
|
|
491
|
+
name: "Dictionary",
|
|
492
|
+
value: { type: { name: "String" } }
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
};
|
|
498
|
+
const CollectorPolicyListResult = {
|
|
499
|
+
type: {
|
|
500
|
+
name: "Composite",
|
|
501
|
+
className: "CollectorPolicyListResult",
|
|
502
|
+
modelProperties: {
|
|
503
|
+
value: {
|
|
504
|
+
serializedName: "value",
|
|
505
|
+
type: {
|
|
506
|
+
name: "Sequence",
|
|
507
|
+
element: {
|
|
508
|
+
type: {
|
|
509
|
+
name: "Composite",
|
|
510
|
+
className: "CollectorPolicy"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
nextLink: {
|
|
516
|
+
serializedName: "nextLink",
|
|
517
|
+
readOnly: true,
|
|
518
|
+
type: {
|
|
519
|
+
name: "String"
|
|
520
|
+
}
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
};
|
|
525
|
+
const CollectorPolicySystemData = {
|
|
526
|
+
type: {
|
|
527
|
+
name: "Composite",
|
|
528
|
+
className: "CollectorPolicySystemData",
|
|
529
|
+
modelProperties: Object.assign({}, SystemData.type.modelProperties)
|
|
530
|
+
}
|
|
531
|
+
};
|
|
532
|
+
const TrackedResourceSystemData = {
|
|
533
|
+
type: {
|
|
534
|
+
name: "Composite",
|
|
535
|
+
className: "TrackedResourceSystemData",
|
|
536
|
+
modelProperties: Object.assign({}, SystemData.type.modelProperties)
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
const CollectorPolicy = {
|
|
540
|
+
type: {
|
|
541
|
+
name: "Composite",
|
|
542
|
+
className: "CollectorPolicy",
|
|
543
|
+
modelProperties: Object.assign(Object.assign({}, ProxyResource.type.modelProperties), { etag: {
|
|
544
|
+
serializedName: "etag",
|
|
545
|
+
readOnly: true,
|
|
546
|
+
type: {
|
|
547
|
+
name: "String"
|
|
548
|
+
}
|
|
549
|
+
}, systemData: {
|
|
550
|
+
serializedName: "systemData",
|
|
551
|
+
type: {
|
|
552
|
+
name: "Composite",
|
|
553
|
+
className: "CollectorPolicySystemData"
|
|
554
|
+
}
|
|
555
|
+
}, ingestionPolicy: {
|
|
556
|
+
serializedName: "properties.ingestionPolicy",
|
|
557
|
+
type: {
|
|
558
|
+
name: "Composite",
|
|
559
|
+
className: "IngestionPolicyPropertiesFormat"
|
|
560
|
+
}
|
|
561
|
+
}, emissionPolicies: {
|
|
562
|
+
serializedName: "properties.emissionPolicies",
|
|
563
|
+
type: {
|
|
564
|
+
name: "Sequence",
|
|
565
|
+
element: {
|
|
566
|
+
type: {
|
|
567
|
+
name: "Composite",
|
|
568
|
+
className: "EmissionPoliciesPropertiesFormat"
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}, provisioningState: {
|
|
573
|
+
serializedName: "properties.provisioningState",
|
|
574
|
+
readOnly: true,
|
|
575
|
+
type: {
|
|
576
|
+
name: "String"
|
|
577
|
+
}
|
|
578
|
+
} })
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
const AzureTrafficCollector = {
|
|
582
|
+
type: {
|
|
583
|
+
name: "Composite",
|
|
584
|
+
className: "AzureTrafficCollector",
|
|
585
|
+
modelProperties: Object.assign(Object.assign({}, TrackedResource.type.modelProperties), { etag: {
|
|
586
|
+
serializedName: "etag",
|
|
587
|
+
readOnly: true,
|
|
588
|
+
type: {
|
|
589
|
+
name: "String"
|
|
590
|
+
}
|
|
591
|
+
}, collectorPolicies: {
|
|
592
|
+
serializedName: "properties.collectorPolicies",
|
|
593
|
+
type: {
|
|
594
|
+
name: "Sequence",
|
|
595
|
+
element: {
|
|
596
|
+
type: {
|
|
597
|
+
name: "Composite",
|
|
598
|
+
className: "CollectorPolicy"
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
}, virtualHub: {
|
|
603
|
+
serializedName: "properties.virtualHub",
|
|
604
|
+
type: {
|
|
605
|
+
name: "Composite",
|
|
606
|
+
className: "ResourceReference"
|
|
607
|
+
}
|
|
608
|
+
}, provisioningState: {
|
|
609
|
+
serializedName: "properties.provisioningState",
|
|
610
|
+
readOnly: true,
|
|
611
|
+
type: {
|
|
612
|
+
name: "String"
|
|
613
|
+
}
|
|
614
|
+
} })
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
var Mappers = /*#__PURE__*/Object.freeze({
|
|
619
|
+
__proto__: null,
|
|
620
|
+
OperationListResult: OperationListResult,
|
|
621
|
+
Operation: Operation,
|
|
622
|
+
OperationDisplay: OperationDisplay,
|
|
623
|
+
CloudError: CloudError,
|
|
624
|
+
CloudErrorBody: CloudErrorBody,
|
|
625
|
+
AzureTrafficCollectorListResult: AzureTrafficCollectorListResult,
|
|
626
|
+
IngestionPolicyPropertiesFormat: IngestionPolicyPropertiesFormat,
|
|
627
|
+
IngestionSourcesPropertiesFormat: IngestionSourcesPropertiesFormat,
|
|
628
|
+
EmissionPoliciesPropertiesFormat: EmissionPoliciesPropertiesFormat,
|
|
629
|
+
EmissionPolicyDestination: EmissionPolicyDestination,
|
|
630
|
+
SystemData: SystemData,
|
|
631
|
+
ProxyResource: ProxyResource,
|
|
632
|
+
ResourceReference: ResourceReference,
|
|
633
|
+
TrackedResource: TrackedResource,
|
|
634
|
+
TagsObject: TagsObject,
|
|
635
|
+
CollectorPolicyListResult: CollectorPolicyListResult,
|
|
636
|
+
CollectorPolicySystemData: CollectorPolicySystemData,
|
|
637
|
+
TrackedResourceSystemData: TrackedResourceSystemData,
|
|
638
|
+
CollectorPolicy: CollectorPolicy,
|
|
639
|
+
AzureTrafficCollector: AzureTrafficCollector
|
|
640
|
+
});
|
|
641
|
+
|
|
642
|
+
/*
|
|
643
|
+
* Copyright (c) Microsoft Corporation.
|
|
644
|
+
* Licensed under the MIT License.
|
|
645
|
+
*
|
|
646
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
647
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
648
|
+
*/
|
|
649
|
+
const accept = {
|
|
650
|
+
parameterPath: "accept",
|
|
651
|
+
mapper: {
|
|
652
|
+
defaultValue: "application/json",
|
|
653
|
+
isConstant: true,
|
|
654
|
+
serializedName: "Accept",
|
|
655
|
+
type: {
|
|
656
|
+
name: "String"
|
|
657
|
+
}
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
const $host = {
|
|
661
|
+
parameterPath: "$host",
|
|
662
|
+
mapper: {
|
|
663
|
+
serializedName: "$host",
|
|
664
|
+
required: true,
|
|
665
|
+
type: {
|
|
666
|
+
name: "String"
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
skipEncoding: true
|
|
670
|
+
};
|
|
671
|
+
const apiVersion = {
|
|
672
|
+
parameterPath: "apiVersion",
|
|
673
|
+
mapper: {
|
|
674
|
+
defaultValue: "2022-05-01",
|
|
675
|
+
isConstant: true,
|
|
676
|
+
serializedName: "api-version",
|
|
677
|
+
type: {
|
|
678
|
+
name: "String"
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
};
|
|
682
|
+
const subscriptionId = {
|
|
683
|
+
parameterPath: "subscriptionId",
|
|
684
|
+
mapper: {
|
|
685
|
+
serializedName: "subscriptionId",
|
|
686
|
+
required: true,
|
|
687
|
+
type: {
|
|
688
|
+
name: "String"
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
};
|
|
692
|
+
const nextLink = {
|
|
693
|
+
parameterPath: "nextLink",
|
|
694
|
+
mapper: {
|
|
695
|
+
serializedName: "nextLink",
|
|
696
|
+
required: true,
|
|
697
|
+
type: {
|
|
698
|
+
name: "String"
|
|
699
|
+
}
|
|
700
|
+
},
|
|
701
|
+
skipEncoding: true
|
|
702
|
+
};
|
|
703
|
+
const resourceGroupName = {
|
|
704
|
+
parameterPath: "resourceGroupName",
|
|
705
|
+
mapper: {
|
|
706
|
+
serializedName: "resourceGroupName",
|
|
707
|
+
required: true,
|
|
708
|
+
type: {
|
|
709
|
+
name: "String"
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
};
|
|
713
|
+
const azureTrafficCollectorName = {
|
|
714
|
+
parameterPath: "azureTrafficCollectorName",
|
|
715
|
+
mapper: {
|
|
716
|
+
serializedName: "azureTrafficCollectorName",
|
|
717
|
+
required: true,
|
|
718
|
+
type: {
|
|
719
|
+
name: "String"
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
const contentType = {
|
|
724
|
+
parameterPath: ["options", "contentType"],
|
|
725
|
+
mapper: {
|
|
726
|
+
defaultValue: "application/json",
|
|
727
|
+
isConstant: true,
|
|
728
|
+
serializedName: "Content-Type",
|
|
729
|
+
type: {
|
|
730
|
+
name: "String"
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
const parameters1 = {
|
|
735
|
+
parameterPath: "parameters",
|
|
736
|
+
mapper: TagsObject
|
|
737
|
+
};
|
|
738
|
+
const collectorPolicyName = {
|
|
739
|
+
parameterPath: "collectorPolicyName",
|
|
740
|
+
mapper: {
|
|
741
|
+
serializedName: "collectorPolicyName",
|
|
742
|
+
required: true,
|
|
743
|
+
type: {
|
|
744
|
+
name: "String"
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
/*
|
|
750
|
+
* Copyright (c) Microsoft Corporation.
|
|
751
|
+
* Licensed under the MIT License.
|
|
752
|
+
*
|
|
753
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
754
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
755
|
+
*/
|
|
756
|
+
/// <reference lib="esnext.asynciterable" />
|
|
757
|
+
/** Class containing NetworkFunction operations. */
|
|
758
|
+
class NetworkFunctionImpl {
|
|
759
|
+
/**
|
|
760
|
+
* Initialize a new instance of the class NetworkFunction class.
|
|
761
|
+
* @param client Reference to the service client
|
|
762
|
+
*/
|
|
763
|
+
constructor(client) {
|
|
764
|
+
this.client = client;
|
|
765
|
+
}
|
|
766
|
+
/**
|
|
767
|
+
* Lists all of the available NetworkFunction Rest API operations.
|
|
768
|
+
* @param options The options parameters.
|
|
769
|
+
*/
|
|
770
|
+
listOperations(options) {
|
|
771
|
+
const iter = this.listOperationsPagingAll(options);
|
|
772
|
+
return {
|
|
773
|
+
next() {
|
|
774
|
+
return iter.next();
|
|
775
|
+
},
|
|
776
|
+
[Symbol.asyncIterator]() {
|
|
777
|
+
return this;
|
|
778
|
+
},
|
|
779
|
+
byPage: () => {
|
|
780
|
+
return this.listOperationsPagingPage(options);
|
|
781
|
+
}
|
|
782
|
+
};
|
|
783
|
+
}
|
|
784
|
+
listOperationsPagingPage(options) {
|
|
785
|
+
return tslib.__asyncGenerator(this, arguments, function* listOperationsPagingPage_1() {
|
|
786
|
+
let result = yield tslib.__await(this._listOperations(options));
|
|
787
|
+
yield yield tslib.__await(result.value || []);
|
|
788
|
+
});
|
|
789
|
+
}
|
|
790
|
+
listOperationsPagingAll(options) {
|
|
791
|
+
return tslib.__asyncGenerator(this, arguments, function* listOperationsPagingAll_1() {
|
|
792
|
+
var e_1, _a;
|
|
793
|
+
try {
|
|
794
|
+
for (var _b = tslib.__asyncValues(this.listOperationsPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
795
|
+
const page = _c.value;
|
|
796
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
797
|
+
}
|
|
798
|
+
}
|
|
799
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
800
|
+
finally {
|
|
801
|
+
try {
|
|
802
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
803
|
+
}
|
|
804
|
+
finally { if (e_1) throw e_1.error; }
|
|
805
|
+
}
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
/**
|
|
809
|
+
* Lists all of the available NetworkFunction Rest API operations.
|
|
810
|
+
* @param options The options parameters.
|
|
811
|
+
*/
|
|
812
|
+
_listOperations(options) {
|
|
813
|
+
return this.client.sendOperationRequest({ options }, listOperationsOperationSpec);
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
// Operation Specifications
|
|
817
|
+
const serializer$4 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
818
|
+
const listOperationsOperationSpec = {
|
|
819
|
+
path: "/providers/Microsoft.NetworkFunction/operations",
|
|
820
|
+
httpMethod: "GET",
|
|
821
|
+
responses: {
|
|
822
|
+
200: {
|
|
823
|
+
bodyMapper: OperationListResult
|
|
824
|
+
},
|
|
825
|
+
default: {
|
|
826
|
+
bodyMapper: CloudError
|
|
827
|
+
}
|
|
828
|
+
},
|
|
829
|
+
queryParameters: [apiVersion],
|
|
830
|
+
urlParameters: [$host],
|
|
831
|
+
headerParameters: [accept],
|
|
832
|
+
serializer: serializer$4
|
|
833
|
+
};
|
|
834
|
+
|
|
835
|
+
/*
|
|
836
|
+
* Copyright (c) Microsoft Corporation.
|
|
837
|
+
* Licensed under the MIT License.
|
|
838
|
+
*
|
|
839
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
840
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
841
|
+
*/
|
|
842
|
+
/// <reference lib="esnext.asynciterable" />
|
|
843
|
+
/** Class containing AzureTrafficCollectorsBySubscription operations. */
|
|
844
|
+
class AzureTrafficCollectorsBySubscriptionImpl {
|
|
845
|
+
/**
|
|
846
|
+
* Initialize a new instance of the class AzureTrafficCollectorsBySubscription class.
|
|
847
|
+
* @param client Reference to the service client
|
|
848
|
+
*/
|
|
849
|
+
constructor(client) {
|
|
850
|
+
this.client = client;
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Return list of Azure Traffic Collectors in a subscription
|
|
854
|
+
* @param options The options parameters.
|
|
855
|
+
*/
|
|
856
|
+
list(options) {
|
|
857
|
+
const iter = this.listPagingAll(options);
|
|
858
|
+
return {
|
|
859
|
+
next() {
|
|
860
|
+
return iter.next();
|
|
861
|
+
},
|
|
862
|
+
[Symbol.asyncIterator]() {
|
|
863
|
+
return this;
|
|
864
|
+
},
|
|
865
|
+
byPage: () => {
|
|
866
|
+
return this.listPagingPage(options);
|
|
867
|
+
}
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
listPagingPage(options) {
|
|
871
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
872
|
+
let result = yield tslib.__await(this._list(options));
|
|
873
|
+
yield yield tslib.__await(result.value || []);
|
|
874
|
+
let continuationToken = result.nextLink;
|
|
875
|
+
while (continuationToken) {
|
|
876
|
+
result = yield tslib.__await(this._listNext(continuationToken, options));
|
|
877
|
+
continuationToken = result.nextLink;
|
|
878
|
+
yield yield tslib.__await(result.value || []);
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
}
|
|
882
|
+
listPagingAll(options) {
|
|
883
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
884
|
+
var e_1, _a;
|
|
885
|
+
try {
|
|
886
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
887
|
+
const page = _c.value;
|
|
888
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
892
|
+
finally {
|
|
893
|
+
try {
|
|
894
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
895
|
+
}
|
|
896
|
+
finally { if (e_1) throw e_1.error; }
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Return list of Azure Traffic Collectors in a subscription
|
|
902
|
+
* @param options The options parameters.
|
|
903
|
+
*/
|
|
904
|
+
_list(options) {
|
|
905
|
+
return this.client.sendOperationRequest({ options }, listOperationSpec$2);
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* ListNext
|
|
909
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
910
|
+
* @param options The options parameters.
|
|
911
|
+
*/
|
|
912
|
+
_listNext(nextLink, options) {
|
|
913
|
+
return this.client.sendOperationRequest({ nextLink, options }, listNextOperationSpec$2);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
// Operation Specifications
|
|
917
|
+
const serializer$3 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
918
|
+
const listOperationSpec$2 = {
|
|
919
|
+
path: "/subscriptions/{subscriptionId}/providers/Microsoft.NetworkFunction/azureTrafficCollectors",
|
|
920
|
+
httpMethod: "GET",
|
|
921
|
+
responses: {
|
|
922
|
+
200: {
|
|
923
|
+
bodyMapper: AzureTrafficCollectorListResult
|
|
924
|
+
},
|
|
925
|
+
default: {
|
|
926
|
+
bodyMapper: CloudError
|
|
927
|
+
}
|
|
928
|
+
},
|
|
929
|
+
queryParameters: [apiVersion],
|
|
930
|
+
urlParameters: [$host, subscriptionId],
|
|
931
|
+
headerParameters: [accept],
|
|
932
|
+
serializer: serializer$3
|
|
933
|
+
};
|
|
934
|
+
const listNextOperationSpec$2 = {
|
|
935
|
+
path: "{nextLink}",
|
|
936
|
+
httpMethod: "GET",
|
|
937
|
+
responses: {
|
|
938
|
+
200: {
|
|
939
|
+
bodyMapper: AzureTrafficCollectorListResult
|
|
940
|
+
},
|
|
941
|
+
default: {
|
|
942
|
+
bodyMapper: CloudError
|
|
943
|
+
}
|
|
944
|
+
},
|
|
945
|
+
queryParameters: [apiVersion],
|
|
946
|
+
urlParameters: [
|
|
947
|
+
$host,
|
|
948
|
+
subscriptionId,
|
|
949
|
+
nextLink
|
|
950
|
+
],
|
|
951
|
+
headerParameters: [accept],
|
|
952
|
+
serializer: serializer$3
|
|
953
|
+
};
|
|
954
|
+
|
|
955
|
+
/*
|
|
956
|
+
* Copyright (c) Microsoft Corporation.
|
|
957
|
+
* Licensed under the MIT License.
|
|
958
|
+
*
|
|
959
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
960
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
961
|
+
*/
|
|
962
|
+
/// <reference lib="esnext.asynciterable" />
|
|
963
|
+
/** Class containing AzureTrafficCollectorsByResourceGroup operations. */
|
|
964
|
+
class AzureTrafficCollectorsByResourceGroupImpl {
|
|
965
|
+
/**
|
|
966
|
+
* Initialize a new instance of the class AzureTrafficCollectorsByResourceGroup class.
|
|
967
|
+
* @param client Reference to the service client
|
|
968
|
+
*/
|
|
969
|
+
constructor(client) {
|
|
970
|
+
this.client = client;
|
|
971
|
+
}
|
|
972
|
+
/**
|
|
973
|
+
* Return list of Azure Traffic Collectors in a Resource Group
|
|
974
|
+
* @param resourceGroupName The name of the resource group.
|
|
975
|
+
* @param options The options parameters.
|
|
976
|
+
*/
|
|
977
|
+
list(resourceGroupName, options) {
|
|
978
|
+
const iter = this.listPagingAll(resourceGroupName, options);
|
|
979
|
+
return {
|
|
980
|
+
next() {
|
|
981
|
+
return iter.next();
|
|
982
|
+
},
|
|
983
|
+
[Symbol.asyncIterator]() {
|
|
984
|
+
return this;
|
|
985
|
+
},
|
|
986
|
+
byPage: () => {
|
|
987
|
+
return this.listPagingPage(resourceGroupName, options);
|
|
988
|
+
}
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
listPagingPage(resourceGroupName, options) {
|
|
992
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
993
|
+
let result = yield tslib.__await(this._list(resourceGroupName, options));
|
|
994
|
+
yield yield tslib.__await(result.value || []);
|
|
995
|
+
let continuationToken = result.nextLink;
|
|
996
|
+
while (continuationToken) {
|
|
997
|
+
result = yield tslib.__await(this._listNext(resourceGroupName, continuationToken, options));
|
|
998
|
+
continuationToken = result.nextLink;
|
|
999
|
+
yield yield tslib.__await(result.value || []);
|
|
1000
|
+
}
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
listPagingAll(resourceGroupName, options) {
|
|
1004
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1005
|
+
var e_1, _a;
|
|
1006
|
+
try {
|
|
1007
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1008
|
+
const page = _c.value;
|
|
1009
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1013
|
+
finally {
|
|
1014
|
+
try {
|
|
1015
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1016
|
+
}
|
|
1017
|
+
finally { if (e_1) throw e_1.error; }
|
|
1018
|
+
}
|
|
1019
|
+
});
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Return list of Azure Traffic Collectors in a Resource Group
|
|
1023
|
+
* @param resourceGroupName The name of the resource group.
|
|
1024
|
+
* @param options The options parameters.
|
|
1025
|
+
*/
|
|
1026
|
+
_list(resourceGroupName, options) {
|
|
1027
|
+
return this.client.sendOperationRequest({ resourceGroupName, options }, listOperationSpec$1);
|
|
1028
|
+
}
|
|
1029
|
+
/**
|
|
1030
|
+
* ListNext
|
|
1031
|
+
* @param resourceGroupName The name of the resource group.
|
|
1032
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1033
|
+
* @param options The options parameters.
|
|
1034
|
+
*/
|
|
1035
|
+
_listNext(resourceGroupName, nextLink, options) {
|
|
1036
|
+
return this.client.sendOperationRequest({ resourceGroupName, nextLink, options }, listNextOperationSpec$1);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
// Operation Specifications
|
|
1040
|
+
const serializer$2 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1041
|
+
const listOperationSpec$1 = {
|
|
1042
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors",
|
|
1043
|
+
httpMethod: "GET",
|
|
1044
|
+
responses: {
|
|
1045
|
+
200: {
|
|
1046
|
+
bodyMapper: AzureTrafficCollectorListResult
|
|
1047
|
+
},
|
|
1048
|
+
default: {
|
|
1049
|
+
bodyMapper: CloudError
|
|
1050
|
+
}
|
|
1051
|
+
},
|
|
1052
|
+
queryParameters: [apiVersion],
|
|
1053
|
+
urlParameters: [
|
|
1054
|
+
$host,
|
|
1055
|
+
subscriptionId,
|
|
1056
|
+
resourceGroupName
|
|
1057
|
+
],
|
|
1058
|
+
headerParameters: [accept],
|
|
1059
|
+
serializer: serializer$2
|
|
1060
|
+
};
|
|
1061
|
+
const listNextOperationSpec$1 = {
|
|
1062
|
+
path: "{nextLink}",
|
|
1063
|
+
httpMethod: "GET",
|
|
1064
|
+
responses: {
|
|
1065
|
+
200: {
|
|
1066
|
+
bodyMapper: AzureTrafficCollectorListResult
|
|
1067
|
+
},
|
|
1068
|
+
default: {
|
|
1069
|
+
bodyMapper: CloudError
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
queryParameters: [apiVersion],
|
|
1073
|
+
urlParameters: [
|
|
1074
|
+
$host,
|
|
1075
|
+
subscriptionId,
|
|
1076
|
+
nextLink,
|
|
1077
|
+
resourceGroupName
|
|
1078
|
+
],
|
|
1079
|
+
headerParameters: [accept],
|
|
1080
|
+
serializer: serializer$2
|
|
1081
|
+
};
|
|
1082
|
+
|
|
1083
|
+
/*
|
|
1084
|
+
* Copyright (c) Microsoft Corporation.
|
|
1085
|
+
* Licensed under the MIT License.
|
|
1086
|
+
*
|
|
1087
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1088
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1089
|
+
*/
|
|
1090
|
+
class LroImpl {
|
|
1091
|
+
constructor(sendOperationFn, args, spec, requestPath = spec.path, requestMethod = spec.httpMethod) {
|
|
1092
|
+
this.sendOperationFn = sendOperationFn;
|
|
1093
|
+
this.args = args;
|
|
1094
|
+
this.spec = spec;
|
|
1095
|
+
this.requestPath = requestPath;
|
|
1096
|
+
this.requestMethod = requestMethod;
|
|
1097
|
+
}
|
|
1098
|
+
sendInitialRequest() {
|
|
1099
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1100
|
+
return this.sendOperationFn(this.args, this.spec);
|
|
1101
|
+
});
|
|
1102
|
+
}
|
|
1103
|
+
sendPollRequest(path) {
|
|
1104
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1105
|
+
const _a = this.spec, restSpec = tslib.__rest(_a, ["requestBody"]);
|
|
1106
|
+
return this.sendOperationFn(this.args, Object.assign(Object.assign({}, restSpec), { path, httpMethod: "GET" }));
|
|
1107
|
+
});
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
/*
|
|
1112
|
+
* Copyright (c) Microsoft Corporation.
|
|
1113
|
+
* Licensed under the MIT License.
|
|
1114
|
+
*
|
|
1115
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1116
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1117
|
+
*/
|
|
1118
|
+
/** Class containing AzureTrafficCollectors operations. */
|
|
1119
|
+
class AzureTrafficCollectorsImpl {
|
|
1120
|
+
/**
|
|
1121
|
+
* Initialize a new instance of the class AzureTrafficCollectors class.
|
|
1122
|
+
* @param client Reference to the service client
|
|
1123
|
+
*/
|
|
1124
|
+
constructor(client) {
|
|
1125
|
+
this.client = client;
|
|
1126
|
+
}
|
|
1127
|
+
/**
|
|
1128
|
+
* Gets the specified Azure Traffic Collector in a specified resource group
|
|
1129
|
+
* @param resourceGroupName The name of the resource group.
|
|
1130
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1131
|
+
* @param options The options parameters.
|
|
1132
|
+
*/
|
|
1133
|
+
get(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1134
|
+
return this.client.sendOperationRequest({ resourceGroupName, azureTrafficCollectorName, options }, getOperationSpec$1);
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Creates or updates a Azure Traffic Collector resource
|
|
1138
|
+
* @param resourceGroupName The name of the resource group.
|
|
1139
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1140
|
+
* @param options The options parameters.
|
|
1141
|
+
*/
|
|
1142
|
+
beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1143
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1144
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1145
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1146
|
+
});
|
|
1147
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1148
|
+
var _a;
|
|
1149
|
+
let currentRawResponse = undefined;
|
|
1150
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1151
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1152
|
+
currentRawResponse = rawResponse;
|
|
1153
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1154
|
+
};
|
|
1155
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1156
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1157
|
+
return {
|
|
1158
|
+
flatResponse,
|
|
1159
|
+
rawResponse: {
|
|
1160
|
+
statusCode: currentRawResponse.status,
|
|
1161
|
+
body: currentRawResponse.parsedBody,
|
|
1162
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
});
|
|
1166
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, azureTrafficCollectorName, options }, createOrUpdateOperationSpec$1);
|
|
1167
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1168
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1169
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1170
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
1171
|
+
});
|
|
1172
|
+
yield poller.poll();
|
|
1173
|
+
return poller;
|
|
1174
|
+
});
|
|
1175
|
+
}
|
|
1176
|
+
/**
|
|
1177
|
+
* Creates or updates a Azure Traffic Collector resource
|
|
1178
|
+
* @param resourceGroupName The name of the resource group.
|
|
1179
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1180
|
+
* @param options The options parameters.
|
|
1181
|
+
*/
|
|
1182
|
+
beginCreateOrUpdateAndWait(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1183
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1184
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, options);
|
|
1185
|
+
return poller.pollUntilDone();
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
/**
|
|
1189
|
+
* Deletes a specified Azure Traffic Collector resource.
|
|
1190
|
+
* @param resourceGroupName The name of the resource group.
|
|
1191
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1192
|
+
* @param options The options parameters.
|
|
1193
|
+
*/
|
|
1194
|
+
beginDelete(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1195
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1196
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1197
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1198
|
+
});
|
|
1199
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1200
|
+
var _a;
|
|
1201
|
+
let currentRawResponse = undefined;
|
|
1202
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1203
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1204
|
+
currentRawResponse = rawResponse;
|
|
1205
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1206
|
+
};
|
|
1207
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1208
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1209
|
+
return {
|
|
1210
|
+
flatResponse,
|
|
1211
|
+
rawResponse: {
|
|
1212
|
+
statusCode: currentRawResponse.status,
|
|
1213
|
+
body: currentRawResponse.parsedBody,
|
|
1214
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
});
|
|
1218
|
+
const lro = new LroImpl(sendOperation, { resourceGroupName, azureTrafficCollectorName, options }, deleteOperationSpec$1);
|
|
1219
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1220
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1221
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1222
|
+
lroResourceLocationConfig: "location"
|
|
1223
|
+
});
|
|
1224
|
+
yield poller.poll();
|
|
1225
|
+
return poller;
|
|
1226
|
+
});
|
|
1227
|
+
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Deletes a specified Azure Traffic Collector resource.
|
|
1230
|
+
* @param resourceGroupName The name of the resource group.
|
|
1231
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1232
|
+
* @param options The options parameters.
|
|
1233
|
+
*/
|
|
1234
|
+
beginDeleteAndWait(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1235
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1236
|
+
const poller = yield this.beginDelete(resourceGroupName, azureTrafficCollectorName, options);
|
|
1237
|
+
return poller.pollUntilDone();
|
|
1238
|
+
});
|
|
1239
|
+
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Updates the specified Azure Traffic Collector tags.
|
|
1242
|
+
* @param resourceGroupName The name of the resource group.
|
|
1243
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1244
|
+
* @param parameters Parameters supplied to update Azure Traffic Collector tags.
|
|
1245
|
+
* @param options The options parameters.
|
|
1246
|
+
*/
|
|
1247
|
+
updateTags(resourceGroupName, azureTrafficCollectorName, parameters, options) {
|
|
1248
|
+
return this.client.sendOperationRequest({ resourceGroupName, azureTrafficCollectorName, parameters, options }, updateTagsOperationSpec);
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
// Operation Specifications
|
|
1252
|
+
const serializer$1 = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1253
|
+
const getOperationSpec$1 = {
|
|
1254
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}",
|
|
1255
|
+
httpMethod: "GET",
|
|
1256
|
+
responses: {
|
|
1257
|
+
200: {
|
|
1258
|
+
bodyMapper: AzureTrafficCollector
|
|
1259
|
+
},
|
|
1260
|
+
default: {
|
|
1261
|
+
bodyMapper: CloudError
|
|
1262
|
+
}
|
|
1263
|
+
},
|
|
1264
|
+
queryParameters: [apiVersion],
|
|
1265
|
+
urlParameters: [
|
|
1266
|
+
$host,
|
|
1267
|
+
subscriptionId,
|
|
1268
|
+
resourceGroupName,
|
|
1269
|
+
azureTrafficCollectorName
|
|
1270
|
+
],
|
|
1271
|
+
headerParameters: [accept],
|
|
1272
|
+
serializer: serializer$1
|
|
1273
|
+
};
|
|
1274
|
+
const createOrUpdateOperationSpec$1 = {
|
|
1275
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}",
|
|
1276
|
+
httpMethod: "PUT",
|
|
1277
|
+
responses: {
|
|
1278
|
+
200: {
|
|
1279
|
+
bodyMapper: AzureTrafficCollector
|
|
1280
|
+
},
|
|
1281
|
+
201: {
|
|
1282
|
+
bodyMapper: AzureTrafficCollector
|
|
1283
|
+
},
|
|
1284
|
+
202: {
|
|
1285
|
+
bodyMapper: AzureTrafficCollector
|
|
1286
|
+
},
|
|
1287
|
+
204: {
|
|
1288
|
+
bodyMapper: AzureTrafficCollector
|
|
1289
|
+
},
|
|
1290
|
+
default: {
|
|
1291
|
+
bodyMapper: CloudError
|
|
1292
|
+
}
|
|
1293
|
+
},
|
|
1294
|
+
requestBody: {
|
|
1295
|
+
parameterPath: {
|
|
1296
|
+
location: ["options", "location"],
|
|
1297
|
+
tags: ["options", "tags"],
|
|
1298
|
+
collectorPolicies: ["options", "collectorPolicies"],
|
|
1299
|
+
virtualHub: ["options", "virtualHub"]
|
|
1300
|
+
},
|
|
1301
|
+
mapper: Object.assign(Object.assign({}, AzureTrafficCollector), { required: true })
|
|
1302
|
+
},
|
|
1303
|
+
queryParameters: [apiVersion],
|
|
1304
|
+
urlParameters: [
|
|
1305
|
+
$host,
|
|
1306
|
+
subscriptionId,
|
|
1307
|
+
resourceGroupName,
|
|
1308
|
+
azureTrafficCollectorName
|
|
1309
|
+
],
|
|
1310
|
+
headerParameters: [accept, contentType],
|
|
1311
|
+
mediaType: "json",
|
|
1312
|
+
serializer: serializer$1
|
|
1313
|
+
};
|
|
1314
|
+
const deleteOperationSpec$1 = {
|
|
1315
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}",
|
|
1316
|
+
httpMethod: "DELETE",
|
|
1317
|
+
responses: {
|
|
1318
|
+
200: {},
|
|
1319
|
+
201: {},
|
|
1320
|
+
202: {},
|
|
1321
|
+
204: {},
|
|
1322
|
+
default: {
|
|
1323
|
+
bodyMapper: CloudError
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
queryParameters: [apiVersion],
|
|
1327
|
+
urlParameters: [
|
|
1328
|
+
$host,
|
|
1329
|
+
subscriptionId,
|
|
1330
|
+
resourceGroupName,
|
|
1331
|
+
azureTrafficCollectorName
|
|
1332
|
+
],
|
|
1333
|
+
headerParameters: [accept],
|
|
1334
|
+
serializer: serializer$1
|
|
1335
|
+
};
|
|
1336
|
+
const updateTagsOperationSpec = {
|
|
1337
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}",
|
|
1338
|
+
httpMethod: "PATCH",
|
|
1339
|
+
responses: {
|
|
1340
|
+
200: {
|
|
1341
|
+
bodyMapper: AzureTrafficCollector
|
|
1342
|
+
},
|
|
1343
|
+
default: {
|
|
1344
|
+
bodyMapper: CloudError
|
|
1345
|
+
}
|
|
1346
|
+
},
|
|
1347
|
+
requestBody: parameters1,
|
|
1348
|
+
queryParameters: [apiVersion],
|
|
1349
|
+
urlParameters: [
|
|
1350
|
+
$host,
|
|
1351
|
+
subscriptionId,
|
|
1352
|
+
resourceGroupName,
|
|
1353
|
+
azureTrafficCollectorName
|
|
1354
|
+
],
|
|
1355
|
+
headerParameters: [accept, contentType],
|
|
1356
|
+
mediaType: "json",
|
|
1357
|
+
serializer: serializer$1
|
|
1358
|
+
};
|
|
1359
|
+
|
|
1360
|
+
/*
|
|
1361
|
+
* Copyright (c) Microsoft Corporation.
|
|
1362
|
+
* Licensed under the MIT License.
|
|
1363
|
+
*
|
|
1364
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1365
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1366
|
+
*/
|
|
1367
|
+
/// <reference lib="esnext.asynciterable" />
|
|
1368
|
+
/** Class containing CollectorPolicies operations. */
|
|
1369
|
+
class CollectorPoliciesImpl {
|
|
1370
|
+
/**
|
|
1371
|
+
* Initialize a new instance of the class CollectorPolicies class.
|
|
1372
|
+
* @param client Reference to the service client
|
|
1373
|
+
*/
|
|
1374
|
+
constructor(client) {
|
|
1375
|
+
this.client = client;
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Return list of Collector policies in a Azure Traffic Collector
|
|
1379
|
+
* @param resourceGroupName The name of the resource group.
|
|
1380
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1381
|
+
* @param options The options parameters.
|
|
1382
|
+
*/
|
|
1383
|
+
list(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1384
|
+
const iter = this.listPagingAll(resourceGroupName, azureTrafficCollectorName, options);
|
|
1385
|
+
return {
|
|
1386
|
+
next() {
|
|
1387
|
+
return iter.next();
|
|
1388
|
+
},
|
|
1389
|
+
[Symbol.asyncIterator]() {
|
|
1390
|
+
return this;
|
|
1391
|
+
},
|
|
1392
|
+
byPage: () => {
|
|
1393
|
+
return this.listPagingPage(resourceGroupName, azureTrafficCollectorName, options);
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1396
|
+
}
|
|
1397
|
+
listPagingPage(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1398
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingPage_1() {
|
|
1399
|
+
let result = yield tslib.__await(this._list(resourceGroupName, azureTrafficCollectorName, options));
|
|
1400
|
+
yield yield tslib.__await(result.value || []);
|
|
1401
|
+
let continuationToken = result.nextLink;
|
|
1402
|
+
while (continuationToken) {
|
|
1403
|
+
result = yield tslib.__await(this._listNext(resourceGroupName, azureTrafficCollectorName, continuationToken, options));
|
|
1404
|
+
continuationToken = result.nextLink;
|
|
1405
|
+
yield yield tslib.__await(result.value || []);
|
|
1406
|
+
}
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
listPagingAll(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1410
|
+
return tslib.__asyncGenerator(this, arguments, function* listPagingAll_1() {
|
|
1411
|
+
var e_1, _a;
|
|
1412
|
+
try {
|
|
1413
|
+
for (var _b = tslib.__asyncValues(this.listPagingPage(resourceGroupName, azureTrafficCollectorName, options)), _c; _c = yield tslib.__await(_b.next()), !_c.done;) {
|
|
1414
|
+
const page = _c.value;
|
|
1415
|
+
yield tslib.__await(yield* tslib.__asyncDelegator(tslib.__asyncValues(page)));
|
|
1416
|
+
}
|
|
1417
|
+
}
|
|
1418
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1419
|
+
finally {
|
|
1420
|
+
try {
|
|
1421
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib.__await(_a.call(_b));
|
|
1422
|
+
}
|
|
1423
|
+
finally { if (e_1) throw e_1.error; }
|
|
1424
|
+
}
|
|
1425
|
+
});
|
|
1426
|
+
}
|
|
1427
|
+
/**
|
|
1428
|
+
* Return list of Collector policies in a Azure Traffic Collector
|
|
1429
|
+
* @param resourceGroupName The name of the resource group.
|
|
1430
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1431
|
+
* @param options The options parameters.
|
|
1432
|
+
*/
|
|
1433
|
+
_list(resourceGroupName, azureTrafficCollectorName, options) {
|
|
1434
|
+
return this.client.sendOperationRequest({ resourceGroupName, azureTrafficCollectorName, options }, listOperationSpec);
|
|
1435
|
+
}
|
|
1436
|
+
/**
|
|
1437
|
+
* Gets the collector policy in a specified Traffic Collector
|
|
1438
|
+
* @param resourceGroupName The name of the resource group.
|
|
1439
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1440
|
+
* @param collectorPolicyName Collector Policy Name
|
|
1441
|
+
* @param options The options parameters.
|
|
1442
|
+
*/
|
|
1443
|
+
get(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
|
|
1444
|
+
return this.client.sendOperationRequest({
|
|
1445
|
+
resourceGroupName,
|
|
1446
|
+
azureTrafficCollectorName,
|
|
1447
|
+
collectorPolicyName,
|
|
1448
|
+
options
|
|
1449
|
+
}, getOperationSpec);
|
|
1450
|
+
}
|
|
1451
|
+
/**
|
|
1452
|
+
* Creates or updates a Collector Policy resource
|
|
1453
|
+
* @param resourceGroupName The name of the resource group.
|
|
1454
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1455
|
+
* @param collectorPolicyName Collector Policy Name
|
|
1456
|
+
* @param options The options parameters.
|
|
1457
|
+
*/
|
|
1458
|
+
beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
|
|
1459
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1460
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1461
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1462
|
+
});
|
|
1463
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1464
|
+
var _a;
|
|
1465
|
+
let currentRawResponse = undefined;
|
|
1466
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1467
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1468
|
+
currentRawResponse = rawResponse;
|
|
1469
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1470
|
+
};
|
|
1471
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1472
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1473
|
+
return {
|
|
1474
|
+
flatResponse,
|
|
1475
|
+
rawResponse: {
|
|
1476
|
+
statusCode: currentRawResponse.status,
|
|
1477
|
+
body: currentRawResponse.parsedBody,
|
|
1478
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1479
|
+
}
|
|
1480
|
+
};
|
|
1481
|
+
});
|
|
1482
|
+
const lro = new LroImpl(sendOperation, {
|
|
1483
|
+
resourceGroupName,
|
|
1484
|
+
azureTrafficCollectorName,
|
|
1485
|
+
collectorPolicyName,
|
|
1486
|
+
options
|
|
1487
|
+
}, createOrUpdateOperationSpec);
|
|
1488
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1489
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1490
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1491
|
+
lroResourceLocationConfig: "azure-async-operation"
|
|
1492
|
+
});
|
|
1493
|
+
yield poller.poll();
|
|
1494
|
+
return poller;
|
|
1495
|
+
});
|
|
1496
|
+
}
|
|
1497
|
+
/**
|
|
1498
|
+
* Creates or updates a Collector Policy resource
|
|
1499
|
+
* @param resourceGroupName The name of the resource group.
|
|
1500
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1501
|
+
* @param collectorPolicyName Collector Policy Name
|
|
1502
|
+
* @param options The options parameters.
|
|
1503
|
+
*/
|
|
1504
|
+
beginCreateOrUpdateAndWait(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
|
|
1505
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1506
|
+
const poller = yield this.beginCreateOrUpdate(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options);
|
|
1507
|
+
return poller.pollUntilDone();
|
|
1508
|
+
});
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* Deletes a specified Collector Policy resource.
|
|
1512
|
+
* @param resourceGroupName The name of the resource group.
|
|
1513
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1514
|
+
* @param collectorPolicyName Collector Policy Name
|
|
1515
|
+
* @param options The options parameters.
|
|
1516
|
+
*/
|
|
1517
|
+
beginDelete(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
|
|
1518
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1519
|
+
const directSendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1520
|
+
return this.client.sendOperationRequest(args, spec);
|
|
1521
|
+
});
|
|
1522
|
+
const sendOperation = (args, spec) => tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1523
|
+
var _a;
|
|
1524
|
+
let currentRawResponse = undefined;
|
|
1525
|
+
const providedCallback = (_a = args.options) === null || _a === void 0 ? void 0 : _a.onResponse;
|
|
1526
|
+
const callback = (rawResponse, flatResponse) => {
|
|
1527
|
+
currentRawResponse = rawResponse;
|
|
1528
|
+
providedCallback === null || providedCallback === void 0 ? void 0 : providedCallback(rawResponse, flatResponse);
|
|
1529
|
+
};
|
|
1530
|
+
const updatedArgs = Object.assign(Object.assign({}, args), { options: Object.assign(Object.assign({}, args.options), { onResponse: callback }) });
|
|
1531
|
+
const flatResponse = yield directSendOperation(updatedArgs, spec);
|
|
1532
|
+
return {
|
|
1533
|
+
flatResponse,
|
|
1534
|
+
rawResponse: {
|
|
1535
|
+
statusCode: currentRawResponse.status,
|
|
1536
|
+
body: currentRawResponse.parsedBody,
|
|
1537
|
+
headers: currentRawResponse.headers.toJSON()
|
|
1538
|
+
}
|
|
1539
|
+
};
|
|
1540
|
+
});
|
|
1541
|
+
const lro = new LroImpl(sendOperation, {
|
|
1542
|
+
resourceGroupName,
|
|
1543
|
+
azureTrafficCollectorName,
|
|
1544
|
+
collectorPolicyName,
|
|
1545
|
+
options
|
|
1546
|
+
}, deleteOperationSpec);
|
|
1547
|
+
const poller = new coreLro.LroEngine(lro, {
|
|
1548
|
+
resumeFrom: options === null || options === void 0 ? void 0 : options.resumeFrom,
|
|
1549
|
+
intervalInMs: options === null || options === void 0 ? void 0 : options.updateIntervalInMs,
|
|
1550
|
+
lroResourceLocationConfig: "location"
|
|
1551
|
+
});
|
|
1552
|
+
yield poller.poll();
|
|
1553
|
+
return poller;
|
|
1554
|
+
});
|
|
1555
|
+
}
|
|
1556
|
+
/**
|
|
1557
|
+
* Deletes a specified Collector Policy resource.
|
|
1558
|
+
* @param resourceGroupName The name of the resource group.
|
|
1559
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1560
|
+
* @param collectorPolicyName Collector Policy Name
|
|
1561
|
+
* @param options The options parameters.
|
|
1562
|
+
*/
|
|
1563
|
+
beginDeleteAndWait(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options) {
|
|
1564
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1565
|
+
const poller = yield this.beginDelete(resourceGroupName, azureTrafficCollectorName, collectorPolicyName, options);
|
|
1566
|
+
return poller.pollUntilDone();
|
|
1567
|
+
});
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* ListNext
|
|
1571
|
+
* @param resourceGroupName The name of the resource group.
|
|
1572
|
+
* @param azureTrafficCollectorName Azure Traffic Collector name
|
|
1573
|
+
* @param nextLink The nextLink from the previous successful call to the List method.
|
|
1574
|
+
* @param options The options parameters.
|
|
1575
|
+
*/
|
|
1576
|
+
_listNext(resourceGroupName, azureTrafficCollectorName, nextLink, options) {
|
|
1577
|
+
return this.client.sendOperationRequest({ resourceGroupName, azureTrafficCollectorName, nextLink, options }, listNextOperationSpec);
|
|
1578
|
+
}
|
|
1579
|
+
}
|
|
1580
|
+
// Operation Specifications
|
|
1581
|
+
const serializer = coreClient__namespace.createSerializer(Mappers, /* isXml */ false);
|
|
1582
|
+
const listOperationSpec = {
|
|
1583
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies",
|
|
1584
|
+
httpMethod: "GET",
|
|
1585
|
+
responses: {
|
|
1586
|
+
200: {
|
|
1587
|
+
bodyMapper: CollectorPolicyListResult
|
|
1588
|
+
},
|
|
1589
|
+
default: {
|
|
1590
|
+
bodyMapper: CloudError
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
queryParameters: [apiVersion],
|
|
1594
|
+
urlParameters: [
|
|
1595
|
+
$host,
|
|
1596
|
+
subscriptionId,
|
|
1597
|
+
resourceGroupName,
|
|
1598
|
+
azureTrafficCollectorName
|
|
1599
|
+
],
|
|
1600
|
+
headerParameters: [accept],
|
|
1601
|
+
serializer
|
|
1602
|
+
};
|
|
1603
|
+
const getOperationSpec = {
|
|
1604
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
|
|
1605
|
+
httpMethod: "GET",
|
|
1606
|
+
responses: {
|
|
1607
|
+
200: {
|
|
1608
|
+
bodyMapper: CollectorPolicy
|
|
1609
|
+
},
|
|
1610
|
+
default: {
|
|
1611
|
+
bodyMapper: CloudError
|
|
1612
|
+
}
|
|
1613
|
+
},
|
|
1614
|
+
queryParameters: [apiVersion],
|
|
1615
|
+
urlParameters: [
|
|
1616
|
+
$host,
|
|
1617
|
+
subscriptionId,
|
|
1618
|
+
resourceGroupName,
|
|
1619
|
+
azureTrafficCollectorName,
|
|
1620
|
+
collectorPolicyName
|
|
1621
|
+
],
|
|
1622
|
+
headerParameters: [accept],
|
|
1623
|
+
serializer
|
|
1624
|
+
};
|
|
1625
|
+
const createOrUpdateOperationSpec = {
|
|
1626
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
|
|
1627
|
+
httpMethod: "PUT",
|
|
1628
|
+
responses: {
|
|
1629
|
+
200: {
|
|
1630
|
+
bodyMapper: CollectorPolicy
|
|
1631
|
+
},
|
|
1632
|
+
201: {
|
|
1633
|
+
bodyMapper: CollectorPolicy
|
|
1634
|
+
},
|
|
1635
|
+
202: {
|
|
1636
|
+
bodyMapper: CollectorPolicy
|
|
1637
|
+
},
|
|
1638
|
+
204: {
|
|
1639
|
+
bodyMapper: CollectorPolicy
|
|
1640
|
+
},
|
|
1641
|
+
default: {
|
|
1642
|
+
bodyMapper: CloudError
|
|
1643
|
+
}
|
|
1644
|
+
},
|
|
1645
|
+
requestBody: {
|
|
1646
|
+
parameterPath: {
|
|
1647
|
+
ingestionPolicy: ["options", "ingestionPolicy"],
|
|
1648
|
+
emissionPolicies: ["options", "emissionPolicies"]
|
|
1649
|
+
},
|
|
1650
|
+
mapper: Object.assign(Object.assign({}, CollectorPolicy), { required: true })
|
|
1651
|
+
},
|
|
1652
|
+
queryParameters: [apiVersion],
|
|
1653
|
+
urlParameters: [
|
|
1654
|
+
$host,
|
|
1655
|
+
subscriptionId,
|
|
1656
|
+
resourceGroupName,
|
|
1657
|
+
azureTrafficCollectorName,
|
|
1658
|
+
collectorPolicyName
|
|
1659
|
+
],
|
|
1660
|
+
headerParameters: [accept, contentType],
|
|
1661
|
+
mediaType: "json",
|
|
1662
|
+
serializer
|
|
1663
|
+
};
|
|
1664
|
+
const deleteOperationSpec = {
|
|
1665
|
+
path: "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetworkFunction/azureTrafficCollectors/{azureTrafficCollectorName}/collectorPolicies/{collectorPolicyName}",
|
|
1666
|
+
httpMethod: "DELETE",
|
|
1667
|
+
responses: {
|
|
1668
|
+
200: {},
|
|
1669
|
+
201: {},
|
|
1670
|
+
202: {},
|
|
1671
|
+
204: {},
|
|
1672
|
+
default: {
|
|
1673
|
+
bodyMapper: CloudError
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
queryParameters: [apiVersion],
|
|
1677
|
+
urlParameters: [
|
|
1678
|
+
$host,
|
|
1679
|
+
subscriptionId,
|
|
1680
|
+
resourceGroupName,
|
|
1681
|
+
azureTrafficCollectorName,
|
|
1682
|
+
collectorPolicyName
|
|
1683
|
+
],
|
|
1684
|
+
headerParameters: [accept],
|
|
1685
|
+
serializer
|
|
1686
|
+
};
|
|
1687
|
+
const listNextOperationSpec = {
|
|
1688
|
+
path: "{nextLink}",
|
|
1689
|
+
httpMethod: "GET",
|
|
1690
|
+
responses: {
|
|
1691
|
+
200: {
|
|
1692
|
+
bodyMapper: CollectorPolicyListResult
|
|
1693
|
+
},
|
|
1694
|
+
default: {
|
|
1695
|
+
bodyMapper: CloudError
|
|
1696
|
+
}
|
|
1697
|
+
},
|
|
1698
|
+
queryParameters: [apiVersion],
|
|
1699
|
+
urlParameters: [
|
|
1700
|
+
$host,
|
|
1701
|
+
subscriptionId,
|
|
1702
|
+
nextLink,
|
|
1703
|
+
resourceGroupName,
|
|
1704
|
+
azureTrafficCollectorName
|
|
1705
|
+
],
|
|
1706
|
+
headerParameters: [accept],
|
|
1707
|
+
serializer
|
|
1708
|
+
};
|
|
1709
|
+
|
|
1710
|
+
/*
|
|
1711
|
+
* Copyright (c) Microsoft Corporation.
|
|
1712
|
+
* Licensed under the MIT License.
|
|
1713
|
+
*
|
|
1714
|
+
* Code generated by Microsoft (R) AutoRest Code Generator.
|
|
1715
|
+
* Changes may cause incorrect behavior and will be lost if the code is regenerated.
|
|
1716
|
+
*/
|
|
1717
|
+
class AzureTrafficCollectorClient extends coreClient__namespace.ServiceClient {
|
|
1718
|
+
/**
|
|
1719
|
+
* Initializes a new instance of the AzureTrafficCollectorClient class.
|
|
1720
|
+
* @param credentials Subscription credentials which uniquely identify client subscription.
|
|
1721
|
+
* @param subscriptionId Azure Subscription ID.
|
|
1722
|
+
* @param options The parameter options
|
|
1723
|
+
*/
|
|
1724
|
+
constructor(credentials, subscriptionId, options) {
|
|
1725
|
+
var _a, _b;
|
|
1726
|
+
if (credentials === undefined) {
|
|
1727
|
+
throw new Error("'credentials' cannot be null");
|
|
1728
|
+
}
|
|
1729
|
+
if (subscriptionId === undefined) {
|
|
1730
|
+
throw new Error("'subscriptionId' cannot be null");
|
|
1731
|
+
}
|
|
1732
|
+
// Initializing default values for options
|
|
1733
|
+
if (!options) {
|
|
1734
|
+
options = {};
|
|
1735
|
+
}
|
|
1736
|
+
const defaults = {
|
|
1737
|
+
requestContentType: "application/json; charset=utf-8",
|
|
1738
|
+
credential: credentials
|
|
1739
|
+
};
|
|
1740
|
+
const packageDetails = `azsdk-js-arm-networkfunction/1.0.0`;
|
|
1741
|
+
const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix
|
|
1742
|
+
? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}`
|
|
1743
|
+
: `${packageDetails}`;
|
|
1744
|
+
if (!options.credentialScopes) {
|
|
1745
|
+
options.credentialScopes = ["https://management.azure.com/.default"];
|
|
1746
|
+
}
|
|
1747
|
+
const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: {
|
|
1748
|
+
userAgentPrefix
|
|
1749
|
+
}, baseUri: (_b = (_a = options.endpoint) !== null && _a !== void 0 ? _a : options.baseUri) !== null && _b !== void 0 ? _b : "https://management.azure.com" });
|
|
1750
|
+
super(optionsWithDefaults);
|
|
1751
|
+
if ((options === null || options === void 0 ? void 0 : options.pipeline) && options.pipeline.getOrderedPolicies().length > 0) {
|
|
1752
|
+
const pipelinePolicies = options.pipeline.getOrderedPolicies();
|
|
1753
|
+
const bearerTokenAuthenticationPolicyFound = pipelinePolicies.some((pipelinePolicy) => pipelinePolicy.name ===
|
|
1754
|
+
coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName);
|
|
1755
|
+
if (!bearerTokenAuthenticationPolicyFound) {
|
|
1756
|
+
this.pipeline.removePolicy({
|
|
1757
|
+
name: coreRestPipeline__namespace.bearerTokenAuthenticationPolicyName
|
|
1758
|
+
});
|
|
1759
|
+
this.pipeline.addPolicy(coreRestPipeline__namespace.bearerTokenAuthenticationPolicy({
|
|
1760
|
+
scopes: `${optionsWithDefaults.baseUri}/.default`,
|
|
1761
|
+
challengeCallbacks: {
|
|
1762
|
+
authorizeRequestOnChallenge: coreClient__namespace.authorizeRequestOnClaimChallenge
|
|
1763
|
+
}
|
|
1764
|
+
}));
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
// Parameter assignments
|
|
1768
|
+
this.subscriptionId = subscriptionId;
|
|
1769
|
+
// Assigning values to Constant parameters
|
|
1770
|
+
this.$host = options.$host || "https://management.azure.com";
|
|
1771
|
+
this.apiVersion = options.apiVersion || "2022-05-01";
|
|
1772
|
+
this.networkFunction = new NetworkFunctionImpl(this);
|
|
1773
|
+
this.azureTrafficCollectorsBySubscription = new AzureTrafficCollectorsBySubscriptionImpl(this);
|
|
1774
|
+
this.azureTrafficCollectorsByResourceGroup = new AzureTrafficCollectorsByResourceGroupImpl(this);
|
|
1775
|
+
this.azureTrafficCollectors = new AzureTrafficCollectorsImpl(this);
|
|
1776
|
+
this.collectorPolicies = new CollectorPoliciesImpl(this);
|
|
1777
|
+
this.addCustomApiVersionPolicy(options.apiVersion);
|
|
1778
|
+
}
|
|
1779
|
+
/** A function that adds a policy that sets the api-version (or equivalent) to reflect the library version. */
|
|
1780
|
+
addCustomApiVersionPolicy(apiVersion) {
|
|
1781
|
+
if (!apiVersion) {
|
|
1782
|
+
return;
|
|
1783
|
+
}
|
|
1784
|
+
const apiVersionPolicy = {
|
|
1785
|
+
name: "CustomApiVersionPolicy",
|
|
1786
|
+
sendRequest(request, next) {
|
|
1787
|
+
return tslib.__awaiter(this, void 0, void 0, function* () {
|
|
1788
|
+
const param = request.url.split("?");
|
|
1789
|
+
if (param.length > 1) {
|
|
1790
|
+
const newParams = param[1].split("&").map((item) => {
|
|
1791
|
+
if (item.indexOf("api-version") > -1) {
|
|
1792
|
+
return "api-version=" + apiVersion;
|
|
1793
|
+
}
|
|
1794
|
+
else {
|
|
1795
|
+
return item;
|
|
1796
|
+
}
|
|
1797
|
+
});
|
|
1798
|
+
request.url = param[0] + "?" + newParams.join("&");
|
|
1799
|
+
}
|
|
1800
|
+
return next(request);
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
};
|
|
1804
|
+
this.pipeline.addPolicy(apiVersionPolicy);
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
|
|
1808
|
+
exports.AzureTrafficCollectorClient = AzureTrafficCollectorClient;
|
|
1809
|
+
//# sourceMappingURL=index.js.map
|