@aws-sdk/client-xray 3.183.0 → 3.186.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 (50) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist-cjs/protocols/Aws_restJson1.js +2 -2
  3. package/dist-es/XRay.js +117 -110
  4. package/dist-es/XRayClient.js +28 -22
  5. package/dist-es/commands/BatchGetTracesCommand.js +28 -21
  6. package/dist-es/commands/CreateGroupCommand.js +28 -21
  7. package/dist-es/commands/CreateSamplingRuleCommand.js +28 -21
  8. package/dist-es/commands/DeleteGroupCommand.js +28 -21
  9. package/dist-es/commands/DeleteSamplingRuleCommand.js +28 -21
  10. package/dist-es/commands/GetEncryptionConfigCommand.js +28 -21
  11. package/dist-es/commands/GetGroupCommand.js +28 -21
  12. package/dist-es/commands/GetGroupsCommand.js +28 -21
  13. package/dist-es/commands/GetInsightCommand.js +28 -21
  14. package/dist-es/commands/GetInsightEventsCommand.js +28 -21
  15. package/dist-es/commands/GetInsightImpactGraphCommand.js +28 -21
  16. package/dist-es/commands/GetInsightSummariesCommand.js +28 -21
  17. package/dist-es/commands/GetSamplingRulesCommand.js +28 -21
  18. package/dist-es/commands/GetSamplingStatisticSummariesCommand.js +28 -21
  19. package/dist-es/commands/GetSamplingTargetsCommand.js +28 -21
  20. package/dist-es/commands/GetServiceGraphCommand.js +28 -21
  21. package/dist-es/commands/GetTimeSeriesServiceStatisticsCommand.js +28 -21
  22. package/dist-es/commands/GetTraceGraphCommand.js +28 -21
  23. package/dist-es/commands/GetTraceSummariesCommand.js +28 -21
  24. package/dist-es/commands/ListTagsForResourceCommand.js +28 -21
  25. package/dist-es/commands/PutEncryptionConfigCommand.js +28 -21
  26. package/dist-es/commands/PutTelemetryRecordsCommand.js +28 -21
  27. package/dist-es/commands/PutTraceSegmentsCommand.js +28 -21
  28. package/dist-es/commands/TagResourceCommand.js +28 -21
  29. package/dist-es/commands/UntagResourceCommand.js +28 -21
  30. package/dist-es/commands/UpdateGroupCommand.js +28 -21
  31. package/dist-es/commands/UpdateSamplingRuleCommand.js +28 -21
  32. package/dist-es/endpoints.js +8 -8
  33. package/dist-es/models/XRayServiceException.js +10 -5
  34. package/dist-es/models/models_0.js +180 -393
  35. package/dist-es/pagination/BatchGetTracesPaginator.js +67 -24
  36. package/dist-es/pagination/GetGroupsPaginator.js +67 -24
  37. package/dist-es/pagination/GetInsightEventsPaginator.js +68 -25
  38. package/dist-es/pagination/GetInsightSummariesPaginator.js +68 -25
  39. package/dist-es/pagination/GetSamplingRulesPaginator.js +67 -24
  40. package/dist-es/pagination/GetSamplingStatisticSummariesPaginator.js +67 -24
  41. package/dist-es/pagination/GetServiceGraphPaginator.js +67 -24
  42. package/dist-es/pagination/GetTimeSeriesServiceStatisticsPaginator.js +67 -24
  43. package/dist-es/pagination/GetTraceGraphPaginator.js +67 -24
  44. package/dist-es/pagination/GetTraceSummariesPaginator.js +67 -24
  45. package/dist-es/protocols/Aws_restJson1.js +2708 -2041
  46. package/dist-es/runtimeConfig.browser.js +12 -26
  47. package/dist-es/runtimeConfig.js +12 -30
  48. package/dist-es/runtimeConfig.native.js +5 -8
  49. package/dist-es/runtimeConfig.shared.js +11 -8
  50. package/package.json +33 -33
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.186.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.185.0...v3.186.0) (2022-10-06)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-xray
9
+
10
+
11
+
12
+
13
+
14
+ # [3.185.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.184.0...v3.185.0) (2022-10-05)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **codegen:** add deser check for x-amz-request-id ([#4015](https://github.com/aws/aws-sdk-js-v3/issues/4015)) ([6ff07bd](https://github.com/aws/aws-sdk-js-v3/commit/6ff07bd7e72bd56725f318013ac1d6d0fbbcdd9a))
20
+
21
+
22
+
23
+
24
+
6
25
  # [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
26
 
8
27
  **Note:** Version bump only for package @aws-sdk/client-xray
@@ -2878,10 +2878,10 @@ const deserializeAws_restJson1ValueWithServiceIds = (output, context) => {
2878
2878
  };
2879
2879
  };
2880
2880
  const deserializeMetadata = (output) => {
2881
- var _a;
2881
+ var _a, _b;
2882
2882
  return ({
2883
2883
  httpStatusCode: output.statusCode,
2884
- requestId: (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"],
2884
+ requestId: (_b = (_a = output.headers["x-amzn-requestid"]) !== null && _a !== void 0 ? _a : output.headers["x-amzn-request-id"]) !== null && _b !== void 0 ? _b : output.headers["x-amz-request-id"],
2885
2885
  extendedRequestId: output.headers["x-amz-id-2"],
2886
2886
  cfId: output.headers["x-amz-cf-id"],
2887
2887
  });
package/dist-es/XRay.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { __extends } from "tslib";
1
2
  import { BatchGetTracesCommand, } from "./commands/BatchGetTracesCommand";
2
3
  import { CreateGroupCommand } from "./commands/CreateGroupCommand";
3
4
  import { CreateSamplingRuleCommand, } from "./commands/CreateSamplingRuleCommand";
@@ -26,383 +27,389 @@ import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
26
27
  import { UpdateGroupCommand } from "./commands/UpdateGroupCommand";
27
28
  import { UpdateSamplingRuleCommand, } from "./commands/UpdateSamplingRuleCommand";
28
29
  import { XRayClient } from "./XRayClient";
29
- export class XRay extends XRayClient {
30
- batchGetTraces(args, optionsOrCb, cb) {
31
- const command = new BatchGetTracesCommand(args);
30
+ var XRay = (function (_super) {
31
+ __extends(XRay, _super);
32
+ function XRay() {
33
+ return _super !== null && _super.apply(this, arguments) || this;
34
+ }
35
+ XRay.prototype.batchGetTraces = function (args, optionsOrCb, cb) {
36
+ var command = new BatchGetTracesCommand(args);
32
37
  if (typeof optionsOrCb === "function") {
33
38
  this.send(command, optionsOrCb);
34
39
  }
35
40
  else if (typeof cb === "function") {
36
41
  if (typeof optionsOrCb !== "object")
37
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
42
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
38
43
  this.send(command, optionsOrCb || {}, cb);
39
44
  }
40
45
  else {
41
46
  return this.send(command, optionsOrCb);
42
47
  }
43
- }
44
- createGroup(args, optionsOrCb, cb) {
45
- const command = new CreateGroupCommand(args);
48
+ };
49
+ XRay.prototype.createGroup = function (args, optionsOrCb, cb) {
50
+ var command = new CreateGroupCommand(args);
46
51
  if (typeof optionsOrCb === "function") {
47
52
  this.send(command, optionsOrCb);
48
53
  }
49
54
  else if (typeof cb === "function") {
50
55
  if (typeof optionsOrCb !== "object")
51
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
56
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
52
57
  this.send(command, optionsOrCb || {}, cb);
53
58
  }
54
59
  else {
55
60
  return this.send(command, optionsOrCb);
56
61
  }
57
- }
58
- createSamplingRule(args, optionsOrCb, cb) {
59
- const command = new CreateSamplingRuleCommand(args);
62
+ };
63
+ XRay.prototype.createSamplingRule = function (args, optionsOrCb, cb) {
64
+ var command = new CreateSamplingRuleCommand(args);
60
65
  if (typeof optionsOrCb === "function") {
61
66
  this.send(command, optionsOrCb);
62
67
  }
63
68
  else if (typeof cb === "function") {
64
69
  if (typeof optionsOrCb !== "object")
65
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
70
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
66
71
  this.send(command, optionsOrCb || {}, cb);
67
72
  }
68
73
  else {
69
74
  return this.send(command, optionsOrCb);
70
75
  }
71
- }
72
- deleteGroup(args, optionsOrCb, cb) {
73
- const command = new DeleteGroupCommand(args);
76
+ };
77
+ XRay.prototype.deleteGroup = function (args, optionsOrCb, cb) {
78
+ var command = new DeleteGroupCommand(args);
74
79
  if (typeof optionsOrCb === "function") {
75
80
  this.send(command, optionsOrCb);
76
81
  }
77
82
  else if (typeof cb === "function") {
78
83
  if (typeof optionsOrCb !== "object")
79
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
84
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
80
85
  this.send(command, optionsOrCb || {}, cb);
81
86
  }
82
87
  else {
83
88
  return this.send(command, optionsOrCb);
84
89
  }
85
- }
86
- deleteSamplingRule(args, optionsOrCb, cb) {
87
- const command = new DeleteSamplingRuleCommand(args);
90
+ };
91
+ XRay.prototype.deleteSamplingRule = function (args, optionsOrCb, cb) {
92
+ var command = new DeleteSamplingRuleCommand(args);
88
93
  if (typeof optionsOrCb === "function") {
89
94
  this.send(command, optionsOrCb);
90
95
  }
91
96
  else if (typeof cb === "function") {
92
97
  if (typeof optionsOrCb !== "object")
93
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
98
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
94
99
  this.send(command, optionsOrCb || {}, cb);
95
100
  }
96
101
  else {
97
102
  return this.send(command, optionsOrCb);
98
103
  }
99
- }
100
- getEncryptionConfig(args, optionsOrCb, cb) {
101
- const command = new GetEncryptionConfigCommand(args);
104
+ };
105
+ XRay.prototype.getEncryptionConfig = function (args, optionsOrCb, cb) {
106
+ var command = new GetEncryptionConfigCommand(args);
102
107
  if (typeof optionsOrCb === "function") {
103
108
  this.send(command, optionsOrCb);
104
109
  }
105
110
  else if (typeof cb === "function") {
106
111
  if (typeof optionsOrCb !== "object")
107
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
112
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
108
113
  this.send(command, optionsOrCb || {}, cb);
109
114
  }
110
115
  else {
111
116
  return this.send(command, optionsOrCb);
112
117
  }
113
- }
114
- getGroup(args, optionsOrCb, cb) {
115
- const command = new GetGroupCommand(args);
118
+ };
119
+ XRay.prototype.getGroup = function (args, optionsOrCb, cb) {
120
+ var command = new GetGroupCommand(args);
116
121
  if (typeof optionsOrCb === "function") {
117
122
  this.send(command, optionsOrCb);
118
123
  }
119
124
  else if (typeof cb === "function") {
120
125
  if (typeof optionsOrCb !== "object")
121
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
126
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
122
127
  this.send(command, optionsOrCb || {}, cb);
123
128
  }
124
129
  else {
125
130
  return this.send(command, optionsOrCb);
126
131
  }
127
- }
128
- getGroups(args, optionsOrCb, cb) {
129
- const command = new GetGroupsCommand(args);
132
+ };
133
+ XRay.prototype.getGroups = function (args, optionsOrCb, cb) {
134
+ var command = new GetGroupsCommand(args);
130
135
  if (typeof optionsOrCb === "function") {
131
136
  this.send(command, optionsOrCb);
132
137
  }
133
138
  else if (typeof cb === "function") {
134
139
  if (typeof optionsOrCb !== "object")
135
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
140
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
136
141
  this.send(command, optionsOrCb || {}, cb);
137
142
  }
138
143
  else {
139
144
  return this.send(command, optionsOrCb);
140
145
  }
141
- }
142
- getInsight(args, optionsOrCb, cb) {
143
- const command = new GetInsightCommand(args);
146
+ };
147
+ XRay.prototype.getInsight = function (args, optionsOrCb, cb) {
148
+ var command = new GetInsightCommand(args);
144
149
  if (typeof optionsOrCb === "function") {
145
150
  this.send(command, optionsOrCb);
146
151
  }
147
152
  else if (typeof cb === "function") {
148
153
  if (typeof optionsOrCb !== "object")
149
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
154
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
150
155
  this.send(command, optionsOrCb || {}, cb);
151
156
  }
152
157
  else {
153
158
  return this.send(command, optionsOrCb);
154
159
  }
155
- }
156
- getInsightEvents(args, optionsOrCb, cb) {
157
- const command = new GetInsightEventsCommand(args);
160
+ };
161
+ XRay.prototype.getInsightEvents = function (args, optionsOrCb, cb) {
162
+ var command = new GetInsightEventsCommand(args);
158
163
  if (typeof optionsOrCb === "function") {
159
164
  this.send(command, optionsOrCb);
160
165
  }
161
166
  else if (typeof cb === "function") {
162
167
  if (typeof optionsOrCb !== "object")
163
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
168
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
164
169
  this.send(command, optionsOrCb || {}, cb);
165
170
  }
166
171
  else {
167
172
  return this.send(command, optionsOrCb);
168
173
  }
169
- }
170
- getInsightImpactGraph(args, optionsOrCb, cb) {
171
- const command = new GetInsightImpactGraphCommand(args);
174
+ };
175
+ XRay.prototype.getInsightImpactGraph = function (args, optionsOrCb, cb) {
176
+ var command = new GetInsightImpactGraphCommand(args);
172
177
  if (typeof optionsOrCb === "function") {
173
178
  this.send(command, optionsOrCb);
174
179
  }
175
180
  else if (typeof cb === "function") {
176
181
  if (typeof optionsOrCb !== "object")
177
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
182
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
178
183
  this.send(command, optionsOrCb || {}, cb);
179
184
  }
180
185
  else {
181
186
  return this.send(command, optionsOrCb);
182
187
  }
183
- }
184
- getInsightSummaries(args, optionsOrCb, cb) {
185
- const command = new GetInsightSummariesCommand(args);
188
+ };
189
+ XRay.prototype.getInsightSummaries = function (args, optionsOrCb, cb) {
190
+ var command = new GetInsightSummariesCommand(args);
186
191
  if (typeof optionsOrCb === "function") {
187
192
  this.send(command, optionsOrCb);
188
193
  }
189
194
  else if (typeof cb === "function") {
190
195
  if (typeof optionsOrCb !== "object")
191
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
196
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
192
197
  this.send(command, optionsOrCb || {}, cb);
193
198
  }
194
199
  else {
195
200
  return this.send(command, optionsOrCb);
196
201
  }
197
- }
198
- getSamplingRules(args, optionsOrCb, cb) {
199
- const command = new GetSamplingRulesCommand(args);
202
+ };
203
+ XRay.prototype.getSamplingRules = function (args, optionsOrCb, cb) {
204
+ var command = new GetSamplingRulesCommand(args);
200
205
  if (typeof optionsOrCb === "function") {
201
206
  this.send(command, optionsOrCb);
202
207
  }
203
208
  else if (typeof cb === "function") {
204
209
  if (typeof optionsOrCb !== "object")
205
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
210
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
206
211
  this.send(command, optionsOrCb || {}, cb);
207
212
  }
208
213
  else {
209
214
  return this.send(command, optionsOrCb);
210
215
  }
211
- }
212
- getSamplingStatisticSummaries(args, optionsOrCb, cb) {
213
- const command = new GetSamplingStatisticSummariesCommand(args);
216
+ };
217
+ XRay.prototype.getSamplingStatisticSummaries = function (args, optionsOrCb, cb) {
218
+ var command = new GetSamplingStatisticSummariesCommand(args);
214
219
  if (typeof optionsOrCb === "function") {
215
220
  this.send(command, optionsOrCb);
216
221
  }
217
222
  else if (typeof cb === "function") {
218
223
  if (typeof optionsOrCb !== "object")
219
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
224
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
220
225
  this.send(command, optionsOrCb || {}, cb);
221
226
  }
222
227
  else {
223
228
  return this.send(command, optionsOrCb);
224
229
  }
225
- }
226
- getSamplingTargets(args, optionsOrCb, cb) {
227
- const command = new GetSamplingTargetsCommand(args);
230
+ };
231
+ XRay.prototype.getSamplingTargets = function (args, optionsOrCb, cb) {
232
+ var command = new GetSamplingTargetsCommand(args);
228
233
  if (typeof optionsOrCb === "function") {
229
234
  this.send(command, optionsOrCb);
230
235
  }
231
236
  else if (typeof cb === "function") {
232
237
  if (typeof optionsOrCb !== "object")
233
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
238
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
234
239
  this.send(command, optionsOrCb || {}, cb);
235
240
  }
236
241
  else {
237
242
  return this.send(command, optionsOrCb);
238
243
  }
239
- }
240
- getServiceGraph(args, optionsOrCb, cb) {
241
- const command = new GetServiceGraphCommand(args);
244
+ };
245
+ XRay.prototype.getServiceGraph = function (args, optionsOrCb, cb) {
246
+ var command = new GetServiceGraphCommand(args);
242
247
  if (typeof optionsOrCb === "function") {
243
248
  this.send(command, optionsOrCb);
244
249
  }
245
250
  else if (typeof cb === "function") {
246
251
  if (typeof optionsOrCb !== "object")
247
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
252
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
248
253
  this.send(command, optionsOrCb || {}, cb);
249
254
  }
250
255
  else {
251
256
  return this.send(command, optionsOrCb);
252
257
  }
253
- }
254
- getTimeSeriesServiceStatistics(args, optionsOrCb, cb) {
255
- const command = new GetTimeSeriesServiceStatisticsCommand(args);
258
+ };
259
+ XRay.prototype.getTimeSeriesServiceStatistics = function (args, optionsOrCb, cb) {
260
+ var command = new GetTimeSeriesServiceStatisticsCommand(args);
256
261
  if (typeof optionsOrCb === "function") {
257
262
  this.send(command, optionsOrCb);
258
263
  }
259
264
  else if (typeof cb === "function") {
260
265
  if (typeof optionsOrCb !== "object")
261
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
266
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
262
267
  this.send(command, optionsOrCb || {}, cb);
263
268
  }
264
269
  else {
265
270
  return this.send(command, optionsOrCb);
266
271
  }
267
- }
268
- getTraceGraph(args, optionsOrCb, cb) {
269
- const command = new GetTraceGraphCommand(args);
272
+ };
273
+ XRay.prototype.getTraceGraph = function (args, optionsOrCb, cb) {
274
+ var command = new GetTraceGraphCommand(args);
270
275
  if (typeof optionsOrCb === "function") {
271
276
  this.send(command, optionsOrCb);
272
277
  }
273
278
  else if (typeof cb === "function") {
274
279
  if (typeof optionsOrCb !== "object")
275
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
280
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
276
281
  this.send(command, optionsOrCb || {}, cb);
277
282
  }
278
283
  else {
279
284
  return this.send(command, optionsOrCb);
280
285
  }
281
- }
282
- getTraceSummaries(args, optionsOrCb, cb) {
283
- const command = new GetTraceSummariesCommand(args);
286
+ };
287
+ XRay.prototype.getTraceSummaries = function (args, optionsOrCb, cb) {
288
+ var command = new GetTraceSummariesCommand(args);
284
289
  if (typeof optionsOrCb === "function") {
285
290
  this.send(command, optionsOrCb);
286
291
  }
287
292
  else if (typeof cb === "function") {
288
293
  if (typeof optionsOrCb !== "object")
289
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
294
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
290
295
  this.send(command, optionsOrCb || {}, cb);
291
296
  }
292
297
  else {
293
298
  return this.send(command, optionsOrCb);
294
299
  }
295
- }
296
- listTagsForResource(args, optionsOrCb, cb) {
297
- const command = new ListTagsForResourceCommand(args);
300
+ };
301
+ XRay.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
302
+ var command = new ListTagsForResourceCommand(args);
298
303
  if (typeof optionsOrCb === "function") {
299
304
  this.send(command, optionsOrCb);
300
305
  }
301
306
  else if (typeof cb === "function") {
302
307
  if (typeof optionsOrCb !== "object")
303
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
308
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
304
309
  this.send(command, optionsOrCb || {}, cb);
305
310
  }
306
311
  else {
307
312
  return this.send(command, optionsOrCb);
308
313
  }
309
- }
310
- putEncryptionConfig(args, optionsOrCb, cb) {
311
- const command = new PutEncryptionConfigCommand(args);
314
+ };
315
+ XRay.prototype.putEncryptionConfig = function (args, optionsOrCb, cb) {
316
+ var command = new PutEncryptionConfigCommand(args);
312
317
  if (typeof optionsOrCb === "function") {
313
318
  this.send(command, optionsOrCb);
314
319
  }
315
320
  else if (typeof cb === "function") {
316
321
  if (typeof optionsOrCb !== "object")
317
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
322
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
318
323
  this.send(command, optionsOrCb || {}, cb);
319
324
  }
320
325
  else {
321
326
  return this.send(command, optionsOrCb);
322
327
  }
323
- }
324
- putTelemetryRecords(args, optionsOrCb, cb) {
325
- const command = new PutTelemetryRecordsCommand(args);
328
+ };
329
+ XRay.prototype.putTelemetryRecords = function (args, optionsOrCb, cb) {
330
+ var command = new PutTelemetryRecordsCommand(args);
326
331
  if (typeof optionsOrCb === "function") {
327
332
  this.send(command, optionsOrCb);
328
333
  }
329
334
  else if (typeof cb === "function") {
330
335
  if (typeof optionsOrCb !== "object")
331
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
336
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
332
337
  this.send(command, optionsOrCb || {}, cb);
333
338
  }
334
339
  else {
335
340
  return this.send(command, optionsOrCb);
336
341
  }
337
- }
338
- putTraceSegments(args, optionsOrCb, cb) {
339
- const command = new PutTraceSegmentsCommand(args);
342
+ };
343
+ XRay.prototype.putTraceSegments = function (args, optionsOrCb, cb) {
344
+ var command = new PutTraceSegmentsCommand(args);
340
345
  if (typeof optionsOrCb === "function") {
341
346
  this.send(command, optionsOrCb);
342
347
  }
343
348
  else if (typeof cb === "function") {
344
349
  if (typeof optionsOrCb !== "object")
345
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
350
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
346
351
  this.send(command, optionsOrCb || {}, cb);
347
352
  }
348
353
  else {
349
354
  return this.send(command, optionsOrCb);
350
355
  }
351
- }
352
- tagResource(args, optionsOrCb, cb) {
353
- const command = new TagResourceCommand(args);
356
+ };
357
+ XRay.prototype.tagResource = function (args, optionsOrCb, cb) {
358
+ var command = new TagResourceCommand(args);
354
359
  if (typeof optionsOrCb === "function") {
355
360
  this.send(command, optionsOrCb);
356
361
  }
357
362
  else if (typeof cb === "function") {
358
363
  if (typeof optionsOrCb !== "object")
359
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
364
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
360
365
  this.send(command, optionsOrCb || {}, cb);
361
366
  }
362
367
  else {
363
368
  return this.send(command, optionsOrCb);
364
369
  }
365
- }
366
- untagResource(args, optionsOrCb, cb) {
367
- const command = new UntagResourceCommand(args);
370
+ };
371
+ XRay.prototype.untagResource = function (args, optionsOrCb, cb) {
372
+ var command = new UntagResourceCommand(args);
368
373
  if (typeof optionsOrCb === "function") {
369
374
  this.send(command, optionsOrCb);
370
375
  }
371
376
  else if (typeof cb === "function") {
372
377
  if (typeof optionsOrCb !== "object")
373
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
378
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
374
379
  this.send(command, optionsOrCb || {}, cb);
375
380
  }
376
381
  else {
377
382
  return this.send(command, optionsOrCb);
378
383
  }
379
- }
380
- updateGroup(args, optionsOrCb, cb) {
381
- const command = new UpdateGroupCommand(args);
384
+ };
385
+ XRay.prototype.updateGroup = function (args, optionsOrCb, cb) {
386
+ var command = new UpdateGroupCommand(args);
382
387
  if (typeof optionsOrCb === "function") {
383
388
  this.send(command, optionsOrCb);
384
389
  }
385
390
  else if (typeof cb === "function") {
386
391
  if (typeof optionsOrCb !== "object")
387
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
392
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
388
393
  this.send(command, optionsOrCb || {}, cb);
389
394
  }
390
395
  else {
391
396
  return this.send(command, optionsOrCb);
392
397
  }
393
- }
394
- updateSamplingRule(args, optionsOrCb, cb) {
395
- const command = new UpdateSamplingRuleCommand(args);
398
+ };
399
+ XRay.prototype.updateSamplingRule = function (args, optionsOrCb, cb) {
400
+ var command = new UpdateSamplingRuleCommand(args);
396
401
  if (typeof optionsOrCb === "function") {
397
402
  this.send(command, optionsOrCb);
398
403
  }
399
404
  else if (typeof cb === "function") {
400
405
  if (typeof optionsOrCb !== "object")
401
- throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
406
+ throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
402
407
  this.send(command, optionsOrCb || {}, cb);
403
408
  }
404
409
  else {
405
410
  return this.send(command, optionsOrCb);
406
411
  }
407
- }
408
- }
412
+ };
413
+ return XRay;
414
+ }(XRayClient));
415
+ export { XRay };
@@ -1,3 +1,4 @@
1
+ import { __extends } from "tslib";
1
2
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
2
3
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
3
4
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -8,26 +9,31 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
8
9
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
9
10
  import { Client as __Client, } from "@aws-sdk/smithy-client";
10
11
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
11
- export class XRayClient extends __Client {
12
- constructor(configuration) {
13
- const _config_0 = __getRuntimeConfig(configuration);
14
- const _config_1 = resolveRegionConfig(_config_0);
15
- const _config_2 = resolveEndpointsConfig(_config_1);
16
- const _config_3 = resolveRetryConfig(_config_2);
17
- const _config_4 = resolveHostHeaderConfig(_config_3);
18
- const _config_5 = resolveAwsAuthConfig(_config_4);
19
- const _config_6 = resolveUserAgentConfig(_config_5);
20
- super(_config_6);
21
- this.config = _config_6;
22
- this.middlewareStack.use(getRetryPlugin(this.config));
23
- this.middlewareStack.use(getContentLengthPlugin(this.config));
24
- this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
- this.middlewareStack.use(getLoggerPlugin(this.config));
26
- this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
- this.middlewareStack.use(getUserAgentPlugin(this.config));
12
+ var XRayClient = (function (_super) {
13
+ __extends(XRayClient, _super);
14
+ function XRayClient(configuration) {
15
+ var _this = this;
16
+ var _config_0 = __getRuntimeConfig(configuration);
17
+ var _config_1 = resolveRegionConfig(_config_0);
18
+ var _config_2 = resolveEndpointsConfig(_config_1);
19
+ var _config_3 = resolveRetryConfig(_config_2);
20
+ var _config_4 = resolveHostHeaderConfig(_config_3);
21
+ var _config_5 = resolveAwsAuthConfig(_config_4);
22
+ var _config_6 = resolveUserAgentConfig(_config_5);
23
+ _this = _super.call(this, _config_6) || this;
24
+ _this.config = _config_6;
25
+ _this.middlewareStack.use(getRetryPlugin(_this.config));
26
+ _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
+ _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
+ _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
+ _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
+ _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
+ _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
+ return _this;
29
33
  }
30
- destroy() {
31
- super.destroy();
32
- }
33
- }
34
+ XRayClient.prototype.destroy = function () {
35
+ _super.prototype.destroy.call(this);
36
+ };
37
+ return XRayClient;
38
+ }(__Client));
39
+ export { XRayClient };