Skip to content

Commit 02f29e9

Browse files
author
Steven Yuan
committed
chore(codegen): generate client-dynamodb
1 parent 6ed9a19 commit 02f29e9

File tree

7 files changed

+27
-277
lines changed

7 files changed

+27
-277
lines changed

clients/client-dynamodb/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
"@aws-sdk/middleware-host-header": "*",
2828
"@aws-sdk/middleware-logger": "*",
2929
"@aws-sdk/middleware-recursion-detection": "*",
30+
"@aws-sdk/middleware-signing": "*",
3031
"@aws-sdk/middleware-user-agent": "*",
3132
"@aws-sdk/region-config-resolver": "*",
3233
"@aws-sdk/types": "*",
3334
"@aws-sdk/util-endpoints": "*",
3435
"@aws-sdk/util-user-agent-browser": "*",
3536
"@aws-sdk/util-user-agent-node": "*",
3637
"@smithy/config-resolver": "^2.0.21",
37-
"@smithy/core": "^1.2.0",
3838
"@smithy/fetch-http-handler": "^2.3.1",
3939
"@smithy/hash-node": "^2.0.17",
4040
"@smithy/invalid-dependency": "^2.0.15",
@@ -55,7 +55,6 @@
5555
"@smithy/util-defaults-mode-browser": "^2.0.22",
5656
"@smithy/util-defaults-mode-node": "^2.0.29",
5757
"@smithy/util-endpoints": "^1.0.7",
58-
"@smithy/util-middleware": "^2.0.8",
5958
"@smithy/util-retry": "^2.0.8",
6059
"@smithy/util-utf8": "^2.0.2",
6160
"@smithy/util-waiter": "^2.0.15",

clients/client-dynamodb/src/DynamoDBClient.ts

Lines changed: 25 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,20 @@ import {
1212
} from "@aws-sdk/middleware-host-header";
1313
import { getLoggerPlugin } from "@aws-sdk/middleware-logger";
1414
import { getRecursionDetectionPlugin } from "@aws-sdk/middleware-recursion-detection";
15+
import {
16+
AwsAuthInputConfig,
17+
AwsAuthResolvedConfig,
18+
getAwsAuthPlugin,
19+
resolveAwsAuthConfig,
20+
} from "@aws-sdk/middleware-signing";
1521
import {
1622
getUserAgentPlugin,
1723
resolveUserAgentConfig,
1824
UserAgentInputConfig,
1925
UserAgentResolvedConfig,
2026
} from "@aws-sdk/middleware-user-agent";
27+
import { Credentials as __Credentials } from "@aws-sdk/types";
2128
import { RegionInputConfig, RegionResolvedConfig, resolveRegionConfig } from "@smithy/config-resolver";
22-
import {
23-
DefaultIdentityProviderConfig,
24-
getHttpAuthSchemeEndpointRuleSetPlugin,
25-
getHttpSigningPlugin,
26-
} from "@smithy/core";
2729
import { getContentLengthPlugin } from "@smithy/middleware-content-length";
2830
import { EndpointInputConfig, EndpointResolvedConfig, resolveEndpointConfig } from "@smithy/middleware-endpoint";
2931
import { getRetryPlugin, resolveRetryConfig, RetryInputConfig, RetryResolvedConfig } from "@smithy/middleware-retry";
@@ -35,7 +37,6 @@ import {
3537
SmithyResolvedConfiguration as __SmithyResolvedConfiguration,
3638
} from "@smithy/smithy-client";
3739
import {
38-
AwsCredentialIdentityProvider,
3940
BodyLengthCalculator as __BodyLengthCalculator,
4041
CheckOptionalClientConfig as __CheckOptionalClientConfig,
4142
ChecksumConstructor as __ChecksumConstructor,
@@ -52,12 +53,6 @@ import {
5253
UserAgent as __UserAgent,
5354
} from "@smithy/types";
5455

55-
import {
56-
defaultDynamoDBHttpAuthSchemeParametersProvider,
57-
HttpAuthSchemeInputConfig,
58-
HttpAuthSchemeResolvedConfig,
59-
resolveHttpAuthSchemeConfig,
60-
} from "./auth/httpAuthSchemeProvider";
6156
import {
6257
BatchExecuteStatementCommandInput,
6358
BatchExecuteStatementCommandOutput,
@@ -380,22 +375,28 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
380375
useFipsEndpoint?: boolean | __Provider<boolean>;
381376

382377
/**
383-
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
378+
* The AWS region to which this client will send requests
379+
*/
380+
region?: string | __Provider<string>;
381+
382+
/**
383+
* Default credentials provider; Not available in browser runtime.
384384
* @internal
385385
*/
386-
defaultUserAgentProvider?: Provider<__UserAgent>;
386+
credentialDefaultProvider?: (input: any) => __Provider<__Credentials>;
387387

388388
/**
389-
* The AWS region to which this client will send requests
389+
* The provider populating default tracking information to be sent with `user-agent`, `x-amz-user-agent` header
390+
* @internal
390391
*/
391-
region?: string | __Provider<string>;
392+
defaultUserAgentProvider?: Provider<__UserAgent>;
392393

393394
/**
394-
* Default credentials provider; Not available in browser runtime.
395-
* @deprecated
395+
* The provider which populates default for endpointDiscoveryEnabled configuration, if it's
396+
* not passed during client creation.
396397
* @internal
397398
*/
398-
credentialDefaultProvider?: (input: any) => AwsCredentialIdentityProvider;
399+
endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
399400

400401
/**
401402
* Value for how many times a request will be made at most in case of retry.
@@ -423,13 +424,6 @@ export interface ClientDefaults extends Partial<__SmithyResolvedConfiguration<__
423424
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
424425
*/
425426
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
426-
427-
/**
428-
* The provider which populates default for endpointDiscoveryEnabled configuration, if it's
429-
* not passed during client creation.
430-
* @internal
431-
*/
432-
endpointDiscoveryEnabledProvider?: __Provider<boolean | undefined>;
433427
}
434428

435429
/**
@@ -441,8 +435,8 @@ export type DynamoDBClientConfigType = Partial<__SmithyConfiguration<__HttpHandl
441435
EndpointInputConfig<EndpointParameters> &
442436
RetryInputConfig &
443437
HostHeaderInputConfig &
438+
AwsAuthInputConfig &
444439
UserAgentInputConfig &
445-
HttpAuthSchemeInputConfig &
446440
EndpointDiscoveryInputConfig &
447441
ClientInputEndpointParameters;
448442
/**
@@ -462,8 +456,8 @@ export type DynamoDBClientResolvedConfigType = __SmithyResolvedConfiguration<__H
462456
EndpointResolvedConfig<EndpointParameters> &
463457
RetryResolvedConfig &
464458
HostHeaderResolvedConfig &
459+
AwsAuthResolvedConfig &
465460
UserAgentResolvedConfig &
466-
HttpAuthSchemeResolvedConfig &
467461
EndpointDiscoveryResolvedConfig &
468462
ClientResolvedEndpointParameters;
469463
/**
@@ -504,26 +498,15 @@ export class DynamoDBClient extends __Client<
504498
*/
505499
readonly config: DynamoDBClientResolvedConfig;
506500

507-
private getDefaultHttpAuthSchemeParametersProvider() {
508-
return defaultDynamoDBHttpAuthSchemeParametersProvider;
509-
}
510-
511-
private getIdentityProviderConfigProvider() {
512-
return async (config: DynamoDBClientResolvedConfig) =>
513-
new DefaultIdentityProviderConfig({
514-
"aws.auth#sigv4": config.credentials,
515-
});
516-
}
517-
518501
constructor(...[configuration]: __CheckOptionalClientConfig<DynamoDBClientConfig>) {
519502
const _config_0 = __getRuntimeConfig(configuration || {});
520503
const _config_1 = resolveClientEndpointParameters(_config_0);
521504
const _config_2 = resolveRegionConfig(_config_1);
522505
const _config_3 = resolveEndpointConfig(_config_2);
523506
const _config_4 = resolveRetryConfig(_config_3);
524507
const _config_5 = resolveHostHeaderConfig(_config_4);
525-
const _config_6 = resolveUserAgentConfig(_config_5);
526-
const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
508+
const _config_6 = resolveAwsAuthConfig(_config_5);
509+
const _config_7 = resolveUserAgentConfig(_config_6);
527510
const _config_8 = resolveEndpointDiscoveryConfig(_config_7, {
528511
endpointDiscoveryCommandCtor: DescribeEndpointsCommand,
529512
});
@@ -535,14 +518,8 @@ export class DynamoDBClient extends __Client<
535518
this.middlewareStack.use(getHostHeaderPlugin(this.config));
536519
this.middlewareStack.use(getLoggerPlugin(this.config));
537520
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
521+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
538522
this.middlewareStack.use(getUserAgentPlugin(this.config));
539-
this.middlewareStack.use(
540-
getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
541-
httpAuthSchemeParametersProvider: this.getDefaultHttpAuthSchemeParametersProvider(),
542-
identityProviderConfigProvider: this.getIdentityProviderConfigProvider(),
543-
})
544-
);
545-
this.middlewareStack.use(getHttpSigningPlugin(this.config));
546523
}
547524

548525
/**

clients/client-dynamodb/src/auth/httpAuthExtensionConfiguration.ts

Lines changed: 0 additions & 72 deletions
This file was deleted.

clients/client-dynamodb/src/auth/httpAuthSchemeProvider.ts

Lines changed: 0 additions & 137 deletions
This file was deleted.

0 commit comments

Comments
 (0)