@aws-sdk/client-fsx 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,595 +0,0 @@
1
- const { FSxServiceException: __BaseException } = require("./FSxServiceException");
2
- exports.AccessPointAlreadyOwnedByYou = class AccessPointAlreadyOwnedByYou extends __BaseException {
3
- name = "AccessPointAlreadyOwnedByYou";
4
- $fault = "client";
5
- ErrorCode;
6
- Message;
7
- constructor(opts) {
8
- super({
9
- name: "AccessPointAlreadyOwnedByYou",
10
- $fault: "client",
11
- ...opts,
12
- });
13
- Object.setPrototypeOf(this, AccessPointAlreadyOwnedByYou.prototype);
14
- this.ErrorCode = opts.ErrorCode;
15
- this.Message = opts.Message;
16
- }
17
- };
18
- exports.ActiveDirectoryError = class ActiveDirectoryError extends __BaseException {
19
- name = "ActiveDirectoryError";
20
- $fault = "client";
21
- ActiveDirectoryId;
22
- Type;
23
- Message;
24
- constructor(opts) {
25
- super({
26
- name: "ActiveDirectoryError",
27
- $fault: "client",
28
- ...opts,
29
- });
30
- Object.setPrototypeOf(this, ActiveDirectoryError.prototype);
31
- this.ActiveDirectoryId = opts.ActiveDirectoryId;
32
- this.Type = opts.Type;
33
- this.Message = opts.Message;
34
- }
35
- };
36
- exports.BadRequest = class BadRequest extends __BaseException {
37
- name = "BadRequest";
38
- $fault = "client";
39
- Message;
40
- constructor(opts) {
41
- super({
42
- name: "BadRequest",
43
- $fault: "client",
44
- ...opts,
45
- });
46
- Object.setPrototypeOf(this, BadRequest.prototype);
47
- this.Message = opts.Message;
48
- }
49
- };
50
- exports.FileSystemNotFound = class FileSystemNotFound extends __BaseException {
51
- name = "FileSystemNotFound";
52
- $fault = "client";
53
- Message;
54
- constructor(opts) {
55
- super({
56
- name: "FileSystemNotFound",
57
- $fault: "client",
58
- ...opts,
59
- });
60
- Object.setPrototypeOf(this, FileSystemNotFound.prototype);
61
- this.Message = opts.Message;
62
- }
63
- };
64
- exports.InternalServerError = class InternalServerError extends __BaseException {
65
- name = "InternalServerError";
66
- $fault = "server";
67
- Message;
68
- constructor(opts) {
69
- super({
70
- name: "InternalServerError",
71
- $fault: "server",
72
- ...opts,
73
- });
74
- Object.setPrototypeOf(this, InternalServerError.prototype);
75
- this.Message = opts.Message;
76
- }
77
- };
78
- exports.DataRepositoryTaskEnded = class DataRepositoryTaskEnded extends __BaseException {
79
- name = "DataRepositoryTaskEnded";
80
- $fault = "client";
81
- Message;
82
- constructor(opts) {
83
- super({
84
- name: "DataRepositoryTaskEnded",
85
- $fault: "client",
86
- ...opts,
87
- });
88
- Object.setPrototypeOf(this, DataRepositoryTaskEnded.prototype);
89
- this.Message = opts.Message;
90
- }
91
- };
92
- exports.DataRepositoryTaskNotFound = class DataRepositoryTaskNotFound extends __BaseException {
93
- name = "DataRepositoryTaskNotFound";
94
- $fault = "client";
95
- Message;
96
- constructor(opts) {
97
- super({
98
- name: "DataRepositoryTaskNotFound",
99
- $fault: "client",
100
- ...opts,
101
- });
102
- Object.setPrototypeOf(this, DataRepositoryTaskNotFound.prototype);
103
- this.Message = opts.Message;
104
- }
105
- };
106
- exports.UnsupportedOperation = class UnsupportedOperation extends __BaseException {
107
- name = "UnsupportedOperation";
108
- $fault = "client";
109
- Message;
110
- constructor(opts) {
111
- super({
112
- name: "UnsupportedOperation",
113
- $fault: "client",
114
- ...opts,
115
- });
116
- Object.setPrototypeOf(this, UnsupportedOperation.prototype);
117
- this.Message = opts.Message;
118
- }
119
- };
120
- exports.BackupNotFound = class BackupNotFound extends __BaseException {
121
- name = "BackupNotFound";
122
- $fault = "client";
123
- Message;
124
- constructor(opts) {
125
- super({
126
- name: "BackupNotFound",
127
- $fault: "client",
128
- ...opts,
129
- });
130
- Object.setPrototypeOf(this, BackupNotFound.prototype);
131
- this.Message = opts.Message;
132
- }
133
- };
134
- exports.IncompatibleParameterError = class IncompatibleParameterError extends __BaseException {
135
- name = "IncompatibleParameterError";
136
- $fault = "client";
137
- Parameter;
138
- Message;
139
- constructor(opts) {
140
- super({
141
- name: "IncompatibleParameterError",
142
- $fault: "client",
143
- ...opts,
144
- });
145
- Object.setPrototypeOf(this, IncompatibleParameterError.prototype);
146
- this.Parameter = opts.Parameter;
147
- this.Message = opts.Message;
148
- }
149
- };
150
- exports.IncompatibleRegionForMultiAZ = class IncompatibleRegionForMultiAZ extends __BaseException {
151
- name = "IncompatibleRegionForMultiAZ";
152
- $fault = "client";
153
- Message;
154
- constructor(opts) {
155
- super({
156
- name: "IncompatibleRegionForMultiAZ",
157
- $fault: "client",
158
- ...opts,
159
- });
160
- Object.setPrototypeOf(this, IncompatibleRegionForMultiAZ.prototype);
161
- this.Message = opts.Message;
162
- }
163
- };
164
- exports.InvalidDestinationKmsKey = class InvalidDestinationKmsKey extends __BaseException {
165
- name = "InvalidDestinationKmsKey";
166
- $fault = "client";
167
- Message;
168
- constructor(opts) {
169
- super({
170
- name: "InvalidDestinationKmsKey",
171
- $fault: "client",
172
- ...opts,
173
- });
174
- Object.setPrototypeOf(this, InvalidDestinationKmsKey.prototype);
175
- this.Message = opts.Message;
176
- }
177
- };
178
- exports.InvalidRegion = class InvalidRegion extends __BaseException {
179
- name = "InvalidRegion";
180
- $fault = "client";
181
- Message;
182
- constructor(opts) {
183
- super({
184
- name: "InvalidRegion",
185
- $fault: "client",
186
- ...opts,
187
- });
188
- Object.setPrototypeOf(this, InvalidRegion.prototype);
189
- this.Message = opts.Message;
190
- }
191
- };
192
- exports.InvalidSourceKmsKey = class InvalidSourceKmsKey extends __BaseException {
193
- name = "InvalidSourceKmsKey";
194
- $fault = "client";
195
- Message;
196
- constructor(opts) {
197
- super({
198
- name: "InvalidSourceKmsKey",
199
- $fault: "client",
200
- ...opts,
201
- });
202
- Object.setPrototypeOf(this, InvalidSourceKmsKey.prototype);
203
- this.Message = opts.Message;
204
- }
205
- };
206
- exports.ServiceLimitExceeded = class ServiceLimitExceeded extends __BaseException {
207
- name = "ServiceLimitExceeded";
208
- $fault = "client";
209
- Limit;
210
- Message;
211
- constructor(opts) {
212
- super({
213
- name: "ServiceLimitExceeded",
214
- $fault: "client",
215
- ...opts,
216
- });
217
- Object.setPrototypeOf(this, ServiceLimitExceeded.prototype);
218
- this.Limit = opts.Limit;
219
- this.Message = opts.Message;
220
- }
221
- };
222
- exports.SourceBackupUnavailable = class SourceBackupUnavailable extends __BaseException {
223
- name = "SourceBackupUnavailable";
224
- $fault = "client";
225
- Message;
226
- BackupId;
227
- constructor(opts) {
228
- super({
229
- name: "SourceBackupUnavailable",
230
- $fault: "client",
231
- ...opts,
232
- });
233
- Object.setPrototypeOf(this, SourceBackupUnavailable.prototype);
234
- this.Message = opts.Message;
235
- this.BackupId = opts.BackupId;
236
- }
237
- };
238
- exports.InvalidAccessPoint = class InvalidAccessPoint extends __BaseException {
239
- name = "InvalidAccessPoint";
240
- $fault = "client";
241
- ErrorCode;
242
- Message;
243
- constructor(opts) {
244
- super({
245
- name: "InvalidAccessPoint",
246
- $fault: "client",
247
- ...opts,
248
- });
249
- Object.setPrototypeOf(this, InvalidAccessPoint.prototype);
250
- this.ErrorCode = opts.ErrorCode;
251
- this.Message = opts.Message;
252
- }
253
- };
254
- exports.InvalidRequest = class InvalidRequest extends __BaseException {
255
- name = "InvalidRequest";
256
- $fault = "client";
257
- ErrorCode;
258
- Message;
259
- constructor(opts) {
260
- super({
261
- name: "InvalidRequest",
262
- $fault: "client",
263
- ...opts,
264
- });
265
- Object.setPrototypeOf(this, InvalidRequest.prototype);
266
- this.ErrorCode = opts.ErrorCode;
267
- this.Message = opts.Message;
268
- }
269
- };
270
- exports.TooManyAccessPoints = class TooManyAccessPoints extends __BaseException {
271
- name = "TooManyAccessPoints";
272
- $fault = "client";
273
- ErrorCode;
274
- Message;
275
- constructor(opts) {
276
- super({
277
- name: "TooManyAccessPoints",
278
- $fault: "client",
279
- ...opts,
280
- });
281
- Object.setPrototypeOf(this, TooManyAccessPoints.prototype);
282
- this.ErrorCode = opts.ErrorCode;
283
- this.Message = opts.Message;
284
- }
285
- };
286
- exports.VolumeNotFound = class VolumeNotFound extends __BaseException {
287
- name = "VolumeNotFound";
288
- $fault = "client";
289
- Message;
290
- constructor(opts) {
291
- super({
292
- name: "VolumeNotFound",
293
- $fault: "client",
294
- ...opts,
295
- });
296
- Object.setPrototypeOf(this, VolumeNotFound.prototype);
297
- this.Message = opts.Message;
298
- }
299
- };
300
- exports.BackupInProgress = class BackupInProgress extends __BaseException {
301
- name = "BackupInProgress";
302
- $fault = "client";
303
- Message;
304
- constructor(opts) {
305
- super({
306
- name: "BackupInProgress",
307
- $fault: "client",
308
- ...opts,
309
- });
310
- Object.setPrototypeOf(this, BackupInProgress.prototype);
311
- this.Message = opts.Message;
312
- }
313
- };
314
- exports.DataRepositoryTaskExecuting = class DataRepositoryTaskExecuting extends __BaseException {
315
- name = "DataRepositoryTaskExecuting";
316
- $fault = "client";
317
- Message;
318
- constructor(opts) {
319
- super({
320
- name: "DataRepositoryTaskExecuting",
321
- $fault: "client",
322
- ...opts,
323
- });
324
- Object.setPrototypeOf(this, DataRepositoryTaskExecuting.prototype);
325
- this.Message = opts.Message;
326
- }
327
- };
328
- exports.InvalidNetworkSettings = class InvalidNetworkSettings extends __BaseException {
329
- name = "InvalidNetworkSettings";
330
- $fault = "client";
331
- Message;
332
- InvalidSubnetId;
333
- InvalidSecurityGroupId;
334
- InvalidRouteTableId;
335
- constructor(opts) {
336
- super({
337
- name: "InvalidNetworkSettings",
338
- $fault: "client",
339
- ...opts,
340
- });
341
- Object.setPrototypeOf(this, InvalidNetworkSettings.prototype);
342
- this.Message = opts.Message;
343
- this.InvalidSubnetId = opts.InvalidSubnetId;
344
- this.InvalidSecurityGroupId = opts.InvalidSecurityGroupId;
345
- this.InvalidRouteTableId = opts.InvalidRouteTableId;
346
- }
347
- };
348
- exports.InvalidPerUnitStorageThroughput = class InvalidPerUnitStorageThroughput extends __BaseException {
349
- name = "InvalidPerUnitStorageThroughput";
350
- $fault = "client";
351
- Message;
352
- constructor(opts) {
353
- super({
354
- name: "InvalidPerUnitStorageThroughput",
355
- $fault: "client",
356
- ...opts,
357
- });
358
- Object.setPrototypeOf(this, InvalidPerUnitStorageThroughput.prototype);
359
- this.Message = opts.Message;
360
- }
361
- };
362
- exports.MissingFileCacheConfiguration = class MissingFileCacheConfiguration extends __BaseException {
363
- name = "MissingFileCacheConfiguration";
364
- $fault = "client";
365
- Message;
366
- constructor(opts) {
367
- super({
368
- name: "MissingFileCacheConfiguration",
369
- $fault: "client",
370
- ...opts,
371
- });
372
- Object.setPrototypeOf(this, MissingFileCacheConfiguration.prototype);
373
- this.Message = opts.Message;
374
- }
375
- };
376
- exports.InvalidExportPath = class InvalidExportPath extends __BaseException {
377
- name = "InvalidExportPath";
378
- $fault = "client";
379
- Message;
380
- constructor(opts) {
381
- super({
382
- name: "InvalidExportPath",
383
- $fault: "client",
384
- ...opts,
385
- });
386
- Object.setPrototypeOf(this, InvalidExportPath.prototype);
387
- this.Message = opts.Message;
388
- }
389
- };
390
- exports.InvalidImportPath = class InvalidImportPath extends __BaseException {
391
- name = "InvalidImportPath";
392
- $fault = "client";
393
- Message;
394
- constructor(opts) {
395
- super({
396
- name: "InvalidImportPath",
397
- $fault: "client",
398
- ...opts,
399
- });
400
- Object.setPrototypeOf(this, InvalidImportPath.prototype);
401
- this.Message = opts.Message;
402
- }
403
- };
404
- exports.MissingFileSystemConfiguration = class MissingFileSystemConfiguration extends __BaseException {
405
- name = "MissingFileSystemConfiguration";
406
- $fault = "client";
407
- Message;
408
- constructor(opts) {
409
- super({
410
- name: "MissingFileSystemConfiguration",
411
- $fault: "client",
412
- ...opts,
413
- });
414
- Object.setPrototypeOf(this, MissingFileSystemConfiguration.prototype);
415
- this.Message = opts.Message;
416
- }
417
- };
418
- exports.MissingVolumeConfiguration = class MissingVolumeConfiguration extends __BaseException {
419
- name = "MissingVolumeConfiguration";
420
- $fault = "client";
421
- Message;
422
- constructor(opts) {
423
- super({
424
- name: "MissingVolumeConfiguration",
425
- $fault: "client",
426
- ...opts,
427
- });
428
- Object.setPrototypeOf(this, MissingVolumeConfiguration.prototype);
429
- this.Message = opts.Message;
430
- }
431
- };
432
- exports.StorageVirtualMachineNotFound = class StorageVirtualMachineNotFound extends __BaseException {
433
- name = "StorageVirtualMachineNotFound";
434
- $fault = "client";
435
- Message;
436
- constructor(opts) {
437
- super({
438
- name: "StorageVirtualMachineNotFound",
439
- $fault: "client",
440
- ...opts,
441
- });
442
- Object.setPrototypeOf(this, StorageVirtualMachineNotFound.prototype);
443
- this.Message = opts.Message;
444
- }
445
- };
446
- exports.BackupBeingCopied = class BackupBeingCopied extends __BaseException {
447
- name = "BackupBeingCopied";
448
- $fault = "client";
449
- Message;
450
- BackupId;
451
- constructor(opts) {
452
- super({
453
- name: "BackupBeingCopied",
454
- $fault: "client",
455
- ...opts,
456
- });
457
- Object.setPrototypeOf(this, BackupBeingCopied.prototype);
458
- this.Message = opts.Message;
459
- this.BackupId = opts.BackupId;
460
- }
461
- };
462
- exports.BackupRestoring = class BackupRestoring extends __BaseException {
463
- name = "BackupRestoring";
464
- $fault = "client";
465
- Message;
466
- FileSystemId;
467
- constructor(opts) {
468
- super({
469
- name: "BackupRestoring",
470
- $fault: "client",
471
- ...opts,
472
- });
473
- Object.setPrototypeOf(this, BackupRestoring.prototype);
474
- this.Message = opts.Message;
475
- this.FileSystemId = opts.FileSystemId;
476
- }
477
- };
478
- exports.DataRepositoryAssociationNotFound = class DataRepositoryAssociationNotFound extends __BaseException {
479
- name = "DataRepositoryAssociationNotFound";
480
- $fault = "client";
481
- Message;
482
- constructor(opts) {
483
- super({
484
- name: "DataRepositoryAssociationNotFound",
485
- $fault: "client",
486
- ...opts,
487
- });
488
- Object.setPrototypeOf(this, DataRepositoryAssociationNotFound.prototype);
489
- this.Message = opts.Message;
490
- }
491
- };
492
- exports.FileCacheNotFound = class FileCacheNotFound extends __BaseException {
493
- name = "FileCacheNotFound";
494
- $fault = "client";
495
- Message;
496
- constructor(opts) {
497
- super({
498
- name: "FileCacheNotFound",
499
- $fault: "client",
500
- ...opts,
501
- });
502
- Object.setPrototypeOf(this, FileCacheNotFound.prototype);
503
- this.Message = opts.Message;
504
- }
505
- };
506
- exports.SnapshotNotFound = class SnapshotNotFound extends __BaseException {
507
- name = "SnapshotNotFound";
508
- $fault = "client";
509
- Message;
510
- constructor(opts) {
511
- super({
512
- name: "SnapshotNotFound",
513
- $fault: "client",
514
- ...opts,
515
- });
516
- Object.setPrototypeOf(this, SnapshotNotFound.prototype);
517
- this.Message = opts.Message;
518
- }
519
- };
520
- exports.InvalidDataRepositoryType = class InvalidDataRepositoryType extends __BaseException {
521
- name = "InvalidDataRepositoryType";
522
- $fault = "client";
523
- Message;
524
- constructor(opts) {
525
- super({
526
- name: "InvalidDataRepositoryType",
527
- $fault: "client",
528
- ...opts,
529
- });
530
- Object.setPrototypeOf(this, InvalidDataRepositoryType.prototype);
531
- this.Message = opts.Message;
532
- }
533
- };
534
- exports.S3AccessPointAttachmentNotFound = class S3AccessPointAttachmentNotFound extends __BaseException {
535
- name = "S3AccessPointAttachmentNotFound";
536
- $fault = "client";
537
- Message;
538
- constructor(opts) {
539
- super({
540
- name: "S3AccessPointAttachmentNotFound",
541
- $fault: "client",
542
- ...opts,
543
- });
544
- Object.setPrototypeOf(this, S3AccessPointAttachmentNotFound.prototype);
545
- this.Message = opts.Message;
546
- }
547
- };
548
- exports.NotServiceResourceError = class NotServiceResourceError extends __BaseException {
549
- name = "NotServiceResourceError";
550
- $fault = "client";
551
- ResourceARN;
552
- Message;
553
- constructor(opts) {
554
- super({
555
- name: "NotServiceResourceError",
556
- $fault: "client",
557
- ...opts,
558
- });
559
- Object.setPrototypeOf(this, NotServiceResourceError.prototype);
560
- this.ResourceARN = opts.ResourceARN;
561
- this.Message = opts.Message;
562
- }
563
- };
564
- exports.ResourceDoesNotSupportTagging = class ResourceDoesNotSupportTagging extends __BaseException {
565
- name = "ResourceDoesNotSupportTagging";
566
- $fault = "client";
567
- ResourceARN;
568
- Message;
569
- constructor(opts) {
570
- super({
571
- name: "ResourceDoesNotSupportTagging",
572
- $fault: "client",
573
- ...opts,
574
- });
575
- Object.setPrototypeOf(this, ResourceDoesNotSupportTagging.prototype);
576
- this.ResourceARN = opts.ResourceARN;
577
- this.Message = opts.Message;
578
- }
579
- };
580
- exports.ResourceNotFound = class ResourceNotFound extends __BaseException {
581
- name = "ResourceNotFound";
582
- $fault = "client";
583
- ResourceARN;
584
- Message;
585
- constructor(opts) {
586
- super({
587
- name: "ResourceNotFound",
588
- $fault: "client",
589
- ...opts,
590
- });
591
- Object.setPrototypeOf(this, ResourceNotFound.prototype);
592
- this.ResourceARN = opts.ResourceARN;
593
- this.Message = opts.Message;
594
- }
595
- };
@@ -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;
@@ -1,12 +0,0 @@
1
- const { Sha256 } = require("@aws-crypto/sha256-js");
2
- const { getRuntimeConfig: getBrowserRuntimeConfig } = require("./runtimeConfig.browser");
3
- const getRuntimeConfig = (config) => {
4
- const browserDefaults = getBrowserRuntimeConfig(config);
5
- return {
6
- ...browserDefaults,
7
- ...config,
8
- runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
- };
11
- };
12
- exports.getRuntimeConfig = getRuntimeConfig;