@aws-sdk/client-ram 3.46.0 → 3.48.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 (44) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist-cjs/RAM.js +15 -0
  3. package/dist-cjs/commands/ListPermissionVersionsCommand.js +36 -0
  4. package/dist-cjs/commands/index.js +1 -0
  5. package/dist-cjs/endpoints.js +0 -20
  6. package/dist-cjs/models/models_0.js +14 -134
  7. package/dist-cjs/pagination/ListPermissionVersionsPaginator.js +35 -0
  8. package/dist-cjs/pagination/index.js +1 -0
  9. package/dist-cjs/protocols/Aws_restJson1.js +124 -1
  10. package/dist-cjs/runtimeConfig.browser.js +7 -2
  11. package/dist-cjs/runtimeConfig.js +10 -2
  12. package/dist-es/RAM.js +15 -0
  13. package/dist-es/commands/ListPermissionVersionsCommand.js +39 -0
  14. package/dist-es/commands/index.js +1 -0
  15. package/dist-es/endpoints.js +0 -20
  16. package/dist-es/models/models_0.js +8 -88
  17. package/dist-es/pagination/ListPermissionVersionsPaginator.js +74 -0
  18. package/dist-es/pagination/index.js +1 -0
  19. package/dist-es/protocols/Aws_restJson1.js +138 -0
  20. package/dist-es/runtimeConfig.browser.js +12 -3
  21. package/dist-es/runtimeConfig.js +13 -4
  22. package/dist-types/RAM.d.ts +7 -0
  23. package/dist-types/RAMClient.d.ts +8 -3
  24. package/dist-types/commands/ListPermissionVersionsCommand.d.ts +35 -0
  25. package/dist-types/commands/index.d.ts +1 -0
  26. package/dist-types/models/models_0.d.ts +57 -133
  27. package/dist-types/pagination/ListPermissionVersionsPaginator.d.ts +4 -0
  28. package/dist-types/pagination/index.d.ts +1 -0
  29. package/dist-types/protocols/Aws_restJson1.d.ts +3 -0
  30. package/dist-types/runtimeConfig.browser.d.ts +3 -2
  31. package/dist-types/runtimeConfig.d.ts +4 -3
  32. package/dist-types/runtimeConfig.native.d.ts +1 -0
  33. package/dist-types/ts3.4/RAM.d.ts +5 -0
  34. package/dist-types/ts3.4/RAMClient.d.ts +6 -3
  35. package/dist-types/ts3.4/commands/ListPermissionVersionsCommand.d.ts +17 -0
  36. package/dist-types/ts3.4/commands/index.d.ts +1 -0
  37. package/dist-types/ts3.4/models/models_0.d.ts +22 -88
  38. package/dist-types/ts3.4/pagination/ListPermissionVersionsPaginator.d.ts +4 -0
  39. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  40. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +3 -0
  41. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +3 -2
  42. package/dist-types/ts3.4/runtimeConfig.d.ts +4 -3
  43. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -0
  44. package/package.json +35 -35
@@ -15,13 +15,18 @@ const util_body_length_node_1 = require("@aws-sdk/util-body-length-node");
15
15
  const util_user_agent_node_1 = require("@aws-sdk/util-user-agent-node");
16
16
  const util_utf8_node_1 = require("@aws-sdk/util-utf8-node");
17
17
  const runtimeConfig_shared_1 = require("./runtimeConfig.shared");
18
+ const smithy_client_1 = require("@aws-sdk/smithy-client");
19
+ const util_defaults_mode_node_1 = require("@aws-sdk/util-defaults-mode-node");
18
20
  const getRuntimeConfig = (config) => {
19
21
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
22
+ const defaultsMode = util_defaults_mode_node_1.resolveDefaultsModeConfig(config);
23
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
20
24
  const clientSharedValues = runtimeConfig_shared_1.getRuntimeConfig(config);
21
25
  return {
22
26
  ...clientSharedValues,
23
27
  ...config,
24
28
  runtime: "node",
29
+ defaultsMode,
25
30
  base64Decoder: (_a = config === null || config === void 0 ? void 0 : config.base64Decoder) !== null && _a !== void 0 ? _a : util_base64_node_1.fromBase64,
26
31
  base64Encoder: (_b = config === null || config === void 0 ? void 0 : config.base64Encoder) !== null && _b !== void 0 ? _b : util_base64_node_1.toBase64,
27
32
  bodyLengthChecker: (_c = config === null || config === void 0 ? void 0 : config.bodyLengthChecker) !== null && _c !== void 0 ? _c : util_body_length_node_1.calculateBodyLength,
@@ -29,8 +34,11 @@ const getRuntimeConfig = (config) => {
29
34
  defaultUserAgentProvider: (_e = config === null || config === void 0 ? void 0 : config.defaultUserAgentProvider) !== null && _e !== void 0 ? _e : util_user_agent_node_1.defaultUserAgent({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
30
35
  maxAttempts: (_f = config === null || config === void 0 ? void 0 : config.maxAttempts) !== null && _f !== void 0 ? _f : node_config_provider_1.loadConfig(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS),
31
36
  region: (_g = config === null || config === void 0 ? void 0 : config.region) !== null && _g !== void 0 ? _g : node_config_provider_1.loadConfig(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS),
32
- requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(),
33
- retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig(middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS),
37
+ requestHandler: (_h = config === null || config === void 0 ? void 0 : config.requestHandler) !== null && _h !== void 0 ? _h : new node_http_handler_1.NodeHttpHandler(defaultConfigProvider),
38
+ retryMode: (_j = config === null || config === void 0 ? void 0 : config.retryMode) !== null && _j !== void 0 ? _j : node_config_provider_1.loadConfig({
39
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || middleware_retry_1.DEFAULT_RETRY_MODE,
41
+ }),
34
42
  sha256: (_k = config === null || config === void 0 ? void 0 : config.sha256) !== null && _k !== void 0 ? _k : hash_node_1.Hash.bind(null, "sha256"),
35
43
  streamCollector: (_l = config === null || config === void 0 ? void 0 : config.streamCollector) !== null && _l !== void 0 ? _l : node_http_handler_1.streamCollector,
36
44
  useDualstackEndpoint: (_m = config === null || config === void 0 ? void 0 : config.useDualstackEndpoint) !== null && _m !== void 0 ? _m : node_config_provider_1.loadConfig(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS),
package/dist-es/RAM.js CHANGED
@@ -14,6 +14,7 @@ import { GetResourceShareInvitationsCommand, } from "./commands/GetResourceShare
14
14
  import { GetResourceSharesCommand, } from "./commands/GetResourceSharesCommand";
15
15
  import { ListPendingInvitationResourcesCommand, } from "./commands/ListPendingInvitationResourcesCommand";
16
16
  import { ListPermissionsCommand, } from "./commands/ListPermissionsCommand";
17
+ import { ListPermissionVersionsCommand, } from "./commands/ListPermissionVersionsCommand";
17
18
  import { ListPrincipalsCommand, } from "./commands/ListPrincipalsCommand";
18
19
  import { ListResourcesCommand, } from "./commands/ListResourcesCommand";
19
20
  import { ListResourceSharePermissionsCommand, } from "./commands/ListResourceSharePermissionsCommand";
@@ -239,6 +240,20 @@ var RAM = (function (_super) {
239
240
  return this.send(command, optionsOrCb);
240
241
  }
241
242
  };
243
+ RAM.prototype.listPermissionVersions = function (args, optionsOrCb, cb) {
244
+ var command = new ListPermissionVersionsCommand(args);
245
+ if (typeof optionsOrCb === "function") {
246
+ this.send(command, optionsOrCb);
247
+ }
248
+ else if (typeof cb === "function") {
249
+ if (typeof optionsOrCb !== "object")
250
+ throw new Error("Expect http options but get " + typeof optionsOrCb);
251
+ this.send(command, optionsOrCb || {}, cb);
252
+ }
253
+ else {
254
+ return this.send(command, optionsOrCb);
255
+ }
256
+ };
242
257
  RAM.prototype.listPrincipals = function (args, optionsOrCb, cb) {
243
258
  var command = new ListPrincipalsCommand(args);
244
259
  if (typeof optionsOrCb === "function") {
@@ -0,0 +1,39 @@
1
+ import { __extends } from "tslib";
2
+ import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
+ import { Command as $Command } from "@aws-sdk/smithy-client";
4
+ import { ListPermissionVersionsRequest, ListPermissionVersionsResponse } from "../models/models_0";
5
+ import { deserializeAws_restJson1ListPermissionVersionsCommand, serializeAws_restJson1ListPermissionVersionsCommand, } from "../protocols/Aws_restJson1";
6
+ var ListPermissionVersionsCommand = (function (_super) {
7
+ __extends(ListPermissionVersionsCommand, _super);
8
+ function ListPermissionVersionsCommand(input) {
9
+ var _this = _super.call(this) || this;
10
+ _this.input = input;
11
+ return _this;
12
+ }
13
+ ListPermissionVersionsCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
14
+ this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
+ var stack = clientStack.concat(this.middlewareStack);
16
+ var logger = configuration.logger;
17
+ var clientName = "RAMClient";
18
+ var commandName = "ListPermissionVersionsCommand";
19
+ var handlerExecutionContext = {
20
+ logger: logger,
21
+ clientName: clientName,
22
+ commandName: commandName,
23
+ inputFilterSensitiveLog: ListPermissionVersionsRequest.filterSensitiveLog,
24
+ outputFilterSensitiveLog: ListPermissionVersionsResponse.filterSensitiveLog,
25
+ };
26
+ var requestHandler = configuration.requestHandler;
27
+ return stack.resolve(function (request) {
28
+ return requestHandler.handle(request.request, options || {});
29
+ }, handlerExecutionContext);
30
+ };
31
+ ListPermissionVersionsCommand.prototype.serialize = function (input, context) {
32
+ return serializeAws_restJson1ListPermissionVersionsCommand(input, context);
33
+ };
34
+ ListPermissionVersionsCommand.prototype.deserialize = function (output, context) {
35
+ return deserializeAws_restJson1ListPermissionVersionsCommand(output, context);
36
+ };
37
+ return ListPermissionVersionsCommand;
38
+ }($Command));
39
+ export { ListPermissionVersionsCommand };
@@ -12,6 +12,7 @@ export * from "./GetResourceShareAssociationsCommand";
12
12
  export * from "./GetResourceShareInvitationsCommand";
13
13
  export * from "./GetResourceSharesCommand";
14
14
  export * from "./ListPendingInvitationResourcesCommand";
15
+ export * from "./ListPermissionVersionsCommand";
15
16
  export * from "./ListPermissionsCommand";
16
17
  export * from "./ListPrincipalsCommand";
17
18
  export * from "./ListResourceSharePermissionsCommand";
@@ -3,10 +3,6 @@ import { getRegionInfo } from "@aws-sdk/config-resolver";
3
3
  var regionHash = {
4
4
  "ca-central-1": {
5
5
  variants: [
6
- {
7
- hostname: "ram.ca-central-1.amazonaws.com",
8
- tags: [],
9
- },
10
6
  {
11
7
  hostname: "ram-fips.ca-central-1.amazonaws.com",
12
8
  tags: ["fips"],
@@ -15,10 +11,6 @@ var regionHash = {
15
11
  },
16
12
  "us-east-1": {
17
13
  variants: [
18
- {
19
- hostname: "ram.us-east-1.amazonaws.com",
20
- tags: [],
21
- },
22
14
  {
23
15
  hostname: "ram-fips.us-east-1.amazonaws.com",
24
16
  tags: ["fips"],
@@ -27,10 +19,6 @@ var regionHash = {
27
19
  },
28
20
  "us-east-2": {
29
21
  variants: [
30
- {
31
- hostname: "ram.us-east-2.amazonaws.com",
32
- tags: [],
33
- },
34
22
  {
35
23
  hostname: "ram-fips.us-east-2.amazonaws.com",
36
24
  tags: ["fips"],
@@ -57,10 +45,6 @@ var regionHash = {
57
45
  },
58
46
  "us-west-1": {
59
47
  variants: [
60
- {
61
- hostname: "ram.us-west-1.amazonaws.com",
62
- tags: [],
63
- },
64
48
  {
65
49
  hostname: "ram-fips.us-west-1.amazonaws.com",
66
50
  tags: ["fips"],
@@ -69,10 +53,6 @@ var regionHash = {
69
53
  },
70
54
  "us-west-2": {
71
55
  variants: [
72
- {
73
- hostname: "ram.us-west-2.amazonaws.com",
74
- tags: [],
75
- },
76
56
  {
77
57
  hostname: "ram-fips.us-west-2.amazonaws.com",
78
58
  tags: ["fips"],
@@ -15,46 +15,6 @@ export var AcceptResourceShareInvitationResponse;
15
15
  (function (AcceptResourceShareInvitationResponse) {
16
16
  AcceptResourceShareInvitationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
17
17
  })(AcceptResourceShareInvitationResponse || (AcceptResourceShareInvitationResponse = {}));
18
- export var IdempotentParameterMismatchException;
19
- (function (IdempotentParameterMismatchException) {
20
- IdempotentParameterMismatchException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
21
- })(IdempotentParameterMismatchException || (IdempotentParameterMismatchException = {}));
22
- export var InvalidClientTokenException;
23
- (function (InvalidClientTokenException) {
24
- InvalidClientTokenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
25
- })(InvalidClientTokenException || (InvalidClientTokenException = {}));
26
- export var MalformedArnException;
27
- (function (MalformedArnException) {
28
- MalformedArnException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
29
- })(MalformedArnException || (MalformedArnException = {}));
30
- export var OperationNotPermittedException;
31
- (function (OperationNotPermittedException) {
32
- OperationNotPermittedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
33
- })(OperationNotPermittedException || (OperationNotPermittedException = {}));
34
- export var ResourceShareInvitationAlreadyAcceptedException;
35
- (function (ResourceShareInvitationAlreadyAcceptedException) {
36
- ResourceShareInvitationAlreadyAcceptedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
37
- })(ResourceShareInvitationAlreadyAcceptedException || (ResourceShareInvitationAlreadyAcceptedException = {}));
38
- export var ResourceShareInvitationAlreadyRejectedException;
39
- (function (ResourceShareInvitationAlreadyRejectedException) {
40
- ResourceShareInvitationAlreadyRejectedException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
41
- })(ResourceShareInvitationAlreadyRejectedException || (ResourceShareInvitationAlreadyRejectedException = {}));
42
- export var ResourceShareInvitationArnNotFoundException;
43
- (function (ResourceShareInvitationArnNotFoundException) {
44
- ResourceShareInvitationArnNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
45
- })(ResourceShareInvitationArnNotFoundException || (ResourceShareInvitationArnNotFoundException = {}));
46
- export var ResourceShareInvitationExpiredException;
47
- (function (ResourceShareInvitationExpiredException) {
48
- ResourceShareInvitationExpiredException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
49
- })(ResourceShareInvitationExpiredException || (ResourceShareInvitationExpiredException = {}));
50
- export var ServerInternalException;
51
- (function (ServerInternalException) {
52
- ServerInternalException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
53
- })(ServerInternalException || (ServerInternalException = {}));
54
- export var ServiceUnavailableException;
55
- (function (ServiceUnavailableException) {
56
- ServiceUnavailableException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
57
- })(ServiceUnavailableException || (ServiceUnavailableException = {}));
58
18
  export var AssociateResourceShareRequest;
59
19
  (function (AssociateResourceShareRequest) {
60
20
  AssociateResourceShareRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -63,26 +23,6 @@ export var AssociateResourceShareResponse;
63
23
  (function (AssociateResourceShareResponse) {
64
24
  AssociateResourceShareResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
65
25
  })(AssociateResourceShareResponse || (AssociateResourceShareResponse = {}));
66
- export var InvalidParameterException;
67
- (function (InvalidParameterException) {
68
- InvalidParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
69
- })(InvalidParameterException || (InvalidParameterException = {}));
70
- export var InvalidStateTransitionException;
71
- (function (InvalidStateTransitionException) {
72
- InvalidStateTransitionException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
73
- })(InvalidStateTransitionException || (InvalidStateTransitionException = {}));
74
- export var ResourceShareLimitExceededException;
75
- (function (ResourceShareLimitExceededException) {
76
- ResourceShareLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
77
- })(ResourceShareLimitExceededException || (ResourceShareLimitExceededException = {}));
78
- export var ThrottlingException;
79
- (function (ThrottlingException) {
80
- ThrottlingException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
81
- })(ThrottlingException || (ThrottlingException = {}));
82
- export var UnknownResourceException;
83
- (function (UnknownResourceException) {
84
- UnknownResourceException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
85
- })(UnknownResourceException || (UnknownResourceException = {}));
86
26
  export var AssociateResourceSharePermissionRequest;
87
27
  (function (AssociateResourceSharePermissionRequest) {
88
28
  AssociateResourceSharePermissionRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -107,10 +47,6 @@ export var CreateResourceShareResponse;
107
47
  (function (CreateResourceShareResponse) {
108
48
  CreateResourceShareResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
109
49
  })(CreateResourceShareResponse || (CreateResourceShareResponse = {}));
110
- export var TagPolicyViolationException;
111
- (function (TagPolicyViolationException) {
112
- TagPolicyViolationException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
113
- })(TagPolicyViolationException || (TagPolicyViolationException = {}));
114
50
  export var DeleteResourceShareRequest;
115
51
  (function (DeleteResourceShareRequest) {
116
52
  DeleteResourceShareRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -163,14 +99,6 @@ export var GetResourcePoliciesResponse;
163
99
  (function (GetResourcePoliciesResponse) {
164
100
  GetResourcePoliciesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
165
101
  })(GetResourcePoliciesResponse || (GetResourcePoliciesResponse = {}));
166
- export var InvalidNextTokenException;
167
- (function (InvalidNextTokenException) {
168
- InvalidNextTokenException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
169
- })(InvalidNextTokenException || (InvalidNextTokenException = {}));
170
- export var ResourceArnNotFoundException;
171
- (function (ResourceArnNotFoundException) {
172
- ResourceArnNotFoundException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
- })(ResourceArnNotFoundException || (ResourceArnNotFoundException = {}));
174
102
  export var GetResourceShareAssociationsRequest;
175
103
  (function (GetResourceShareAssociationsRequest) {
176
104
  GetResourceShareAssociationsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -187,10 +115,6 @@ export var GetResourceShareInvitationsResponse;
187
115
  (function (GetResourceShareInvitationsResponse) {
188
116
  GetResourceShareInvitationsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
189
117
  })(GetResourceShareInvitationsResponse || (GetResourceShareInvitationsResponse = {}));
190
- export var InvalidMaxResultsException;
191
- (function (InvalidMaxResultsException) {
192
- InvalidMaxResultsException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
193
- })(InvalidMaxResultsException || (InvalidMaxResultsException = {}));
194
118
  export var ResourceOwner;
195
119
  (function (ResourceOwner) {
196
120
  ResourceOwner["OTHER_ACCOUNTS"] = "OTHER-ACCOUNTS";
@@ -231,10 +155,6 @@ export var ListPendingInvitationResourcesResponse;
231
155
  (function (ListPendingInvitationResourcesResponse) {
232
156
  ListPendingInvitationResourcesResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
233
157
  })(ListPendingInvitationResourcesResponse || (ListPendingInvitationResourcesResponse = {}));
234
- export var MissingRequiredParameterException;
235
- (function (MissingRequiredParameterException) {
236
- MissingRequiredParameterException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
237
- })(MissingRequiredParameterException || (MissingRequiredParameterException = {}));
238
158
  export var ListPermissionsRequest;
239
159
  (function (ListPermissionsRequest) {
240
160
  ListPermissionsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -247,6 +167,14 @@ export var ListPermissionsResponse;
247
167
  (function (ListPermissionsResponse) {
248
168
  ListPermissionsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
249
169
  })(ListPermissionsResponse || (ListPermissionsResponse = {}));
170
+ export var ListPermissionVersionsRequest;
171
+ (function (ListPermissionVersionsRequest) {
172
+ ListPermissionVersionsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
173
+ })(ListPermissionVersionsRequest || (ListPermissionVersionsRequest = {}));
174
+ export var ListPermissionVersionsResponse;
175
+ (function (ListPermissionVersionsResponse) {
176
+ ListPermissionVersionsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
177
+ })(ListPermissionVersionsResponse || (ListPermissionVersionsResponse = {}));
250
178
  export var ListPrincipalsRequest;
251
179
  (function (ListPrincipalsRequest) {
252
180
  ListPrincipalsRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -259,10 +187,6 @@ export var ListPrincipalsResponse;
259
187
  (function (ListPrincipalsResponse) {
260
188
  ListPrincipalsResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
261
189
  })(ListPrincipalsResponse || (ListPrincipalsResponse = {}));
262
- export var InvalidResourceTypeException;
263
- (function (InvalidResourceTypeException) {
264
- InvalidResourceTypeException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
265
- })(InvalidResourceTypeException || (InvalidResourceTypeException = {}));
266
190
  export var ListResourcesRequest;
267
191
  (function (ListResourcesRequest) {
268
192
  ListResourcesRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -307,10 +231,6 @@ export var RejectResourceShareInvitationResponse;
307
231
  (function (RejectResourceShareInvitationResponse) {
308
232
  RejectResourceShareInvitationResponse.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
309
233
  })(RejectResourceShareInvitationResponse || (RejectResourceShareInvitationResponse = {}));
310
- export var TagLimitExceededException;
311
- (function (TagLimitExceededException) {
312
- TagLimitExceededException.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
313
- })(TagLimitExceededException || (TagLimitExceededException = {}));
314
234
  export var TagResourceRequest;
315
235
  (function (TagResourceRequest) {
316
236
  TagResourceRequest.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -0,0 +1,74 @@
1
+ import { __asyncGenerator, __await, __awaiter, __generator, __read, __spreadArray } from "tslib";
2
+ import { ListPermissionVersionsCommand, } from "../commands/ListPermissionVersionsCommand";
3
+ import { RAM } from "../RAM";
4
+ import { RAMClient } from "../RAMClient";
5
+ var makePagedClientRequest = function (client, input) {
6
+ var args = [];
7
+ for (var _i = 2; _i < arguments.length; _i++) {
8
+ args[_i - 2] = arguments[_i];
9
+ }
10
+ return __awaiter(void 0, void 0, void 0, function () {
11
+ return __generator(this, function (_a) {
12
+ switch (_a.label) {
13
+ case 0: return [4, client.send.apply(client, __spreadArray([new ListPermissionVersionsCommand(input)], __read(args)))];
14
+ case 1: return [2, _a.sent()];
15
+ }
16
+ });
17
+ });
18
+ };
19
+ var makePagedRequest = function (client, input) {
20
+ var args = [];
21
+ for (var _i = 2; _i < arguments.length; _i++) {
22
+ args[_i - 2] = arguments[_i];
23
+ }
24
+ return __awaiter(void 0, void 0, void 0, function () {
25
+ return __generator(this, function (_a) {
26
+ switch (_a.label) {
27
+ case 0: return [4, client.listPermissionVersions.apply(client, __spreadArray([input], __read(args)))];
28
+ case 1: return [2, _a.sent()];
29
+ }
30
+ });
31
+ });
32
+ };
33
+ export function paginateListPermissionVersions(config, input) {
34
+ var additionalArguments = [];
35
+ for (var _i = 2; _i < arguments.length; _i++) {
36
+ additionalArguments[_i - 2] = arguments[_i];
37
+ }
38
+ return __asyncGenerator(this, arguments, function paginateListPermissionVersions_1() {
39
+ var token, hasNext, page;
40
+ return __generator(this, function (_a) {
41
+ switch (_a.label) {
42
+ case 0:
43
+ token = config.startingToken || undefined;
44
+ hasNext = true;
45
+ _a.label = 1;
46
+ case 1:
47
+ if (!hasNext) return [3, 9];
48
+ input.nextToken = token;
49
+ input["maxResults"] = config.pageSize;
50
+ if (!(config.client instanceof RAM)) return [3, 3];
51
+ return [4, __await(makePagedRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
52
+ case 2:
53
+ page = _a.sent();
54
+ return [3, 6];
55
+ case 3:
56
+ if (!(config.client instanceof RAMClient)) return [3, 5];
57
+ return [4, __await(makePagedClientRequest.apply(void 0, __spreadArray([config.client, input], __read(additionalArguments))))];
58
+ case 4:
59
+ page = _a.sent();
60
+ return [3, 6];
61
+ case 5: throw new Error("Invalid client, expected RAM | RAMClient");
62
+ case 6: return [4, __await(page)];
63
+ case 7: return [4, _a.sent()];
64
+ case 8:
65
+ _a.sent();
66
+ token = page.nextToken;
67
+ hasNext = !!token;
68
+ return [3, 1];
69
+ case 9: return [4, __await(undefined)];
70
+ case 10: return [2, _a.sent()];
71
+ }
72
+ });
73
+ });
74
+ }
@@ -4,6 +4,7 @@ export * from "./GetResourceShareInvitationsPaginator";
4
4
  export * from "./GetResourceSharesPaginator";
5
5
  export * from "./Interfaces";
6
6
  export * from "./ListPendingInvitationResourcesPaginator";
7
+ export * from "./ListPermissionVersionsPaginator";
7
8
  export * from "./ListPermissionsPaginator";
8
9
  export * from "./ListPrincipalsPaginator";
9
10
  export * from "./ListResourceSharePermissionsPaginator";
@@ -411,6 +411,30 @@ export var serializeAws_restJson1ListPermissionsCommand = function (input, conte
411
411
  }
412
412
  });
413
413
  }); };
414
+ export var serializeAws_restJson1ListPermissionVersionsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
415
+ var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
416
+ return __generator(this, function (_c) {
417
+ switch (_c.label) {
418
+ case 0: return [4, context.endpoint()];
419
+ case 1:
420
+ _a = _c.sent(), hostname = _a.hostname, _b = _a.protocol, protocol = _b === void 0 ? "https" : _b, port = _a.port, basePath = _a.path;
421
+ headers = {
422
+ "content-type": "application/json",
423
+ };
424
+ resolvedPath = "" + ((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/listpermissionversions";
425
+ body = JSON.stringify(__assign(__assign(__assign({}, (input.maxResults !== undefined && input.maxResults !== null && { maxResults: input.maxResults })), (input.nextToken !== undefined && input.nextToken !== null && { nextToken: input.nextToken })), (input.permissionArn !== undefined && input.permissionArn !== null && { permissionArn: input.permissionArn })));
426
+ return [2, new __HttpRequest({
427
+ protocol: protocol,
428
+ hostname: hostname,
429
+ port: port,
430
+ method: "POST",
431
+ headers: headers,
432
+ path: resolvedPath,
433
+ body: body,
434
+ })];
435
+ }
436
+ });
437
+ }); };
414
438
  export var serializeAws_restJson1ListPrincipalsCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
415
439
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
416
440
  return __generator(this, function (_c) {
@@ -2438,6 +2462,120 @@ var deserializeAws_restJson1ListPermissionsCommandError = function (output, cont
2438
2462
  }
2439
2463
  });
2440
2464
  }); };
2465
+ export var deserializeAws_restJson1ListPermissionVersionsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2466
+ var contents, data, _a, _b;
2467
+ return __generator(this, function (_c) {
2468
+ switch (_c.label) {
2469
+ case 0:
2470
+ if (output.statusCode !== 200 && output.statusCode >= 300) {
2471
+ return [2, deserializeAws_restJson1ListPermissionVersionsCommandError(output, context)];
2472
+ }
2473
+ contents = {
2474
+ $metadata: deserializeMetadata(output),
2475
+ nextToken: undefined,
2476
+ permissions: undefined,
2477
+ };
2478
+ _a = __expectNonNull;
2479
+ _b = __expectObject;
2480
+ return [4, parseBody(output.body, context)];
2481
+ case 1:
2482
+ data = _a.apply(void 0, [_b.apply(void 0, [_c.sent()]), "body"]);
2483
+ if (data.nextToken !== undefined && data.nextToken !== null) {
2484
+ contents.nextToken = __expectString(data.nextToken);
2485
+ }
2486
+ if (data.permissions !== undefined && data.permissions !== null) {
2487
+ contents.permissions = deserializeAws_restJson1ResourceSharePermissionList(data.permissions, context);
2488
+ }
2489
+ return [2, Promise.resolve(contents)];
2490
+ }
2491
+ });
2492
+ }); };
2493
+ var deserializeAws_restJson1ListPermissionVersionsCommandError = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2494
+ var parsedOutput, _a, response, errorCode, _b, _c, _d, _e, _f, _g, _h, _j, parsedBody, message;
2495
+ var _k;
2496
+ return __generator(this, function (_l) {
2497
+ switch (_l.label) {
2498
+ case 0:
2499
+ _a = [__assign({}, output)];
2500
+ _k = {};
2501
+ return [4, parseBody(output.body, context)];
2502
+ case 1:
2503
+ parsedOutput = __assign.apply(void 0, _a.concat([(_k.body = _l.sent(), _k)]));
2504
+ errorCode = "UnknownError";
2505
+ errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2506
+ _b = errorCode;
2507
+ switch (_b) {
2508
+ case "InvalidNextTokenException": return [3, 2];
2509
+ case "com.amazonaws.ram#InvalidNextTokenException": return [3, 2];
2510
+ case "InvalidParameterException": return [3, 4];
2511
+ case "com.amazonaws.ram#InvalidParameterException": return [3, 4];
2512
+ case "MalformedArnException": return [3, 6];
2513
+ case "com.amazonaws.ram#MalformedArnException": return [3, 6];
2514
+ case "OperationNotPermittedException": return [3, 8];
2515
+ case "com.amazonaws.ram#OperationNotPermittedException": return [3, 8];
2516
+ case "ServerInternalException": return [3, 10];
2517
+ case "com.amazonaws.ram#ServerInternalException": return [3, 10];
2518
+ case "ServiceUnavailableException": return [3, 12];
2519
+ case "com.amazonaws.ram#ServiceUnavailableException": return [3, 12];
2520
+ case "UnknownResourceException": return [3, 14];
2521
+ case "com.amazonaws.ram#UnknownResourceException": return [3, 14];
2522
+ }
2523
+ return [3, 16];
2524
+ case 2:
2525
+ _c = [{}];
2526
+ return [4, deserializeAws_restJson1InvalidNextTokenExceptionResponse(parsedOutput, context)];
2527
+ case 3:
2528
+ response = __assign.apply(void 0, [__assign.apply(void 0, _c.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2529
+ return [3, 17];
2530
+ case 4:
2531
+ _d = [{}];
2532
+ return [4, deserializeAws_restJson1InvalidParameterExceptionResponse(parsedOutput, context)];
2533
+ case 5:
2534
+ response = __assign.apply(void 0, [__assign.apply(void 0, _d.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2535
+ return [3, 17];
2536
+ case 6:
2537
+ _e = [{}];
2538
+ return [4, deserializeAws_restJson1MalformedArnExceptionResponse(parsedOutput, context)];
2539
+ case 7:
2540
+ response = __assign.apply(void 0, [__assign.apply(void 0, _e.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2541
+ return [3, 17];
2542
+ case 8:
2543
+ _f = [{}];
2544
+ return [4, deserializeAws_restJson1OperationNotPermittedExceptionResponse(parsedOutput, context)];
2545
+ case 9:
2546
+ response = __assign.apply(void 0, [__assign.apply(void 0, _f.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2547
+ return [3, 17];
2548
+ case 10:
2549
+ _g = [{}];
2550
+ return [4, deserializeAws_restJson1ServerInternalExceptionResponse(parsedOutput, context)];
2551
+ case 11:
2552
+ response = __assign.apply(void 0, [__assign.apply(void 0, _g.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2553
+ return [3, 17];
2554
+ case 12:
2555
+ _h = [{}];
2556
+ return [4, deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context)];
2557
+ case 13:
2558
+ response = __assign.apply(void 0, [__assign.apply(void 0, _h.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2559
+ return [3, 17];
2560
+ case 14:
2561
+ _j = [{}];
2562
+ return [4, deserializeAws_restJson1UnknownResourceExceptionResponse(parsedOutput, context)];
2563
+ case 15:
2564
+ response = __assign.apply(void 0, [__assign.apply(void 0, _j.concat([(_l.sent())])), { name: errorCode, $metadata: deserializeMetadata(output) }]);
2565
+ return [3, 17];
2566
+ case 16:
2567
+ parsedBody = parsedOutput.body;
2568
+ errorCode = parsedBody.code || parsedBody.Code || errorCode;
2569
+ response = __assign(__assign({}, parsedBody), { name: "" + errorCode, message: parsedBody.message || parsedBody.Message || errorCode, $fault: "client", $metadata: deserializeMetadata(output) });
2570
+ _l.label = 17;
2571
+ case 17:
2572
+ message = response.message || response.Message || errorCode;
2573
+ response.message = message;
2574
+ delete response.Message;
2575
+ return [2, Promise.reject(Object.assign(new Error(message), response))];
2576
+ }
2577
+ });
2578
+ }); };
2441
2579
  export var deserializeAws_restJson1ListPrincipalsCommand = function (output, context) { return __awaiter(void 0, void 0, void 0, function () {
2442
2580
  var contents, data, _a, _b;
2443
2581
  return __generator(this, function (_c) {
@@ -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,19 +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 { loadConfigsForDefaultMode } from "@aws-sdk/smithy-client";
16
+ import { resolveDefaultsModeConfig } from "@aws-sdk/util-defaults-mode-node";
15
17
  export var getRuntimeConfig = function (config) {
16
18
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
19
+ var defaultsMode = resolveDefaultsModeConfig(config);
20
+ var defaultConfigProvider = function () { return defaultsMode().then(loadConfigsForDefaultMode); };
17
21
  var clientSharedValues = getSharedRuntimeConfig(config);
18
- 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 });
19
28
  };