@aws-sdk/client-redshift-data 3.1076.0 → 3.1078.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist-cjs/index.js +22 -115
  2. package/dist-es/commandBuilder.js +6 -0
  3. package/dist-es/commands/BatchExecuteStatementCommand.js +2 -14
  4. package/dist-es/commands/CancelStatementCommand.js +2 -14
  5. package/dist-es/commands/DescribeStatementCommand.js +2 -14
  6. package/dist-es/commands/DescribeTableCommand.js +2 -14
  7. package/dist-es/commands/ExecuteStatementCommand.js +2 -14
  8. package/dist-es/commands/GetStatementResultCommand.js +2 -14
  9. package/dist-es/commands/GetStatementResultV2Command.js +2 -14
  10. package/dist-es/commands/ListDatabasesCommand.js +2 -14
  11. package/dist-es/commands/ListSchemasCommand.js +2 -14
  12. package/dist-es/commands/ListStatementsCommand.js +2 -14
  13. package/dist-es/commands/ListTablesCommand.js +2 -14
  14. package/dist-es/index.js +1 -0
  15. package/dist-es/runtimeConfig.browser.js +0 -2
  16. package/dist-es/runtimeConfig.js +1 -2
  17. package/dist-es/runtimeConfig.native.js +0 -2
  18. package/dist-es/runtimeConfig.shared.js +2 -0
  19. package/dist-types/commandBuilder.d.ts +18 -0
  20. package/dist-types/commands/BatchExecuteStatementCommand.d.ts +3 -8
  21. package/dist-types/commands/CancelStatementCommand.d.ts +3 -8
  22. package/dist-types/commands/DescribeStatementCommand.d.ts +3 -8
  23. package/dist-types/commands/DescribeTableCommand.d.ts +3 -8
  24. package/dist-types/commands/ExecuteStatementCommand.d.ts +3 -8
  25. package/dist-types/commands/GetStatementResultCommand.d.ts +3 -8
  26. package/dist-types/commands/GetStatementResultV2Command.d.ts +3 -8
  27. package/dist-types/commands/ListDatabasesCommand.d.ts +3 -8
  28. package/dist-types/commands/ListSchemasCommand.d.ts +3 -8
  29. package/dist-types/commands/ListStatementsCommand.d.ts +3 -8
  30. package/dist-types/commands/ListTablesCommand.d.ts +3 -8
  31. package/dist-types/index.d.ts +1 -0
  32. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  33. package/dist-types/runtimeConfig.d.ts +1 -1
  34. package/dist-types/runtimeConfig.native.d.ts +1 -1
  35. package/dist-types/runtimeConfig.shared.d.ts +1 -0
  36. package/dist-types/ts3.4/commandBuilder.d.ts +46 -0
  37. package/dist-types/ts3.4/commands/BatchExecuteStatementCommand.d.ts +7 -16
  38. package/dist-types/ts3.4/commands/CancelStatementCommand.d.ts +7 -16
  39. package/dist-types/ts3.4/commands/DescribeStatementCommand.d.ts +7 -16
  40. package/dist-types/ts3.4/commands/DescribeTableCommand.d.ts +7 -16
  41. package/dist-types/ts3.4/commands/ExecuteStatementCommand.d.ts +7 -16
  42. package/dist-types/ts3.4/commands/GetStatementResultCommand.d.ts +7 -16
  43. package/dist-types/ts3.4/commands/GetStatementResultV2Command.d.ts +7 -16
  44. package/dist-types/ts3.4/commands/ListDatabasesCommand.d.ts +7 -16
  45. package/dist-types/ts3.4/commands/ListSchemasCommand.d.ts +7 -16
  46. package/dist-types/ts3.4/commands/ListStatementsCommand.d.ts +7 -16
  47. package/dist-types/ts3.4/commands/ListTablesCommand.d.ts +7 -16
  48. package/dist-types/ts3.4/index.d.ts +1 -0
  49. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  50. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  51. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  52. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +1 -0
  53. package/package.json +8 -10
package/dist-cjs/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  const { awsEndpointFunctions, emitWarningIfUnsupportedVersion: emitWarningIfUnsupportedVersion$1, createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin } = require("@aws-sdk/core/client");
2
2
  const { getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, createPaginator } = require("@smithy/core");
3
- const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, Command, createAggregatedClient } = require("@smithy/core/client");
4
- exports.$Command = Command;
3
+ const { normalizeProvider, getSmithyContext, ServiceException, NoOpLogger, emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode, getDefaultExtensionConfiguration, resolveDefaultRuntimeConfig, Client, makeBuilder, createAggregatedClient } = require("@smithy/core/client");
4
+ const { Command: $Command } = require("@smithy/core/client");
5
+ exports.$Command = $Command;
5
6
  exports.__Client = Client;
6
7
  const { resolveDefaultsModeConfig, loadConfig, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, resolveRegionConfig } = require("@smithy/core/config");
7
8
  const { BinaryDecisionDiagram, EndpointCache, decideEndpoint, customEndpointFunctions, resolveEndpointConfig, getEndpointPlugin } = require("@smithy/core/endpoints");
@@ -10,9 +11,10 @@ const { DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_MAX_ATTEMPT_CON
10
11
  const { TypeRegistry, getSchemaSerdePlugin } = require("@smithy/core/schema");
11
12
  const { resolveAwsSdkSigV4Config, AwsSdkSigV4Signer, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } = require("@aws-sdk/core/httpAuthSchemes");
12
13
  const { defaultProvider } = require("@aws-sdk/credential-provider-node");
13
- const { toUtf8, fromUtf8, toBase64, fromBase64, Hash, calculateBodyLength } = require("@smithy/core/serde");
14
+ const { toUtf8, fromUtf8, toBase64, fromBase64, calculateBodyLength } = require("@smithy/core/serde");
14
15
  const { streamCollector, NodeHttpHandler } = require("@smithy/node-http-handler");
15
16
  const { AwsJson1_1Protocol } = require("@aws-sdk/core/protocols");
17
+ const { Sha256 } = require("@smithy/core/checksum");
16
18
 
17
19
  const defaultRedshiftDataHttpAuthSchemeParametersProvider = async (config, context, input) => {
18
20
  return {
@@ -67,7 +69,7 @@ const commonParams = {
67
69
  UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
68
70
  };
69
71
 
70
- var version = "3.1075.0";
72
+ var version = "3.1077.0";
71
73
  var packageInfo = {
72
74
  version: version};
73
75
 
@@ -698,6 +700,7 @@ const getRuntimeConfig$1 = (config) => {
698
700
  serviceTarget: "RedshiftData",
699
701
  },
700
702
  serviceId: config?.serviceId ?? "Redshift Data",
703
+ sha256: config?.sha256 ?? Sha256,
701
704
  urlParser: config?.urlParser ?? parseUrl,
702
705
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
703
706
  utf8Encoder: config?.utf8Encoder ?? toUtf8,
@@ -731,7 +734,6 @@ const getRuntimeConfig = (config) => {
731
734
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
732
735
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
733
736
  }, config),
734
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
735
737
  streamCollector: config?.streamCollector ?? streamCollector,
736
738
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
737
739
  useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -819,136 +821,41 @@ class RedshiftDataClient extends Client {
819
821
  }
820
822
  }
821
823
 
822
- class BatchExecuteStatementCommand extends Command
823
- .classBuilder()
824
- .ep(commonParams)
825
- .m(function (Command, cs, config, o) {
826
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
827
- })
828
- .s("RedshiftData", "BatchExecuteStatement", {})
829
- .n("RedshiftDataClient", "BatchExecuteStatementCommand")
830
- .sc(BatchExecuteStatement$)
831
- .build() {
824
+ const command = makeBuilder(commonParams, "RedshiftData", "RedshiftDataClient", getEndpointPlugin);
825
+ const _ep0 = {};
826
+ const _mw0 = (Command, cs, config, o) => [];
827
+
828
+ class BatchExecuteStatementCommand extends command(_ep0, _mw0, "BatchExecuteStatement", BatchExecuteStatement$) {
832
829
  }
833
830
 
834
- class CancelStatementCommand extends Command
835
- .classBuilder()
836
- .ep(commonParams)
837
- .m(function (Command, cs, config, o) {
838
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
839
- })
840
- .s("RedshiftData", "CancelStatement", {})
841
- .n("RedshiftDataClient", "CancelStatementCommand")
842
- .sc(CancelStatement$)
843
- .build() {
831
+ class CancelStatementCommand extends command(_ep0, _mw0, "CancelStatement", CancelStatement$) {
844
832
  }
845
833
 
846
- class DescribeStatementCommand extends Command
847
- .classBuilder()
848
- .ep(commonParams)
849
- .m(function (Command, cs, config, o) {
850
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
851
- })
852
- .s("RedshiftData", "DescribeStatement", {})
853
- .n("RedshiftDataClient", "DescribeStatementCommand")
854
- .sc(DescribeStatement$)
855
- .build() {
834
+ class DescribeStatementCommand extends command(_ep0, _mw0, "DescribeStatement", DescribeStatement$) {
856
835
  }
857
836
 
858
- class DescribeTableCommand extends Command
859
- .classBuilder()
860
- .ep(commonParams)
861
- .m(function (Command, cs, config, o) {
862
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
863
- })
864
- .s("RedshiftData", "DescribeTable", {})
865
- .n("RedshiftDataClient", "DescribeTableCommand")
866
- .sc(DescribeTable$)
867
- .build() {
837
+ class DescribeTableCommand extends command(_ep0, _mw0, "DescribeTable", DescribeTable$) {
868
838
  }
869
839
 
870
- class ExecuteStatementCommand extends Command
871
- .classBuilder()
872
- .ep(commonParams)
873
- .m(function (Command, cs, config, o) {
874
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
875
- })
876
- .s("RedshiftData", "ExecuteStatement", {})
877
- .n("RedshiftDataClient", "ExecuteStatementCommand")
878
- .sc(ExecuteStatement$)
879
- .build() {
840
+ class ExecuteStatementCommand extends command(_ep0, _mw0, "ExecuteStatement", ExecuteStatement$) {
880
841
  }
881
842
 
882
- class GetStatementResultCommand extends Command
883
- .classBuilder()
884
- .ep(commonParams)
885
- .m(function (Command, cs, config, o) {
886
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
887
- })
888
- .s("RedshiftData", "GetStatementResult", {})
889
- .n("RedshiftDataClient", "GetStatementResultCommand")
890
- .sc(GetStatementResult$)
891
- .build() {
843
+ class GetStatementResultCommand extends command(_ep0, _mw0, "GetStatementResult", GetStatementResult$) {
892
844
  }
893
845
 
894
- class GetStatementResultV2Command extends Command
895
- .classBuilder()
896
- .ep(commonParams)
897
- .m(function (Command, cs, config, o) {
898
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
899
- })
900
- .s("RedshiftData", "GetStatementResultV2", {})
901
- .n("RedshiftDataClient", "GetStatementResultV2Command")
902
- .sc(GetStatementResultV2$)
903
- .build() {
846
+ class GetStatementResultV2Command extends command(_ep0, _mw0, "GetStatementResultV2", GetStatementResultV2$) {
904
847
  }
905
848
 
906
- class ListDatabasesCommand extends Command
907
- .classBuilder()
908
- .ep(commonParams)
909
- .m(function (Command, cs, config, o) {
910
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
911
- })
912
- .s("RedshiftData", "ListDatabases", {})
913
- .n("RedshiftDataClient", "ListDatabasesCommand")
914
- .sc(ListDatabases$)
915
- .build() {
849
+ class ListDatabasesCommand extends command(_ep0, _mw0, "ListDatabases", ListDatabases$) {
916
850
  }
917
851
 
918
- class ListSchemasCommand extends Command
919
- .classBuilder()
920
- .ep(commonParams)
921
- .m(function (Command, cs, config, o) {
922
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
923
- })
924
- .s("RedshiftData", "ListSchemas", {})
925
- .n("RedshiftDataClient", "ListSchemasCommand")
926
- .sc(ListSchemas$)
927
- .build() {
852
+ class ListSchemasCommand extends command(_ep0, _mw0, "ListSchemas", ListSchemas$) {
928
853
  }
929
854
 
930
- class ListStatementsCommand extends Command
931
- .classBuilder()
932
- .ep(commonParams)
933
- .m(function (Command, cs, config, o) {
934
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
935
- })
936
- .s("RedshiftData", "ListStatements", {})
937
- .n("RedshiftDataClient", "ListStatementsCommand")
938
- .sc(ListStatements$)
939
- .build() {
855
+ class ListStatementsCommand extends command(_ep0, _mw0, "ListStatements", ListStatements$) {
940
856
  }
941
857
 
942
- class ListTablesCommand extends Command
943
- .classBuilder()
944
- .ep(commonParams)
945
- .m(function (Command, cs, config, o) {
946
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
947
- })
948
- .s("RedshiftData", "ListTables", {})
949
- .n("RedshiftDataClient", "ListTablesCommand")
950
- .sc(ListTables$)
951
- .build() {
858
+ class ListTablesCommand extends command(_ep0, _mw0, "ListTables", ListTables$) {
952
859
  }
953
860
 
954
861
  const paginateDescribeTable = createPaginator(RedshiftDataClient, DescribeTableCommand, "NextToken", "NextToken", "MaxResults");
@@ -0,0 +1,6 @@
1
+ import { makeBuilder } from "@smithy/core/client";
2
+ import { getEndpointPlugin } from "@smithy/core/endpoints";
3
+ import { commonParams } from "./endpoint/EndpointParameters";
4
+ export const command = makeBuilder(commonParams, "RedshiftData", "RedshiftDataClient", getEndpointPlugin);
5
+ export const _ep0 = {};
6
+ export const _mw0 = (Command, cs, config, o) => [];
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { BatchExecuteStatement$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class BatchExecuteStatementCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "BatchExecuteStatement", {})
13
- .n("RedshiftDataClient", "BatchExecuteStatementCommand")
14
- .sc(BatchExecuteStatement$)
15
- .build() {
3
+ export class BatchExecuteStatementCommand extends command(_ep0, _mw0, "BatchExecuteStatement", BatchExecuteStatement$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { CancelStatement$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class CancelStatementCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "CancelStatement", {})
13
- .n("RedshiftDataClient", "CancelStatementCommand")
14
- .sc(CancelStatement$)
15
- .build() {
3
+ export class CancelStatementCommand extends command(_ep0, _mw0, "CancelStatement", CancelStatement$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { DescribeStatement$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class DescribeStatementCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "DescribeStatement", {})
13
- .n("RedshiftDataClient", "DescribeStatementCommand")
14
- .sc(DescribeStatement$)
15
- .build() {
3
+ export class DescribeStatementCommand extends command(_ep0, _mw0, "DescribeStatement", DescribeStatement$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { DescribeTable$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class DescribeTableCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "DescribeTable", {})
13
- .n("RedshiftDataClient", "DescribeTableCommand")
14
- .sc(DescribeTable$)
15
- .build() {
3
+ export class DescribeTableCommand extends command(_ep0, _mw0, "DescribeTable", DescribeTable$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ExecuteStatement$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ExecuteStatementCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "ExecuteStatement", {})
13
- .n("RedshiftDataClient", "ExecuteStatementCommand")
14
- .sc(ExecuteStatement$)
15
- .build() {
3
+ export class ExecuteStatementCommand extends command(_ep0, _mw0, "ExecuteStatement", ExecuteStatement$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetStatementResult$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetStatementResultCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "GetStatementResult", {})
13
- .n("RedshiftDataClient", "GetStatementResultCommand")
14
- .sc(GetStatementResult$)
15
- .build() {
3
+ export class GetStatementResultCommand extends command(_ep0, _mw0, "GetStatementResult", GetStatementResult$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { GetStatementResultV2$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class GetStatementResultV2Command extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "GetStatementResultV2", {})
13
- .n("RedshiftDataClient", "GetStatementResultV2Command")
14
- .sc(GetStatementResultV2$)
15
- .build() {
3
+ export class GetStatementResultV2Command extends command(_ep0, _mw0, "GetStatementResultV2", GetStatementResultV2$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListDatabases$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListDatabasesCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "ListDatabases", {})
13
- .n("RedshiftDataClient", "ListDatabasesCommand")
14
- .sc(ListDatabases$)
15
- .build() {
3
+ export class ListDatabasesCommand extends command(_ep0, _mw0, "ListDatabases", ListDatabases$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListSchemas$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListSchemasCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "ListSchemas", {})
13
- .n("RedshiftDataClient", "ListSchemasCommand")
14
- .sc(ListSchemas$)
15
- .build() {
3
+ export class ListSchemasCommand extends command(_ep0, _mw0, "ListSchemas", ListSchemas$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListStatements$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListStatementsCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "ListStatements", {})
13
- .n("RedshiftDataClient", "ListStatementsCommand")
14
- .sc(ListStatements$)
15
- .build() {
3
+ export class ListStatementsCommand extends command(_ep0, _mw0, "ListStatements", ListStatements$) {
16
4
  }
@@ -1,16 +1,4 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
- import { getEndpointPlugin } from "@smithy/core/endpoints";
3
- import { commonParams } from "../endpoint/EndpointParameters";
1
+ import { _ep0, _mw0, command } from "../commandBuilder";
4
2
  import { ListTables$ } from "../schemas/schemas_0";
5
- export { $Command };
6
- export class ListTablesCommand extends $Command
7
- .classBuilder()
8
- .ep(commonParams)
9
- .m(function (Command, cs, config, o) {
10
- return [getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
11
- })
12
- .s("RedshiftData", "ListTables", {})
13
- .n("RedshiftDataClient", "ListTablesCommand")
14
- .sc(ListTables$)
15
- .build() {
3
+ export class ListTablesCommand extends command(_ep0, _mw0, "ListTables", ListTables$) {
16
4
  }
package/dist-es/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from "./RedshiftDataClient";
2
2
  export * from "./RedshiftData";
3
3
  export * from "./commands";
4
+ export { Command as $Command } from "@smithy/core/client";
4
5
  export * from "./schemas/schemas_0";
5
6
  export * from "./pagination";
6
7
  export * from "./models/enums";
@@ -1,5 +1,4 @@
1
1
  import packageInfo from "../package.json";
2
- import { Sha256 } from "@aws-crypto/sha256-browser";
3
2
  import { createDefaultUserAgentProvider } from "@aws-sdk/core/client";
4
3
  import { invalidProvider, loadConfigsForDefaultMode } from "@smithy/core/client";
5
4
  import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT, resolveDefaultsModeConfig, } from "@smithy/core/config";
@@ -23,7 +22,6 @@ export const getRuntimeConfig = (config) => {
23
22
  region: config?.region ?? invalidProvider("Region is missing"),
24
23
  requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
25
24
  retryMode: config?.retryMode ?? (async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE),
26
- sha256: config?.sha256 ?? Sha256,
27
25
  streamCollector: config?.streamCollector ?? streamCollector,
28
26
  useDualstackEndpoint: config?.useDualstackEndpoint ?? (() => Promise.resolve(DEFAULT_USE_DUALSTACK_ENDPOINT)),
29
27
  useFipsEndpoint: config?.useFipsEndpoint ?? (() => Promise.resolve(DEFAULT_USE_FIPS_ENDPOINT)),
@@ -5,7 +5,7 @@ import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credentia
5
5
  import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/core/client";
6
6
  import { loadConfig as loadNodeConfig, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, resolveDefaultsModeConfig, } from "@smithy/core/config";
7
7
  import { DEFAULT_RETRY_MODE, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS, } from "@smithy/core/retry";
8
- import { calculateBodyLength, Hash } from "@smithy/core/serde";
8
+ import { calculateBodyLength } from "@smithy/core/serde";
9
9
  import { NodeHttpHandler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
10
10
  import { getRuntimeConfig as getSharedRuntimeConfig } from "./runtimeConfig.shared";
11
11
  export const getRuntimeConfig = (config) => {
@@ -35,7 +35,6 @@ export const getRuntimeConfig = (config) => {
35
35
  ...NODE_RETRY_MODE_CONFIG_OPTIONS,
36
36
  default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE,
37
37
  }, config),
38
- sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
39
38
  streamCollector: config?.streamCollector ?? streamCollector,
40
39
  useDualstackEndpoint: config?.useDualstackEndpoint ?? loadNodeConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
41
40
  useFipsEndpoint: config?.useFipsEndpoint ?? loadNodeConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
@@ -1,4 +1,3 @@
1
- import { Sha256 } from "@aws-crypto/sha256-js";
2
1
  import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
3
2
  export const getRuntimeConfig = (config) => {
4
3
  const browserDefaults = getBrowserRuntimeConfig(config);
@@ -6,6 +5,5 @@ export const getRuntimeConfig = (config) => {
6
5
  ...browserDefaults,
7
6
  ...config,
8
7
  runtime: "react-native",
9
- sha256: config?.sha256 ?? Sha256,
10
8
  };
11
9
  };
@@ -1,5 +1,6 @@
1
1
  import { AwsSdkSigV4Signer } from "@aws-sdk/core/httpAuthSchemes";
2
2
  import { AwsJson1_1Protocol } from "@aws-sdk/core/protocols";
3
+ import { Sha256 } from "@smithy/core/checksum";
3
4
  import { NoOpLogger } from "@smithy/core/client";
4
5
  import { parseUrl } from "@smithy/core/protocols";
5
6
  import { fromBase64, fromUtf8, toBase64, toUtf8 } from "@smithy/core/serde";
@@ -31,6 +32,7 @@ export const getRuntimeConfig = (config) => {
31
32
  serviceTarget: "RedshiftData",
32
33
  },
33
34
  serviceId: config?.serviceId ?? "Redshift Data",
35
+ sha256: config?.sha256 ?? Sha256,
34
36
  urlParser: config?.urlParser ?? parseUrl,
35
37
  utf8Decoder: config?.utf8Decoder ?? fromUtf8,
36
38
  utf8Encoder: config?.utf8Encoder ?? toUtf8,
@@ -0,0 +1,18 @@
1
+ import type { EndpointParameterInstructions } from "@smithy/types";
2
+ import type { RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "./RedshiftDataClient";
3
+ /**
4
+ * @internal
5
+ */
6
+ export declare const command: <I extends ServiceInputTypes, O extends ServiceOutputTypes>(added: EndpointParameterInstructions, plugins: (CommandCtor: any, clientStack: any, config: any, options: any) => import("@smithy/types").Pluggable<any, any>[], op: string, $: import("@smithy/types").StaticOperationSchema, smithyContext?: Record<string, unknown>) => {
7
+ new (input: I): import("@smithy/core/client").CommandImpl<I, O, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
8
+ new (...[input]: import("@smithy/types").OptionalParameter<I>): import("@smithy/core/client").CommandImpl<I, O, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
9
+ getEndpointParameterInstructions(): EndpointParameterInstructions;
10
+ };
11
+ /**
12
+ * @internal
13
+ */
14
+ export declare const _ep0: EndpointParameterInstructions;
15
+ /**
16
+ * @internal
17
+ */
18
+ export declare const _mw0: (Command: any, cs: any, config: any, o: any) => never[];
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { BatchExecuteStatementInput, BatchExecuteStatementOutput } from "../models/models_0";
4
- import type { RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftDataClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface BatchExecuteStatementCommandInput extends BatchExecuteStatement
22
19
  export interface BatchExecuteStatementCommandOutput extends BatchExecuteStatementOutput, __MetadataBearer {
23
20
  }
24
21
  declare const BatchExecuteStatementCommand_base: {
25
- new (input: BatchExecuteStatementCommandInput): import("@smithy/core/client").CommandImpl<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: BatchExecuteStatementCommandInput): import("@smithy/core/client").CommandImpl<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: BatchExecuteStatementCommandInput): import("@smithy/core/client").CommandImpl<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput, import("..").RedshiftDataClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: BatchExecuteStatementCommandInput): import("@smithy/core/client").CommandImpl<BatchExecuteStatementCommandInput, BatchExecuteStatementCommandOutput, import("..").RedshiftDataClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Runs one or more SQL statements, which can be data manipulation language (DML) or data definition language (DDL). Depending on the authorization method, use one of the following combinations of request parameters: </p> <ul> <li> <p>Secrets Manager - when connecting to a cluster, provide the <code>secret-arn</code> of a secret stored in Secrets Manager which has <code>username</code> and <code>password</code>. The specified secret contains credentials to connect to the <code>database</code> you specify. When you are connecting to a cluster, you also supply the database name, If you provide a cluster identifier (<code>dbClusterIdentifier</code>), it must match the cluster identifier stored in the secret. When you are connecting to a serverless workgroup, you also supply the database name.</p> </li> <li> <p>Temporary credentials - when connecting to your data warehouse, choose one of the following options:</p> <ul> <li> <p>When connecting to a serverless workgroup, specify the workgroup name and database name. The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>. Also, permission to call the <code>redshift-serverless:GetCredentials</code> operation is required.</p> </li> <li> <p>When connecting to a cluster as an IAM identity, specify the cluster identifier and the database name. The database user name is derived from the IAM identity. For example, <code>arn:iam::123456789012:user:foo</code> has the database user name <code>IAM:foo</code>. Also, permission to call the <code>redshift:GetClusterCredentialsWithIAM</code> operation is required.</p> </li> <li> <p>When connecting to a cluster as a database user, specify the cluster identifier, the database name, and the database user name. Also, permission to call the <code>redshift:GetClusterCredentials</code> operation is required.</p> </li> </ul> </li> </ul> <p>For more information about the Amazon Redshift Data API and CLI usage examples, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the <i>Amazon Redshift Management Guide</i>. </p>
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { CancelStatementRequest, CancelStatementResponse } from "../models/models_0";
4
- import type { RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftDataClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface CancelStatementCommandInput extends CancelStatementRequest {
22
19
  export interface CancelStatementCommandOutput extends CancelStatementResponse, __MetadataBearer {
23
20
  }
24
21
  declare const CancelStatementCommand_base: {
25
- new (input: CancelStatementCommandInput): import("@smithy/core/client").CommandImpl<CancelStatementCommandInput, CancelStatementCommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: CancelStatementCommandInput): import("@smithy/core/client").CommandImpl<CancelStatementCommandInput, CancelStatementCommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: CancelStatementCommandInput): import("@smithy/core/client").CommandImpl<CancelStatementCommandInput, CancelStatementCommandOutput, import("..").RedshiftDataClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: CancelStatementCommandInput): import("@smithy/core/client").CommandImpl<CancelStatementCommandInput, CancelStatementCommandOutput, import("..").RedshiftDataClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Cancels a running query. To be canceled, a query must be running. </p> <p>For more information about the Amazon Redshift Data API and CLI usage examples, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the <i>Amazon Redshift Management Guide</i>. </p>
@@ -1,12 +1,9 @@
1
- import { Command as $Command } from "@smithy/core/client";
2
1
  import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
3
2
  import type { DescribeStatementRequest, DescribeStatementResponse } from "../models/models_0";
4
- import type { RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftDataClient";
5
3
  /**
6
4
  * @public
7
5
  */
8
6
  export type { __MetadataBearer };
9
- export { $Command };
10
7
  /**
11
8
  * @public
12
9
  *
@@ -22,11 +19,9 @@ export interface DescribeStatementCommandInput extends DescribeStatementRequest
22
19
  export interface DescribeStatementCommandOutput extends DescribeStatementResponse, __MetadataBearer {
23
20
  }
24
21
  declare const DescribeStatementCommand_base: {
25
- new (input: DescribeStatementCommandInput): import("@smithy/core/client").CommandImpl<DescribeStatementCommandInput, DescribeStatementCommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
26
- new (input: DescribeStatementCommandInput): import("@smithy/core/client").CommandImpl<DescribeStatementCommandInput, DescribeStatementCommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
27
- getEndpointParameterInstructions(): {
28
- [x: string]: unknown;
29
- };
22
+ new (input: DescribeStatementCommandInput): import("@smithy/core/client").CommandImpl<DescribeStatementCommandInput, DescribeStatementCommandOutput, import("..").RedshiftDataClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
23
+ new (input: DescribeStatementCommandInput): import("@smithy/core/client").CommandImpl<DescribeStatementCommandInput, DescribeStatementCommandOutput, import("..").RedshiftDataClientResolvedConfig, import("..").ServiceInputTypes, import("..").ServiceOutputTypes>;
24
+ getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
30
25
  };
31
26
  /**
32
27
  * <p>Describes the details about a specific instance when a query was run by the Amazon Redshift Data API. The information includes when the query started, when it finished, the query status, the number of rows returned, and the SQL statement. </p> <p>For more information about the Amazon Redshift Data API and CLI usage examples, see <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the <i>Amazon Redshift Management Guide</i>. </p>