@aws-sdk/nested-clients 3.997.6 → 3.997.8

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 (216) hide show
  1. package/dist-cjs/submodules/cognito-identity/index.js +520 -52
  2. package/dist-cjs/submodules/signin/index.js +454 -49
  3. package/dist-cjs/submodules/sso/index.js +399 -49
  4. package/dist-cjs/submodules/sso-oidc/index.js +593 -49
  5. package/dist-cjs/submodules/sts/index.js +835 -55
  6. package/dist-es/submodules/cognito-identity/CognitoIdentity.js +1 -1
  7. package/dist-es/submodules/cognito-identity/CognitoIdentityClient.js +5 -5
  8. package/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +1 -1
  9. package/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js +2 -2
  10. package/dist-es/submodules/cognito-identity/commands/GetIdCommand.js +2 -2
  11. package/dist-es/submodules/cognito-identity/endpoint/bdd.js +1 -1
  12. package/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js +1 -1
  13. package/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -1
  14. package/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +4 -6
  15. package/dist-es/submodules/cognito-identity/runtimeConfig.js +4 -8
  16. package/dist-es/submodules/cognito-identity/runtimeConfig.shared.js +3 -4
  17. package/dist-es/submodules/cognito-identity/runtimeExtensions.js +2 -2
  18. package/dist-es/submodules/signin/Signin.js +1 -1
  19. package/dist-es/submodules/signin/SigninClient.js +5 -5
  20. package/dist-es/submodules/signin/auth/httpAuthSchemeProvider.js +1 -1
  21. package/dist-es/submodules/signin/commands/CreateOAuth2TokenCommand.js +2 -2
  22. package/dist-es/submodules/signin/endpoint/bdd.js +1 -1
  23. package/dist-es/submodules/signin/endpoint/endpointResolver.js +1 -1
  24. package/dist-es/submodules/signin/models/SigninServiceException.js +1 -1
  25. package/dist-es/submodules/signin/runtimeConfig.browser.js +4 -6
  26. package/dist-es/submodules/signin/runtimeConfig.js +4 -8
  27. package/dist-es/submodules/signin/runtimeConfig.shared.js +3 -4
  28. package/dist-es/submodules/signin/runtimeExtensions.js +2 -2
  29. package/dist-es/submodules/sso/SSO.js +1 -1
  30. package/dist-es/submodules/sso/SSOClient.js +5 -5
  31. package/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js +1 -1
  32. package/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js +2 -2
  33. package/dist-es/submodules/sso/endpoint/bdd.js +1 -1
  34. package/dist-es/submodules/sso/endpoint/endpointResolver.js +1 -1
  35. package/dist-es/submodules/sso/models/SSOServiceException.js +1 -1
  36. package/dist-es/submodules/sso/runtimeConfig.browser.js +4 -6
  37. package/dist-es/submodules/sso/runtimeConfig.js +4 -8
  38. package/dist-es/submodules/sso/runtimeConfig.shared.js +3 -4
  39. package/dist-es/submodules/sso/runtimeExtensions.js +2 -2
  40. package/dist-es/submodules/sso-oidc/SSOOIDC.js +1 -1
  41. package/dist-es/submodules/sso-oidc/SSOOIDCClient.js +5 -5
  42. package/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +1 -1
  43. package/dist-es/submodules/sso-oidc/commands/CreateTokenCommand.js +2 -2
  44. package/dist-es/submodules/sso-oidc/endpoint/bdd.js +1 -1
  45. package/dist-es/submodules/sso-oidc/endpoint/endpointResolver.js +1 -1
  46. package/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -1
  47. package/dist-es/submodules/sso-oidc/runtimeConfig.browser.js +4 -6
  48. package/dist-es/submodules/sso-oidc/runtimeConfig.js +4 -8
  49. package/dist-es/submodules/sso-oidc/runtimeConfig.shared.js +3 -4
  50. package/dist-es/submodules/sso-oidc/runtimeExtensions.js +2 -2
  51. package/dist-es/submodules/sts/STS.js +1 -1
  52. package/dist-es/submodules/sts/STSClient.js +5 -5
  53. package/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js +5 -10
  54. package/dist-es/submodules/sts/commands/AssumeRoleCommand.js +2 -2
  55. package/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js +2 -2
  56. package/dist-es/submodules/sts/defaultStsRoleAssumers.js +0 -5
  57. package/dist-es/submodules/sts/endpoint/bdd.js +1 -1
  58. package/dist-es/submodules/sts/endpoint/endpointResolver.js +1 -1
  59. package/dist-es/submodules/sts/models/STSServiceException.js +1 -1
  60. package/dist-es/submodules/sts/runtimeConfig.browser.js +4 -6
  61. package/dist-es/submodules/sts/runtimeConfig.js +4 -8
  62. package/dist-es/submodules/sts/runtimeConfig.shared.js +3 -4
  63. package/dist-es/submodules/sts/runtimeExtensions.js +2 -2
  64. package/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +5 -5
  65. package/dist-types/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +6 -4
  66. package/dist-types/submodules/cognito-identity/commands/GetIdCommand.d.ts +6 -4
  67. package/dist-types/submodules/cognito-identity/endpoint/bdd.d.ts +1 -1
  68. package/dist-types/submodules/cognito-identity/extensionConfiguration.d.ts +1 -1
  69. package/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -1
  70. package/dist-types/submodules/cognito-identity/models/errors.d.ts +1 -1
  71. package/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +4 -4
  72. package/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +3 -3
  73. package/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +4 -4
  74. package/dist-types/submodules/signin/SigninClient.d.ts +5 -5
  75. package/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +6 -4
  76. package/dist-types/submodules/signin/endpoint/bdd.d.ts +1 -1
  77. package/dist-types/submodules/signin/extensionConfiguration.d.ts +1 -1
  78. package/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -1
  79. package/dist-types/submodules/signin/models/errors.d.ts +1 -1
  80. package/dist-types/submodules/signin/runtimeConfig.browser.d.ts +4 -4
  81. package/dist-types/submodules/signin/runtimeConfig.d.ts +3 -3
  82. package/dist-types/submodules/signin/runtimeConfig.native.d.ts +4 -4
  83. package/dist-types/submodules/sso/SSOClient.d.ts +5 -5
  84. package/dist-types/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +6 -4
  85. package/dist-types/submodules/sso/endpoint/bdd.d.ts +1 -1
  86. package/dist-types/submodules/sso/extensionConfiguration.d.ts +1 -1
  87. package/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -1
  88. package/dist-types/submodules/sso/models/errors.d.ts +1 -1
  89. package/dist-types/submodules/sso/runtimeConfig.browser.d.ts +4 -4
  90. package/dist-types/submodules/sso/runtimeConfig.d.ts +3 -3
  91. package/dist-types/submodules/sso/runtimeConfig.native.d.ts +4 -4
  92. package/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +5 -5
  93. package/dist-types/submodules/sso-oidc/commands/CreateTokenCommand.d.ts +6 -4
  94. package/dist-types/submodules/sso-oidc/endpoint/bdd.d.ts +1 -1
  95. package/dist-types/submodules/sso-oidc/extensionConfiguration.d.ts +1 -1
  96. package/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -1
  97. package/dist-types/submodules/sso-oidc/models/errors.d.ts +1 -1
  98. package/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +4 -4
  99. package/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +3 -3
  100. package/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +4 -4
  101. package/dist-types/submodules/sts/STSClient.d.ts +5 -5
  102. package/dist-types/submodules/sts/auth/httpAuthSchemeProvider.d.ts +3 -13
  103. package/dist-types/submodules/sts/commands/AssumeRoleCommand.d.ts +6 -4
  104. package/dist-types/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +6 -4
  105. package/dist-types/submodules/sts/defaultStsRoleAssumers.d.ts +0 -9
  106. package/dist-types/submodules/sts/endpoint/bdd.d.ts +1 -1
  107. package/dist-types/submodules/sts/extensionConfiguration.d.ts +1 -1
  108. package/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -1
  109. package/dist-types/submodules/sts/models/errors.d.ts +1 -1
  110. package/dist-types/submodules/sts/runtimeConfig.browser.d.ts +4 -4
  111. package/dist-types/submodules/sts/runtimeConfig.d.ts +3 -3
  112. package/dist-types/submodules/sts/runtimeConfig.native.d.ts +4 -4
  113. package/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentityClient.d.ts +8 -14
  114. package/dist-types/ts3.4/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +6 -4
  115. package/dist-types/ts3.4/submodules/cognito-identity/commands/GetIdCommand.d.ts +6 -4
  116. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/bdd.d.ts +1 -1
  117. package/dist-types/ts3.4/submodules/cognito-identity/extensionConfiguration.d.ts +1 -1
  118. package/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -1
  119. package/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +1 -1
  120. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +4 -4
  121. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +3 -3
  122. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +5 -5
  123. package/dist-types/ts3.4/submodules/signin/SigninClient.d.ts +8 -14
  124. package/dist-types/ts3.4/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +6 -4
  125. package/dist-types/ts3.4/submodules/signin/endpoint/bdd.d.ts +1 -1
  126. package/dist-types/ts3.4/submodules/signin/extensionConfiguration.d.ts +1 -1
  127. package/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -1
  128. package/dist-types/ts3.4/submodules/signin/models/errors.d.ts +1 -1
  129. package/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +4 -4
  130. package/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +3 -3
  131. package/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +5 -5
  132. package/dist-types/ts3.4/submodules/sso/SSOClient.d.ts +8 -14
  133. package/dist-types/ts3.4/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +6 -4
  134. package/dist-types/ts3.4/submodules/sso/endpoint/bdd.d.ts +1 -1
  135. package/dist-types/ts3.4/submodules/sso/extensionConfiguration.d.ts +1 -1
  136. package/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -1
  137. package/dist-types/ts3.4/submodules/sso/models/errors.d.ts +1 -1
  138. package/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +4 -4
  139. package/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +3 -3
  140. package/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +5 -5
  141. package/dist-types/ts3.4/submodules/sso-oidc/SSOOIDCClient.d.ts +8 -14
  142. package/dist-types/ts3.4/submodules/sso-oidc/commands/CreateTokenCommand.d.ts +6 -4
  143. package/dist-types/ts3.4/submodules/sso-oidc/endpoint/bdd.d.ts +1 -1
  144. package/dist-types/ts3.4/submodules/sso-oidc/extensionConfiguration.d.ts +1 -1
  145. package/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -1
  146. package/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +1 -1
  147. package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +4 -4
  148. package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +3 -3
  149. package/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +5 -5
  150. package/dist-types/ts3.4/submodules/sts/STSClient.d.ts +8 -14
  151. package/dist-types/ts3.4/submodules/sts/auth/httpAuthSchemeProvider.d.ts +2 -12
  152. package/dist-types/ts3.4/submodules/sts/commands/AssumeRoleCommand.d.ts +6 -4
  153. package/dist-types/ts3.4/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.d.ts +6 -4
  154. package/dist-types/ts3.4/submodules/sts/defaultStsRoleAssumers.d.ts +0 -3
  155. package/dist-types/ts3.4/submodules/sts/endpoint/bdd.d.ts +1 -1
  156. package/dist-types/ts3.4/submodules/sts/extensionConfiguration.d.ts +1 -1
  157. package/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -1
  158. package/dist-types/ts3.4/submodules/sts/models/errors.d.ts +1 -1
  159. package/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +4 -4
  160. package/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +3 -3
  161. package/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +5 -5
  162. package/package.json +13 -34
  163. package/dist-cjs/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +0 -60
  164. package/dist-cjs/submodules/cognito-identity/endpoint/bdd.js +0 -100
  165. package/dist-cjs/submodules/cognito-identity/endpoint/endpointResolver.js +0 -18
  166. package/dist-cjs/submodules/cognito-identity/models/CognitoIdentityServiceException.js +0 -12
  167. package/dist-cjs/submodules/cognito-identity/models/errors.js +0 -121
  168. package/dist-cjs/submodules/cognito-identity/runtimeConfig.browser.js +0 -38
  169. package/dist-cjs/submodules/cognito-identity/runtimeConfig.js +0 -54
  170. package/dist-cjs/submodules/cognito-identity/runtimeConfig.native.js +0 -15
  171. package/dist-cjs/submodules/cognito-identity/runtimeConfig.shared.js +0 -50
  172. package/dist-cjs/submodules/cognito-identity/schemas/schemas_0.js +0 -110
  173. package/dist-cjs/submodules/signin/auth/httpAuthSchemeProvider.js +0 -56
  174. package/dist-cjs/submodules/signin/endpoint/bdd.js +0 -90
  175. package/dist-cjs/submodules/signin/endpoint/endpointResolver.js +0 -18
  176. package/dist-cjs/submodules/signin/models/SigninServiceException.js +0 -12
  177. package/dist-cjs/submodules/signin/models/errors.js +0 -64
  178. package/dist-cjs/submodules/signin/runtimeConfig.browser.js +0 -39
  179. package/dist-cjs/submodules/signin/runtimeConfig.js +0 -54
  180. package/dist-cjs/submodules/signin/runtimeConfig.native.js +0 -15
  181. package/dist-cjs/submodules/signin/runtimeConfig.shared.js +0 -49
  182. package/dist-cjs/submodules/signin/schemas/schemas_0.js +0 -125
  183. package/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +0 -56
  184. package/dist-cjs/submodules/sso/endpoint/bdd.js +0 -80
  185. package/dist-cjs/submodules/sso/endpoint/endpointResolver.js +0 -18
  186. package/dist-cjs/submodules/sso/models/SSOServiceException.js +0 -12
  187. package/dist-cjs/submodules/sso/models/errors.js +0 -56
  188. package/dist-cjs/submodules/sso/runtimeConfig.browser.js +0 -38
  189. package/dist-cjs/submodules/sso/runtimeConfig.js +0 -54
  190. package/dist-cjs/submodules/sso/runtimeConfig.native.js +0 -15
  191. package/dist-cjs/submodules/sso/runtimeConfig.shared.js +0 -49
  192. package/dist-cjs/submodules/sso/schemas/schemas_0.js +0 -90
  193. package/dist-cjs/submodules/sso-oidc/auth/httpAuthSchemeProvider.js +0 -56
  194. package/dist-cjs/submodules/sso-oidc/endpoint/bdd.js +0 -80
  195. package/dist-cjs/submodules/sso-oidc/endpoint/endpointResolver.js +0 -18
  196. package/dist-cjs/submodules/sso-oidc/models/SSOOIDCServiceException.js +0 -12
  197. package/dist-cjs/submodules/sso-oidc/models/errors.js +0 -195
  198. package/dist-cjs/submodules/sso-oidc/runtimeConfig.browser.js +0 -38
  199. package/dist-cjs/submodules/sso-oidc/runtimeConfig.js +0 -54
  200. package/dist-cjs/submodules/sso-oidc/runtimeConfig.native.js +0 -15
  201. package/dist-cjs/submodules/sso-oidc/runtimeConfig.shared.js +0 -49
  202. package/dist-cjs/submodules/sso-oidc/schemas/schemas_0.js +0 -140
  203. package/dist-cjs/submodules/sts/STSClient.js +0 -55
  204. package/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js +0 -43
  205. package/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js +0 -144
  206. package/dist-cjs/submodules/sts/endpoint/EndpointParameters.js +0 -19
  207. package/dist-cjs/submodules/sts/endpoint/bdd.js +0 -150
  208. package/dist-cjs/submodules/sts/endpoint/endpointResolver.js +0 -18
  209. package/dist-cjs/submodules/sts/models/STSServiceException.js +0 -12
  210. package/dist-cjs/submodules/sts/models/errors.js +0 -96
  211. package/dist-cjs/submodules/sts/runtimeConfig.browser.js +0 -39
  212. package/dist-cjs/submodules/sts/runtimeConfig.js +0 -74
  213. package/dist-cjs/submodules/sts/runtimeConfig.native.js +0 -15
  214. package/dist-cjs/submodules/sts/runtimeConfig.shared.js +0 -57
  215. package/dist-cjs/submodules/sts/runtimeExtensions.js +0 -13
  216. package/dist-cjs/submodules/sts/schemas/schemas_0.js +0 -195
@@ -1,36 +1,817 @@
1
1
  'use strict';
2
2
 
3
- var STSClient = require('./STSClient');
4
- var smithyClient = require('@smithy/smithy-client');
5
- var middlewareEndpoint = require('@smithy/middleware-endpoint');
6
- var EndpointParameters = require('./endpoint/EndpointParameters');
7
- var schemas_0 = require('./schemas/schemas_0');
8
- var errors = require('./models/errors');
9
- var client = require('@aws-sdk/core/client');
3
+ var middlewareHostHeader = require('@aws-sdk/middleware-host-header');
4
+ var middlewareLogger = require('@aws-sdk/middleware-logger');
5
+ var middlewareRecursionDetection = require('@aws-sdk/middleware-recursion-detection');
6
+ var middlewareUserAgent = require('@aws-sdk/middleware-user-agent');
7
+ var core = require('@smithy/core');
8
+ var client = require('@smithy/core/client');
9
+ var config = require('@smithy/core/config');
10
+ var endpoints = require('@smithy/core/endpoints');
11
+ var protocols = require('@smithy/core/protocols');
12
+ var retry = require('@smithy/core/retry');
13
+ var schema = require('@smithy/core/schema');
14
+ var httpAuthSchemes = require('@aws-sdk/core/httpAuthSchemes');
15
+ var signatureV4MultiRegion = require('@aws-sdk/signature-v4-multi-region');
16
+ var utilEndpoints = require('@aws-sdk/util-endpoints');
17
+ var client$1 = require('@aws-sdk/core/client');
18
+ var utilUserAgentNode = require('@aws-sdk/util-user-agent-node');
19
+ var serde = require('@smithy/core/serde');
20
+ var nodeHttpHandler = require('@smithy/node-http-handler');
21
+ var protocols$1 = require('@aws-sdk/core/protocols');
10
22
  var regionConfigResolver = require('@aws-sdk/region-config-resolver');
11
- var STSServiceException = require('./models/STSServiceException');
12
23
 
13
- class AssumeRoleCommand extends smithyClient.Command
24
+ const q = "ref";
25
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "stringEquals", g = "getAttr", h = "us-east-1", i = "sigv4", j = "sts", k = "https://sts.{Region}.{PartitionResult#dnsSuffix}", l = { [q]: "Endpoint" }, m = { [q]: "Region" }, n = { [q]: d }, o = {}, p = [m];
26
+ const _data = {
27
+ conditions: [
28
+ [c, [l]],
29
+ [c, p],
30
+ ["aws.partition", p, d],
31
+ [e, [{ [q]: "UseFIPS" }, b]],
32
+ [e, [{ [q]: "UseDualStack" }, b]],
33
+ [f, [m, "aws-global"]],
34
+ [e, [{ [q]: "UseGlobalEndpoint" }, b]],
35
+ [f, [m, "eu-central-1"]],
36
+ [e, [{ fn: g, argv: [n, "supportsDualStack"] }, b]],
37
+ [e, [{ fn: g, argv: [n, "supportsFIPS"] }, b]],
38
+ [f, [m, "ap-south-1"]],
39
+ [f, [m, "eu-north-1"]],
40
+ [f, [m, "eu-west-1"]],
41
+ [f, [m, "eu-west-2"]],
42
+ [f, [m, "eu-west-3"]],
43
+ [f, [m, "sa-east-1"]],
44
+ [f, [m, h]],
45
+ [f, [m, "us-east-2"]],
46
+ [f, [m, "us-west-2"]],
47
+ [f, [m, "us-west-1"]],
48
+ [f, [m, "ca-central-1"]],
49
+ [f, [m, "ap-southeast-1"]],
50
+ [f, [m, "ap-northeast-1"]],
51
+ [f, [m, "ap-southeast-2"]],
52
+ [f, [{ fn: g, argv: [n, "name"] }, "aws-us-gov"]],
53
+ ],
54
+ results: [
55
+ [a],
56
+ ["https://sts.amazonaws.com", { authSchemes: [{ name: i, signingName: j, signingRegion: h }] }],
57
+ [k, { authSchemes: [{ name: i, signingName: j, signingRegion: "{Region}" }] }],
58
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
59
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
60
+ [l, o],
61
+ ["https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
62
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
63
+ ["https://sts.{Region}.amazonaws.com", o],
64
+ ["https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", o],
65
+ [a, "FIPS is enabled but this partition does not support FIPS"],
66
+ ["https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", o],
67
+ [a, "DualStack is enabled but this partition does not support DualStack"],
68
+ [k, o],
69
+ [a, "Invalid Configuration: Missing Region"],
70
+ ],
71
+ };
72
+ const root = 2;
73
+ const r = 100_000_000;
74
+ const nodes = new Int32Array([
75
+ -1,
76
+ 1,
77
+ -1,
78
+ 0,
79
+ 30,
80
+ 3,
81
+ 1,
82
+ 4,
83
+ r + 14,
84
+ 2,
85
+ 5,
86
+ r + 14,
87
+ 3,
88
+ 25,
89
+ 6,
90
+ 4,
91
+ 24,
92
+ 7,
93
+ 5,
94
+ r + 1,
95
+ 8,
96
+ 6,
97
+ 9,
98
+ r + 13,
99
+ 7,
100
+ r + 1,
101
+ 10,
102
+ 10,
103
+ r + 1,
104
+ 11,
105
+ 11,
106
+ r + 1,
107
+ 12,
108
+ 12,
109
+ r + 1,
110
+ 13,
111
+ 13,
112
+ r + 1,
113
+ 14,
114
+ 14,
115
+ r + 1,
116
+ 15,
117
+ 15,
118
+ r + 1,
119
+ 16,
120
+ 16,
121
+ r + 1,
122
+ 17,
123
+ 17,
124
+ r + 1,
125
+ 18,
126
+ 18,
127
+ r + 1,
128
+ 19,
129
+ 19,
130
+ r + 1,
131
+ 20,
132
+ 20,
133
+ r + 1,
134
+ 21,
135
+ 21,
136
+ r + 1,
137
+ 22,
138
+ 22,
139
+ r + 1,
140
+ 23,
141
+ 23,
142
+ r + 1,
143
+ r + 2,
144
+ 8,
145
+ r + 11,
146
+ r + 12,
147
+ 4,
148
+ 28,
149
+ 26,
150
+ 9,
151
+ 27,
152
+ r + 10,
153
+ 24,
154
+ r + 8,
155
+ r + 9,
156
+ 8,
157
+ 29,
158
+ r + 7,
159
+ 9,
160
+ r + 6,
161
+ r + 7,
162
+ 3,
163
+ r + 3,
164
+ 31,
165
+ 4,
166
+ r + 4,
167
+ r + 5,
168
+ ]);
169
+ const bdd = endpoints.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
170
+
171
+ const cache = new endpoints.EndpointCache({
172
+ size: 50,
173
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"],
174
+ });
175
+ const defaultEndpointResolver = (endpointParams, context = {}) => {
176
+ return cache.get(endpointParams, () => endpoints.decideEndpoint(bdd, {
177
+ endpointParams: endpointParams,
178
+ logger: context.logger,
179
+ }));
180
+ };
181
+ endpoints.customEndpointFunctions.aws = utilEndpoints.awsEndpointFunctions;
182
+
183
+ const createEndpointRuleSetHttpAuthSchemeParametersProvider = (defaultHttpAuthSchemeParametersProvider) => async (config, context, input) => {
184
+ if (!input) {
185
+ throw new Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");
186
+ }
187
+ const defaultParameters = await defaultHttpAuthSchemeParametersProvider(config, context, input);
188
+ const instructionsFn = client.getSmithyContext(context)?.commandInstance?.constructor
189
+ ?.getEndpointParameterInstructions;
190
+ if (!instructionsFn) {
191
+ throw new Error(`getEndpointParameterInstructions() is not defined on '${context.commandName}'`);
192
+ }
193
+ const endpointParameters = await endpoints.resolveParams(input, { getEndpointParameterInstructions: instructionsFn }, config);
194
+ return Object.assign(defaultParameters, endpointParameters);
195
+ };
196
+ const _defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
197
+ return {
198
+ operation: client.getSmithyContext(context).operation,
199
+ region: (await client.normalizeProvider(config.region)()) ||
200
+ (() => {
201
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
202
+ })(),
203
+ };
204
+ };
205
+ const defaultSTSHttpAuthSchemeParametersProvider = createEndpointRuleSetHttpAuthSchemeParametersProvider(_defaultSTSHttpAuthSchemeParametersProvider);
206
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
207
+ return {
208
+ schemeId: "aws.auth#sigv4",
209
+ signingProperties: {
210
+ name: "sts",
211
+ region: authParameters.region,
212
+ },
213
+ propertiesExtractor: (config, context) => ({
214
+ signingProperties: {
215
+ config,
216
+ context,
217
+ },
218
+ }),
219
+ };
220
+ }
221
+ function createAwsAuthSigv4aHttpAuthOption(authParameters) {
222
+ return {
223
+ schemeId: "aws.auth#sigv4a",
224
+ signingProperties: {
225
+ name: "sts",
226
+ region: authParameters.region,
227
+ },
228
+ propertiesExtractor: (config, context) => ({
229
+ signingProperties: {
230
+ config,
231
+ context,
232
+ },
233
+ }),
234
+ };
235
+ }
236
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
237
+ return {
238
+ schemeId: "smithy.api#noAuth",
239
+ };
240
+ }
241
+ const createEndpointRuleSetHttpAuthSchemeProvider = (defaultEndpointResolver, defaultHttpAuthSchemeResolver, createHttpAuthOptionFunctions) => {
242
+ const endpointRuleSetHttpAuthSchemeProvider = (authParameters) => {
243
+ const endpoint = defaultEndpointResolver(authParameters);
244
+ const authSchemes = endpoint.properties?.authSchemes;
245
+ if (!authSchemes) {
246
+ return defaultHttpAuthSchemeResolver(authParameters);
247
+ }
248
+ const options = [];
249
+ for (const scheme of authSchemes) {
250
+ const { name: resolvedName, properties = {}, ...rest } = scheme;
251
+ const name = resolvedName.toLowerCase();
252
+ if (resolvedName !== name) {
253
+ console.warn(`HttpAuthScheme has been normalized with lowercasing: '${resolvedName}' to '${name}'`);
254
+ }
255
+ let schemeId;
256
+ if (name === "sigv4a") {
257
+ schemeId = "aws.auth#sigv4a";
258
+ const sigv4Present = authSchemes.find((s) => {
259
+ const name = s.name.toLowerCase();
260
+ return name !== "sigv4a" && name.startsWith("sigv4");
261
+ });
262
+ if (signatureV4MultiRegion.SignatureV4MultiRegion.sigv4aDependency() === "none" && sigv4Present) {
263
+ continue;
264
+ }
265
+ }
266
+ else if (name.startsWith("sigv4")) {
267
+ schemeId = "aws.auth#sigv4";
268
+ }
269
+ else {
270
+ throw new Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${name}'`);
271
+ }
272
+ const createOption = createHttpAuthOptionFunctions[schemeId];
273
+ if (!createOption) {
274
+ throw new Error(`Could not find HttpAuthOption create function for '${schemeId}'`);
275
+ }
276
+ const option = createOption(authParameters);
277
+ option.schemeId = schemeId;
278
+ option.signingProperties = { ...(option.signingProperties || {}), ...rest, ...properties };
279
+ options.push(option);
280
+ }
281
+ return options;
282
+ };
283
+ return endpointRuleSetHttpAuthSchemeProvider;
284
+ };
285
+ const _defaultSTSHttpAuthSchemeProvider = (authParameters) => {
286
+ const options = [];
287
+ switch (authParameters.operation) {
288
+ case "AssumeRoleWithWebIdentity": {
289
+ options.push(createSmithyApiNoAuthHttpAuthOption());
290
+ options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
291
+ break;
292
+ }
293
+ default: {
294
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
295
+ options.push(createAwsAuthSigv4aHttpAuthOption(authParameters));
296
+ }
297
+ }
298
+ return options;
299
+ };
300
+ const defaultSTSHttpAuthSchemeProvider = createEndpointRuleSetHttpAuthSchemeProvider(defaultEndpointResolver, _defaultSTSHttpAuthSchemeProvider, {
301
+ "aws.auth#sigv4": createAwsAuthSigv4HttpAuthOption,
302
+ "aws.auth#sigv4a": createAwsAuthSigv4aHttpAuthOption,
303
+ "smithy.api#noAuth": createSmithyApiNoAuthHttpAuthOption,
304
+ });
305
+ const resolveHttpAuthSchemeConfig = (config) => {
306
+ const config_0 = httpAuthSchemes.resolveAwsSdkSigV4Config(config);
307
+ const config_1 = httpAuthSchemes.resolveAwsSdkSigV4AConfig(config_0);
308
+ return Object.assign(config_1, {
309
+ authSchemePreference: client.normalizeProvider(config.authSchemePreference ?? []),
310
+ });
311
+ };
312
+
313
+ const resolveClientEndpointParameters = (options) => {
314
+ return Object.assign(options, {
315
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
316
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
317
+ useGlobalEndpoint: options.useGlobalEndpoint ?? false,
318
+ defaultSigningName: "sts",
319
+ });
320
+ };
321
+ const commonParams = {
322
+ UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
323
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
324
+ Endpoint: { type: "builtInParams", name: "endpoint" },
325
+ Region: { type: "builtInParams", name: "region" },
326
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
327
+ };
328
+
329
+ var version = "3.997.7";
330
+ var packageInfo = {
331
+ version: version};
332
+
333
+ class STSServiceException extends client.ServiceException {
334
+ constructor(options) {
335
+ super(options);
336
+ Object.setPrototypeOf(this, STSServiceException.prototype);
337
+ }
338
+ }
339
+
340
+ class ExpiredTokenException extends STSServiceException {
341
+ name = "ExpiredTokenException";
342
+ $fault = "client";
343
+ constructor(opts) {
344
+ super({
345
+ name: "ExpiredTokenException",
346
+ $fault: "client",
347
+ ...opts,
348
+ });
349
+ Object.setPrototypeOf(this, ExpiredTokenException.prototype);
350
+ }
351
+ }
352
+ class MalformedPolicyDocumentException extends STSServiceException {
353
+ name = "MalformedPolicyDocumentException";
354
+ $fault = "client";
355
+ constructor(opts) {
356
+ super({
357
+ name: "MalformedPolicyDocumentException",
358
+ $fault: "client",
359
+ ...opts,
360
+ });
361
+ Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
362
+ }
363
+ }
364
+ class PackedPolicyTooLargeException extends STSServiceException {
365
+ name = "PackedPolicyTooLargeException";
366
+ $fault = "client";
367
+ constructor(opts) {
368
+ super({
369
+ name: "PackedPolicyTooLargeException",
370
+ $fault: "client",
371
+ ...opts,
372
+ });
373
+ Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
374
+ }
375
+ }
376
+ class RegionDisabledException extends STSServiceException {
377
+ name = "RegionDisabledException";
378
+ $fault = "client";
379
+ constructor(opts) {
380
+ super({
381
+ name: "RegionDisabledException",
382
+ $fault: "client",
383
+ ...opts,
384
+ });
385
+ Object.setPrototypeOf(this, RegionDisabledException.prototype);
386
+ }
387
+ }
388
+ class IDPRejectedClaimException extends STSServiceException {
389
+ name = "IDPRejectedClaimException";
390
+ $fault = "client";
391
+ constructor(opts) {
392
+ super({
393
+ name: "IDPRejectedClaimException",
394
+ $fault: "client",
395
+ ...opts,
396
+ });
397
+ Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
398
+ }
399
+ }
400
+ class InvalidIdentityTokenException extends STSServiceException {
401
+ name = "InvalidIdentityTokenException";
402
+ $fault = "client";
403
+ constructor(opts) {
404
+ super({
405
+ name: "InvalidIdentityTokenException",
406
+ $fault: "client",
407
+ ...opts,
408
+ });
409
+ Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
410
+ }
411
+ }
412
+ class IDPCommunicationErrorException extends STSServiceException {
413
+ name = "IDPCommunicationErrorException";
414
+ $fault = "client";
415
+ $retryable = {};
416
+ constructor(opts) {
417
+ super({
418
+ name: "IDPCommunicationErrorException",
419
+ $fault: "client",
420
+ ...opts,
421
+ });
422
+ Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
423
+ }
424
+ }
425
+
426
+ const _A = "Arn";
427
+ const _AKI = "AccessKeyId";
428
+ const _AR = "AssumeRole";
429
+ const _ARI = "AssumedRoleId";
430
+ const _ARR = "AssumeRoleRequest";
431
+ const _ARRs = "AssumeRoleResponse";
432
+ const _ARU = "AssumedRoleUser";
433
+ const _ARWWI = "AssumeRoleWithWebIdentity";
434
+ const _ARWWIR = "AssumeRoleWithWebIdentityRequest";
435
+ const _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
436
+ const _Au = "Audience";
437
+ const _C = "Credentials";
438
+ const _CA = "ContextAssertion";
439
+ const _DS = "DurationSeconds";
440
+ const _E = "Expiration";
441
+ const _EI = "ExternalId";
442
+ const _ETE = "ExpiredTokenException";
443
+ const _IDPCEE = "IDPCommunicationErrorException";
444
+ const _IDPRCE = "IDPRejectedClaimException";
445
+ const _IITE = "InvalidIdentityTokenException";
446
+ const _K = "Key";
447
+ const _MPDE = "MalformedPolicyDocumentException";
448
+ const _P = "Policy";
449
+ const _PA = "PolicyArns";
450
+ const _PAr = "ProviderArn";
451
+ const _PC = "ProvidedContexts";
452
+ const _PCLT = "ProvidedContextsListType";
453
+ const _PCr = "ProvidedContext";
454
+ const _PDT = "PolicyDescriptorType";
455
+ const _PI = "ProviderId";
456
+ const _PPS = "PackedPolicySize";
457
+ const _PPTLE = "PackedPolicyTooLargeException";
458
+ const _Pr = "Provider";
459
+ const _RA = "RoleArn";
460
+ const _RDE = "RegionDisabledException";
461
+ const _RSN = "RoleSessionName";
462
+ const _SAK = "SecretAccessKey";
463
+ const _SFWIT = "SubjectFromWebIdentityToken";
464
+ const _SI = "SourceIdentity";
465
+ const _SN = "SerialNumber";
466
+ const _ST = "SessionToken";
467
+ const _T = "Tags";
468
+ const _TC = "TokenCode";
469
+ const _TTK = "TransitiveTagKeys";
470
+ const _Ta = "Tag";
471
+ const _V = "Value";
472
+ const _WIT = "WebIdentityToken";
473
+ const _a = "arn";
474
+ const _aKST = "accessKeySecretType";
475
+ const _aQE = "awsQueryError";
476
+ const _c = "client";
477
+ const _cTT = "clientTokenType";
478
+ const _e = "error";
479
+ const _hE = "httpError";
480
+ const _m = "message";
481
+ const _pDLT = "policyDescriptorListType";
482
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
483
+ const _tLT = "tagListType";
484
+ const n0 = "com.amazonaws.sts";
485
+ const _s_registry = schema.TypeRegistry.for(_s);
486
+ var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
487
+ _s_registry.registerError(STSServiceException$, STSServiceException);
488
+ const n0_registry = schema.TypeRegistry.for(n0);
489
+ var ExpiredTokenException$ = [
490
+ -3,
491
+ n0,
492
+ _ETE,
493
+ { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
494
+ [_m],
495
+ [0],
496
+ ];
497
+ n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
498
+ var IDPCommunicationErrorException$ = [
499
+ -3,
500
+ n0,
501
+ _IDPCEE,
502
+ { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
503
+ [_m],
504
+ [0],
505
+ ];
506
+ n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
507
+ var IDPRejectedClaimException$ = [
508
+ -3,
509
+ n0,
510
+ _IDPRCE,
511
+ { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
512
+ [_m],
513
+ [0],
514
+ ];
515
+ n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
516
+ var InvalidIdentityTokenException$ = [
517
+ -3,
518
+ n0,
519
+ _IITE,
520
+ { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
521
+ [_m],
522
+ [0],
523
+ ];
524
+ n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
525
+ var MalformedPolicyDocumentException$ = [
526
+ -3,
527
+ n0,
528
+ _MPDE,
529
+ { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
530
+ [_m],
531
+ [0],
532
+ ];
533
+ n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
534
+ var PackedPolicyTooLargeException$ = [
535
+ -3,
536
+ n0,
537
+ _PPTLE,
538
+ { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
539
+ [_m],
540
+ [0],
541
+ ];
542
+ n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
543
+ var RegionDisabledException$ = [
544
+ -3,
545
+ n0,
546
+ _RDE,
547
+ { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
548
+ [_m],
549
+ [0],
550
+ ];
551
+ n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
552
+ const errorTypeRegistries = [_s_registry, n0_registry];
553
+ var accessKeySecretType = [0, n0, _aKST, 8, 0];
554
+ var clientTokenType = [0, n0, _cTT, 8, 0];
555
+ var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2];
556
+ var AssumeRoleRequest$ = [
557
+ 3,
558
+ n0,
559
+ _ARR,
560
+ 0,
561
+ [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
562
+ [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType],
563
+ 2,
564
+ ];
565
+ var AssumeRoleResponse$ = [
566
+ 3,
567
+ n0,
568
+ _ARRs,
569
+ 0,
570
+ [_C, _ARU, _PPS, _SI],
571
+ [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0],
572
+ ];
573
+ var AssumeRoleWithWebIdentityRequest$ = [
574
+ 3,
575
+ n0,
576
+ _ARWWIR,
577
+ 0,
578
+ [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
579
+ [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1],
580
+ 3,
581
+ ];
582
+ var AssumeRoleWithWebIdentityResponse$ = [
583
+ 3,
584
+ n0,
585
+ _ARWWIRs,
586
+ 0,
587
+ [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
588
+ [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0],
589
+ ];
590
+ var Credentials$ = [
591
+ 3,
592
+ n0,
593
+ _C,
594
+ 0,
595
+ [_AKI, _SAK, _ST, _E],
596
+ [0, [() => accessKeySecretType, 0], 0, 4],
597
+ 4,
598
+ ];
599
+ var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
600
+ var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
601
+ var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2];
602
+ var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
603
+ var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
604
+ var tagListType = [1, n0, _tLT, 0, () => Tag$];
605
+ var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
606
+ var AssumeRoleWithWebIdentity$ = [
607
+ 9,
608
+ n0,
609
+ _ARWWI,
610
+ 0,
611
+ () => AssumeRoleWithWebIdentityRequest$,
612
+ () => AssumeRoleWithWebIdentityResponse$,
613
+ ];
614
+
615
+ const getRuntimeConfig$1 = (config) => {
616
+ return {
617
+ apiVersion: "2011-06-15",
618
+ base64Decoder: config?.base64Decoder ?? serde.fromBase64,
619
+ base64Encoder: config?.base64Encoder ?? serde.toBase64,
620
+ disableHostPrefix: config?.disableHostPrefix ?? false,
621
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
622
+ extensions: config?.extensions ?? [],
623
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
624
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
625
+ {
626
+ schemeId: "aws.auth#sigv4",
627
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
628
+ signer: new httpAuthSchemes.AwsSdkSigV4Signer(),
629
+ },
630
+ {
631
+ schemeId: "aws.auth#sigv4a",
632
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
633
+ signer: new httpAuthSchemes.AwsSdkSigV4ASigner(),
634
+ },
635
+ {
636
+ schemeId: "smithy.api#noAuth",
637
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
638
+ signer: new core.NoAuthSigner(),
639
+ },
640
+ ],
641
+ logger: config?.logger ?? new client.NoOpLogger(),
642
+ protocol: config?.protocol ?? protocols$1.AwsQueryProtocol,
643
+ protocolSettings: config?.protocolSettings ?? {
644
+ defaultNamespace: "com.amazonaws.sts",
645
+ errorTypeRegistries,
646
+ xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
647
+ version: "2011-06-15",
648
+ serviceTarget: "AWSSecurityTokenServiceV20110615",
649
+ },
650
+ serviceId: config?.serviceId ?? "STS",
651
+ signerConstructor: config?.signerConstructor ?? signatureV4MultiRegion.SignatureV4MultiRegion,
652
+ urlParser: config?.urlParser ?? protocols.parseUrl,
653
+ utf8Decoder: config?.utf8Decoder ?? serde.fromUtf8,
654
+ utf8Encoder: config?.utf8Encoder ?? serde.toUtf8,
655
+ };
656
+ };
657
+
658
+ const getRuntimeConfig = (config$1) => {
659
+ client.emitWarningIfUnsupportedVersion(process.version);
660
+ const defaultsMode = config.resolveDefaultsModeConfig(config$1);
661
+ const defaultConfigProvider = () => defaultsMode().then(client.loadConfigsForDefaultMode);
662
+ const clientSharedValues = getRuntimeConfig$1(config$1);
663
+ client$1.emitWarningIfUnsupportedVersion(process.version);
664
+ const loaderConfig = {
665
+ profile: config$1?.profile,
666
+ logger: clientSharedValues.logger,
667
+ };
668
+ return {
669
+ ...clientSharedValues,
670
+ ...config$1,
671
+ runtime: "node",
672
+ defaultsMode,
673
+ authSchemePreference: config$1?.authSchemePreference ?? config.loadConfig(httpAuthSchemes.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
674
+ bodyLengthChecker: config$1?.bodyLengthChecker ?? serde.calculateBodyLength,
675
+ defaultUserAgentProvider: config$1?.defaultUserAgentProvider ??
676
+ utilUserAgentNode.createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
677
+ httpAuthSchemes: config$1?.httpAuthSchemes ?? [
678
+ {
679
+ schemeId: "aws.auth#sigv4",
680
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") ||
681
+ (async (idProps) => await config$1.credentialDefaultProvider(idProps?.__config || {})()),
682
+ signer: new httpAuthSchemes.AwsSdkSigV4Signer(),
683
+ },
684
+ {
685
+ schemeId: "aws.auth#sigv4a",
686
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4a"),
687
+ signer: new httpAuthSchemes.AwsSdkSigV4ASigner(),
688
+ },
689
+ {
690
+ schemeId: "smithy.api#noAuth",
691
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
692
+ signer: new core.NoAuthSigner(),
693
+ },
694
+ ],
695
+ maxAttempts: config$1?.maxAttempts ?? config.loadConfig(retry.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config$1),
696
+ region: config$1?.region ??
697
+ config.loadConfig(config.NODE_REGION_CONFIG_OPTIONS, { ...config.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
698
+ requestHandler: nodeHttpHandler.NodeHttpHandler.create(config$1?.requestHandler ?? defaultConfigProvider),
699
+ retryMode: config$1?.retryMode ??
700
+ config.loadConfig({
701
+ ...retry.NODE_RETRY_MODE_CONFIG_OPTIONS,
702
+ default: async () => (await defaultConfigProvider()).retryMode || retry.DEFAULT_RETRY_MODE,
703
+ }, config$1),
704
+ sha256: config$1?.sha256 ?? serde.Hash.bind(null, "sha256"),
705
+ sigv4aSigningRegionSet: config$1?.sigv4aSigningRegionSet ?? config.loadConfig(httpAuthSchemes.NODE_SIGV4A_CONFIG_OPTIONS, loaderConfig),
706
+ streamCollector: config$1?.streamCollector ?? nodeHttpHandler.streamCollector,
707
+ useDualstackEndpoint: config$1?.useDualstackEndpoint ?? config.loadConfig(config.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
708
+ useFipsEndpoint: config$1?.useFipsEndpoint ?? config.loadConfig(config.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
709
+ userAgentAppId: config$1?.userAgentAppId ?? config.loadConfig(utilUserAgentNode.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
710
+ };
711
+ };
712
+
713
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
714
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
715
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
716
+ let _credentials = runtimeConfig.credentials;
717
+ return {
718
+ setHttpAuthScheme(httpAuthScheme) {
719
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
720
+ if (index === -1) {
721
+ _httpAuthSchemes.push(httpAuthScheme);
722
+ }
723
+ else {
724
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
725
+ }
726
+ },
727
+ httpAuthSchemes() {
728
+ return _httpAuthSchemes;
729
+ },
730
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
731
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
732
+ },
733
+ httpAuthSchemeProvider() {
734
+ return _httpAuthSchemeProvider;
735
+ },
736
+ setCredentials(credentials) {
737
+ _credentials = credentials;
738
+ },
739
+ credentials() {
740
+ return _credentials;
741
+ },
742
+ };
743
+ };
744
+ const resolveHttpAuthRuntimeConfig = (config) => {
745
+ return {
746
+ httpAuthSchemes: config.httpAuthSchemes(),
747
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
748
+ credentials: config.credentials(),
749
+ };
750
+ };
751
+
752
+ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
753
+ const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), client.getDefaultExtensionConfiguration(runtimeConfig), protocols.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
754
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
755
+ return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), client.resolveDefaultRuntimeConfig(extensionConfiguration), protocols.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
756
+ };
757
+
758
+ class STSClient extends client.Client {
759
+ config;
760
+ constructor(...[configuration]) {
761
+ const _config_0 = getRuntimeConfig(configuration || {});
762
+ super(_config_0);
763
+ this.initConfig = _config_0;
764
+ const _config_1 = resolveClientEndpointParameters(_config_0);
765
+ const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1);
766
+ const _config_3 = retry.resolveRetryConfig(_config_2);
767
+ const _config_4 = config.resolveRegionConfig(_config_3);
768
+ const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4);
769
+ const _config_6 = endpoints.resolveEndpointConfig(_config_5);
770
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
771
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
772
+ this.config = _config_8;
773
+ this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config));
774
+ this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config));
775
+ this.middlewareStack.use(retry.getRetryPlugin(this.config));
776
+ this.middlewareStack.use(protocols.getContentLengthPlugin(this.config));
777
+ this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config));
778
+ this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config));
779
+ this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config));
780
+ this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
781
+ httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
782
+ identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({
783
+ "aws.auth#sigv4": config.credentials,
784
+ "aws.auth#sigv4a": config.credentials,
785
+ }),
786
+ }));
787
+ this.middlewareStack.use(core.getHttpSigningPlugin(this.config));
788
+ }
789
+ destroy() {
790
+ super.destroy();
791
+ }
792
+ }
793
+
794
+ class AssumeRoleCommand extends client.Command
14
795
  .classBuilder()
15
- .ep(EndpointParameters.commonParams)
796
+ .ep(commonParams)
16
797
  .m(function (Command, cs, config, o) {
17
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
798
+ return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
18
799
  })
19
800
  .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {})
20
801
  .n("STSClient", "AssumeRoleCommand")
21
- .sc(schemas_0.AssumeRole$)
802
+ .sc(AssumeRole$)
22
803
  .build() {
23
804
  }
24
805
 
25
- class AssumeRoleWithWebIdentityCommand extends smithyClient.Command
806
+ class AssumeRoleWithWebIdentityCommand extends client.Command
26
807
  .classBuilder()
27
- .ep(EndpointParameters.commonParams)
808
+ .ep(commonParams)
28
809
  .m(function (Command, cs, config, o) {
29
- return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
810
+ return [endpoints.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
30
811
  })
31
812
  .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {})
32
813
  .n("STSClient", "AssumeRoleWithWebIdentityCommand")
33
- .sc(schemas_0.AssumeRoleWithWebIdentity$)
814
+ .sc(AssumeRoleWithWebIdentity$)
34
815
  .build() {
35
816
  }
36
817
 
@@ -38,9 +819,9 @@ const commands = {
38
819
  AssumeRoleCommand,
39
820
  AssumeRoleWithWebIdentityCommand,
40
821
  };
41
- class STS extends STSClient.STSClient {
822
+ class STS extends STSClient {
42
823
  }
43
- smithyClient.createAggregatedClient(commands, STS);
824
+ client.createAggregatedClient(commands, STS);
44
825
 
45
826
  const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
46
827
  if (typeof assumedRoleUser?.Arn === "string") {
@@ -94,7 +875,7 @@ const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
94
875
  ...(Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope }),
95
876
  ...(accountId && { accountId }),
96
877
  };
97
- client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
878
+ client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
98
879
  return credentials;
99
880
  };
100
881
  };
@@ -131,9 +912,9 @@ const getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
131
912
  ...(accountId && { accountId }),
132
913
  };
133
914
  if (accountId) {
134
- client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
915
+ client$1.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
135
916
  }
136
- client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
917
+ client$1.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
137
918
  return credentials;
138
919
  };
139
920
  };
@@ -154,49 +935,48 @@ const getCustomizableStsClientCtor = (baseCtor, customizations) => {
154
935
  }
155
936
  };
156
937
  };
157
- const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
158
- const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
938
+ const getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
939
+ const getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
159
940
  const decorateDefaultCredentialProvider = (provider) => (input) => provider({
160
941
  roleAssumer: getDefaultRoleAssumer(input),
161
942
  roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
162
943
  ...input,
163
944
  });
164
945
 
165
- exports.$Command = smithyClient.Command;
166
- exports.STSServiceException = STSServiceException.STSServiceException;
946
+ exports.$Command = client.Command;
947
+ exports.__Client = client.Client;
948
+ exports.AssumeRole$ = AssumeRole$;
167
949
  exports.AssumeRoleCommand = AssumeRoleCommand;
950
+ exports.AssumeRoleRequest$ = AssumeRoleRequest$;
951
+ exports.AssumeRoleResponse$ = AssumeRoleResponse$;
952
+ exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
168
953
  exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
954
+ exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
955
+ exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
956
+ exports.AssumedRoleUser$ = AssumedRoleUser$;
957
+ exports.Credentials$ = Credentials$;
958
+ exports.ExpiredTokenException = ExpiredTokenException;
959
+ exports.ExpiredTokenException$ = ExpiredTokenException$;
960
+ exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
961
+ exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
962
+ exports.IDPRejectedClaimException = IDPRejectedClaimException;
963
+ exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
964
+ exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
965
+ exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
966
+ exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
967
+ exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
968
+ exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
969
+ exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
970
+ exports.PolicyDescriptorType$ = PolicyDescriptorType$;
971
+ exports.ProvidedContext$ = ProvidedContext$;
972
+ exports.RegionDisabledException = RegionDisabledException;
973
+ exports.RegionDisabledException$ = RegionDisabledException$;
169
974
  exports.STS = STS;
975
+ exports.STSClient = STSClient;
976
+ exports.STSServiceException = STSServiceException;
977
+ exports.STSServiceException$ = STSServiceException$;
978
+ exports.Tag$ = Tag$;
170
979
  exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
980
+ exports.errorTypeRegistries = errorTypeRegistries;
171
981
  exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
172
982
  exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
173
- Object.prototype.hasOwnProperty.call(STSClient, '__proto__') &&
174
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
175
- Object.defineProperty(exports, '__proto__', {
176
- enumerable: true,
177
- value: STSClient['__proto__']
178
- });
179
-
180
- Object.keys(STSClient).forEach(function (k) {
181
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = STSClient[k];
182
- });
183
- Object.prototype.hasOwnProperty.call(schemas_0, '__proto__') &&
184
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
185
- Object.defineProperty(exports, '__proto__', {
186
- enumerable: true,
187
- value: schemas_0['__proto__']
188
- });
189
-
190
- Object.keys(schemas_0).forEach(function (k) {
191
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = schemas_0[k];
192
- });
193
- Object.prototype.hasOwnProperty.call(errors, '__proto__') &&
194
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
195
- Object.defineProperty(exports, '__proto__', {
196
- enumerable: true,
197
- value: errors['__proto__']
198
- });
199
-
200
- Object.keys(errors).forEach(function (k) {
201
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = errors[k];
202
- });