@aws-sdk/client-neptunedata 3.1074.0 → 3.1076.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.
@@ -1,624 +0,0 @@
1
- const { NeptunedataServiceException: __BaseException } = require("./NeptunedataServiceException");
2
- exports.AccessDeniedException = class AccessDeniedException extends __BaseException {
3
- name = "AccessDeniedException";
4
- $fault = "client";
5
- detailedMessage;
6
- requestId;
7
- code;
8
- constructor(opts) {
9
- super({
10
- name: "AccessDeniedException",
11
- $fault: "client",
12
- ...opts,
13
- });
14
- Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
- this.detailedMessage = opts.detailedMessage;
16
- this.requestId = opts.requestId;
17
- this.code = opts.code;
18
- }
19
- };
20
- exports.BadRequestException = class BadRequestException extends __BaseException {
21
- name = "BadRequestException";
22
- $fault = "client";
23
- detailedMessage;
24
- requestId;
25
- code;
26
- constructor(opts) {
27
- super({
28
- name: "BadRequestException",
29
- $fault: "client",
30
- ...opts,
31
- });
32
- Object.setPrototypeOf(this, BadRequestException.prototype);
33
- this.detailedMessage = opts.detailedMessage;
34
- this.requestId = opts.requestId;
35
- this.code = opts.code;
36
- }
37
- };
38
- exports.ClientTimeoutException = class ClientTimeoutException extends __BaseException {
39
- name = "ClientTimeoutException";
40
- $fault = "client";
41
- $retryable = {};
42
- detailedMessage;
43
- requestId;
44
- code;
45
- constructor(opts) {
46
- super({
47
- name: "ClientTimeoutException",
48
- $fault: "client",
49
- ...opts,
50
- });
51
- Object.setPrototypeOf(this, ClientTimeoutException.prototype);
52
- this.detailedMessage = opts.detailedMessage;
53
- this.requestId = opts.requestId;
54
- this.code = opts.code;
55
- }
56
- };
57
- exports.ConcurrentModificationException = class ConcurrentModificationException extends __BaseException {
58
- name = "ConcurrentModificationException";
59
- $fault = "server";
60
- $retryable = {};
61
- detailedMessage;
62
- requestId;
63
- code;
64
- constructor(opts) {
65
- super({
66
- name: "ConcurrentModificationException",
67
- $fault: "server",
68
- ...opts,
69
- });
70
- Object.setPrototypeOf(this, ConcurrentModificationException.prototype);
71
- this.detailedMessage = opts.detailedMessage;
72
- this.requestId = opts.requestId;
73
- this.code = opts.code;
74
- }
75
- };
76
- exports.ConstraintViolationException = class ConstraintViolationException extends __BaseException {
77
- name = "ConstraintViolationException";
78
- $fault = "client";
79
- $retryable = {};
80
- detailedMessage;
81
- requestId;
82
- code;
83
- constructor(opts) {
84
- super({
85
- name: "ConstraintViolationException",
86
- $fault: "client",
87
- ...opts,
88
- });
89
- Object.setPrototypeOf(this, ConstraintViolationException.prototype);
90
- this.detailedMessage = opts.detailedMessage;
91
- this.requestId = opts.requestId;
92
- this.code = opts.code;
93
- }
94
- };
95
- exports.FailureByQueryException = class FailureByQueryException extends __BaseException {
96
- name = "FailureByQueryException";
97
- $fault = "server";
98
- $retryable = {};
99
- detailedMessage;
100
- requestId;
101
- code;
102
- constructor(opts) {
103
- super({
104
- name: "FailureByQueryException",
105
- $fault: "server",
106
- ...opts,
107
- });
108
- Object.setPrototypeOf(this, FailureByQueryException.prototype);
109
- this.detailedMessage = opts.detailedMessage;
110
- this.requestId = opts.requestId;
111
- this.code = opts.code;
112
- }
113
- };
114
- exports.IllegalArgumentException = class IllegalArgumentException extends __BaseException {
115
- name = "IllegalArgumentException";
116
- $fault = "client";
117
- detailedMessage;
118
- requestId;
119
- code;
120
- constructor(opts) {
121
- super({
122
- name: "IllegalArgumentException",
123
- $fault: "client",
124
- ...opts,
125
- });
126
- Object.setPrototypeOf(this, IllegalArgumentException.prototype);
127
- this.detailedMessage = opts.detailedMessage;
128
- this.requestId = opts.requestId;
129
- this.code = opts.code;
130
- }
131
- };
132
- exports.InvalidArgumentException = class InvalidArgumentException extends __BaseException {
133
- name = "InvalidArgumentException";
134
- $fault = "client";
135
- detailedMessage;
136
- requestId;
137
- code;
138
- constructor(opts) {
139
- super({
140
- name: "InvalidArgumentException",
141
- $fault: "client",
142
- ...opts,
143
- });
144
- Object.setPrototypeOf(this, InvalidArgumentException.prototype);
145
- this.detailedMessage = opts.detailedMessage;
146
- this.requestId = opts.requestId;
147
- this.code = opts.code;
148
- }
149
- };
150
- exports.InvalidParameterException = class InvalidParameterException extends __BaseException {
151
- name = "InvalidParameterException";
152
- $fault = "client";
153
- detailedMessage;
154
- requestId;
155
- code;
156
- constructor(opts) {
157
- super({
158
- name: "InvalidParameterException",
159
- $fault: "client",
160
- ...opts,
161
- });
162
- Object.setPrototypeOf(this, InvalidParameterException.prototype);
163
- this.detailedMessage = opts.detailedMessage;
164
- this.requestId = opts.requestId;
165
- this.code = opts.code;
166
- }
167
- };
168
- exports.MissingParameterException = class MissingParameterException extends __BaseException {
169
- name = "MissingParameterException";
170
- $fault = "client";
171
- detailedMessage;
172
- requestId;
173
- code;
174
- constructor(opts) {
175
- super({
176
- name: "MissingParameterException",
177
- $fault: "client",
178
- ...opts,
179
- });
180
- Object.setPrototypeOf(this, MissingParameterException.prototype);
181
- this.detailedMessage = opts.detailedMessage;
182
- this.requestId = opts.requestId;
183
- this.code = opts.code;
184
- }
185
- };
186
- exports.ParsingException = class ParsingException extends __BaseException {
187
- name = "ParsingException";
188
- $fault = "client";
189
- detailedMessage;
190
- requestId;
191
- code;
192
- constructor(opts) {
193
- super({
194
- name: "ParsingException",
195
- $fault: "client",
196
- ...opts,
197
- });
198
- Object.setPrototypeOf(this, ParsingException.prototype);
199
- this.detailedMessage = opts.detailedMessage;
200
- this.requestId = opts.requestId;
201
- this.code = opts.code;
202
- }
203
- };
204
- exports.PreconditionsFailedException = class PreconditionsFailedException extends __BaseException {
205
- name = "PreconditionsFailedException";
206
- $fault = "client";
207
- detailedMessage;
208
- requestId;
209
- code;
210
- constructor(opts) {
211
- super({
212
- name: "PreconditionsFailedException",
213
- $fault: "client",
214
- ...opts,
215
- });
216
- Object.setPrototypeOf(this, PreconditionsFailedException.prototype);
217
- this.detailedMessage = opts.detailedMessage;
218
- this.requestId = opts.requestId;
219
- this.code = opts.code;
220
- }
221
- };
222
- exports.TimeLimitExceededException = class TimeLimitExceededException extends __BaseException {
223
- name = "TimeLimitExceededException";
224
- $fault = "server";
225
- $retryable = {};
226
- detailedMessage;
227
- requestId;
228
- code;
229
- constructor(opts) {
230
- super({
231
- name: "TimeLimitExceededException",
232
- $fault: "server",
233
- ...opts,
234
- });
235
- Object.setPrototypeOf(this, TimeLimitExceededException.prototype);
236
- this.detailedMessage = opts.detailedMessage;
237
- this.requestId = opts.requestId;
238
- this.code = opts.code;
239
- }
240
- };
241
- exports.TooManyRequestsException = class TooManyRequestsException extends __BaseException {
242
- name = "TooManyRequestsException";
243
- $fault = "client";
244
- $retryable = {};
245
- detailedMessage;
246
- requestId;
247
- code;
248
- constructor(opts) {
249
- super({
250
- name: "TooManyRequestsException",
251
- $fault: "client",
252
- ...opts,
253
- });
254
- Object.setPrototypeOf(this, TooManyRequestsException.prototype);
255
- this.detailedMessage = opts.detailedMessage;
256
- this.requestId = opts.requestId;
257
- this.code = opts.code;
258
- }
259
- };
260
- exports.UnsupportedOperationException = class UnsupportedOperationException extends __BaseException {
261
- name = "UnsupportedOperationException";
262
- $fault = "client";
263
- detailedMessage;
264
- requestId;
265
- code;
266
- constructor(opts) {
267
- super({
268
- name: "UnsupportedOperationException",
269
- $fault: "client",
270
- ...opts,
271
- });
272
- Object.setPrototypeOf(this, UnsupportedOperationException.prototype);
273
- this.detailedMessage = opts.detailedMessage;
274
- this.requestId = opts.requestId;
275
- this.code = opts.code;
276
- }
277
- };
278
- exports.BulkLoadIdNotFoundException = class BulkLoadIdNotFoundException extends __BaseException {
279
- name = "BulkLoadIdNotFoundException";
280
- $fault = "client";
281
- $retryable = {};
282
- detailedMessage;
283
- requestId;
284
- code;
285
- constructor(opts) {
286
- super({
287
- name: "BulkLoadIdNotFoundException",
288
- $fault: "client",
289
- ...opts,
290
- });
291
- Object.setPrototypeOf(this, BulkLoadIdNotFoundException.prototype);
292
- this.detailedMessage = opts.detailedMessage;
293
- this.requestId = opts.requestId;
294
- this.code = opts.code;
295
- }
296
- };
297
- exports.InternalFailureException = class InternalFailureException extends __BaseException {
298
- name = "InternalFailureException";
299
- $fault = "server";
300
- detailedMessage;
301
- requestId;
302
- code;
303
- constructor(opts) {
304
- super({
305
- name: "InternalFailureException",
306
- $fault: "server",
307
- ...opts,
308
- });
309
- Object.setPrototypeOf(this, InternalFailureException.prototype);
310
- this.detailedMessage = opts.detailedMessage;
311
- this.requestId = opts.requestId;
312
- this.code = opts.code;
313
- }
314
- };
315
- exports.LoadUrlAccessDeniedException = class LoadUrlAccessDeniedException extends __BaseException {
316
- name = "LoadUrlAccessDeniedException";
317
- $fault = "client";
318
- detailedMessage;
319
- requestId;
320
- code;
321
- constructor(opts) {
322
- super({
323
- name: "LoadUrlAccessDeniedException",
324
- $fault: "client",
325
- ...opts,
326
- });
327
- Object.setPrototypeOf(this, LoadUrlAccessDeniedException.prototype);
328
- this.detailedMessage = opts.detailedMessage;
329
- this.requestId = opts.requestId;
330
- this.code = opts.code;
331
- }
332
- };
333
- exports.MLResourceNotFoundException = class MLResourceNotFoundException extends __BaseException {
334
- name = "MLResourceNotFoundException";
335
- $fault = "client";
336
- detailedMessage;
337
- requestId;
338
- code;
339
- constructor(opts) {
340
- super({
341
- name: "MLResourceNotFoundException",
342
- $fault: "client",
343
- ...opts,
344
- });
345
- Object.setPrototypeOf(this, MLResourceNotFoundException.prototype);
346
- this.detailedMessage = opts.detailedMessage;
347
- this.requestId = opts.requestId;
348
- this.code = opts.code;
349
- }
350
- };
351
- exports.InvalidNumericDataException = class InvalidNumericDataException extends __BaseException {
352
- name = "InvalidNumericDataException";
353
- $fault = "client";
354
- detailedMessage;
355
- requestId;
356
- code;
357
- constructor(opts) {
358
- super({
359
- name: "InvalidNumericDataException",
360
- $fault: "client",
361
- ...opts,
362
- });
363
- Object.setPrototypeOf(this, InvalidNumericDataException.prototype);
364
- this.detailedMessage = opts.detailedMessage;
365
- this.requestId = opts.requestId;
366
- this.code = opts.code;
367
- }
368
- };
369
- exports.ReadOnlyViolationException = class ReadOnlyViolationException extends __BaseException {
370
- name = "ReadOnlyViolationException";
371
- $fault = "client";
372
- detailedMessage;
373
- requestId;
374
- code;
375
- constructor(opts) {
376
- super({
377
- name: "ReadOnlyViolationException",
378
- $fault: "client",
379
- ...opts,
380
- });
381
- Object.setPrototypeOf(this, ReadOnlyViolationException.prototype);
382
- this.detailedMessage = opts.detailedMessage;
383
- this.requestId = opts.requestId;
384
- this.code = opts.code;
385
- }
386
- };
387
- exports.StatisticsNotAvailableException = class StatisticsNotAvailableException extends __BaseException {
388
- name = "StatisticsNotAvailableException";
389
- $fault = "client";
390
- detailedMessage;
391
- requestId;
392
- code;
393
- constructor(opts) {
394
- super({
395
- name: "StatisticsNotAvailableException",
396
- $fault: "client",
397
- ...opts,
398
- });
399
- Object.setPrototypeOf(this, StatisticsNotAvailableException.prototype);
400
- this.detailedMessage = opts.detailedMessage;
401
- this.requestId = opts.requestId;
402
- this.code = opts.code;
403
- }
404
- };
405
- exports.MethodNotAllowedException = class MethodNotAllowedException extends __BaseException {
406
- name = "MethodNotAllowedException";
407
- $fault = "client";
408
- detailedMessage;
409
- requestId;
410
- code;
411
- constructor(opts) {
412
- super({
413
- name: "MethodNotAllowedException",
414
- $fault: "client",
415
- ...opts,
416
- });
417
- Object.setPrototypeOf(this, MethodNotAllowedException.prototype);
418
- this.detailedMessage = opts.detailedMessage;
419
- this.requestId = opts.requestId;
420
- this.code = opts.code;
421
- }
422
- };
423
- exports.ServerShutdownException = class ServerShutdownException extends __BaseException {
424
- name = "ServerShutdownException";
425
- $fault = "server";
426
- detailedMessage;
427
- requestId;
428
- code;
429
- constructor(opts) {
430
- super({
431
- name: "ServerShutdownException",
432
- $fault: "server",
433
- ...opts,
434
- });
435
- Object.setPrototypeOf(this, ServerShutdownException.prototype);
436
- this.detailedMessage = opts.detailedMessage;
437
- this.requestId = opts.requestId;
438
- this.code = opts.code;
439
- }
440
- };
441
- exports.CancelledByUserException = class CancelledByUserException extends __BaseException {
442
- name = "CancelledByUserException";
443
- $fault = "server";
444
- detailedMessage;
445
- requestId;
446
- code;
447
- constructor(opts) {
448
- super({
449
- name: "CancelledByUserException",
450
- $fault: "server",
451
- ...opts,
452
- });
453
- Object.setPrototypeOf(this, CancelledByUserException.prototype);
454
- this.detailedMessage = opts.detailedMessage;
455
- this.requestId = opts.requestId;
456
- this.code = opts.code;
457
- }
458
- };
459
- exports.MalformedQueryException = class MalformedQueryException extends __BaseException {
460
- name = "MalformedQueryException";
461
- $fault = "client";
462
- detailedMessage;
463
- requestId;
464
- code;
465
- constructor(opts) {
466
- super({
467
- name: "MalformedQueryException",
468
- $fault: "client",
469
- ...opts,
470
- });
471
- Object.setPrototypeOf(this, MalformedQueryException.prototype);
472
- this.detailedMessage = opts.detailedMessage;
473
- this.requestId = opts.requestId;
474
- this.code = opts.code;
475
- }
476
- };
477
- exports.MemoryLimitExceededException = class MemoryLimitExceededException extends __BaseException {
478
- name = "MemoryLimitExceededException";
479
- $fault = "server";
480
- $retryable = {};
481
- detailedMessage;
482
- requestId;
483
- code;
484
- constructor(opts) {
485
- super({
486
- name: "MemoryLimitExceededException",
487
- $fault: "server",
488
- ...opts,
489
- });
490
- Object.setPrototypeOf(this, MemoryLimitExceededException.prototype);
491
- this.detailedMessage = opts.detailedMessage;
492
- this.requestId = opts.requestId;
493
- this.code = opts.code;
494
- }
495
- };
496
- exports.QueryLimitExceededException = class QueryLimitExceededException extends __BaseException {
497
- name = "QueryLimitExceededException";
498
- $fault = "server";
499
- $retryable = {};
500
- detailedMessage;
501
- requestId;
502
- code;
503
- constructor(opts) {
504
- super({
505
- name: "QueryLimitExceededException",
506
- $fault: "server",
507
- ...opts,
508
- });
509
- Object.setPrototypeOf(this, QueryLimitExceededException.prototype);
510
- this.detailedMessage = opts.detailedMessage;
511
- this.requestId = opts.requestId;
512
- this.code = opts.code;
513
- }
514
- };
515
- exports.QueryLimitException = class QueryLimitException extends __BaseException {
516
- name = "QueryLimitException";
517
- $fault = "client";
518
- detailedMessage;
519
- requestId;
520
- code;
521
- constructor(opts) {
522
- super({
523
- name: "QueryLimitException",
524
- $fault: "client",
525
- ...opts,
526
- });
527
- Object.setPrototypeOf(this, QueryLimitException.prototype);
528
- this.detailedMessage = opts.detailedMessage;
529
- this.requestId = opts.requestId;
530
- this.code = opts.code;
531
- }
532
- };
533
- exports.QueryTooLargeException = class QueryTooLargeException extends __BaseException {
534
- name = "QueryTooLargeException";
535
- $fault = "client";
536
- detailedMessage;
537
- requestId;
538
- code;
539
- constructor(opts) {
540
- super({
541
- name: "QueryTooLargeException",
542
- $fault: "client",
543
- ...opts,
544
- });
545
- Object.setPrototypeOf(this, QueryTooLargeException.prototype);
546
- this.detailedMessage = opts.detailedMessage;
547
- this.requestId = opts.requestId;
548
- this.code = opts.code;
549
- }
550
- };
551
- exports.ExpiredStreamException = class ExpiredStreamException extends __BaseException {
552
- name = "ExpiredStreamException";
553
- $fault = "client";
554
- detailedMessage;
555
- requestId;
556
- code;
557
- constructor(opts) {
558
- super({
559
- name: "ExpiredStreamException",
560
- $fault: "client",
561
- ...opts,
562
- });
563
- Object.setPrototypeOf(this, ExpiredStreamException.prototype);
564
- this.detailedMessage = opts.detailedMessage;
565
- this.requestId = opts.requestId;
566
- this.code = opts.code;
567
- }
568
- };
569
- exports.StreamRecordsNotFoundException = class StreamRecordsNotFoundException extends __BaseException {
570
- name = "StreamRecordsNotFoundException";
571
- $fault = "client";
572
- detailedMessage;
573
- requestId;
574
- code;
575
- constructor(opts) {
576
- super({
577
- name: "StreamRecordsNotFoundException",
578
- $fault: "client",
579
- ...opts,
580
- });
581
- Object.setPrototypeOf(this, StreamRecordsNotFoundException.prototype);
582
- this.detailedMessage = opts.detailedMessage;
583
- this.requestId = opts.requestId;
584
- this.code = opts.code;
585
- }
586
- };
587
- exports.ThrottlingException = class ThrottlingException extends __BaseException {
588
- name = "ThrottlingException";
589
- $fault = "server";
590
- $retryable = {};
591
- detailedMessage;
592
- requestId;
593
- code;
594
- constructor(opts) {
595
- super({
596
- name: "ThrottlingException",
597
- $fault: "server",
598
- ...opts,
599
- });
600
- Object.setPrototypeOf(this, ThrottlingException.prototype);
601
- this.detailedMessage = opts.detailedMessage;
602
- this.requestId = opts.requestId;
603
- this.code = opts.code;
604
- }
605
- };
606
- exports.S3Exception = class S3Exception extends __BaseException {
607
- name = "S3Exception";
608
- $fault = "client";
609
- $retryable = {};
610
- detailedMessage;
611
- requestId;
612
- code;
613
- constructor(opts) {
614
- super({
615
- name: "S3Exception",
616
- $fault: "client",
617
- ...opts,
618
- });
619
- Object.setPrototypeOf(this, S3Exception.prototype);
620
- this.detailedMessage = opts.detailedMessage;
621
- this.requestId = opts.requestId;
622
- this.code = opts.code;
623
- }
624
- };
@@ -1,32 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { Sha256 } = require("@aws-crypto/sha256-browser");
3
- const { createDefaultUserAgentProvider } = require("@aws-sdk/core/client");
4
- const { invalidProvider, loadConfigsForDefaultMode } = require("@smithy/core/client");
5
- const { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig } = require("@smithy/core/config");
6
- const { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } = require("@smithy/core/retry");
7
- const { calculateBodyLength } = require("@smithy/core/serde");
8
- const { FetchHttpHandler: RequestHandler, streamCollector } = require("@smithy/fetch-http-handler");
9
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
10
- const getRuntimeConfig = (config) => {
11
- const defaultsMode = resolveDefaultsModeConfig(config);
12
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
13
- const clientSharedValues = getSharedRuntimeConfig(config);
14
- return {
15
- ...clientSharedValues,
16
- ...config,
17
- runtime: "browser",
18
- defaultsMode,
19
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
20
- credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
21
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
22
- maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
23
- region: config?.region ?? invalidProvider("Region is missing"),
24
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
- retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
- streamCollector: config?.streamCollector ?? streamCollector,
28
- useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
- useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
30
- };
31
- };
32
- exports.getRuntimeConfig = getRuntimeConfig;
@@ -1,45 +0,0 @@
1
- const packageInfo = require("../package.json");
2
- const { createDefaultUserAgentProvider, emitWarningIfUnsupportedVersion: awsCheckVersion, NODE_APP_ID_CONFIG_OPTIONS } = require("@aws-sdk/core/client");
3
- const { NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
4
- const { defaultProvider: credentialDefaultProvider } = require("@aws-sdk/credential-provider-node");
5
- const { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } = require("@smithy/core/client");
6
- const { loadConfig: loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig } = require("@smithy/core/config");
7
- const { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } = require("@smithy/core/retry");
8
- const { calculateBodyLength, Hash } = require("@smithy/core/serde");
9
- const { NodeHttpHandler: RequestHandler, streamCollector } = require("@smithy/node-http-handler");
10
- const { getRuntimeConfig: getSharedRuntimeConfig } = require("./runtimeConfig.shared");
11
- const getRuntimeConfig = (config) => {
12
- emitWarningIfUnsupportedVersion(process.version);
13
- const defaultsMode = resolveDefaultsModeConfig(config);
14
- const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
- const clientSharedValues = getSharedRuntimeConfig(config);
16
- awsCheckVersion(process.version);
17
- const loaderConfig = {
18
- profile: config?.profile,
19
- logger: clientSharedValues.logger,
20
- };
21
- return {
22
- ...clientSharedValues,
23
- ...config,
24
- runtime: "node",
25
- defaultsMode,
26
- authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
27
- bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
28
- credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
29
- defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
30
- maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
31
- region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
32
- requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
33
- retryMode: config?.retryMode ??
34
- loadNodeConfig({
35
- ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
- default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
- }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
- streamCollector: config?.streamCollector ?? streamCollector,
40
- useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
- useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
42
- userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
43
- };
44
- };
45
- exports.getRuntimeConfig = getRuntimeConfig;