@aws-sdk/client-dynamodb 3.476.0 → 3.477.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,19 +5,28 @@ const middleware_endpoint_discovery_1 = require("@aws-sdk/middleware-endpoint-di
5
5
  const middleware_host_header_1 = require("@aws-sdk/middleware-host-header");
6
6
  const middleware_logger_1 = require("@aws-sdk/middleware-logger");
7
7
  const middleware_recursion_detection_1 = require("@aws-sdk/middleware-recursion-detection");
8
- const middleware_signing_1 = require("@aws-sdk/middleware-signing");
9
8
  const middleware_user_agent_1 = require("@aws-sdk/middleware-user-agent");
10
9
  const config_resolver_1 = require("@smithy/config-resolver");
10
+ const core_1 = require("@smithy/core");
11
11
  const middleware_content_length_1 = require("@smithy/middleware-content-length");
12
12
  const middleware_endpoint_1 = require("@smithy/middleware-endpoint");
13
13
  const middleware_retry_1 = require("@smithy/middleware-retry");
14
14
  const smithy_client_1 = require("@smithy/smithy-client");
15
15
  Object.defineProperty(exports, "__Client", { enumerable: true, get: function () { return smithy_client_1.Client; } });
16
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
16
17
  const DescribeEndpointsCommand_1 = require("./commands/DescribeEndpointsCommand");
17
18
  const EndpointParameters_1 = require("./endpoint/EndpointParameters");
18
19
  const runtimeConfig_1 = require("./runtimeConfig");
19
20
  const runtimeExtensions_1 = require("./runtimeExtensions");
20
21
  class DynamoDBClient extends smithy_client_1.Client {
22
+ getDefaultHttpAuthSchemeParametersProvider() {
23
+ return httpAuthSchemeProvider_1.defaultDynamoDBHttpAuthSchemeParametersProvider;
24
+ }
25
+ getIdentityProviderConfigProvider() {
26
+ return async (config) => new core_1.DefaultIdentityProviderConfig({
27
+ "aws.auth#sigv4": config.credentials,
28
+ });
29
+ }
21
30
  constructor(...[configuration]) {
22
31
  const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
23
32
  const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
@@ -25,8 +34,8 @@ class DynamoDBClient extends smithy_client_1.Client {
25
34
  const _config_3 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_2);
26
35
  const _config_4 = (0, middleware_retry_1.resolveRetryConfig)(_config_3);
27
36
  const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
28
- const _config_6 = (0, middleware_signing_1.resolveAwsAuthConfig)(_config_5);
29
- const _config_7 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_6);
37
+ const _config_6 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_5);
38
+ const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
30
39
  const _config_8 = (0, middleware_endpoint_discovery_1.resolveEndpointDiscoveryConfig)(_config_7, {
31
40
  endpointDiscoveryCommandCtor: DescribeEndpointsCommand_1.DescribeEndpointsCommand,
32
41
  });
@@ -38,8 +47,12 @@ class DynamoDBClient extends smithy_client_1.Client {
38
47
  this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
39
48
  this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
40
49
  this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
41
- this.middlewareStack.use((0, middleware_signing_1.getAwsAuthPlugin)(this.config));
42
50
  this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
51
+ this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
52
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
53
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
54
+ }));
55
+ this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
43
56
  }
44
57
  destroy() {
45
58
  super.destroy();
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;
4
+ const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
5
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
6
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
7
+ let _credentials = runtimeConfig.credentials;
8
+ return {
9
+ setHttpAuthScheme(httpAuthScheme) {
10
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
11
+ if (index === -1) {
12
+ _httpAuthSchemes.push(httpAuthScheme);
13
+ }
14
+ else {
15
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
16
+ }
17
+ },
18
+ httpAuthSchemes() {
19
+ return _httpAuthSchemes;
20
+ },
21
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
22
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
23
+ },
24
+ httpAuthSchemeProvider() {
25
+ return _httpAuthSchemeProvider;
26
+ },
27
+ setCredentials(credentials) {
28
+ _credentials = credentials;
29
+ },
30
+ credentials() {
31
+ return _credentials;
32
+ },
33
+ };
34
+ };
35
+ exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
36
+ const resolveHttpAuthRuntimeConfig = (config) => {
37
+ return {
38
+ httpAuthSchemes: config.httpAuthSchemes(),
39
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
40
+ credentials: config.credentials(),
41
+ };
42
+ };
43
+ exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHttpAuthSchemeConfig = exports.defaultDynamoDBHttpAuthSchemeProvider = exports.defaultDynamoDBHttpAuthSchemeParametersProvider = void 0;
4
+ const core_1 = require("@aws-sdk/core");
5
+ const util_middleware_1 = require("@smithy/util-middleware");
6
+ const defaultDynamoDBHttpAuthSchemeParametersProvider = async (config, context, input) => {
7
+ return {
8
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
9
+ region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||
10
+ (() => {
11
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
12
+ })(),
13
+ };
14
+ };
15
+ exports.defaultDynamoDBHttpAuthSchemeParametersProvider = defaultDynamoDBHttpAuthSchemeParametersProvider;
16
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
17
+ return {
18
+ schemeId: "aws.auth#sigv4",
19
+ signingProperties: {
20
+ name: "dynamodb",
21
+ region: authParameters.region,
22
+ },
23
+ propertiesExtractor: (config, context) => ({
24
+ signingProperties: {
25
+ config,
26
+ context,
27
+ },
28
+ }),
29
+ };
30
+ }
31
+ const defaultDynamoDBHttpAuthSchemeProvider = (authParameters) => {
32
+ const options = [];
33
+ switch (authParameters.operation) {
34
+ default: {
35
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
36
+ }
37
+ }
38
+ return options;
39
+ };
40
+ exports.defaultDynamoDBHttpAuthSchemeProvider = defaultDynamoDBHttpAuthSchemeProvider;
41
+ const resolveHttpAuthSchemeConfig = (config) => {
42
+ const config_0 = (0, core_1.resolveAWSSDKSigV4Config)(config);
43
+ return {
44
+ ...config_0,
45
+ };
46
+ };
47
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
@@ -1,10 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getRuntimeConfig = void 0;
4
+ const core_1 = require("@aws-sdk/core");
4
5
  const smithy_client_1 = require("@smithy/smithy-client");
5
6
  const url_parser_1 = require("@smithy/url-parser");
6
7
  const util_base64_1 = require("@smithy/util-base64");
7
8
  const util_utf8_1 = require("@smithy/util-utf8");
9
+ const httpAuthSchemeProvider_1 = require("./auth/httpAuthSchemeProvider");
8
10
  const endpointResolver_1 = require("./endpoint/endpointResolver");
9
11
  const getRuntimeConfig = (config) => {
10
12
  return {
@@ -14,6 +16,14 @@ const getRuntimeConfig = (config) => {
14
16
  disableHostPrefix: config?.disableHostPrefix ?? false,
15
17
  endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
16
18
  extensions: config?.extensions ?? [],
19
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultDynamoDBHttpAuthSchemeProvider,
20
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
21
+ {
22
+ schemeId: "aws.auth#sigv4",
23
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
24
+ signer: new core_1.AWSSDKSigV4Signer(),
25
+ },
26
+ ],
17
27
  logger: config?.logger ?? new smithy_client_1.NoOpLogger(),
18
28
  serviceId: config?.serviceId ?? "DynamoDB",
19
29
  urlParser: config?.urlParser ?? url_parser_1.parseUrl,
@@ -4,12 +4,14 @@ exports.resolveRuntimeExtensions = void 0;
4
4
  const region_config_resolver_1 = require("@aws-sdk/region-config-resolver");
5
5
  const protocol_http_1 = require("@smithy/protocol-http");
6
6
  const smithy_client_1 = require("@smithy/smithy-client");
7
+ const httpAuthExtensionConfiguration_1 = require("./auth/httpAuthExtensionConfiguration");
7
8
  const asPartial = (t) => t;
8
9
  const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
9
10
  const extensionConfiguration = {
10
11
  ...asPartial((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig)),
11
12
  ...asPartial((0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig)),
12
13
  ...asPartial((0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig)),
14
+ ...asPartial((0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig)),
13
15
  };
14
16
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
15
17
  return {
@@ -17,6 +19,7 @@ const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
17
19
  ...(0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),
18
20
  ...(0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration),
19
21
  ...(0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),
22
+ ...(0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration),
20
23
  };
21
24
  };
22
25
  exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
@@ -2,19 +2,28 @@ import { resolveEndpointDiscoveryConfig, } from "@aws-sdk/middleware-endpoint-di
2
2
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
3
3
  import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
4
4
  import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
5
- import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-signing";
6
5
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
7
6
  import { resolveRegionConfig } from "@smithy/config-resolver";
7
+ import { DefaultIdentityProviderConfig, getHttpAuthSchemeEndpointRuleSetPlugin, getHttpSigningPlugin, } from "@smithy/core";
8
8
  import { getContentLengthPlugin } from "@smithy/middleware-content-length";
9
9
  import { resolveEndpointConfig } from "@smithy/middleware-endpoint";
10
10
  import { getRetryPlugin, resolveRetryConfig } from "@smithy/middleware-retry";
11
11
  import { Client as __Client, } from "@smithy/smithy-client";
12
+ import { defaultDynamoDBHttpAuthSchemeParametersProvider, resolveHttpAuthSchemeConfig, } from "./auth/httpAuthSchemeProvider";
12
13
  import { DescribeEndpointsCommand, } from "./commands/DescribeEndpointsCommand";
13
14
  import { resolveClientEndpointParameters, } from "./endpoint/EndpointParameters";
14
15
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
15
16
  import { resolveRuntimeExtensions } from "./runtimeExtensions";
16
17
  export { __Client };
17
18
  export class DynamoDBClient extends __Client {
19
+ getDefaultHttpAuthSchemeParametersProvider() {
20
+ return defaultDynamoDBHttpAuthSchemeParametersProvider;
21
+ }
22
+ getIdentityProviderConfigProvider() {
23
+ return async (config) => new DefaultIdentityProviderConfig({
24
+ "aws.auth#sigv4": config.credentials,
25
+ });
26
+ }
18
27
  constructor(...[configuration]) {
19
28
  const _config_0 = __getRuntimeConfig(configuration || {});
20
29
  const _config_1 = resolveClientEndpointParameters(_config_0);
@@ -22,8 +31,8 @@ export class DynamoDBClient extends __Client {
22
31
  const _config_3 = resolveEndpointConfig(_config_2);
23
32
  const _config_4 = resolveRetryConfig(_config_3);
24
33
  const _config_5 = resolveHostHeaderConfig(_config_4);
25
- const _config_6 = resolveAwsAuthConfig(_config_5);
26
- const _config_7 = resolveUserAgentConfig(_config_6);
34
+ const _config_6 = resolveUserAgentConfig(_config_5);
35
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
27
36
  const _config_8 = resolveEndpointDiscoveryConfig(_config_7, {
28
37
  endpointDiscoveryCommandCtor: DescribeEndpointsCommand,
29
38
  });
@@ -35,8 +44,12 @@ export class DynamoDBClient extends __Client {
35
44
  this.middlewareStack.use(getHostHeaderPlugin(this.config));
36
45
  this.middlewareStack.use(getLoggerPlugin(this.config));
37
46
  this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
38
- this.middlewareStack.use(getAwsAuthPlugin(this.config));
39
47
  this.middlewareStack.use(getUserAgentPlugin(this.config));
48
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
49
+ httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
50
+ identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
51
+ }));
52
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
40
53
  }
41
54
  destroy() {
42
55
  super.destroy();
@@ -0,0 +1,38 @@
1
+ export const getHttpAuthExtensionConfiguration = (runtimeConfig) => {
2
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
3
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
4
+ let _credentials = runtimeConfig.credentials;
5
+ return {
6
+ setHttpAuthScheme(httpAuthScheme) {
7
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
8
+ if (index === -1) {
9
+ _httpAuthSchemes.push(httpAuthScheme);
10
+ }
11
+ else {
12
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
13
+ }
14
+ },
15
+ httpAuthSchemes() {
16
+ return _httpAuthSchemes;
17
+ },
18
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
19
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
20
+ },
21
+ httpAuthSchemeProvider() {
22
+ return _httpAuthSchemeProvider;
23
+ },
24
+ setCredentials(credentials) {
25
+ _credentials = credentials;
26
+ },
27
+ credentials() {
28
+ return _credentials;
29
+ },
30
+ };
31
+ };
32
+ export const resolveHttpAuthRuntimeConfig = (config) => {
33
+ return {
34
+ httpAuthSchemes: config.httpAuthSchemes(),
35
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
36
+ credentials: config.credentials(),
37
+ };
38
+ };
@@ -0,0 +1,41 @@
1
+ import { resolveAWSSDKSigV4Config, } from "@aws-sdk/core";
2
+ import { getSmithyContext, normalizeProvider } from "@smithy/util-middleware";
3
+ export const defaultDynamoDBHttpAuthSchemeParametersProvider = async (config, context, input) => {
4
+ return {
5
+ operation: getSmithyContext(context).operation,
6
+ region: (await normalizeProvider(config.region)()) ||
7
+ (() => {
8
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
9
+ })(),
10
+ };
11
+ };
12
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
13
+ return {
14
+ schemeId: "aws.auth#sigv4",
15
+ signingProperties: {
16
+ name: "dynamodb",
17
+ region: authParameters.region,
18
+ },
19
+ propertiesExtractor: (config, context) => ({
20
+ signingProperties: {
21
+ config,
22
+ context,
23
+ },
24
+ }),
25
+ };
26
+ }
27
+ export const defaultDynamoDBHttpAuthSchemeProvider = (authParameters) => {
28
+ const options = [];
29
+ switch (authParameters.operation) {
30
+ default: {
31
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
32
+ }
33
+ }
34
+ return options;
35
+ };
36
+ export const resolveHttpAuthSchemeConfig = (config) => {
37
+ const config_0 = resolveAWSSDKSigV4Config(config);
38
+ return {
39
+ ...config_0,
40
+ };
41
+ };
@@ -1,7 +1,9 @@
1
+ import { AWSSDKSigV4Signer } from "@aws-sdk/core";
1
2
  import { NoOpLogger } from "@smithy/smithy-client";
2
3
  import { parseUrl } from "@smithy/url-parser";
3
4
  import { fromBase64, toBase64 } from "@smithy/util-base64";
4
5
  import { fromUtf8, toUtf8 } from "@smithy/util-utf8";
6
+ import { defaultDynamoDBHttpAuthSchemeProvider } from "./auth/httpAuthSchemeProvider";
5
7
  import { defaultEndpointResolver } from "./endpoint/endpointResolver";
6
8
  export const getRuntimeConfig = (config) => {
7
9
  return {
@@ -11,6 +13,14 @@ export const getRuntimeConfig = (config) => {
11
13
  disableHostPrefix: config?.disableHostPrefix ?? false,
12
14
  endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
13
15
  extensions: config?.extensions ?? [],
16
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultDynamoDBHttpAuthSchemeProvider,
17
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
18
+ {
19
+ schemeId: "aws.auth#sigv4",
20
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
21
+ signer: new AWSSDKSigV4Signer(),
22
+ },
23
+ ],
14
24
  logger: config?.logger ?? new NoOpLogger(),
15
25
  serviceId: config?.serviceId ?? "DynamoDB",
16
26
  urlParser: config?.urlParser ?? parseUrl,
@@ -1,12 +1,14 @@
1
1
  import { getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, } from "@aws-sdk/region-config-resolver";
2
2
  import { getHttpHandlerExtensionConfiguration, resolveHttpHandlerRuntimeConfig } from "@smithy/protocol-http";
3
3
  import { getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig } from "@smithy/smithy-client";
4
+ import { getHttpAuthExtensionConfiguration, resolveHttpAuthRuntimeConfig } from "./auth/httpAuthExtensionConfiguration";
4
5
  const asPartial = (t) => t;
5
6
  export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
6
7
  const extensionConfiguration = {
7
8
  ...asPartial(getAwsRegionExtensionConfiguration(runtimeConfig)),
8
9
  ...asPartial(getDefaultExtensionConfiguration(runtimeConfig)),
9
10
  ...asPartial(getHttpHandlerExtensionConfiguration(runtimeConfig)),
11
+ ...asPartial(getHttpAuthExtensionConfiguration(runtimeConfig)),
10
12
  };
11
13
  extensions.forEach((extension) => extension.configure(extensionConfiguration));
12
14
  return {
@@ -14,5 +16,6 @@ export const resolveRuntimeExtensions = (runtimeConfig, extensions) => {
14
16
  ...resolveAwsRegionExtensionConfiguration(extensionConfiguration),
15
17
  ...resolveDefaultRuntimeConfig(extensionConfiguration),
16
18
  ...resolveHttpHandlerRuntimeConfig(extensionConfiguration),
19
+ ...resolveHttpAuthRuntimeConfig(extensionConfiguration),
17
20
  };
18
21
  };
@@ -1,14 +1,13 @@
1
1
  import { EndpointDiscoveryInputConfig, EndpointDiscoveryResolvedConfig } from "@aws-sdk/middleware-endpoint-discovery";
2
2
  import { HostHeaderInputConfig, HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
3
- import { AwsAuthInputConfig, AwsAuthResolvedConfig } from "@aws-sdk/middleware-signing";
4
3
  import { UserAgentInputConfig, UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
5
- import { Credentials as __Credentials } from "@aws-sdk/types";
6
4
  import { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
7
5
  import { EndpointInputConfig, EndpointResolvedConfig } from "@smithy/middleware-endpoint";
8
6
  import { RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
9
7
  import { HttpHandler as __HttpHandler } from "@smithy/protocol-http";
10
8
  import { Client as __Client, DefaultsMode as __DefaultsMode, SmithyConfiguration as __SmithyConfiguration, SmithyResolvedConfiguration as __SmithyResolvedConfiguration } from "@smithy/smithy-client";
11
- import { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
9
+ import { AwsCredentialIdentityProvider, BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
10
+ import { HttpAuthSchemeInputConfig, HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
12
11
  import { BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput } from "./commands/BatchExecuteStatementCommand";
13
12
  import { BatchGetItemCommandInput, BatchGetItemCommandOutput } from "./commands/BatchGetItemCommand";
14
13
  import { BatchWriteItemCommandInput, BatchWriteItemCommandOutput } from "./commands/BatchWriteItemCommand";
@@ -145,26 +144,21 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
145
144
  * Enables FIPS compatible endpoints.
146
145
  */
147
146
  useFipsEndpoint?: boolean | __Provider<boolean>;
148
- /**
149
- * The AWS region to which this client will send requests
150
- */
151
- region?: string | __Provider<string>;
152
- /**
153
- * Default credentials provider; Not available in browser runtime.
154
- * @internal
155
- */
156
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
157
147
  /**
158
148
  * The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
159
149
  * @internal
160
150
  */
161
151
  defaultUserAgentProvider?: Provider<__UserAgent>;
162
152
  /**
163
- * The provider which populates default for endpointDiscoveryEnabled configuration, if it's
164
- * not passed during client creation.
153
+ * The AWS region to which this client will send requests
154
+ */
155
+ region?: string | __Provider<string>;
156
+ /**
157
+ * Default credentials provider; Not available in browser runtime.
158
+ * @deprecated
165
159
  * @internal
166
160
  */
167
- endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
161
+ credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
168
162
  /**
169
163
  * Value for how many times a request will be made at most in case of retry.
170
164
  */
@@ -187,11 +181,17 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
187
181
  * The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
188
182
  */
189
183
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
184
+ /**
185
+ * The provider which populates default for endpointDiscoveryEnabled configuration, if it's
186
+ * not passed during client creation.
187
+ * @internal
188
+ */
189
+ endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
190
190
  }
191
191
  /**
192
192
  * @public
193
193
  */
194
- export type DynamoDBClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & AwsAuthInputConfig & UserAgentInputConfig & EndpointDiscoveryInputConfig & ClientInputEndpointParameters;
194
+ export type DynamoDBClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & RegionInputConfig & EndpointInputConfig<EndpointParameters> & RetryInputConfig & HostHeaderInputConfig & UserAgentInputConfig & HttpAuthSchemeInputConfig & EndpointDiscoveryInputConfig & ClientInputEndpointParameters;
195
195
  /**
196
196
  * @public
197
197
  *
@@ -202,7 +202,7 @@ export interface DynamoDBClientConfig extends DynamoDBClientConfigType {
202
202
  /**
203
203
  * @public
204
204
  */
205
- export type DynamoDBClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & AwsAuthResolvedConfig & UserAgentResolvedConfig & EndpointDiscoveryResolvedConfig & ClientResolvedEndpointParameters;
205
+ export type DynamoDBClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & RegionResolvedConfig & EndpointResolvedConfig<EndpointParameters> & RetryResolvedConfig & HostHeaderResolvedConfig & UserAgentResolvedConfig & HttpAuthSchemeResolvedConfig & EndpointDiscoveryResolvedConfig & ClientResolvedEndpointParameters;
206
206
  /**
207
207
  * @public
208
208
  *
@@ -235,6 +235,8 @@ export declare class DynamoDBClient extends __Client<__HttpHandlerOptions, Servi
235
235
  * The resolved configuration of DynamoDBClient class. This is resolved and normalized from the {@link DynamoDBClientConfig | constructor configuration interface}.
236
236
  */
237
237
  readonly config: DynamoDBClientResolvedConfig;
238
+ private getDefaultHttpAuthSchemeParametersProvider;
239
+ private getIdentityProviderConfigProvider;
238
240
  constructor(...[configuration]: __CheckOptionalClientConfig<DynamoDBClientConfig>);
239
241
  /**
240
242
  * Destroy underlying resources, like sockets. It's usually not necessary to do this.
@@ -0,0 +1,29 @@
1
+ import { AwsCredentialIdentity, AwsCredentialIdentityProvider, HttpAuthScheme } from "@smithy/types";
2
+ import { DynamoDBHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
3
+ /**
4
+ * @internal
5
+ */
6
+ export interface HttpAuthExtensionConfiguration {
7
+ setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
8
+ httpAuthSchemes(): HttpAuthScheme[];
9
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider): void;
10
+ httpAuthSchemeProvider(): DynamoDBHttpAuthSchemeProvider;
11
+ setCredentials(credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider): void;
12
+ credentials(): AwsCredentialIdentity | AwsCredentialIdentityProvider | undefined;
13
+ }
14
+ /**
15
+ * @internal
16
+ */
17
+ export type HttpAuthRuntimeConfig = Partial<{
18
+ httpAuthSchemes: HttpAuthScheme[];
19
+ httpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider;
20
+ credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
21
+ }>;
22
+ /**
23
+ * @internal
24
+ */
25
+ export declare const getHttpAuthExtensionConfiguration: (runtimeConfig: HttpAuthRuntimeConfig) => HttpAuthExtensionConfiguration;
26
+ /**
27
+ * @internal
28
+ */
29
+ export declare const resolveHttpAuthRuntimeConfig: (config: HttpAuthExtensionConfiguration) => HttpAuthRuntimeConfig;
@@ -0,0 +1,61 @@
1
+ import { AWSSDKSigV4AuthInputConfig, AWSSDKSigV4AuthResolvedConfig, AWSSDKSigV4PreviouslyResolved } from "@aws-sdk/core";
2
+ import { HandlerExecutionContext, HttpAuthScheme, HttpAuthSchemeParameters, HttpAuthSchemeParametersProvider, HttpAuthSchemeProvider } from "@smithy/types";
3
+ import { DynamoDBClientResolvedConfig } from "../DynamoDBClient";
4
+ /**
5
+ * @internal
6
+ */
7
+ export interface DynamoDBHttpAuthSchemeParameters extends HttpAuthSchemeParameters {
8
+ region?: string;
9
+ }
10
+ /**
11
+ * @internal
12
+ */
13
+ export interface DynamoDBHttpAuthSchemeParametersProvider extends HttpAuthSchemeParametersProvider<DynamoDBClientResolvedConfig, HandlerExecutionContext, DynamoDBHttpAuthSchemeParameters, object> {
14
+ }
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const defaultDynamoDBHttpAuthSchemeParametersProvider: (config: DynamoDBClientResolvedConfig, context: HandlerExecutionContext, input: object) => Promise<DynamoDBHttpAuthSchemeParameters>;
19
+ /**
20
+ * @internal
21
+ */
22
+ export interface DynamoDBHttpAuthSchemeProvider extends HttpAuthSchemeProvider<DynamoDBHttpAuthSchemeParameters> {
23
+ }
24
+ /**
25
+ * @internal
26
+ */
27
+ export declare const defaultDynamoDBHttpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider;
28
+ /**
29
+ * @internal
30
+ */
31
+ export interface HttpAuthSchemeInputConfig extends AWSSDKSigV4AuthInputConfig {
32
+ /**
33
+ * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
34
+ * @internal
35
+ */
36
+ httpAuthSchemes?: HttpAuthScheme[];
37
+ /**
38
+ * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
39
+ * @internal
40
+ */
41
+ httpAuthSchemeProvider?: DynamoDBHttpAuthSchemeProvider;
42
+ }
43
+ /**
44
+ * @internal
45
+ */
46
+ export interface HttpAuthSchemeResolvedConfig extends AWSSDKSigV4AuthResolvedConfig {
47
+ /**
48
+ * experimentalIdentityAndAuth: Configuration of HttpAuthSchemes for a client which provides default identity providers and signers per auth scheme.
49
+ * @internal
50
+ */
51
+ readonly httpAuthSchemes: HttpAuthScheme[];
52
+ /**
53
+ * experimentalIdentityAndAuth: Configuration of an HttpAuthSchemeProvider for a client which resolves which HttpAuthScheme to use.
54
+ * @internal
55
+ */
56
+ readonly httpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider;
57
+ }
58
+ /**
59
+ * @internal
60
+ */
61
+ export declare const resolveHttpAuthSchemeConfig: <T>(config: T & HttpAuthSchemeInputConfig & AWSSDKSigV4PreviouslyResolved) => T & HttpAuthSchemeResolvedConfig;
@@ -1,8 +1,9 @@
1
1
  import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
2
2
  import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
3
3
  import { DefaultExtensionConfiguration } from "@smithy/types";
4
+ import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
4
5
  /**
5
6
  * @internal
6
7
  */
7
- export interface DynamoDBExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration {
8
+ export interface DynamoDBExtensionConfiguration extends HttpHandlerExtensionConfiguration, DefaultExtensionConfiguration, AwsRegionExtensionConfiguration, HttpAuthExtensionConfiguration {
8
9
  }
@@ -7,7 +7,7 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
7
7
  runtime: string;
8
8
  defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
9
9
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
10
- credentialDefaultProvider: (input: any) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
10
+ credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
11
11
  defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
12
12
  endpointDiscoveryEnabledProvider: import("@smithy/types").Provider<boolean | undefined>;
13
13
  maxAttempts: number | import("@smithy/types").Provider<number>;
@@ -37,13 +37,15 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
37
37
  }) => import("@smithy/types").EndpointV2;
38
38
  tls?: boolean | undefined;
39
39
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
40
- credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").Provider<import("@smithy/types").AwsCredentialIdentity> | undefined;
40
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
41
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
42
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
43
+ credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
41
44
  signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
42
45
  signingEscapePath?: boolean | undefined;
43
46
  systemClockOffset?: number | undefined;
44
47
  signingRegion?: string | undefined;
45
48
  signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
46
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
47
49
  endpointCacheSize?: number | undefined;
48
50
  endpointDiscoveryEnabled?: boolean | undefined;
49
51
  };
@@ -7,7 +7,7 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
7
7
  runtime: string;
8
8
  defaultsMode: import("@smithy/types").Provider<import("@smithy/smithy-client").ResolvedDefaultsMode>;
9
9
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
10
- credentialDefaultProvider: (input: any) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
10
+ credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
11
11
  defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
12
12
  endpointDiscoveryEnabledProvider: import("@smithy/types").Provider<boolean | undefined>;
13
13
  maxAttempts: number | import("@smithy/types").Provider<number>;
@@ -37,13 +37,15 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
37
37
  }) => import("@smithy/types").EndpointV2;
38
38
  tls?: boolean | undefined;
39
39
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
40
- credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").Provider<import("@smithy/types").AwsCredentialIdentity> | undefined;
40
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
41
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
42
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
43
+ credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
41
44
  signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
42
45
  signingEscapePath?: boolean | undefined;
43
46
  systemClockOffset?: number | undefined;
44
47
  signingRegion?: string | undefined;
45
48
  signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
46
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
47
49
  endpointCacheSize?: number | undefined;
48
50
  endpointDiscoveryEnabled?: boolean | undefined;
49
51
  };
@@ -21,28 +21,30 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
21
21
  serviceId: string;
22
22
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
23
23
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
24
- region: string | import("@smithy/types").Provider<any>;
25
- credentialDefaultProvider: (input: any) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
26
24
  defaultUserAgentProvider: import("@smithy/types").Provider<import("@smithy/types").UserAgent>;
27
- endpointDiscoveryEnabledProvider: import("@smithy/types").Provider<boolean | undefined>;
25
+ region: string | import("@smithy/types").Provider<any>;
26
+ credentialDefaultProvider: (input: any) => import("@smithy/types").AwsCredentialIdentityProvider;
28
27
  maxAttempts: number | import("@smithy/types").Provider<number>;
29
28
  retryMode: string | import("@smithy/types").Provider<string>;
30
29
  logger: import("@smithy/types").Logger;
31
30
  extensions: import("./runtimeExtensions").RuntimeExtension[];
32
31
  defaultsMode: import("@smithy/smithy-client").DefaultsMode | import("@smithy/types").Provider<import("@smithy/smithy-client").DefaultsMode>;
32
+ endpointDiscoveryEnabledProvider: import("@smithy/types").Provider<boolean | undefined>;
33
33
  endpoint?: string | import("@smithy/types").Endpoint | import("@smithy/types").Provider<import("@smithy/types").Endpoint> | import("@smithy/types").EndpointV2 | import("@smithy/types").Provider<import("@smithy/types").EndpointV2> | undefined;
34
34
  endpointProvider: (endpointParams: import("./endpoint/EndpointParameters").EndpointParameters, context?: {
35
35
  logger?: import("@smithy/types").Logger | undefined;
36
36
  }) => import("@smithy/types").EndpointV2;
37
37
  tls?: boolean | undefined;
38
38
  retryStrategy?: import("@smithy/types").RetryStrategy | import("@smithy/types").RetryStrategyV2 | undefined;
39
- credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").Provider<import("@smithy/types").AwsCredentialIdentity> | undefined;
39
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
40
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
41
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
42
+ credentials?: import("@smithy/types").AwsCredentialIdentity | import("@smithy/types").AwsCredentialIdentityProvider | undefined;
40
43
  signer?: import("@smithy/types").RequestSigner | ((authScheme?: import("@smithy/types").AuthScheme | undefined) => Promise<import("@smithy/types").RequestSigner>) | undefined;
41
44
  signingEscapePath?: boolean | undefined;
42
45
  systemClockOffset?: number | undefined;
43
46
  signingRegion?: string | undefined;
44
47
  signerConstructor?: (new (options: import("@smithy/signature-v4").SignatureV4Init & import("@smithy/signature-v4").SignatureV4CryptoInit) => import("@smithy/types").RequestSigner) | undefined;
45
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
46
48
  endpointCacheSize?: number | undefined;
47
49
  endpointDiscoveryEnabled?: boolean | undefined;
48
50
  };
@@ -11,6 +11,8 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
11
11
  logger?: import("@smithy/types").Logger | undefined;
12
12
  }) => import("@smithy/types").EndpointV2;
13
13
  extensions: import("./runtimeExtensions").RuntimeExtension[];
14
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
15
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
14
16
  logger: import("@smithy/types").Logger;
15
17
  serviceId: string;
16
18
  urlParser: import("@smithy/types").UrlParser;
@@ -6,15 +6,10 @@ import {
6
6
  HostHeaderInputConfig,
7
7
  HostHeaderResolvedConfig,
8
8
  } from "@aws-sdk/middleware-host-header";
9
- import {
10
- AwsAuthInputConfig,
11
- AwsAuthResolvedConfig,
12
- } from "@aws-sdk/middleware-signing";
13
9
  import {
14
10
  UserAgentInputConfig,
15
11
  UserAgentResolvedConfig,
16
12
  } from "@aws-sdk/middleware-user-agent";
17
- import { Credentials as __Credentials } from "@aws-sdk/types";
18
13
  import {
19
14
  RegionInputConfig,
20
15
  RegionResolvedConfig,
@@ -35,6 +30,7 @@ import {
35
30
  SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
36
31
  } from "@smithy/smithy-client";
37
32
  import {
33
+ AwsCredentialIdentityProvider,
38
34
  BodyLengthCalculator as __BodyLengthCalculator,
39
35
  CheckOptionalClientConfig as __CheckOptionalClientConfig,
40
36
  ChecksumConstructor as __ChecksumConstructor,
@@ -49,6 +45,10 @@ import {
49
45
  UrlParser as __UrlParser,
50
46
  UserAgent as __UserAgent,
51
47
  } from "@smithy/types";
48
+ import {
49
+ HttpAuthSchemeInputConfig,
50
+ HttpAuthSchemeResolvedConfig,
51
+ } from "./auth/httpAuthSchemeProvider";
52
52
  import {
53
53
  BatchExecuteStatementCommandInput,
54
54
  BatchExecuteStatementCommandOutput,
@@ -386,15 +386,15 @@ export interface ClientDefaults
386
386
  serviceId?: string;
387
387
  useDualstackEndpoint?: boolean | __Provider<boolean>;
388
388
  useFipsEndpoint?: boolean | __Provider<boolean>;
389
- region?: string | __Provider<string>;
390
- credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
391
389
  defaultUserAgentProvider?: Provider<__UserAgent>;
392
- endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
390
+ region?: string | __Provider<string>;
391
+ credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
393
392
  maxAttempts?: number | __Provider<number>;
394
393
  retryMode?: string | __Provider<string>;
395
394
  logger?: __Logger;
396
395
  extensions?: RuntimeExtension[];
397
396
  defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
397
+ endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
398
398
  }
399
399
  export type DynamoDBClientConfigType = Partial<
400
400
  __SmithyConfiguration<__HttpHandlerOptions>
@@ -404,8 +404,8 @@ export type DynamoDBClientConfigType = Partial<
404
404
  EndpointInputConfig<EndpointParameters> &
405
405
  RetryInputConfig &
406
406
  HostHeaderInputConfig &
407
- AwsAuthInputConfig &
408
407
  UserAgentInputConfig &
408
+ HttpAuthSchemeInputConfig &
409
409
  EndpointDiscoveryInputConfig &
410
410
  ClientInputEndpointParameters;
411
411
  export interface DynamoDBClientConfig extends DynamoDBClientConfigType {}
@@ -417,8 +417,8 @@ export type DynamoDBClientResolvedConfigType =
417
417
  EndpointResolvedConfig<EndpointParameters> &
418
418
  RetryResolvedConfig &
419
419
  HostHeaderResolvedConfig &
420
- AwsAuthResolvedConfig &
421
420
  UserAgentResolvedConfig &
421
+ HttpAuthSchemeResolvedConfig &
422
422
  EndpointDiscoveryResolvedConfig &
423
423
  ClientResolvedEndpointParameters;
424
424
  export interface DynamoDBClientResolvedConfig
@@ -430,6 +430,8 @@ export declare class DynamoDBClient extends __Client<
430
430
  DynamoDBClientResolvedConfig
431
431
  > {
432
432
  readonly config: DynamoDBClientResolvedConfig;
433
+ private getDefaultHttpAuthSchemeParametersProvider;
434
+ private getIdentityProviderConfigProvider;
433
435
  constructor(
434
436
  ...[configuration]: __CheckOptionalClientConfig<DynamoDBClientConfig>
435
437
  );
@@ -0,0 +1,32 @@
1
+ import {
2
+ AwsCredentialIdentity,
3
+ AwsCredentialIdentityProvider,
4
+ HttpAuthScheme,
5
+ } from "@smithy/types";
6
+ import { DynamoDBHttpAuthSchemeProvider } from "./httpAuthSchemeProvider";
7
+ export interface HttpAuthExtensionConfiguration {
8
+ setHttpAuthScheme(httpAuthScheme: HttpAuthScheme): void;
9
+ httpAuthSchemes(): HttpAuthScheme[];
10
+ setHttpAuthSchemeProvider(
11
+ httpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider
12
+ ): void;
13
+ httpAuthSchemeProvider(): DynamoDBHttpAuthSchemeProvider;
14
+ setCredentials(
15
+ credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider
16
+ ): void;
17
+ credentials():
18
+ | AwsCredentialIdentity
19
+ | AwsCredentialIdentityProvider
20
+ | undefined;
21
+ }
22
+ export type HttpAuthRuntimeConfig = Partial<{
23
+ httpAuthSchemes: HttpAuthScheme[];
24
+ httpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider;
25
+ credentials: AwsCredentialIdentity | AwsCredentialIdentityProvider;
26
+ }>;
27
+ export declare const getHttpAuthExtensionConfiguration: (
28
+ runtimeConfig: HttpAuthRuntimeConfig
29
+ ) => HttpAuthExtensionConfiguration;
30
+ export declare const resolveHttpAuthRuntimeConfig: (
31
+ config: HttpAuthExtensionConfiguration
32
+ ) => HttpAuthRuntimeConfig;
@@ -0,0 +1,44 @@
1
+ import {
2
+ AWSSDKSigV4AuthInputConfig,
3
+ AWSSDKSigV4AuthResolvedConfig,
4
+ AWSSDKSigV4PreviouslyResolved,
5
+ } from "@aws-sdk/core";
6
+ import {
7
+ HandlerExecutionContext,
8
+ HttpAuthScheme,
9
+ HttpAuthSchemeParameters,
10
+ HttpAuthSchemeParametersProvider,
11
+ HttpAuthSchemeProvider,
12
+ } from "@smithy/types";
13
+ import { DynamoDBClientResolvedConfig } from "../DynamoDBClient";
14
+ export interface DynamoDBHttpAuthSchemeParameters
15
+ extends HttpAuthSchemeParameters {
16
+ region?: string;
17
+ }
18
+ export interface DynamoDBHttpAuthSchemeParametersProvider
19
+ extends HttpAuthSchemeParametersProvider<
20
+ DynamoDBClientResolvedConfig,
21
+ HandlerExecutionContext,
22
+ DynamoDBHttpAuthSchemeParameters,
23
+ object
24
+ > {}
25
+ export declare const defaultDynamoDBHttpAuthSchemeParametersProvider: (
26
+ config: DynamoDBClientResolvedConfig,
27
+ context: HandlerExecutionContext,
28
+ input: object
29
+ ) => Promise<DynamoDBHttpAuthSchemeParameters>;
30
+ export interface DynamoDBHttpAuthSchemeProvider
31
+ extends HttpAuthSchemeProvider<DynamoDBHttpAuthSchemeParameters> {}
32
+ export declare const defaultDynamoDBHttpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider;
33
+ export interface HttpAuthSchemeInputConfig extends AWSSDKSigV4AuthInputConfig {
34
+ httpAuthSchemes?: HttpAuthScheme[];
35
+ httpAuthSchemeProvider?: DynamoDBHttpAuthSchemeProvider;
36
+ }
37
+ export interface HttpAuthSchemeResolvedConfig
38
+ extends AWSSDKSigV4AuthResolvedConfig {
39
+ readonly httpAuthSchemes: HttpAuthScheme[];
40
+ readonly httpAuthSchemeProvider: DynamoDBHttpAuthSchemeProvider;
41
+ }
42
+ export declare const resolveHttpAuthSchemeConfig: <T>(
43
+ config: T & HttpAuthSchemeInputConfig & AWSSDKSigV4PreviouslyResolved
44
+ ) => T & HttpAuthSchemeResolvedConfig;
@@ -1,7 +1,9 @@
1
1
  import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
2
2
  import { HttpHandlerExtensionConfiguration } from "@smithy/protocol-http";
3
3
  import { DefaultExtensionConfiguration } from "@smithy/types";
4
+ import { HttpAuthExtensionConfiguration } from "./auth/httpAuthExtensionConfiguration";
4
5
  export interface DynamoDBExtensionConfiguration
5
6
  extends HttpHandlerExtensionConfiguration,
6
7
  DefaultExtensionConfiguration,
7
- AwsRegionExtensionConfiguration {}
8
+ AwsRegionExtensionConfiguration,
9
+ HttpAuthExtensionConfiguration {}
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
8
8
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
9
9
  credentialDefaultProvider: (
10
10
  input: any
11
- ) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
11
+ ) => import("@smithy/types").AwsCredentialIdentityProvider;
12
12
  defaultUserAgentProvider: import("@smithy/types").Provider<
13
13
  import("@smithy/types").UserAgent
14
14
  >;
@@ -75,11 +75,12 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
75
75
  | import("@smithy/types").RetryStrategy
76
76
  | import("@smithy/types").RetryStrategyV2
77
77
  | undefined;
78
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
79
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
80
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
78
81
  credentials?:
79
82
  | import("@smithy/types").AwsCredentialIdentity
80
- | import("@smithy/types").Provider<
81
- import("@smithy/types").AwsCredentialIdentity
82
- >
83
+ | import("@smithy/types").AwsCredentialIdentityProvider
83
84
  | undefined;
84
85
  signer?:
85
86
  | import("@smithy/types").RequestSigner
@@ -96,7 +97,6 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
96
97
  import("@smithy/signature-v4").SignatureV4CryptoInit
97
98
  ) => import("@smithy/types").RequestSigner)
98
99
  | undefined;
99
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
100
100
  endpointCacheSize?: number | undefined;
101
101
  endpointDiscoveryEnabled?: boolean | undefined;
102
102
  };
@@ -8,7 +8,7 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
8
8
  bodyLengthChecker: import("@smithy/types").BodyLengthCalculator;
9
9
  credentialDefaultProvider: (
10
10
  input: any
11
- ) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
11
+ ) => import("@smithy/types").AwsCredentialIdentityProvider;
12
12
  defaultUserAgentProvider: import("@smithy/types").Provider<
13
13
  import("@smithy/types").UserAgent
14
14
  >;
@@ -75,11 +75,12 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
75
75
  | import("@smithy/types").RetryStrategy
76
76
  | import("@smithy/types").RetryStrategyV2
77
77
  | undefined;
78
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
79
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
80
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
78
81
  credentials?:
79
82
  | import("@smithy/types").AwsCredentialIdentity
80
- | import("@smithy/types").Provider<
81
- import("@smithy/types").AwsCredentialIdentity
82
- >
83
+ | import("@smithy/types").AwsCredentialIdentityProvider
83
84
  | undefined;
84
85
  signer?:
85
86
  | import("@smithy/types").RequestSigner
@@ -96,7 +97,6 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
96
97
  import("@smithy/signature-v4").SignatureV4CryptoInit
97
98
  ) => import("@smithy/types").RequestSigner)
98
99
  | undefined;
99
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
100
100
  endpointCacheSize?: number | undefined;
101
101
  endpointDiscoveryEnabled?: boolean | undefined;
102
102
  };
@@ -29,16 +29,13 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
29
29
  serviceId: string;
30
30
  useDualstackEndpoint: boolean | import("@smithy/types").Provider<boolean>;
31
31
  useFipsEndpoint: boolean | import("@smithy/types").Provider<boolean>;
32
- region: string | import("@smithy/types").Provider<any>;
33
- credentialDefaultProvider: (
34
- input: any
35
- ) => import("@smithy/types").Provider<import("@aws-sdk/types").Credentials>;
36
32
  defaultUserAgentProvider: import("@smithy/types").Provider<
37
33
  import("@smithy/types").UserAgent
38
34
  >;
39
- endpointDiscoveryEnabledProvider: import("@smithy/types").Provider<
40
- boolean | undefined
41
- >;
35
+ region: string | import("@smithy/types").Provider<any>;
36
+ credentialDefaultProvider: (
37
+ input: any
38
+ ) => import("@smithy/types").AwsCredentialIdentityProvider;
42
39
  maxAttempts: number | import("@smithy/types").Provider<number>;
43
40
  retryMode: string | import("@smithy/types").Provider<string>;
44
41
  logger: import("@smithy/types").Logger;
@@ -48,6 +45,9 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
48
45
  | import("@smithy/types").Provider<
49
46
  import("@smithy/smithy-client").DefaultsMode
50
47
  >;
48
+ endpointDiscoveryEnabledProvider: import("@smithy/types").Provider<
49
+ boolean | undefined
50
+ >;
51
51
  endpoint?:
52
52
  | string
53
53
  | import("@smithy/types").Endpoint
@@ -66,11 +66,12 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
66
66
  | import("@smithy/types").RetryStrategy
67
67
  | import("@smithy/types").RetryStrategyV2
68
68
  | undefined;
69
+ customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
70
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
71
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
69
72
  credentials?:
70
73
  | import("@smithy/types").AwsCredentialIdentity
71
- | import("@smithy/types").Provider<
72
- import("@smithy/types").AwsCredentialIdentity
73
- >
74
+ | import("@smithy/types").AwsCredentialIdentityProvider
74
75
  | undefined;
75
76
  signer?:
76
77
  | import("@smithy/types").RequestSigner
@@ -87,7 +88,6 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
87
88
  import("@smithy/signature-v4").SignatureV4CryptoInit
88
89
  ) => import("@smithy/types").RequestSigner)
89
90
  | undefined;
90
- customUserAgent?: string | import("@smithy/types").UserAgent | undefined;
91
91
  endpointCacheSize?: number | undefined;
92
92
  endpointDiscoveryEnabled?: boolean | undefined;
93
93
  };
@@ -11,6 +11,8 @@ export declare const getRuntimeConfig: (config: DynamoDBClientConfig) => {
11
11
  }
12
12
  ) => import("@smithy/types").EndpointV2;
13
13
  extensions: import("./runtimeExtensions").RuntimeExtension[];
14
+ httpAuthSchemeProvider: import("./auth/httpAuthSchemeProvider").DynamoDBHttpAuthSchemeProvider;
15
+ httpAuthSchemes: import("@smithy/types").HttpAuthScheme[];
14
16
  logger: import("@smithy/types").Logger;
15
17
  serviceId: string;
16
18
  urlParser: import("@smithy/types").UrlParser;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-dynamodb",
3
3
  "description": "AWS SDK for JavaScript Dynamodb Client for Node.js, Browser and React Native",
4
- "version": "3.476.0",
4
+ "version": "3.477.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,14 +20,13 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.476.0",
24
- "@aws-sdk/core": "3.476.0",
25
- "@aws-sdk/credential-provider-node": "3.476.0",
23
+ "@aws-sdk/client-sts": "3.477.0",
24
+ "@aws-sdk/core": "3.477.0",
25
+ "@aws-sdk/credential-provider-node": "3.477.0",
26
26
  "@aws-sdk/middleware-endpoint-discovery": "3.470.0",
27
27
  "@aws-sdk/middleware-host-header": "3.468.0",
28
28
  "@aws-sdk/middleware-logger": "3.468.0",
29
29
  "@aws-sdk/middleware-recursion-detection": "3.468.0",
30
- "@aws-sdk/middleware-signing": "3.468.0",
31
30
  "@aws-sdk/middleware-user-agent": "3.470.0",
32
31
  "@aws-sdk/region-config-resolver": "3.470.0",
33
32
  "@aws-sdk/types": "3.468.0",
@@ -35,6 +34,7 @@
35
34
  "@aws-sdk/util-user-agent-browser": "3.468.0",
36
35
  "@aws-sdk/util-user-agent-node": "3.470.0",
37
36
  "@smithy/config-resolver": "^2.0.21",
37
+ "@smithy/core": "^1.2.0",
38
38
  "@smithy/fetch-http-handler": "^2.3.1",
39
39
  "@smithy/hash-node": "^2.0.17",
40
40
  "@smithy/invalid-dependency": "^2.0.15",
@@ -55,6 +55,7 @@
55
55
  "@smithy/util-defaults-mode-browser": "^2.0.22",
56
56
  "@smithy/util-defaults-mode-node": "^2.0.29",
57
57
  "@smithy/util-endpoints": "^1.0.7",
58
+ "@smithy/util-middleware": "^2.0.8",
58
59
  "@smithy/util-retry": "^2.0.8",
59
60
  "@smithy/util-utf8": "^2.0.2",
60
61
  "@smithy/util-waiter": "^2.0.15",