@aws-sdk/nested-clients 3.996.0 → 3.996.1

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 (172) hide show
  1. package/cognito-identity.d.ts +7 -0
  2. package/cognito-identity.js +5 -0
  3. package/dist-cjs/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +60 -0
  4. package/dist-cjs/submodules/cognito-identity/endpoint/endpointResolver.js +18 -0
  5. package/dist-cjs/submodules/cognito-identity/endpoint/ruleset.js +146 -0
  6. package/dist-cjs/submodules/cognito-identity/index.js +174 -0
  7. package/dist-cjs/submodules/cognito-identity/models/CognitoIdentityServiceException.js +12 -0
  8. package/dist-cjs/submodules/cognito-identity/models/errors.js +121 -0
  9. package/dist-cjs/submodules/cognito-identity/runtimeConfig.browser.js +38 -0
  10. package/dist-cjs/submodules/cognito-identity/runtimeConfig.js +53 -0
  11. package/dist-cjs/submodules/cognito-identity/runtimeConfig.native.js +15 -0
  12. package/dist-cjs/submodules/cognito-identity/runtimeConfig.shared.js +50 -0
  13. package/dist-cjs/submodules/cognito-identity/schemas/schemas_0.js +110 -0
  14. package/dist-cjs/submodules/signin/endpoint/ruleset.js +128 -2
  15. package/dist-cjs/submodules/sso/auth/httpAuthSchemeProvider.js +56 -0
  16. package/dist-cjs/submodules/sso/endpoint/endpointResolver.js +18 -0
  17. package/dist-cjs/submodules/sso/endpoint/ruleset.js +106 -0
  18. package/dist-cjs/submodules/sso/index.js +160 -0
  19. package/dist-cjs/submodules/sso/models/SSOServiceException.js +12 -0
  20. package/dist-cjs/submodules/sso/models/errors.js +56 -0
  21. package/dist-cjs/submodules/sso/runtimeConfig.browser.js +38 -0
  22. package/dist-cjs/submodules/sso/runtimeConfig.js +53 -0
  23. package/dist-cjs/submodules/sso/runtimeConfig.native.js +15 -0
  24. package/dist-cjs/submodules/sso/runtimeConfig.shared.js +49 -0
  25. package/dist-cjs/submodules/sso/schemas/schemas_0.js +90 -0
  26. package/dist-cjs/submodules/sso-oidc/endpoint/ruleset.js +101 -2
  27. package/dist-cjs/submodules/sts/endpoint/ruleset.js +140 -2
  28. package/dist-es/submodules/cognito-identity/CognitoIdentity.js +11 -0
  29. package/dist-es/submodules/cognito-identity/CognitoIdentityClient.js +50 -0
  30. package/dist-es/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.js +38 -0
  31. package/dist-es/submodules/cognito-identity/auth/httpAuthSchemeProvider.js +54 -0
  32. package/dist-es/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.js +16 -0
  33. package/dist-es/submodules/cognito-identity/commands/GetIdCommand.js +16 -0
  34. package/dist-es/submodules/cognito-identity/commands/index.js +2 -0
  35. package/dist-es/submodules/cognito-identity/endpoint/EndpointParameters.js +13 -0
  36. package/dist-es/submodules/cognito-identity/endpoint/endpointResolver.js +14 -0
  37. package/dist-es/submodules/cognito-identity/endpoint/ruleset.js +143 -0
  38. package/dist-es/submodules/cognito-identity/extensionConfiguration.js +1 -0
  39. package/dist-es/submodules/cognito-identity/index.js +7 -0
  40. package/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +8 -0
  41. package/dist-es/submodules/cognito-identity/models/errors.js +109 -0
  42. package/dist-es/submodules/cognito-identity/models/models_0.js +1 -0
  43. package/dist-es/submodules/cognito-identity/runtimeConfig.browser.js +33 -0
  44. package/dist-es/submodules/cognito-identity/runtimeConfig.js +48 -0
  45. package/dist-es/submodules/cognito-identity/runtimeConfig.native.js +11 -0
  46. package/dist-es/submodules/cognito-identity/runtimeConfig.shared.js +46 -0
  47. package/dist-es/submodules/cognito-identity/runtimeExtensions.js +9 -0
  48. package/dist-es/submodules/cognito-identity/schemas/schemas_0.js +107 -0
  49. package/dist-es/submodules/signin/Signin.js +1 -1
  50. package/dist-es/submodules/signin/endpoint/ruleset.js +128 -2
  51. package/dist-es/submodules/sso/SSO.js +9 -0
  52. package/dist-es/submodules/sso/SSOClient.js +50 -0
  53. package/dist-es/submodules/sso/auth/httpAuthExtensionConfiguration.js +38 -0
  54. package/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js +50 -0
  55. package/dist-es/submodules/sso/commands/GetRoleCredentialsCommand.js +16 -0
  56. package/dist-es/submodules/sso/commands/index.js +1 -0
  57. package/dist-es/submodules/sso/endpoint/EndpointParameters.js +13 -0
  58. package/dist-es/submodules/sso/endpoint/endpointResolver.js +14 -0
  59. package/dist-es/submodules/sso/endpoint/ruleset.js +103 -0
  60. package/dist-es/submodules/sso/extensionConfiguration.js +1 -0
  61. package/dist-es/submodules/sso/index.js +7 -0
  62. package/dist-es/submodules/sso/models/SSOServiceException.js +8 -0
  63. package/dist-es/submodules/sso/models/errors.js +49 -0
  64. package/dist-es/submodules/sso/models/models_0.js +1 -0
  65. package/dist-es/submodules/sso/runtimeConfig.browser.js +33 -0
  66. package/dist-es/submodules/sso/runtimeConfig.js +48 -0
  67. package/dist-es/submodules/sso/runtimeConfig.native.js +11 -0
  68. package/dist-es/submodules/sso/runtimeConfig.shared.js +45 -0
  69. package/dist-es/submodules/sso/runtimeExtensions.js +9 -0
  70. package/dist-es/submodules/sso/schemas/schemas_0.js +87 -0
  71. package/dist-es/submodules/sso-oidc/endpoint/ruleset.js +101 -2
  72. package/dist-es/submodules/sts/defaultStsRoleAssumers.js +1 -1
  73. package/dist-es/submodules/sts/endpoint/ruleset.js +140 -2
  74. package/dist-types/submodules/cognito-identity/CognitoIdentity.d.ts +38 -0
  75. package/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +198 -0
  76. package/dist-types/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.d.ts +30 -0
  77. package/dist-types/submodules/cognito-identity/auth/httpAuthSchemeProvider.d.ts +75 -0
  78. package/dist-types/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +120 -0
  79. package/dist-types/submodules/cognito-identity/commands/GetIdCommand.d.ts +107 -0
  80. package/dist-types/submodules/cognito-identity/commands/index.d.ts +2 -0
  81. package/dist-types/submodules/cognito-identity/endpoint/EndpointParameters.d.ts +50 -0
  82. package/dist-types/submodules/cognito-identity/endpoint/endpointResolver.d.ts +8 -0
  83. package/dist-types/submodules/cognito-identity/endpoint/ruleset.d.ts +2 -0
  84. package/dist-types/submodules/cognito-identity/extensionConfiguration.d.ts +9 -0
  85. package/dist-types/submodules/cognito-identity/index.d.ts +29 -0
  86. package/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +14 -0
  87. package/dist-types/submodules/cognito-identity/models/errors.d.ts +119 -0
  88. package/dist-types/submodules/cognito-identity/models/models_0.d.ts +136 -0
  89. package/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +62 -0
  90. package/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +62 -0
  91. package/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +61 -0
  92. package/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +38 -0
  93. package/dist-types/submodules/cognito-identity/runtimeExtensions.d.ts +17 -0
  94. package/dist-types/submodules/cognito-identity/schemas/schemas_0.d.ts +25 -0
  95. package/dist-types/submodules/signin/Signin.d.ts +1 -1
  96. package/dist-types/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +2 -1
  97. package/dist-types/submodules/signin/endpoint/ruleset.d.ts +1 -1
  98. package/dist-types/submodules/signin/models/errors.d.ts +1 -1
  99. package/dist-types/submodules/sso/SSO.d.ts +32 -0
  100. package/dist-types/submodules/sso/SSOClient.d.ts +198 -0
  101. package/dist-types/submodules/sso/auth/httpAuthExtensionConfiguration.d.ts +30 -0
  102. package/dist-types/submodules/sso/auth/httpAuthSchemeProvider.d.ts +75 -0
  103. package/dist-types/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +97 -0
  104. package/dist-types/submodules/sso/commands/index.d.ts +1 -0
  105. package/dist-types/submodules/sso/endpoint/EndpointParameters.d.ts +50 -0
  106. package/dist-types/submodules/sso/endpoint/endpointResolver.d.ts +8 -0
  107. package/dist-types/submodules/sso/endpoint/ruleset.d.ts +2 -0
  108. package/dist-types/submodules/sso/extensionConfiguration.d.ts +9 -0
  109. package/dist-types/submodules/sso/index.d.ts +30 -0
  110. package/dist-types/submodules/sso/models/SSOServiceException.d.ts +14 -0
  111. package/dist-types/submodules/sso/models/errors.d.ts +53 -0
  112. package/dist-types/submodules/sso/models/models_0.d.ts +61 -0
  113. package/dist-types/submodules/sso/runtimeConfig.browser.d.ts +62 -0
  114. package/dist-types/submodules/sso/runtimeConfig.d.ts +62 -0
  115. package/dist-types/submodules/sso/runtimeConfig.native.d.ts +61 -0
  116. package/dist-types/submodules/sso/runtimeConfig.shared.d.ts +38 -0
  117. package/dist-types/submodules/sso/runtimeExtensions.d.ts +17 -0
  118. package/dist-types/submodules/sso/schemas/schemas_0.d.ts +17 -0
  119. package/dist-types/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +2 -1
  120. package/dist-types/submodules/sso-oidc/endpoint/ruleset.d.ts +1 -1
  121. package/dist-types/submodules/sso-oidc/models/errors.d.ts +1 -1
  122. package/dist-types/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +2 -1
  123. package/dist-types/submodules/sts/defaultRoleAssumers.d.ts +3 -3
  124. package/dist-types/submodules/sts/defaultStsRoleAssumers.d.ts +3 -3
  125. package/dist-types/submodules/sts/endpoint/ruleset.d.ts +1 -1
  126. package/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentity.d.ts +38 -0
  127. package/dist-types/ts3.4/submodules/cognito-identity/CognitoIdentityClient.d.ts +126 -0
  128. package/dist-types/ts3.4/submodules/cognito-identity/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  129. package/dist-types/ts3.4/submodules/cognito-identity/auth/httpAuthSchemeProvider.d.ts +47 -0
  130. package/dist-types/ts3.4/submodules/cognito-identity/commands/GetCredentialsForIdentityCommand.d.ts +51 -0
  131. package/dist-types/ts3.4/submodules/cognito-identity/commands/GetIdCommand.d.ts +41 -0
  132. package/dist-types/ts3.4/submodules/cognito-identity/commands/index.d.ts +2 -0
  133. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/EndpointParameters.d.ts +51 -0
  134. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/endpointResolver.d.ts +8 -0
  135. package/dist-types/ts3.4/submodules/cognito-identity/endpoint/ruleset.d.ts +2 -0
  136. package/dist-types/ts3.4/submodules/cognito-identity/extensionConfiguration.d.ts +9 -0
  137. package/dist-types/ts3.4/submodules/cognito-identity/index.d.ts +10 -0
  138. package/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +9 -0
  139. package/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +68 -0
  140. package/dist-types/ts3.4/submodules/cognito-identity/models/models_0.d.ts +23 -0
  141. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +122 -0
  142. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +117 -0
  143. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +126 -0
  144. package/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +60 -0
  145. package/dist-types/ts3.4/submodules/cognito-identity/runtimeExtensions.d.ts +13 -0
  146. package/dist-types/ts3.4/submodules/cognito-identity/schemas/schemas_0.d.ts +24 -0
  147. package/dist-types/ts3.4/submodules/signin/auth/httpAuthExtensionConfiguration.d.ts +1 -1
  148. package/dist-types/ts3.4/submodules/sso/SSO.d.ts +22 -0
  149. package/dist-types/ts3.4/submodules/sso/SSOClient.d.ts +117 -0
  150. package/dist-types/ts3.4/submodules/sso/auth/httpAuthExtensionConfiguration.d.ts +32 -0
  151. package/dist-types/ts3.4/submodules/sso/auth/httpAuthSchemeProvider.d.ts +46 -0
  152. package/dist-types/ts3.4/submodules/sso/commands/GetRoleCredentialsCommand.d.ts +47 -0
  153. package/dist-types/ts3.4/submodules/sso/commands/index.d.ts +1 -0
  154. package/dist-types/ts3.4/submodules/sso/endpoint/EndpointParameters.d.ts +51 -0
  155. package/dist-types/ts3.4/submodules/sso/endpoint/endpointResolver.d.ts +8 -0
  156. package/dist-types/ts3.4/submodules/sso/endpoint/ruleset.d.ts +2 -0
  157. package/dist-types/ts3.4/submodules/sso/extensionConfiguration.d.ts +9 -0
  158. package/dist-types/ts3.4/submodules/sso/index.d.ts +10 -0
  159. package/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +9 -0
  160. package/dist-types/ts3.4/submodules/sso/models/errors.d.ts +30 -0
  161. package/dist-types/ts3.4/submodules/sso/models/models_0.d.ts +14 -0
  162. package/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +120 -0
  163. package/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +115 -0
  164. package/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +124 -0
  165. package/dist-types/ts3.4/submodules/sso/runtimeConfig.shared.d.ts +58 -0
  166. package/dist-types/ts3.4/submodules/sso/runtimeExtensions.d.ts +11 -0
  167. package/dist-types/ts3.4/submodules/sso/schemas/schemas_0.d.ts +16 -0
  168. package/dist-types/ts3.4/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.d.ts +1 -1
  169. package/dist-types/ts3.4/submodules/sts/auth/httpAuthExtensionConfiguration.d.ts +1 -1
  170. package/package.json +54 -36
  171. package/sso.d.ts +7 -0
  172. package/sso.js +5 -0
@@ -0,0 +1,33 @@
1
+ import packageInfo from "../../../package.json";
2
+ import { Sha256 } from "@aws-crypto/sha256-browser";
3
+ import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
4
+ import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
5
+ import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
6
+ import { invalidProvider } from "@smithy/invalid-dependency";
7
+ import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
8
+ import { calculateBodyLength } from "@smithy/util-body-length-browser";
9
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
10
+ import { DEFAULT_MAX_ATTEMPTS, DEFAULT_RETRY_MODE } from "@smithy/util-retry";
11
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
12
+ export const getRuntimeConfig = (config) => {
13
+ const defaultsMode = resolveDefaultsModeConfig(config);
14
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
15
+ const clientSharedValues = getSharedRuntimeConfig(config);
16
+ return {
17
+ ...clientSharedValues,
18
+ ...config,
19
+ runtime: "browser",
20
+ defaultsMode,
21
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
22
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
23
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
24
+ maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
25
+ region: config?.region ?? invalidProvider("Region is missing"),
26
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
27
+ retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
28
+ sha256: config?.sha256 ?? Sha256,
29
+ streamCollector: config?.streamCollector ?? streamCollector,
30
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
31
+ useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
32
+ };
33
+ };
@@ -0,0 +1,48 @@
1
+ import packageInfo from "../../../package.json";
2
+ import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
3
+ import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/util-user-agent-node";
4
+ import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
5
+ import { Hash } from "@smithy/hash-node";
6
+ import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
7
+ import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
8
+ import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
9
+ import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
10
+ import { calculateBodyLength } from "@smithy/util-body-length-node";
11
+ import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
12
+ import { DEFAULT_RETRY_MODE } from "@smithy/util-retry";
13
+ import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
14
+ export const getRuntimeConfig = (config) => {
15
+ emitWarningIfUnsupportedVersion(process.version);
16
+ const defaultsMode = resolveDefaultsModeConfig(config);
17
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
18
+ const clientSharedValues = getSharedRuntimeConfig(config);
19
+ awsCheckVersion(process.version);
20
+ const loaderConfig = {
21
+ profile: config?.profile,
22
+ logger: clientSharedValues.logger,
23
+ };
24
+ return {
25
+ ...clientSharedValues,
26
+ ...config,
27
+ runtime: "node",
28
+ defaultsMode,
29
+ authSchemePreference: config?.authSchemePreference ?? loadNodeConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
30
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
31
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ??
32
+ createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
33
+ maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
34
+ region: config?.region ??
35
+ loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
36
+ requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
37
+ retryMode: config?.retryMode ??
38
+ loadNodeConfig({
39
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
40
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
41
+ }, config),
42
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
43
+ streamCollector: config?.streamCollector ?? streamCollector,
44
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
45
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
46
+ userAgentAppId: config?.userAgentAppId ?? loadNodeConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),
47
+ };
48
+ };
@@ -0,0 +1,11 @@
1
+ import { Sha256 } from "@aws-crypto/sha256-js";
2
+ import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
+ export const getRuntimeConfig = (config) => {
4
+ const browserDefaults = getBrowserRuntimeConfig(config);
5
+ return {
6
+ ...browserDefaults,
7
+ ...config,
8
+ runtime: "react-native",
9
+ sha256: config?.sha256 ?? Sha256,
10
+ };
11
+ };
@@ -0,0 +1,45 @@
1
+ import { AwsSdkSigV4Signer } from "@aws-sdk/core";
2
+ import { AwsRestJsonProtocol } from "@aws-sdk/core/protocols";
3
+ import { NoAuthSigner } from "@smithy/core";
4
+ import { NoOpLogger } from "@smithy/smithy-client";
5
+ import { parseUrl } from "@smithy/url-parser";
6
+ import { fromBase64, toBase64 } from "@smithy/util-base64";
7
+ import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
8
+ import { defaultSSOHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
9
+ import { defaultEndpointResolver } from "./endpoint/endpointResolver";
10
+ import { errorTypeRegistries } from "./schemas/schemas_0";
11
+ export const getRuntimeConfig = (config) => {
12
+ return {
13
+ apiVersion: "2019-06-10",
14
+ base64Decoder: config?.base64Decoder ?? fromBase64,
15
+ base64Encoder: config?.base64Encoder ?? toBase64,
16
+ disableHostPrefix: config?.disableHostPrefix ?? false,
17
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
18
+ extensions: config?.extensions ?? [],
19
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSSOHttpAuthSchemeProvider,
20
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
21
+ {
22
+ schemeId: "aws.auth#sigv4",
23
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
24
+ signer: new AwsSdkSigV4Signer(),
25
+ },
26
+ {
27
+ schemeId: "smithy.api#noAuth",
28
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
29
+ signer: new NoAuthSigner(),
30
+ },
31
+ ],
32
+ logger: config?.logger ?? new NoOpLogger(),
33
+ protocol: config?.protocol ?? AwsRestJsonProtocol,
34
+ protocolSettings: config?.protocolSettings ?? {
35
+ defaultNamespace: "com.amazonaws.sso",
36
+ errorTypeRegistries,
37
+ version: "2019-06-10",
38
+ serviceTarget: "SWBPortalService",
39
+ },
40
+ serviceId: config?.serviceId ?? "SSO",
41
+ urlParser: config?.urlParser ?? parseUrl,
42
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
43
+ utf8Encoder: config?.utf8Encoder ?? toUtf8,
44
+ };
45
+ };
@@ -0,0 +1,9 @@
1
+ import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
2
+ import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
3
+ import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
5
+ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
6
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
7
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
8
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
9
+ };
@@ -0,0 +1,87 @@
1
+ const _ATT = "AccessTokenType";
2
+ const _GRC = "GetRoleCredentials";
3
+ const _GRCR = "GetRoleCredentialsRequest";
4
+ const _GRCRe = "GetRoleCredentialsResponse";
5
+ const _IRE = "InvalidRequestException";
6
+ const _RC = "RoleCredentials";
7
+ const _RNFE = "ResourceNotFoundException";
8
+ const _SAKT = "SecretAccessKeyType";
9
+ const _STT = "SessionTokenType";
10
+ const _TMRE = "TooManyRequestsException";
11
+ const _UE = "UnauthorizedException";
12
+ const _aI = "accountId";
13
+ const _aKI = "accessKeyId";
14
+ const _aT = "accessToken";
15
+ const _ai = "account_id";
16
+ const _c = "client";
17
+ const _e = "error";
18
+ const _ex = "expiration";
19
+ const _h = "http";
20
+ const _hE = "httpError";
21
+ const _hH = "httpHeader";
22
+ const _hQ = "httpQuery";
23
+ const _m = "message";
24
+ const _rC = "roleCredentials";
25
+ const _rN = "roleName";
26
+ const _rn = "role_name";
27
+ const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sso";
28
+ const _sAK = "secretAccessKey";
29
+ const _sT = "sessionToken";
30
+ const _xasbt = "x-amz-sso_bearer_token";
31
+ const n0 = "com.amazonaws.sso";
32
+ import { TypeRegistry } from "@smithy/core/schema";
33
+ import { InvalidRequestException, ResourceNotFoundException, TooManyRequestsException, UnauthorizedException, } from "../models/errors";
34
+ import { SSOServiceException } from "../models/SSOServiceException";
35
+ const _s_registry = TypeRegistry.for(_s);
36
+ export var SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []];
37
+ _s_registry.registerError(SSOServiceException$, SSOServiceException);
38
+ const n0_registry = TypeRegistry.for(n0);
39
+ export var InvalidRequestException$ = [-3, n0, _IRE, { [_e]: _c, [_hE]: 400 }, [_m], [0]];
40
+ n0_registry.registerError(InvalidRequestException$, InvalidRequestException);
41
+ export var ResourceNotFoundException$ = [-3, n0, _RNFE, { [_e]: _c, [_hE]: 404 }, [_m], [0]];
42
+ n0_registry.registerError(ResourceNotFoundException$, ResourceNotFoundException);
43
+ export var TooManyRequestsException$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_m], [0]];
44
+ n0_registry.registerError(TooManyRequestsException$, TooManyRequestsException);
45
+ export var UnauthorizedException$ = [-3, n0, _UE, { [_e]: _c, [_hE]: 401 }, [_m], [0]];
46
+ n0_registry.registerError(UnauthorizedException$, UnauthorizedException);
47
+ export const errorTypeRegistries = [_s_registry, n0_registry];
48
+ var AccessTokenType = [0, n0, _ATT, 8, 0];
49
+ var SecretAccessKeyType = [0, n0, _SAKT, 8, 0];
50
+ var SessionTokenType = [0, n0, _STT, 8, 0];
51
+ export var GetRoleCredentialsRequest$ = [
52
+ 3,
53
+ n0,
54
+ _GRCR,
55
+ 0,
56
+ [_rN, _aI, _aT],
57
+ [
58
+ [0, { [_hQ]: _rn }],
59
+ [0, { [_hQ]: _ai }],
60
+ [() => AccessTokenType, { [_hH]: _xasbt }],
61
+ ],
62
+ 3,
63
+ ];
64
+ export var GetRoleCredentialsResponse$ = [
65
+ 3,
66
+ n0,
67
+ _GRCRe,
68
+ 0,
69
+ [_rC],
70
+ [[() => RoleCredentials$, 0]],
71
+ ];
72
+ export var RoleCredentials$ = [
73
+ 3,
74
+ n0,
75
+ _RC,
76
+ 0,
77
+ [_aKI, _sAK, _sT, _ex],
78
+ [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1],
79
+ ];
80
+ export var GetRoleCredentials$ = [
81
+ 9,
82
+ n0,
83
+ _GRC,
84
+ { [_h]: ["GET", "/federation/credentials", 200] },
85
+ () => GetRoleCredentialsRequest$,
86
+ () => GetRoleCredentialsResponse$,
87
+ ];
@@ -1,4 +1,103 @@
1
1
  const u = "required", v = "fn", w = "argv", x = "ref";
2
- const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, "type": "string" }, j = { [u]: true, "default": false, "type": "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
3
- const _data = { version: "1.0", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n }, type: e }, { endpoint: { url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }] };
2
+ const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "getAttr", i = { [u]: false, type: "string" }, j = { [u]: true, default: false, type: "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
3
+ const _data = {
4
+ version: "1.0",
5
+ parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
6
+ rules: [
7
+ {
8
+ conditions: [{ [v]: b, [w]: [k] }],
9
+ rules: [
10
+ { conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
11
+ { conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
12
+ { endpoint: { url: k, properties: n, headers: n }, type: e },
13
+ ],
14
+ type: f,
15
+ },
16
+ {
17
+ conditions: [{ [v]: b, [w]: t }],
18
+ rules: [
19
+ {
20
+ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
21
+ rules: [
22
+ {
23
+ conditions: [l, m],
24
+ rules: [
25
+ {
26
+ conditions: [{ [v]: c, [w]: [a, o] }, q],
27
+ rules: [
28
+ {
29
+ endpoint: {
30
+ url: "https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
31
+ properties: n,
32
+ headers: n,
33
+ },
34
+ type: e,
35
+ },
36
+ ],
37
+ type: f,
38
+ },
39
+ { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d },
40
+ ],
41
+ type: f,
42
+ },
43
+ {
44
+ conditions: r,
45
+ rules: [
46
+ {
47
+ conditions: [{ [v]: c, [w]: [o, a] }],
48
+ rules: [
49
+ {
50
+ conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
51
+ endpoint: { url: "https://oidc.{Region}.amazonaws.com", properties: n, headers: n },
52
+ type: e,
53
+ },
54
+ {
55
+ endpoint: {
56
+ url: "https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",
57
+ properties: n,
58
+ headers: n,
59
+ },
60
+ type: e,
61
+ },
62
+ ],
63
+ type: f,
64
+ },
65
+ { error: "FIPS is enabled but this partition does not support FIPS", type: d },
66
+ ],
67
+ type: f,
68
+ },
69
+ {
70
+ conditions: s,
71
+ rules: [
72
+ {
73
+ conditions: [q],
74
+ rules: [
75
+ {
76
+ endpoint: {
77
+ url: "https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",
78
+ properties: n,
79
+ headers: n,
80
+ },
81
+ type: e,
82
+ },
83
+ ],
84
+ type: f,
85
+ },
86
+ { error: "DualStack is enabled but this partition does not support DualStack", type: d },
87
+ ],
88
+ type: f,
89
+ },
90
+ {
91
+ endpoint: { url: "https://oidc.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
92
+ type: e,
93
+ },
94
+ ],
95
+ type: f,
96
+ },
97
+ ],
98
+ type: f,
99
+ },
100
+ { error: "Invalid Configuration: Missing Region", type: d },
101
+ ],
102
+ };
4
103
  export const ruleSet = _data;
@@ -1,7 +1,7 @@
1
1
  import { setCredentialFeature } from "@aws-sdk/core/client";
2
2
  import { stsRegionDefaultResolver } from "@aws-sdk/region-config-resolver";
3
3
  import { AssumeRoleCommand } from "./commands/AssumeRoleCommand";
4
- import { AssumeRoleWithWebIdentityCommand, } from "./commands/AssumeRoleWithWebIdentityCommand";
4
+ import { AssumeRoleWithWebIdentityCommand } from "./commands/AssumeRoleWithWebIdentityCommand";
5
5
  const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
6
6
  if (typeof assumedRoleUser?.Arn === "string") {
7
7
  const arnComponents = assumedRoleUser.Arn.split(":");
@@ -1,4 +1,142 @@
1
1
  const F = "required", G = "type", H = "fn", I = "argv", J = "ref";
2
- const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "string" }, n = { [F]: true, "default": false, [G]: "boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} }, v = {}, w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
3
- const _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
2
+ const a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = { [F]: false, [G]: "string" }, n = { [F]: true, default: false, [G]: "boolean" }, o = { [J]: "Endpoint" }, p = { [H]: "isSet", [I]: [{ [J]: "Region" }] }, q = { [J]: "Region" }, r = { [H]: "aws.partition", [I]: [q], assign: "PartitionResult" }, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = {
3
+ url: "https://sts.amazonaws.com",
4
+ properties: { authSchemes: [{ name: e, signingName: f, signingRegion: g }] },
5
+ headers: {},
6
+ }, v = {}, w = { conditions: [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] }, A = { [J]: "PartitionResult" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] }, C = [{ [H]: "isSet", [I]: [o] }], D = [x], E = [y];
7
+ const _data = {
8
+ version: "1.0",
9
+ parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n },
10
+ rules: [
11
+ {
12
+ conditions: [
13
+ { [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] },
14
+ { [H]: "not", [I]: C },
15
+ p,
16
+ r,
17
+ { [H]: c, [I]: [s, a] },
18
+ { [H]: c, [I]: [t, a] },
19
+ ],
20
+ rules: [
21
+ { conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h },
22
+ { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h },
23
+ { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h },
24
+ { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h },
25
+ w,
26
+ { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h },
27
+ { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h },
28
+ { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h },
29
+ { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h },
30
+ { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h },
31
+ { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h },
32
+ { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h },
33
+ { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h },
34
+ { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h },
35
+ { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h },
36
+ { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h },
37
+ {
38
+ endpoint: {
39
+ url: i,
40
+ properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] },
41
+ headers: v,
42
+ },
43
+ [G]: h,
44
+ },
45
+ ],
46
+ [G]: j,
47
+ },
48
+ {
49
+ conditions: C,
50
+ rules: [
51
+ { conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k },
52
+ { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k },
53
+ { endpoint: { url: o, properties: v, headers: v }, [G]: h },
54
+ ],
55
+ [G]: j,
56
+ },
57
+ {
58
+ conditions: [p],
59
+ rules: [
60
+ {
61
+ conditions: [r],
62
+ rules: [
63
+ {
64
+ conditions: [x, y],
65
+ rules: [
66
+ {
67
+ conditions: [{ [H]: c, [I]: [b, z] }, B],
68
+ rules: [
69
+ {
70
+ endpoint: {
71
+ url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
72
+ properties: v,
73
+ headers: v,
74
+ },
75
+ [G]: h,
76
+ },
77
+ ],
78
+ [G]: j,
79
+ },
80
+ { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k },
81
+ ],
82
+ [G]: j,
83
+ },
84
+ {
85
+ conditions: D,
86
+ rules: [
87
+ {
88
+ conditions: [{ [H]: c, [I]: [z, b] }],
89
+ rules: [
90
+ {
91
+ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }],
92
+ endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v },
93
+ [G]: h,
94
+ },
95
+ {
96
+ endpoint: {
97
+ url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",
98
+ properties: v,
99
+ headers: v,
100
+ },
101
+ [G]: h,
102
+ },
103
+ ],
104
+ [G]: j,
105
+ },
106
+ { error: "FIPS is enabled but this partition does not support FIPS", [G]: k },
107
+ ],
108
+ [G]: j,
109
+ },
110
+ {
111
+ conditions: E,
112
+ rules: [
113
+ {
114
+ conditions: [B],
115
+ rules: [
116
+ {
117
+ endpoint: {
118
+ url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",
119
+ properties: v,
120
+ headers: v,
121
+ },
122
+ [G]: h,
123
+ },
124
+ ],
125
+ [G]: j,
126
+ },
127
+ { error: "DualStack is enabled but this partition does not support DualStack", [G]: k },
128
+ ],
129
+ [G]: j,
130
+ },
131
+ w,
132
+ { endpoint: { url: i, properties: v, headers: v }, [G]: h },
133
+ ],
134
+ [G]: j,
135
+ },
136
+ ],
137
+ [G]: j,
138
+ },
139
+ { error: "Invalid Configuration: Missing Region", [G]: k },
140
+ ],
141
+ };
4
142
  export const ruleSet = _data;
@@ -0,0 +1,38 @@
1
+ import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
2
+ import { CognitoIdentityClient } from "./CognitoIdentityClient";
3
+ import type { GetCredentialsForIdentityCommandInput, GetCredentialsForIdentityCommandOutput } from "./commands/GetCredentialsForIdentityCommand";
4
+ import type { GetIdCommandInput, GetIdCommandOutput } from "./commands/GetIdCommand";
5
+ export interface CognitoIdentity {
6
+ /**
7
+ * @see {@link GetCredentialsForIdentityCommand}
8
+ */
9
+ getCredentialsForIdentity(args: GetCredentialsForIdentityCommandInput, options?: __HttpHandlerOptions): Promise<GetCredentialsForIdentityCommandOutput>;
10
+ getCredentialsForIdentity(args: GetCredentialsForIdentityCommandInput, cb: (err: any, data?: GetCredentialsForIdentityCommandOutput) => void): void;
11
+ getCredentialsForIdentity(args: GetCredentialsForIdentityCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetCredentialsForIdentityCommandOutput) => void): void;
12
+ /**
13
+ * @see {@link GetIdCommand}
14
+ */
15
+ getId(args: GetIdCommandInput, options?: __HttpHandlerOptions): Promise<GetIdCommandOutput>;
16
+ getId(args: GetIdCommandInput, cb: (err: any, data?: GetIdCommandOutput) => void): void;
17
+ getId(args: GetIdCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetIdCommandOutput) => void): void;
18
+ }
19
+ /**
20
+ * <fullname>Amazon Cognito Federated Identities</fullname>
21
+ * <p>Amazon Cognito Federated Identities is a web service that delivers scoped temporary
22
+ * credentials to mobile devices and other untrusted environments. It uniquely identifies a
23
+ * device and supplies the user with a consistent identity over the lifetime of an
24
+ * application.</p>
25
+ * <p>Using Amazon Cognito Federated Identities, you can enable authentication with one or
26
+ * more third-party identity providers (Facebook, Google, or Login with Amazon) or an Amazon
27
+ * Cognito user pool, and you can also choose to support unauthenticated access from your app.
28
+ * Cognito delivers a unique identifier for each user and acts as an OpenID token provider
29
+ * trusted by Security Token Service (STS) to access temporary, limited-privilege Amazon Web Services credentials.</p>
30
+ * <p>For a description of the authentication flow from the Amazon Cognito Developer Guide
31
+ * see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flow.html">Authentication
32
+ * Flow</a>.</p>
33
+ * <p>For more information see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-identity.html">Amazon Cognito Federated
34
+ * Identities</a>.</p>
35
+ * @public
36
+ */
37
+ export declare class CognitoIdentity extends CognitoIdentityClient implements CognitoIdentity {
38
+ }