@aws-sdk/client-directory-service 3.45.0 → 3.47.2

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.
@@ -29,30 +29,6 @@ export var AcceptSharedDirectoryResult;
29
29
  (function (AcceptSharedDirectoryResult) {
30
30
  AcceptSharedDirectoryResult.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.SharedDirectory && { SharedDirectory: SharedDirectory.filterSensitiveLog(obj.SharedDirectory) }))); };
31
31
  })(AcceptSharedDirectoryResult || (AcceptSharedDirectoryResult = {}));
32
- export var ClientException;
33
- (function (ClientException) {
34
- ClientException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
35
- })(ClientException || (ClientException = {}));
36
- export var DirectoryAlreadySharedException;
37
- (function (DirectoryAlreadySharedException) {
38
- DirectoryAlreadySharedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
39
- })(DirectoryAlreadySharedException || (DirectoryAlreadySharedException = {}));
40
- export var EntityDoesNotExistException;
41
- (function (EntityDoesNotExistException) {
42
- EntityDoesNotExistException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
43
- })(EntityDoesNotExistException || (EntityDoesNotExistException = {}));
44
- export var InvalidParameterException;
45
- (function (InvalidParameterException) {
46
- InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
47
- })(InvalidParameterException || (InvalidParameterException = {}));
48
- export var ServiceException;
49
- (function (ServiceException) {
50
- ServiceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
51
- })(ServiceException || (ServiceException = {}));
52
- export var AccessDeniedException;
53
- (function (AccessDeniedException) {
54
- AccessDeniedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
55
- })(AccessDeniedException || (AccessDeniedException = {}));
56
32
  export var IpRoute;
57
33
  (function (IpRoute) {
58
34
  IpRoute.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -65,18 +41,6 @@ export var AddIpRoutesResult;
65
41
  (function (AddIpRoutesResult) {
66
42
  AddIpRoutesResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
67
43
  })(AddIpRoutesResult || (AddIpRoutesResult = {}));
68
- export var DirectoryUnavailableException;
69
- (function (DirectoryUnavailableException) {
70
- DirectoryUnavailableException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
71
- })(DirectoryUnavailableException || (DirectoryUnavailableException = {}));
72
- export var EntityAlreadyExistsException;
73
- (function (EntityAlreadyExistsException) {
74
- EntityAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
75
- })(EntityAlreadyExistsException || (EntityAlreadyExistsException = {}));
76
- export var IpRouteLimitExceededException;
77
- (function (IpRouteLimitExceededException) {
78
- IpRouteLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
79
- })(IpRouteLimitExceededException || (IpRouteLimitExceededException = {}));
80
44
  export var DirectoryVpcSettings;
81
45
  (function (DirectoryVpcSettings) {
82
46
  DirectoryVpcSettings.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -89,22 +53,6 @@ export var AddRegionResult;
89
53
  (function (AddRegionResult) {
90
54
  AddRegionResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
91
55
  })(AddRegionResult || (AddRegionResult = {}));
92
- export var DirectoryAlreadyInRegionException;
93
- (function (DirectoryAlreadyInRegionException) {
94
- DirectoryAlreadyInRegionException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
95
- })(DirectoryAlreadyInRegionException || (DirectoryAlreadyInRegionException = {}));
96
- export var DirectoryDoesNotExistException;
97
- (function (DirectoryDoesNotExistException) {
98
- DirectoryDoesNotExistException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
99
- })(DirectoryDoesNotExistException || (DirectoryDoesNotExistException = {}));
100
- export var RegionLimitExceededException;
101
- (function (RegionLimitExceededException) {
102
- RegionLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
103
- })(RegionLimitExceededException || (RegionLimitExceededException = {}));
104
- export var UnsupportedOperationException;
105
- (function (UnsupportedOperationException) {
106
- UnsupportedOperationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
107
- })(UnsupportedOperationException || (UnsupportedOperationException = {}));
108
56
  export var Tag;
109
57
  (function (Tag) {
110
58
  Tag.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -117,18 +65,10 @@ export var AddTagsToResourceResult;
117
65
  (function (AddTagsToResourceResult) {
118
66
  AddTagsToResourceResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
119
67
  })(AddTagsToResourceResult || (AddTagsToResourceResult = {}));
120
- export var TagLimitExceededException;
121
- (function (TagLimitExceededException) {
122
- TagLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
123
- })(TagLimitExceededException || (TagLimitExceededException = {}));
124
68
  export var Attribute;
125
69
  (function (Attribute) {
126
70
  Attribute.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
127
71
  })(Attribute || (Attribute = {}));
128
- export var AuthenticationFailedException;
129
- (function (AuthenticationFailedException) {
130
- AuthenticationFailedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
131
- })(AuthenticationFailedException || (AuthenticationFailedException = {}));
132
72
  export var CancelSchemaExtensionRequest;
133
73
  (function (CancelSchemaExtensionRequest) {
134
74
  CancelSchemaExtensionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -159,26 +99,10 @@ export var Certificate;
159
99
  (function (Certificate) {
160
100
  Certificate.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
161
101
  })(Certificate || (Certificate = {}));
162
- export var CertificateAlreadyExistsException;
163
- (function (CertificateAlreadyExistsException) {
164
- CertificateAlreadyExistsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
165
- })(CertificateAlreadyExistsException || (CertificateAlreadyExistsException = {}));
166
- export var CertificateDoesNotExistException;
167
- (function (CertificateDoesNotExistException) {
168
- CertificateDoesNotExistException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
169
- })(CertificateDoesNotExistException || (CertificateDoesNotExistException = {}));
170
102
  export var CertificateInfo;
171
103
  (function (CertificateInfo) {
172
104
  CertificateInfo.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
105
  })(CertificateInfo || (CertificateInfo = {}));
174
- export var CertificateInUseException;
175
- (function (CertificateInUseException) {
176
- CertificateInUseException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
177
- })(CertificateInUseException || (CertificateInUseException = {}));
178
- export var CertificateLimitExceededException;
179
- (function (CertificateLimitExceededException) {
180
- CertificateLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
181
- })(CertificateLimitExceededException || (CertificateLimitExceededException = {}));
182
106
  export var ClientAuthenticationStatus;
183
107
  (function (ClientAuthenticationStatus) {
184
108
  ClientAuthenticationStatus["DISABLED"] = "Disabled";
@@ -221,10 +145,6 @@ export var ConnectDirectoryResult;
221
145
  (function (ConnectDirectoryResult) {
222
146
  ConnectDirectoryResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
223
147
  })(ConnectDirectoryResult || (ConnectDirectoryResult = {}));
224
- export var DirectoryLimitExceededException;
225
- (function (DirectoryLimitExceededException) {
226
- DirectoryLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
227
- })(DirectoryLimitExceededException || (DirectoryLimitExceededException = {}));
228
148
  export var CreateAliasRequest;
229
149
  (function (CreateAliasRequest) {
230
150
  CreateAliasRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -265,10 +185,6 @@ export var CreateLogSubscriptionResult;
265
185
  (function (CreateLogSubscriptionResult) {
266
186
  CreateLogSubscriptionResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
267
187
  })(CreateLogSubscriptionResult || (CreateLogSubscriptionResult = {}));
268
- export var InsufficientPermissionsException;
269
- (function (InsufficientPermissionsException) {
270
- InsufficientPermissionsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
271
- })(InsufficientPermissionsException || (InsufficientPermissionsException = {}));
272
188
  export var DirectoryEdition;
273
189
  (function (DirectoryEdition) {
274
190
  DirectoryEdition["ENTERPRISE"] = "Enterprise";
@@ -290,10 +206,6 @@ export var CreateSnapshotResult;
290
206
  (function (CreateSnapshotResult) {
291
207
  CreateSnapshotResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
292
208
  })(CreateSnapshotResult || (CreateSnapshotResult = {}));
293
- export var SnapshotLimitExceededException;
294
- (function (SnapshotLimitExceededException) {
295
- SnapshotLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
296
- })(SnapshotLimitExceededException || (SnapshotLimitExceededException = {}));
297
209
  export var SelectiveAuth;
298
210
  (function (SelectiveAuth) {
299
211
  SelectiveAuth["DISABLED"] = "Disabled";
@@ -468,10 +380,6 @@ export var DescribeDirectoriesResult;
468
380
  DirectoryDescriptions: obj.DirectoryDescriptions.map(function (item) { return DirectoryDescription.filterSensitiveLog(item); }),
469
381
  }))); };
470
382
  })(DescribeDirectoriesResult || (DescribeDirectoriesResult = {}));
471
- export var InvalidNextTokenException;
472
- (function (InvalidNextTokenException) {
473
- InvalidNextTokenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
474
- })(InvalidNextTokenException || (InvalidNextTokenException = {}));
475
383
  export var DescribeDomainControllersRequest;
476
384
  (function (DescribeDomainControllersRequest) {
477
385
  DescribeDomainControllersRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -616,10 +524,6 @@ export var DirectoryLimits;
616
524
  (function (DirectoryLimits) {
617
525
  DirectoryLimits.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
618
526
  })(DirectoryLimits || (DirectoryLimits = {}));
619
- export var DirectoryNotSharedException;
620
- (function (DirectoryNotSharedException) {
621
- DirectoryNotSharedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
622
- })(DirectoryNotSharedException || (DirectoryNotSharedException = {}));
623
527
  export var DisableClientAuthenticationRequest;
624
528
  (function (DisableClientAuthenticationRequest) {
625
529
  DisableClientAuthenticationRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -628,10 +532,6 @@ export var DisableClientAuthenticationResult;
628
532
  (function (DisableClientAuthenticationResult) {
629
533
  DisableClientAuthenticationResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
630
534
  })(DisableClientAuthenticationResult || (DisableClientAuthenticationResult = {}));
631
- export var InvalidClientAuthStatusException;
632
- (function (InvalidClientAuthStatusException) {
633
- InvalidClientAuthStatusException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
634
- })(InvalidClientAuthStatusException || (InvalidClientAuthStatusException = {}));
635
535
  export var DisableLDAPSRequest;
636
536
  (function (DisableLDAPSRequest) {
637
537
  DisableLDAPSRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -640,10 +540,6 @@ export var DisableLDAPSResult;
640
540
  (function (DisableLDAPSResult) {
641
541
  DisableLDAPSResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
642
542
  })(DisableLDAPSResult || (DisableLDAPSResult = {}));
643
- export var InvalidLDAPSStatusException;
644
- (function (InvalidLDAPSStatusException) {
645
- InvalidLDAPSStatusException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
646
- })(InvalidLDAPSStatusException || (InvalidLDAPSStatusException = {}));
647
543
  export var DisableRadiusRequest;
648
544
  (function (DisableRadiusRequest) {
649
545
  DisableRadiusRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -668,10 +564,6 @@ export var EnableClientAuthenticationResult;
668
564
  (function (EnableClientAuthenticationResult) {
669
565
  EnableClientAuthenticationResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
670
566
  })(EnableClientAuthenticationResult || (EnableClientAuthenticationResult = {}));
671
- export var NoAvailableCertificateException;
672
- (function (NoAvailableCertificateException) {
673
- NoAvailableCertificateException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
674
- })(NoAvailableCertificateException || (NoAvailableCertificateException = {}));
675
567
  export var EnableLDAPSRequest;
676
568
  (function (EnableLDAPSRequest) {
677
569
  EnableLDAPSRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -789,10 +681,6 @@ export var ListTagsForResourceResult;
789
681
  (function (ListTagsForResourceResult) {
790
682
  ListTagsForResourceResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
791
683
  })(ListTagsForResourceResult || (ListTagsForResourceResult = {}));
792
- export var InvalidCertificateException;
793
- (function (InvalidCertificateException) {
794
- InvalidCertificateException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
795
- })(InvalidCertificateException || (InvalidCertificateException = {}));
796
684
  export var RegisterCertificateRequest;
797
685
  (function (RegisterCertificateRequest) {
798
686
  RegisterCertificateRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -841,10 +729,6 @@ export var RemoveTagsFromResourceResult;
841
729
  (function (RemoveTagsFromResourceResult) {
842
730
  RemoveTagsFromResourceResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
843
731
  })(RemoveTagsFromResourceResult || (RemoveTagsFromResourceResult = {}));
844
- export var InvalidPasswordException;
845
- (function (InvalidPasswordException) {
846
- InvalidPasswordException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
847
- })(InvalidPasswordException || (InvalidPasswordException = {}));
848
732
  export var ResetUserPasswordRequest;
849
733
  (function (ResetUserPasswordRequest) {
850
734
  ResetUserPasswordRequest.filterSensitiveLog = function (obj) { return (__assign(__assign({}, obj), (obj.NewPassword && { NewPassword: SENSITIVE_STRING }))); };
@@ -853,10 +737,6 @@ export var ResetUserPasswordResult;
853
737
  (function (ResetUserPasswordResult) {
854
738
  ResetUserPasswordResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
855
739
  })(ResetUserPasswordResult || (ResetUserPasswordResult = {}));
856
- export var UserDoesNotExistException;
857
- (function (UserDoesNotExistException) {
858
- UserDoesNotExistException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
859
- })(UserDoesNotExistException || (UserDoesNotExistException = {}));
860
740
  export var RestoreFromSnapshotRequest;
861
741
  (function (RestoreFromSnapshotRequest) {
862
742
  RestoreFromSnapshotRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -865,14 +745,6 @@ export var RestoreFromSnapshotResult;
865
745
  (function (RestoreFromSnapshotResult) {
866
746
  RestoreFromSnapshotResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
867
747
  })(RestoreFromSnapshotResult || (RestoreFromSnapshotResult = {}));
868
- export var InvalidTargetException;
869
- (function (InvalidTargetException) {
870
- InvalidTargetException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
871
- })(InvalidTargetException || (InvalidTargetException = {}));
872
- export var OrganizationsException;
873
- (function (OrganizationsException) {
874
- OrganizationsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
875
- })(OrganizationsException || (OrganizationsException = {}));
876
748
  export var TargetType;
877
749
  (function (TargetType) {
878
750
  TargetType["ACCOUNT"] = "ACCOUNT";
@@ -889,10 +761,6 @@ export var ShareDirectoryResult;
889
761
  (function (ShareDirectoryResult) {
890
762
  ShareDirectoryResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
891
763
  })(ShareDirectoryResult || (ShareDirectoryResult = {}));
892
- export var ShareLimitExceededException;
893
- (function (ShareLimitExceededException) {
894
- ShareLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
895
- })(ShareLimitExceededException || (ShareLimitExceededException = {}));
896
764
  export var StartSchemaExtensionRequest;
897
765
  (function (StartSchemaExtensionRequest) {
898
766
  StartSchemaExtensionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -921,10 +789,6 @@ export var UpdateConditionalForwarderResult;
921
789
  (function (UpdateConditionalForwarderResult) {
922
790
  UpdateConditionalForwarderResult.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
923
791
  })(UpdateConditionalForwarderResult || (UpdateConditionalForwarderResult = {}));
924
- export var DomainControllerLimitExceededException;
925
- (function (DomainControllerLimitExceededException) {
926
- DomainControllerLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
927
- })(DomainControllerLimitExceededException || (DomainControllerLimitExceededException = {}));
928
792
  export var UpdateNumberOfDomainControllersRequest;
929
793
  (function (UpdateNumberOfDomainControllersRequest) {
930
794
  UpdateNumberOfDomainControllersRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,8 +1,8 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { Sha256 } from "@aws-crypto/sha256-browser";
4
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@aws-sdk/config-resolver";
5
- import { FetchHttpHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/fetch-http-handler";
6
6
  import { invalidProvider } from "@aws-sdk/invalid-dependency";
7
7
  import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@aws-sdk/middleware-retry";
8
8
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser";
@@ -10,8 +10,17 @@ import { calculateBodyLength } from "@aws-sdk/util-body-length-browser";
10
10
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser";
11
11
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser";
12
12
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
13
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
14
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-browser";
13
15
  export var getRuntimeConfig = function (config) {
14
16
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
17
+ var defaultsMode = resolveDefaultsModeConfig(config);
18
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
15
19
  var clientSharedValues = getSharedRuntimeConfig(config);
16
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new FetchHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return Promise.resolve(DEFAULT_RETRY_MODE); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
20
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "browser", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : (function (_) { return function () { return Promise.reject(new Error("Credential is missing")); }; }), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : DEFAULT_MAX_ATTEMPTS, region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : invalidProvider("Region is missing"), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : (function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
21
+ switch (_a.label) {
22
+ case 0: return [4, defaultConfigProvider()];
23
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
24
+ }
25
+ }); }); }), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Sha256, streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : (function () { return Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT); }), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : (function () { return Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT); }), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
17
26
  };
@@ -1,21 +1,28 @@
1
- import { __assign } from "tslib";
1
+ import { __assign, __awaiter, __generator } from "tslib";
2
2
  import packageInfo from "../package.json";
3
3
  import { decorateDefaultCredentialProvider } from "@aws-sdk/client-sts";
4
4
  import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@aws-sdk/config-resolver";
5
5
  import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
6
6
  import { Hash } from "@aws-sdk/hash-node";
7
- import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@aws-sdk/middleware-retry";
7
+ import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@aws-sdk/middleware-retry";
8
8
  import { loadConfig as loadNodeConfig } from "@aws-sdk/node-config-provider";
9
- import { NodeHttpHandler, streamCollector } from "@aws-sdk/node-http-handler";
9
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@aws-sdk/node-http-handler";
10
10
  import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node";
11
11
  import { calculateBodyLength } from "@aws-sdk/util-body-length-node";
12
12
  import { defaultUserAgent } from "@aws-sdk/util-user-agent-node";
13
13
  import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node";
14
14
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
15
- import { emitWarningIfUnsupportedVersion } from "@aws-sdk/smithy-client";
15
+ import { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
16
17
  export var getRuntimeConfig = function (config) {
17
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
18
- emitWarningIfUnsupportedVersion(process.version);
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
19
21
  var clientSharedValues = getSharedRuntimeConfig(config);
20
- return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new NodeHttpHandler(), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(NODE_RETRY_MODE_CONFIG_OPTIONS), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
22
+ return __assign(__assign(__assign({}, clientSharedValues), config), { runtime: "node", defaultsMode: defaultsMode, base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : fromBase64, base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : toBase64, bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : calculateBodyLength, credentialDefaultProvider: (_d = config === null || config === void 0 ? void 0 : config.credentialDefaultProvider) !== null && _d !== void 0 ? _d : decorateDefaultCredentialProvider(credentialDefaultProvider), defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }), maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS), region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS), requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new RequestHandler(defaultConfigProvider), retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : loadNodeConfig(__assign(__assign({}, NODE_RETRY_MODE_CONFIG_OPTIONS), { default: function () { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0: return [4, defaultConfigProvider()];
25
+ case 1: return [2, (_a.sent()).retryMode || DEFAULT_RETRY_MODE];
26
+ }
27
+ }); }); } })), sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : Hash.bind(null, "sha256"), streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : streamCollector, useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS), useFipsEndpoint: (_o = config === null || config === void 0 ? void 0 : config.useFipsEndpoint) !== null && _o !== void 0 ? _o : loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS), utf8Decoder: (_p = config === null || config === void 0 ? void 0 : config.utf8Decoder) !== null && _p !== void 0 ? _p : fromUtf8, utf8Encoder: (_q = config === null || config === void 0 ? void 0 : config.utf8Encoder) !== null && _q !== void 0 ? _q : toUtf8 });
21
28
  };
@@ -4,7 +4,7 @@ import { RetryInputConfig, RetryResolvedConfig } from "@aws-sdk/middleware-retry
4
4
  import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
5
5
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
6
6
  import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http";
7
- import { Client as __Client, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
7
+ import { Client as __Client, DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@aws-sdk/smithy-client";
8
8
  import { Credentials as __Credentials, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, RegionInfoProvider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@aws-sdk/types";
9
9
  import { AcceptSharedDirectoryCommandInput, AcceptSharedDirectoryCommandOutput } from "./commands/AcceptSharedDirectoryCommand";
10
10
  import { AddIpRoutesCommandInput, AddIpRoutesCommandOutput } from "./commands/AddIpRoutesCommand";
@@ -171,6 +171,10 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
171
171
  * @internal
172
172
  */
173
173
  defaultUserAgentProvider?: Provider<__UserAgent>;
174
+ /**
175
+ * The {@link DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
176
+ */
177
+ defaultsMode?: DefaultsMode | Provider<DefaultsMode>;
174
178
  }
175
179
  declare type DirectoryServiceClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointsInputConfig & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig;
176
180
  /**