@aws-sdk/client-redshift-data 3.678.0 → 3.682.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.
- package/README.md +9 -1
- package/dist-cjs/index.js +63 -1
- package/dist-es/RedshiftData.js +2 -0
- package/dist-es/commands/GetStatementResultV2Command.js +22 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/models_0.js +12 -0
- package/dist-es/pagination/GetStatementResultV2Paginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_json1_1.js +23 -0
- package/dist-types/RedshiftData.d.ts +7 -0
- package/dist-types/RedshiftDataClient.d.ts +3 -2
- package/dist-types/commands/BatchExecuteStatementCommand.d.ts +1 -0
- package/dist-types/commands/DescribeStatementCommand.d.ts +1 -0
- package/dist-types/commands/ExecuteStatementCommand.d.ts +1 -0
- package/dist-types/commands/GetStatementResultCommand.d.ts +4 -2
- package/dist-types/commands/GetStatementResultV2Command.d.ts +110 -0
- package/dist-types/commands/ListStatementsCommand.d.ts +1 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +112 -1
- package/dist-types/pagination/GetStatementResultV2Paginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +9 -0
- package/dist-types/ts3.4/RedshiftData.d.ts +17 -0
- package/dist-types/ts3.4/RedshiftDataClient.d.ts +6 -0
- package/dist-types/ts3.4/commands/GetStatementResultV2Command.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +39 -0
- package/dist-types/ts3.4/pagination/GetStatementResultV2Paginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +12 -0
- package/package.json +14 -14
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ can run SQL statements, which are committed if the statement succeeds. </p>
|
|
|
14
14
|
|
|
15
15
|
## Installing
|
|
16
16
|
|
|
17
|
-
To install
|
|
17
|
+
To install this package, simply type add or install @aws-sdk/client-redshift-data
|
|
18
18
|
using your favorite package manager:
|
|
19
19
|
|
|
20
20
|
- `npm install @aws-sdk/client-redshift-data`
|
|
@@ -254,6 +254,14 @@ GetStatementResult
|
|
|
254
254
|
|
|
255
255
|
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-data/command/GetStatementResultCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-data/Interface/GetStatementResultCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-data/Interface/GetStatementResultCommandOutput/)
|
|
256
256
|
|
|
257
|
+
</details>
|
|
258
|
+
<details>
|
|
259
|
+
<summary>
|
|
260
|
+
GetStatementResultV2
|
|
261
|
+
</summary>
|
|
262
|
+
|
|
263
|
+
[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/redshift-data/command/GetStatementResultV2Command/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-data/Interface/GetStatementResultV2CommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-redshift-data/Interface/GetStatementResultV2CommandOutput/)
|
|
264
|
+
|
|
257
265
|
</details>
|
|
258
266
|
<details>
|
|
259
267
|
<summary>
|
package/dist-cjs/index.js
CHANGED
|
@@ -33,22 +33,26 @@ __export(src_exports, {
|
|
|
33
33
|
ExecuteStatementException: () => ExecuteStatementException,
|
|
34
34
|
Field: () => Field,
|
|
35
35
|
GetStatementResultCommand: () => GetStatementResultCommand,
|
|
36
|
+
GetStatementResultV2Command: () => GetStatementResultV2Command,
|
|
36
37
|
InternalServerException: () => InternalServerException,
|
|
37
38
|
ListDatabasesCommand: () => ListDatabasesCommand,
|
|
38
39
|
ListSchemasCommand: () => ListSchemasCommand,
|
|
39
40
|
ListStatementsCommand: () => ListStatementsCommand,
|
|
40
41
|
ListTablesCommand: () => ListTablesCommand,
|
|
42
|
+
QueryRecords: () => QueryRecords,
|
|
41
43
|
QueryTimeoutException: () => QueryTimeoutException,
|
|
42
44
|
RedshiftData: () => RedshiftData,
|
|
43
45
|
RedshiftDataClient: () => RedshiftDataClient,
|
|
44
46
|
RedshiftDataServiceException: () => RedshiftDataServiceException,
|
|
45
47
|
ResourceNotFoundException: () => ResourceNotFoundException,
|
|
48
|
+
ResultFormatString: () => ResultFormatString,
|
|
46
49
|
StatementStatusString: () => StatementStatusString,
|
|
47
50
|
StatusString: () => StatusString,
|
|
48
51
|
ValidationException: () => ValidationException,
|
|
49
52
|
__Client: () => import_smithy_client.Client,
|
|
50
53
|
paginateDescribeTable: () => paginateDescribeTable,
|
|
51
54
|
paginateGetStatementResult: () => paginateGetStatementResult,
|
|
55
|
+
paginateGetStatementResultV2: () => paginateGetStatementResultV2,
|
|
52
56
|
paginateListDatabases: () => paginateListDatabases,
|
|
53
57
|
paginateListSchemas: () => paginateListSchemas,
|
|
54
58
|
paginateListStatements: () => paginateListStatements,
|
|
@@ -277,6 +281,10 @@ var _BatchExecuteStatementException = class _BatchExecuteStatementException exte
|
|
|
277
281
|
};
|
|
278
282
|
__name(_BatchExecuteStatementException, "BatchExecuteStatementException");
|
|
279
283
|
var BatchExecuteStatementException = _BatchExecuteStatementException;
|
|
284
|
+
var ResultFormatString = {
|
|
285
|
+
CSV: "CSV",
|
|
286
|
+
JSON: "JSON"
|
|
287
|
+
};
|
|
280
288
|
var _InternalServerException = class _InternalServerException extends RedshiftDataServiceException {
|
|
281
289
|
/**
|
|
282
290
|
* @internal
|
|
@@ -422,6 +430,14 @@ var Field;
|
|
|
422
430
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
423
431
|
}, "visit");
|
|
424
432
|
})(Field || (Field = {}));
|
|
433
|
+
var QueryRecords;
|
|
434
|
+
((QueryRecords2) => {
|
|
435
|
+
QueryRecords2.visit = /* @__PURE__ */ __name((value, visitor) => {
|
|
436
|
+
if (value.CSVRecords !== void 0)
|
|
437
|
+
return visitor.CSVRecords(value.CSVRecords);
|
|
438
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
439
|
+
}, "visit");
|
|
440
|
+
})(QueryRecords || (QueryRecords = {}));
|
|
425
441
|
|
|
426
442
|
// src/protocols/Aws_json1_1.ts
|
|
427
443
|
var se_BatchExecuteStatementCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
@@ -460,6 +476,12 @@ var se_GetStatementResultCommand = /* @__PURE__ */ __name(async (input, context)
|
|
|
460
476
|
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
461
477
|
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
462
478
|
}, "se_GetStatementResultCommand");
|
|
479
|
+
var se_GetStatementResultV2Command = /* @__PURE__ */ __name(async (input, context) => {
|
|
480
|
+
const headers = sharedHeaders("GetStatementResultV2");
|
|
481
|
+
let body;
|
|
482
|
+
body = JSON.stringify((0, import_smithy_client._json)(input));
|
|
483
|
+
return buildHttpRpcRequest(context, headers, "/", void 0, body);
|
|
484
|
+
}, "se_GetStatementResultV2Command");
|
|
463
485
|
var se_ListDatabasesCommand = /* @__PURE__ */ __name(async (input, context) => {
|
|
464
486
|
const headers = sharedHeaders("ListDatabases");
|
|
465
487
|
let body;
|
|
@@ -562,6 +584,19 @@ var de_GetStatementResultCommand = /* @__PURE__ */ __name(async (output, context
|
|
|
562
584
|
};
|
|
563
585
|
return response;
|
|
564
586
|
}, "de_GetStatementResultCommand");
|
|
587
|
+
var de_GetStatementResultV2Command = /* @__PURE__ */ __name(async (output, context) => {
|
|
588
|
+
if (output.statusCode >= 300) {
|
|
589
|
+
return de_CommandError(output, context);
|
|
590
|
+
}
|
|
591
|
+
const data = await (0, import_core2.parseJsonBody)(output.body, context);
|
|
592
|
+
let contents = {};
|
|
593
|
+
contents = (0, import_smithy_client._json)(data);
|
|
594
|
+
const response = {
|
|
595
|
+
$metadata: deserializeMetadata(output),
|
|
596
|
+
...contents
|
|
597
|
+
};
|
|
598
|
+
return response;
|
|
599
|
+
}, "de_GetStatementResultV2Command");
|
|
565
600
|
var de_ListDatabasesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
566
601
|
if (output.statusCode >= 300) {
|
|
567
602
|
return de_CommandError(output, context);
|
|
@@ -744,6 +779,7 @@ var se_BatchExecuteStatementInput = /* @__PURE__ */ __name((input, context) => {
|
|
|
744
779
|
ClusterIdentifier: [],
|
|
745
780
|
Database: [],
|
|
746
781
|
DbUser: [],
|
|
782
|
+
ResultFormat: [],
|
|
747
783
|
SecretArn: [],
|
|
748
784
|
SessionId: [],
|
|
749
785
|
SessionKeepAliveSeconds: [],
|
|
@@ -760,6 +796,7 @@ var se_ExecuteStatementInput = /* @__PURE__ */ __name((input, context) => {
|
|
|
760
796
|
Database: [],
|
|
761
797
|
DbUser: [],
|
|
762
798
|
Parameters: import_smithy_client._json,
|
|
799
|
+
ResultFormat: [],
|
|
763
800
|
SecretArn: [],
|
|
764
801
|
SessionId: [],
|
|
765
802
|
SessionKeepAliveSeconds: [],
|
|
@@ -796,6 +833,7 @@ var de_DescribeStatementResponse = /* @__PURE__ */ __name((output, context) => {
|
|
|
796
833
|
QueryString: import_smithy_client.expectString,
|
|
797
834
|
RedshiftPid: import_smithy_client.expectLong,
|
|
798
835
|
RedshiftQueryId: import_smithy_client.expectLong,
|
|
836
|
+
ResultFormat: import_smithy_client.expectString,
|
|
799
837
|
ResultRows: import_smithy_client.expectLong,
|
|
800
838
|
ResultSize: import_smithy_client.expectLong,
|
|
801
839
|
SecretArn: import_smithy_client.expectString,
|
|
@@ -876,6 +914,7 @@ var de_StatementData = /* @__PURE__ */ __name((output, context) => {
|
|
|
876
914
|
QueryParameters: import_smithy_client._json,
|
|
877
915
|
QueryString: import_smithy_client.expectString,
|
|
878
916
|
QueryStrings: import_smithy_client._json,
|
|
917
|
+
ResultFormat: import_smithy_client.expectString,
|
|
879
918
|
SecretArn: import_smithy_client.expectString,
|
|
880
919
|
SessionId: import_smithy_client.expectString,
|
|
881
920
|
StatementName: import_smithy_client.expectString,
|
|
@@ -1024,6 +1063,20 @@ var _GetStatementResultCommand = class _GetStatementResultCommand extends import
|
|
|
1024
1063
|
__name(_GetStatementResultCommand, "GetStatementResultCommand");
|
|
1025
1064
|
var GetStatementResultCommand = _GetStatementResultCommand;
|
|
1026
1065
|
|
|
1066
|
+
// src/commands/GetStatementResultV2Command.ts
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
var _GetStatementResultV2Command = class _GetStatementResultV2Command extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1071
|
+
return [
|
|
1072
|
+
(0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),
|
|
1073
|
+
(0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())
|
|
1074
|
+
];
|
|
1075
|
+
}).s("RedshiftData", "GetStatementResultV2", {}).n("RedshiftDataClient", "GetStatementResultV2Command").f(void 0, void 0).ser(se_GetStatementResultV2Command).de(de_GetStatementResultV2Command).build() {
|
|
1076
|
+
};
|
|
1077
|
+
__name(_GetStatementResultV2Command, "GetStatementResultV2Command");
|
|
1078
|
+
var GetStatementResultV2Command = _GetStatementResultV2Command;
|
|
1079
|
+
|
|
1027
1080
|
// src/commands/ListDatabasesCommand.ts
|
|
1028
1081
|
|
|
1029
1082
|
|
|
@@ -1088,6 +1141,7 @@ var commands = {
|
|
|
1088
1141
|
DescribeTableCommand,
|
|
1089
1142
|
ExecuteStatementCommand,
|
|
1090
1143
|
GetStatementResultCommand,
|
|
1144
|
+
GetStatementResultV2Command,
|
|
1091
1145
|
ListDatabasesCommand,
|
|
1092
1146
|
ListSchemasCommand,
|
|
1093
1147
|
ListStatementsCommand,
|
|
@@ -1107,6 +1161,10 @@ var paginateDescribeTable = (0, import_core.createPaginator)(RedshiftDataClient,
|
|
|
1107
1161
|
|
|
1108
1162
|
var paginateGetStatementResult = (0, import_core.createPaginator)(RedshiftDataClient, GetStatementResultCommand, "NextToken", "NextToken", "");
|
|
1109
1163
|
|
|
1164
|
+
// src/pagination/GetStatementResultV2Paginator.ts
|
|
1165
|
+
|
|
1166
|
+
var paginateGetStatementResultV2 = (0, import_core.createPaginator)(RedshiftDataClient, GetStatementResultV2Command, "NextToken", "NextToken", "");
|
|
1167
|
+
|
|
1110
1168
|
// src/pagination/ListDatabasesPaginator.ts
|
|
1111
1169
|
|
|
1112
1170
|
var paginateListDatabases = (0, import_core.createPaginator)(RedshiftDataClient, ListDatabasesCommand, "NextToken", "NextToken", "MaxResults");
|
|
@@ -1136,12 +1194,14 @@ var paginateListTables = (0, import_core.createPaginator)(RedshiftDataClient, Li
|
|
|
1136
1194
|
DescribeTableCommand,
|
|
1137
1195
|
ExecuteStatementCommand,
|
|
1138
1196
|
GetStatementResultCommand,
|
|
1197
|
+
GetStatementResultV2Command,
|
|
1139
1198
|
ListDatabasesCommand,
|
|
1140
1199
|
ListSchemasCommand,
|
|
1141
1200
|
ListStatementsCommand,
|
|
1142
1201
|
ListTablesCommand,
|
|
1143
1202
|
paginateDescribeTable,
|
|
1144
1203
|
paginateGetStatementResult,
|
|
1204
|
+
paginateGetStatementResultV2,
|
|
1145
1205
|
paginateListDatabases,
|
|
1146
1206
|
paginateListSchemas,
|
|
1147
1207
|
paginateListStatements,
|
|
@@ -1149,6 +1209,7 @@ var paginateListTables = (0, import_core.createPaginator)(RedshiftDataClient, Li
|
|
|
1149
1209
|
ActiveSessionsExceededException,
|
|
1150
1210
|
ActiveStatementsExceededException,
|
|
1151
1211
|
BatchExecuteStatementException,
|
|
1212
|
+
ResultFormatString,
|
|
1152
1213
|
InternalServerException,
|
|
1153
1214
|
ValidationException,
|
|
1154
1215
|
DatabaseConnectionException,
|
|
@@ -1157,6 +1218,7 @@ var paginateListTables = (0, import_core.createPaginator)(RedshiftDataClient, Li
|
|
|
1157
1218
|
StatementStatusString,
|
|
1158
1219
|
QueryTimeoutException,
|
|
1159
1220
|
ExecuteStatementException,
|
|
1160
|
-
Field
|
|
1221
|
+
Field,
|
|
1222
|
+
QueryRecords
|
|
1161
1223
|
});
|
|
1162
1224
|
|
package/dist-es/RedshiftData.js
CHANGED
|
@@ -5,6 +5,7 @@ import { DescribeStatementCommand, } from "./commands/DescribeStatementCommand";
|
|
|
5
5
|
import { DescribeTableCommand, } from "./commands/DescribeTableCommand";
|
|
6
6
|
import { ExecuteStatementCommand, } from "./commands/ExecuteStatementCommand";
|
|
7
7
|
import { GetStatementResultCommand, } from "./commands/GetStatementResultCommand";
|
|
8
|
+
import { GetStatementResultV2Command, } from "./commands/GetStatementResultV2Command";
|
|
8
9
|
import { ListDatabasesCommand, } from "./commands/ListDatabasesCommand";
|
|
9
10
|
import { ListSchemasCommand } from "./commands/ListSchemasCommand";
|
|
10
11
|
import { ListStatementsCommand, } from "./commands/ListStatementsCommand";
|
|
@@ -17,6 +18,7 @@ const commands = {
|
|
|
17
18
|
DescribeTableCommand,
|
|
18
19
|
ExecuteStatementCommand,
|
|
19
20
|
GetStatementResultCommand,
|
|
21
|
+
GetStatementResultV2Command,
|
|
20
22
|
ListDatabasesCommand,
|
|
21
23
|
ListSchemasCommand,
|
|
22
24
|
ListStatementsCommand,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_GetStatementResultV2Command, se_GetStatementResultV2Command } from "../protocols/Aws_json1_1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetStatementResultV2Command extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("RedshiftData", "GetStatementResultV2", {})
|
|
17
|
+
.n("RedshiftDataClient", "GetStatementResultV2Command")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_GetStatementResultV2Command)
|
|
20
|
+
.de(de_GetStatementResultV2Command)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -4,6 +4,7 @@ export * from "./DescribeStatementCommand";
|
|
|
4
4
|
export * from "./DescribeTableCommand";
|
|
5
5
|
export * from "./ExecuteStatementCommand";
|
|
6
6
|
export * from "./GetStatementResultCommand";
|
|
7
|
+
export * from "./GetStatementResultV2Command";
|
|
7
8
|
export * from "./ListDatabasesCommand";
|
|
8
9
|
export * from "./ListSchemasCommand";
|
|
9
10
|
export * from "./ListStatementsCommand";
|
|
@@ -39,6 +39,10 @@ export class BatchExecuteStatementException extends __BaseException {
|
|
|
39
39
|
this.StatementId = opts.StatementId;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
export const ResultFormatString = {
|
|
43
|
+
CSV: "CSV",
|
|
44
|
+
JSON: "JSON",
|
|
45
|
+
};
|
|
42
46
|
export class InternalServerException extends __BaseException {
|
|
43
47
|
constructor(opts) {
|
|
44
48
|
super({
|
|
@@ -154,3 +158,11 @@ export var Field;
|
|
|
154
158
|
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
155
159
|
};
|
|
156
160
|
})(Field || (Field = {}));
|
|
161
|
+
export var QueryRecords;
|
|
162
|
+
(function (QueryRecords) {
|
|
163
|
+
QueryRecords.visit = (value, visitor) => {
|
|
164
|
+
if (value.CSVRecords !== undefined)
|
|
165
|
+
return visitor.CSVRecords(value.CSVRecords);
|
|
166
|
+
return visitor._(value.$unknown[0], value.$unknown[1]);
|
|
167
|
+
};
|
|
168
|
+
})(QueryRecords || (QueryRecords = {}));
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { GetStatementResultV2Command, } from "../commands/GetStatementResultV2Command";
|
|
3
|
+
import { RedshiftDataClient } from "../RedshiftDataClient";
|
|
4
|
+
export const paginateGetStatementResultV2 = createPaginator(RedshiftDataClient, GetStatementResultV2Command, "NextToken", "NextToken", "");
|
|
@@ -40,6 +40,12 @@ export const se_GetStatementResultCommand = async (input, context) => {
|
|
|
40
40
|
body = JSON.stringify(_json(input));
|
|
41
41
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
42
42
|
};
|
|
43
|
+
export const se_GetStatementResultV2Command = async (input, context) => {
|
|
44
|
+
const headers = sharedHeaders("GetStatementResultV2");
|
|
45
|
+
let body;
|
|
46
|
+
body = JSON.stringify(_json(input));
|
|
47
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
48
|
+
};
|
|
43
49
|
export const se_ListDatabasesCommand = async (input, context) => {
|
|
44
50
|
const headers = sharedHeaders("ListDatabases");
|
|
45
51
|
let body;
|
|
@@ -142,6 +148,19 @@ export const de_GetStatementResultCommand = async (output, context) => {
|
|
|
142
148
|
};
|
|
143
149
|
return response;
|
|
144
150
|
};
|
|
151
|
+
export const de_GetStatementResultV2Command = async (output, context) => {
|
|
152
|
+
if (output.statusCode >= 300) {
|
|
153
|
+
return de_CommandError(output, context);
|
|
154
|
+
}
|
|
155
|
+
const data = await parseBody(output.body, context);
|
|
156
|
+
let contents = {};
|
|
157
|
+
contents = _json(data);
|
|
158
|
+
const response = {
|
|
159
|
+
$metadata: deserializeMetadata(output),
|
|
160
|
+
...contents,
|
|
161
|
+
};
|
|
162
|
+
return response;
|
|
163
|
+
};
|
|
145
164
|
export const de_ListDatabasesCommand = async (output, context) => {
|
|
146
165
|
if (output.statusCode >= 300) {
|
|
147
166
|
return de_CommandError(output, context);
|
|
@@ -324,6 +343,7 @@ const se_BatchExecuteStatementInput = (input, context) => {
|
|
|
324
343
|
ClusterIdentifier: [],
|
|
325
344
|
Database: [],
|
|
326
345
|
DbUser: [],
|
|
346
|
+
ResultFormat: [],
|
|
327
347
|
SecretArn: [],
|
|
328
348
|
SessionId: [],
|
|
329
349
|
SessionKeepAliveSeconds: [],
|
|
@@ -340,6 +360,7 @@ const se_ExecuteStatementInput = (input, context) => {
|
|
|
340
360
|
Database: [],
|
|
341
361
|
DbUser: [],
|
|
342
362
|
Parameters: _json,
|
|
363
|
+
ResultFormat: [],
|
|
343
364
|
SecretArn: [],
|
|
344
365
|
SessionId: [],
|
|
345
366
|
SessionKeepAliveSeconds: [],
|
|
@@ -376,6 +397,7 @@ const de_DescribeStatementResponse = (output, context) => {
|
|
|
376
397
|
QueryString: __expectString,
|
|
377
398
|
RedshiftPid: __expectLong,
|
|
378
399
|
RedshiftQueryId: __expectLong,
|
|
400
|
+
ResultFormat: __expectString,
|
|
379
401
|
ResultRows: __expectLong,
|
|
380
402
|
ResultSize: __expectLong,
|
|
381
403
|
SecretArn: __expectString,
|
|
@@ -460,6 +482,7 @@ const de_StatementData = (output, context) => {
|
|
|
460
482
|
QueryParameters: _json,
|
|
461
483
|
QueryString: __expectString,
|
|
462
484
|
QueryStrings: _json,
|
|
485
|
+
ResultFormat: __expectString,
|
|
463
486
|
SecretArn: __expectString,
|
|
464
487
|
SessionId: __expectString,
|
|
465
488
|
StatementName: __expectString,
|
|
@@ -5,6 +5,7 @@ import { DescribeStatementCommandInput, DescribeStatementCommandOutput } from ".
|
|
|
5
5
|
import { DescribeTableCommandInput, DescribeTableCommandOutput } from "./commands/DescribeTableCommand";
|
|
6
6
|
import { ExecuteStatementCommandInput, ExecuteStatementCommandOutput } from "./commands/ExecuteStatementCommand";
|
|
7
7
|
import { GetStatementResultCommandInput, GetStatementResultCommandOutput } from "./commands/GetStatementResultCommand";
|
|
8
|
+
import { GetStatementResultV2CommandInput, GetStatementResultV2CommandOutput } from "./commands/GetStatementResultV2Command";
|
|
8
9
|
import { ListDatabasesCommandInput, ListDatabasesCommandOutput } from "./commands/ListDatabasesCommand";
|
|
9
10
|
import { ListSchemasCommandInput, ListSchemasCommandOutput } from "./commands/ListSchemasCommand";
|
|
10
11
|
import { ListStatementsCommandInput, ListStatementsCommandOutput } from "./commands/ListStatementsCommand";
|
|
@@ -47,6 +48,12 @@ export interface RedshiftData {
|
|
|
47
48
|
getStatementResult(args: GetStatementResultCommandInput, options?: __HttpHandlerOptions): Promise<GetStatementResultCommandOutput>;
|
|
48
49
|
getStatementResult(args: GetStatementResultCommandInput, cb: (err: any, data?: GetStatementResultCommandOutput) => void): void;
|
|
49
50
|
getStatementResult(args: GetStatementResultCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStatementResultCommandOutput) => void): void;
|
|
51
|
+
/**
|
|
52
|
+
* @see {@link GetStatementResultV2Command}
|
|
53
|
+
*/
|
|
54
|
+
getStatementResultV2(args: GetStatementResultV2CommandInput, options?: __HttpHandlerOptions): Promise<GetStatementResultV2CommandOutput>;
|
|
55
|
+
getStatementResultV2(args: GetStatementResultV2CommandInput, cb: (err: any, data?: GetStatementResultV2CommandOutput) => void): void;
|
|
56
|
+
getStatementResultV2(args: GetStatementResultV2CommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: GetStatementResultV2CommandOutput) => void): void;
|
|
50
57
|
/**
|
|
51
58
|
* @see {@link ListDatabasesCommand}
|
|
52
59
|
*/
|
|
@@ -13,6 +13,7 @@ import { DescribeStatementCommandInput, DescribeStatementCommandOutput } from ".
|
|
|
13
13
|
import { DescribeTableCommandInput, DescribeTableCommandOutput } from "./commands/DescribeTableCommand";
|
|
14
14
|
import { ExecuteStatementCommandInput, ExecuteStatementCommandOutput } from "./commands/ExecuteStatementCommand";
|
|
15
15
|
import { GetStatementResultCommandInput, GetStatementResultCommandOutput } from "./commands/GetStatementResultCommand";
|
|
16
|
+
import { GetStatementResultV2CommandInput, GetStatementResultV2CommandOutput } from "./commands/GetStatementResultV2Command";
|
|
16
17
|
import { ListDatabasesCommandInput, ListDatabasesCommandOutput } from "./commands/ListDatabasesCommand";
|
|
17
18
|
import { ListSchemasCommandInput, ListSchemasCommandOutput } from "./commands/ListSchemasCommand";
|
|
18
19
|
import { ListStatementsCommandInput, ListStatementsCommandOutput } from "./commands/ListStatementsCommand";
|
|
@@ -23,11 +24,11 @@ export { __Client };
|
|
|
23
24
|
/**
|
|
24
25
|
* @public
|
|
25
26
|
*/
|
|
26
|
-
export type ServiceInputTypes = BatchExecuteStatementCommandInput | CancelStatementCommandInput | DescribeStatementCommandInput | DescribeTableCommandInput | ExecuteStatementCommandInput | GetStatementResultCommandInput | ListDatabasesCommandInput | ListSchemasCommandInput | ListStatementsCommandInput | ListTablesCommandInput;
|
|
27
|
+
export type ServiceInputTypes = BatchExecuteStatementCommandInput | CancelStatementCommandInput | DescribeStatementCommandInput | DescribeTableCommandInput | ExecuteStatementCommandInput | GetStatementResultCommandInput | GetStatementResultV2CommandInput | ListDatabasesCommandInput | ListSchemasCommandInput | ListStatementsCommandInput | ListTablesCommandInput;
|
|
27
28
|
/**
|
|
28
29
|
* @public
|
|
29
30
|
*/
|
|
30
|
-
export type ServiceOutputTypes = BatchExecuteStatementCommandOutput | CancelStatementCommandOutput | DescribeStatementCommandOutput | DescribeTableCommandOutput | ExecuteStatementCommandOutput | GetStatementResultCommandOutput | ListDatabasesCommandOutput | ListSchemasCommandOutput | ListStatementsCommandOutput | ListTablesCommandOutput;
|
|
31
|
+
export type ServiceOutputTypes = BatchExecuteStatementCommandOutput | CancelStatementCommandOutput | DescribeStatementCommandOutput | DescribeTableCommandOutput | ExecuteStatementCommandOutput | GetStatementResultCommandOutput | GetStatementResultV2CommandOutput | ListDatabasesCommandOutput | ListSchemasCommandOutput | ListStatementsCommandOutput | ListTablesCommandOutput;
|
|
31
32
|
/**
|
|
32
33
|
* @public
|
|
33
34
|
*/
|
|
@@ -84,6 +84,7 @@ declare const BatchExecuteStatementCommand_base: {
|
|
|
84
84
|
* ClientToken: "STRING_VALUE",
|
|
85
85
|
* SessionKeepAliveSeconds: Number("int"),
|
|
86
86
|
* SessionId: "STRING_VALUE",
|
|
87
|
+
* ResultFormat: "STRING_VALUE",
|
|
87
88
|
* };
|
|
88
89
|
* const command = new BatchExecuteStatementCommand(input);
|
|
89
90
|
* const response = await client.send(command);
|
|
@@ -88,6 +88,7 @@ declare const ExecuteStatementCommand_base: {
|
|
|
88
88
|
* ClientToken: "STRING_VALUE",
|
|
89
89
|
* SessionKeepAliveSeconds: Number("int"),
|
|
90
90
|
* SessionId: "STRING_VALUE",
|
|
91
|
+
* ResultFormat: "STRING_VALUE",
|
|
91
92
|
* };
|
|
92
93
|
* const command = new ExecuteStatementCommand(input);
|
|
93
94
|
* const response = await client.send(command);
|
|
@@ -27,8 +27,10 @@ declare const GetStatementResultCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* <p>Fetches the temporarily cached result of an SQL statement.
|
|
31
|
-
*
|
|
30
|
+
* <p>Fetches the temporarily cached result of an SQL statement in JSON format.
|
|
31
|
+
* The <code>ExecuteStatement</code> or <code>BatchExecuteStatement</code> operation that ran the SQL statement must have specified <code>ResultFormat</code> as <code>JSON</code>
|
|
32
|
+
* , or let the format default to JSON.
|
|
33
|
+
* A token is returned to page through the statement results.</p>
|
|
32
34
|
* <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
|
|
33
35
|
* <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
|
|
34
36
|
* <i>Amazon Redshift Management Guide</i>. </p>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import { GetStatementResultV2Request, GetStatementResultV2Response } from "../models/models_0";
|
|
4
|
+
import { RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../RedshiftDataClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link GetStatementResultV2Command}.
|
|
14
|
+
*/
|
|
15
|
+
export interface GetStatementResultV2CommandInput extends GetStatementResultV2Request {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link GetStatementResultV2Command}.
|
|
21
|
+
*/
|
|
22
|
+
export interface GetStatementResultV2CommandOutput extends GetStatementResultV2Response, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const GetStatementResultV2Command_base: {
|
|
25
|
+
new (input: GetStatementResultV2CommandInput): import("@smithy/smithy-client").CommandImpl<GetStatementResultV2CommandInput, GetStatementResultV2CommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (__0_0: GetStatementResultV2CommandInput): import("@smithy/smithy-client").CommandImpl<GetStatementResultV2CommandInput, GetStatementResultV2CommandOutput, RedshiftDataClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Fetches the temporarily cached result of an SQL statement in CSV format.
|
|
31
|
+
* The <code>ExecuteStatement</code> or <code>BatchExecuteStatement</code> operation that ran the SQL statement must have specified <code>ResultFormat</code> as <code>CSV</code>.
|
|
32
|
+
* A token is returned to page through the statement results.</p>
|
|
33
|
+
* <p>For more information about the Amazon Redshift Data API and CLI usage examples, see
|
|
34
|
+
* <a href="https://docs.aws.amazon.com/redshift/latest/mgmt/data-api.html">Using the Amazon Redshift Data API</a> in the
|
|
35
|
+
* <i>Amazon Redshift Management Guide</i>. </p>
|
|
36
|
+
* @example
|
|
37
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
38
|
+
* ```javascript
|
|
39
|
+
* import { RedshiftDataClient, GetStatementResultV2Command } from "@aws-sdk/client-redshift-data"; // ES Modules import
|
|
40
|
+
* // const { RedshiftDataClient, GetStatementResultV2Command } = require("@aws-sdk/client-redshift-data"); // CommonJS import
|
|
41
|
+
* const client = new RedshiftDataClient(config);
|
|
42
|
+
* const input = { // GetStatementResultV2Request
|
|
43
|
+
* Id: "STRING_VALUE", // required
|
|
44
|
+
* NextToken: "STRING_VALUE",
|
|
45
|
+
* };
|
|
46
|
+
* const command = new GetStatementResultV2Command(input);
|
|
47
|
+
* const response = await client.send(command);
|
|
48
|
+
* // { // GetStatementResultV2Response
|
|
49
|
+
* // Records: [ // FormattedSqlRecords // required
|
|
50
|
+
* // { // QueryRecords Union: only one key present
|
|
51
|
+
* // CSVRecords: "STRING_VALUE",
|
|
52
|
+
* // },
|
|
53
|
+
* // ],
|
|
54
|
+
* // ColumnMetadata: [ // ColumnMetadataList
|
|
55
|
+
* // { // ColumnMetadata
|
|
56
|
+
* // isCaseSensitive: true || false,
|
|
57
|
+
* // isCurrency: true || false,
|
|
58
|
+
* // isSigned: true || false,
|
|
59
|
+
* // label: "STRING_VALUE",
|
|
60
|
+
* // name: "STRING_VALUE",
|
|
61
|
+
* // nullable: Number("int"),
|
|
62
|
+
* // precision: Number("int"),
|
|
63
|
+
* // scale: Number("int"),
|
|
64
|
+
* // schemaName: "STRING_VALUE",
|
|
65
|
+
* // tableName: "STRING_VALUE",
|
|
66
|
+
* // typeName: "STRING_VALUE",
|
|
67
|
+
* // length: Number("int"),
|
|
68
|
+
* // columnDefault: "STRING_VALUE",
|
|
69
|
+
* // },
|
|
70
|
+
* // ],
|
|
71
|
+
* // TotalNumRows: Number("long"),
|
|
72
|
+
* // ResultFormat: "STRING_VALUE",
|
|
73
|
+
* // NextToken: "STRING_VALUE",
|
|
74
|
+
* // };
|
|
75
|
+
*
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* @param GetStatementResultV2CommandInput - {@link GetStatementResultV2CommandInput}
|
|
79
|
+
* @returns {@link GetStatementResultV2CommandOutput}
|
|
80
|
+
* @see {@link GetStatementResultV2CommandInput} for command's `input` shape.
|
|
81
|
+
* @see {@link GetStatementResultV2CommandOutput} for command's `response` shape.
|
|
82
|
+
* @see {@link RedshiftDataClientResolvedConfig | config} for RedshiftDataClient's `config` shape.
|
|
83
|
+
*
|
|
84
|
+
* @throws {@link InternalServerException} (server fault)
|
|
85
|
+
* <p>The Amazon Redshift Data API operation failed due to invalid input. </p>
|
|
86
|
+
*
|
|
87
|
+
* @throws {@link ResourceNotFoundException} (client fault)
|
|
88
|
+
* <p>The Amazon Redshift Data API operation failed due to a missing resource. </p>
|
|
89
|
+
*
|
|
90
|
+
* @throws {@link ValidationException} (client fault)
|
|
91
|
+
* <p>The Amazon Redshift Data API operation failed due to invalid input. </p>
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link RedshiftDataServiceException}
|
|
94
|
+
* <p>Base exception class for all service exceptions from RedshiftData service.</p>
|
|
95
|
+
*
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
98
|
+
export declare class GetStatementResultV2Command extends GetStatementResultV2Command_base {
|
|
99
|
+
/** @internal type navigation helper, not in runtime. */
|
|
100
|
+
protected static __types: {
|
|
101
|
+
api: {
|
|
102
|
+
input: GetStatementResultV2Request;
|
|
103
|
+
output: GetStatementResultV2Response;
|
|
104
|
+
};
|
|
105
|
+
sdk: {
|
|
106
|
+
input: GetStatementResultV2CommandInput;
|
|
107
|
+
output: GetStatementResultV2CommandOutput;
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -4,6 +4,7 @@ export * from "./DescribeStatementCommand";
|
|
|
4
4
|
export * from "./DescribeTableCommand";
|
|
5
5
|
export * from "./ExecuteStatementCommand";
|
|
6
6
|
export * from "./GetStatementResultCommand";
|
|
7
|
+
export * from "./GetStatementResultV2Command";
|
|
7
8
|
export * from "./ListDatabasesCommand";
|
|
8
9
|
export * from "./ListSchemasCommand";
|
|
9
10
|
export * from "./ListStatementsCommand";
|
|
@@ -44,6 +44,18 @@ export declare class BatchExecuteStatementException extends __BaseException {
|
|
|
44
44
|
*/
|
|
45
45
|
constructor(opts: __ExceptionOptionType<BatchExecuteStatementException, __BaseException>);
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* @public
|
|
49
|
+
* @enum
|
|
50
|
+
*/
|
|
51
|
+
export declare const ResultFormatString: {
|
|
52
|
+
readonly CSV: "CSV";
|
|
53
|
+
readonly JSON: "JSON";
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
58
|
+
export type ResultFormatString = (typeof ResultFormatString)[keyof typeof ResultFormatString];
|
|
47
59
|
/**
|
|
48
60
|
* @public
|
|
49
61
|
*/
|
|
@@ -107,6 +119,11 @@ export interface BatchExecuteStatementInput {
|
|
|
107
119
|
* @public
|
|
108
120
|
*/
|
|
109
121
|
SessionId?: string;
|
|
122
|
+
/**
|
|
123
|
+
* <p>The data format of the result of the SQL statement. If no format is specified, the default is JSON.</p>
|
|
124
|
+
* @public
|
|
125
|
+
*/
|
|
126
|
+
ResultFormat?: ResultFormatString;
|
|
110
127
|
}
|
|
111
128
|
/**
|
|
112
129
|
* @public
|
|
@@ -584,6 +601,11 @@ export interface DescribeStatementResponse {
|
|
|
584
601
|
* @public
|
|
585
602
|
*/
|
|
586
603
|
SessionId?: string;
|
|
604
|
+
/**
|
|
605
|
+
* <p>The data format of the result of the SQL statement.</p>
|
|
606
|
+
* @public
|
|
607
|
+
*/
|
|
608
|
+
ResultFormat?: ResultFormatString;
|
|
587
609
|
}
|
|
588
610
|
/**
|
|
589
611
|
* @public
|
|
@@ -762,6 +784,11 @@ export interface ExecuteStatementInput {
|
|
|
762
784
|
* @public
|
|
763
785
|
*/
|
|
764
786
|
SessionId?: string;
|
|
787
|
+
/**
|
|
788
|
+
* <p>The data format of the result of the SQL statement. If no format is specified, the default is JSON.</p>
|
|
789
|
+
* @public
|
|
790
|
+
*/
|
|
791
|
+
ResultFormat?: ResultFormatString;
|
|
765
792
|
}
|
|
766
793
|
/**
|
|
767
794
|
* @public
|
|
@@ -923,6 +950,36 @@ export declare namespace Field {
|
|
|
923
950
|
}
|
|
924
951
|
const visit: <T>(value: Field, visitor: Visitor<T>) => T;
|
|
925
952
|
}
|
|
953
|
+
/**
|
|
954
|
+
* <p>The results of the SQL statement.</p>
|
|
955
|
+
* @public
|
|
956
|
+
*/
|
|
957
|
+
export type QueryRecords = QueryRecords.CSVRecordsMember | QueryRecords.$UnknownMember;
|
|
958
|
+
/**
|
|
959
|
+
* @public
|
|
960
|
+
*/
|
|
961
|
+
export declare namespace QueryRecords {
|
|
962
|
+
/**
|
|
963
|
+
* <p>The results of the SQL statement in CSV format.</p>
|
|
964
|
+
* @public
|
|
965
|
+
*/
|
|
966
|
+
interface CSVRecordsMember {
|
|
967
|
+
CSVRecords: string;
|
|
968
|
+
$unknown?: never;
|
|
969
|
+
}
|
|
970
|
+
/**
|
|
971
|
+
* @public
|
|
972
|
+
*/
|
|
973
|
+
interface $UnknownMember {
|
|
974
|
+
CSVRecords?: never;
|
|
975
|
+
$unknown: [string, any];
|
|
976
|
+
}
|
|
977
|
+
interface Visitor<T> {
|
|
978
|
+
CSVRecords: (value: string) => T;
|
|
979
|
+
_: (name: string, value: any) => T;
|
|
980
|
+
}
|
|
981
|
+
const visit: <T>(value: QueryRecords, visitor: Visitor<T>) => T;
|
|
982
|
+
}
|
|
926
983
|
/**
|
|
927
984
|
* @public
|
|
928
985
|
*/
|
|
@@ -946,7 +1003,7 @@ export interface GetStatementResultRequest {
|
|
|
946
1003
|
*/
|
|
947
1004
|
export interface GetStatementResultResponse {
|
|
948
1005
|
/**
|
|
949
|
-
* <p>The results of the SQL statement.</p>
|
|
1006
|
+
* <p>The results of the SQL statement in JSON format.</p>
|
|
950
1007
|
* @public
|
|
951
1008
|
*/
|
|
952
1009
|
Records: Field[][] | undefined;
|
|
@@ -967,6 +1024,55 @@ export interface GetStatementResultResponse {
|
|
|
967
1024
|
*/
|
|
968
1025
|
NextToken?: string;
|
|
969
1026
|
}
|
|
1027
|
+
/**
|
|
1028
|
+
* @public
|
|
1029
|
+
*/
|
|
1030
|
+
export interface GetStatementResultV2Request {
|
|
1031
|
+
/**
|
|
1032
|
+
* <p>The identifier of the SQL statement whose results are to be fetched. This value is a universally unique identifier (UUID) generated by Amazon Redshift Data API.
|
|
1033
|
+
* A suffix indicates then number of the SQL statement.
|
|
1034
|
+
* For example, <code>d9b6c0c9-0747-4bf4-b142-e8883122f766:2</code> has a suffix of <code>:2</code> that indicates the second SQL statement of a batch query.
|
|
1035
|
+
* This identifier is returned by <code>BatchExecuteStatment</code>, <code>ExecuteStatment</code>, and <code>ListStatements</code>. </p>
|
|
1036
|
+
* @public
|
|
1037
|
+
*/
|
|
1038
|
+
Id: string | undefined;
|
|
1039
|
+
/**
|
|
1040
|
+
* <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request.</p>
|
|
1041
|
+
* @public
|
|
1042
|
+
*/
|
|
1043
|
+
NextToken?: string;
|
|
1044
|
+
}
|
|
1045
|
+
/**
|
|
1046
|
+
* @public
|
|
1047
|
+
*/
|
|
1048
|
+
export interface GetStatementResultV2Response {
|
|
1049
|
+
/**
|
|
1050
|
+
* <p>The results of the SQL statement in CSV format.</p>
|
|
1051
|
+
* @public
|
|
1052
|
+
*/
|
|
1053
|
+
Records: QueryRecords[] | undefined;
|
|
1054
|
+
/**
|
|
1055
|
+
* <p>The properties (metadata) of a column.</p>
|
|
1056
|
+
* @public
|
|
1057
|
+
*/
|
|
1058
|
+
ColumnMetadata?: ColumnMetadata[];
|
|
1059
|
+
/**
|
|
1060
|
+
* <p>The total number of rows in the result set returned from a query.
|
|
1061
|
+
* You can use this number to estimate the number of calls to the <code>GetStatementResultV2</code> operation needed to page through the results. </p>
|
|
1062
|
+
* @public
|
|
1063
|
+
*/
|
|
1064
|
+
TotalNumRows?: number;
|
|
1065
|
+
/**
|
|
1066
|
+
* <p>The data format of the result of the SQL statement.</p>
|
|
1067
|
+
* @public
|
|
1068
|
+
*/
|
|
1069
|
+
ResultFormat?: ResultFormatString;
|
|
1070
|
+
/**
|
|
1071
|
+
* <p>A value that indicates the starting point for the next set of response records in a subsequent request. If a value is returned in a response, you can retrieve the next set of records by providing this returned NextToken value in the next NextToken parameter and retrying the command. If the NextToken field is empty, all response records have been retrieved for the request. </p>
|
|
1072
|
+
* @public
|
|
1073
|
+
*/
|
|
1074
|
+
NextToken?: string;
|
|
1075
|
+
}
|
|
970
1076
|
/**
|
|
971
1077
|
* @public
|
|
972
1078
|
*/
|
|
@@ -1212,6 +1318,11 @@ export interface StatementData {
|
|
|
1212
1318
|
* @public
|
|
1213
1319
|
*/
|
|
1214
1320
|
SessionId?: string;
|
|
1321
|
+
/**
|
|
1322
|
+
* <p>The data format of the result of the SQL statement.</p>
|
|
1323
|
+
* @public
|
|
1324
|
+
*/
|
|
1325
|
+
ResultFormat?: ResultFormatString;
|
|
1215
1326
|
}
|
|
1216
1327
|
/**
|
|
1217
1328
|
* @public
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Paginator } from "@smithy/types";
|
|
2
|
+
import { GetStatementResultV2CommandInput, GetStatementResultV2CommandOutput } from "../commands/GetStatementResultV2Command";
|
|
3
|
+
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
4
|
+
/**
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export declare const paginateGetStatementResultV2: (config: RedshiftDataPaginationConfiguration, input: GetStatementResultV2CommandInput, ...rest: any[]) => Paginator<GetStatementResultV2CommandOutput>;
|
|
@@ -6,6 +6,7 @@ import { DescribeStatementCommandInput, DescribeStatementCommandOutput } from ".
|
|
|
6
6
|
import { DescribeTableCommandInput, DescribeTableCommandOutput } from "../commands/DescribeTableCommand";
|
|
7
7
|
import { ExecuteStatementCommandInput, ExecuteStatementCommandOutput } from "../commands/ExecuteStatementCommand";
|
|
8
8
|
import { GetStatementResultCommandInput, GetStatementResultCommandOutput } from "../commands/GetStatementResultCommand";
|
|
9
|
+
import { GetStatementResultV2CommandInput, GetStatementResultV2CommandOutput } from "../commands/GetStatementResultV2Command";
|
|
9
10
|
import { ListDatabasesCommandInput, ListDatabasesCommandOutput } from "../commands/ListDatabasesCommand";
|
|
10
11
|
import { ListSchemasCommandInput, ListSchemasCommandOutput } from "../commands/ListSchemasCommand";
|
|
11
12
|
import { ListStatementsCommandInput, ListStatementsCommandOutput } from "../commands/ListStatementsCommand";
|
|
@@ -34,6 +35,10 @@ export declare const se_ExecuteStatementCommand: (input: ExecuteStatementCommand
|
|
|
34
35
|
* serializeAws_json1_1GetStatementResultCommand
|
|
35
36
|
*/
|
|
36
37
|
export declare const se_GetStatementResultCommand: (input: GetStatementResultCommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
38
|
+
/**
|
|
39
|
+
* serializeAws_json1_1GetStatementResultV2Command
|
|
40
|
+
*/
|
|
41
|
+
export declare const se_GetStatementResultV2Command: (input: GetStatementResultV2CommandInput, context: __SerdeContext) => Promise<__HttpRequest>;
|
|
37
42
|
/**
|
|
38
43
|
* serializeAws_json1_1ListDatabasesCommand
|
|
39
44
|
*/
|
|
@@ -74,6 +79,10 @@ export declare const de_ExecuteStatementCommand: (output: __HttpResponse, contex
|
|
|
74
79
|
* deserializeAws_json1_1GetStatementResultCommand
|
|
75
80
|
*/
|
|
76
81
|
export declare const de_GetStatementResultCommand: (output: __HttpResponse, context: __SerdeContext) => Promise<GetStatementResultCommandOutput>;
|
|
82
|
+
/**
|
|
83
|
+
* deserializeAws_json1_1GetStatementResultV2Command
|
|
84
|
+
*/
|
|
85
|
+
export declare const de_GetStatementResultV2Command: (output: __HttpResponse, context: __SerdeContext) => Promise<GetStatementResultV2CommandOutput>;
|
|
77
86
|
/**
|
|
78
87
|
* deserializeAws_json1_1ListDatabasesCommand
|
|
79
88
|
*/
|
|
@@ -23,6 +23,10 @@ import {
|
|
|
23
23
|
GetStatementResultCommandInput,
|
|
24
24
|
GetStatementResultCommandOutput,
|
|
25
25
|
} from "./commands/GetStatementResultCommand";
|
|
26
|
+
import {
|
|
27
|
+
GetStatementResultV2CommandInput,
|
|
28
|
+
GetStatementResultV2CommandOutput,
|
|
29
|
+
} from "./commands/GetStatementResultV2Command";
|
|
26
30
|
import {
|
|
27
31
|
ListDatabasesCommandInput,
|
|
28
32
|
ListDatabasesCommandOutput,
|
|
@@ -119,6 +123,19 @@ export interface RedshiftData {
|
|
|
119
123
|
options: __HttpHandlerOptions,
|
|
120
124
|
cb: (err: any, data?: GetStatementResultCommandOutput) => void
|
|
121
125
|
): void;
|
|
126
|
+
getStatementResultV2(
|
|
127
|
+
args: GetStatementResultV2CommandInput,
|
|
128
|
+
options?: __HttpHandlerOptions
|
|
129
|
+
): Promise<GetStatementResultV2CommandOutput>;
|
|
130
|
+
getStatementResultV2(
|
|
131
|
+
args: GetStatementResultV2CommandInput,
|
|
132
|
+
cb: (err: any, data?: GetStatementResultV2CommandOutput) => void
|
|
133
|
+
): void;
|
|
134
|
+
getStatementResultV2(
|
|
135
|
+
args: GetStatementResultV2CommandInput,
|
|
136
|
+
options: __HttpHandlerOptions,
|
|
137
|
+
cb: (err: any, data?: GetStatementResultV2CommandOutput) => void
|
|
138
|
+
): void;
|
|
122
139
|
listDatabases(
|
|
123
140
|
args: ListDatabasesCommandInput,
|
|
124
141
|
options?: __HttpHandlerOptions
|
|
@@ -69,6 +69,10 @@ import {
|
|
|
69
69
|
GetStatementResultCommandInput,
|
|
70
70
|
GetStatementResultCommandOutput,
|
|
71
71
|
} from "./commands/GetStatementResultCommand";
|
|
72
|
+
import {
|
|
73
|
+
GetStatementResultV2CommandInput,
|
|
74
|
+
GetStatementResultV2CommandOutput,
|
|
75
|
+
} from "./commands/GetStatementResultV2Command";
|
|
72
76
|
import {
|
|
73
77
|
ListDatabasesCommandInput,
|
|
74
78
|
ListDatabasesCommandOutput,
|
|
@@ -99,6 +103,7 @@ export type ServiceInputTypes =
|
|
|
99
103
|
| DescribeTableCommandInput
|
|
100
104
|
| ExecuteStatementCommandInput
|
|
101
105
|
| GetStatementResultCommandInput
|
|
106
|
+
| GetStatementResultV2CommandInput
|
|
102
107
|
| ListDatabasesCommandInput
|
|
103
108
|
| ListSchemasCommandInput
|
|
104
109
|
| ListStatementsCommandInput
|
|
@@ -110,6 +115,7 @@ export type ServiceOutputTypes =
|
|
|
110
115
|
| DescribeTableCommandOutput
|
|
111
116
|
| ExecuteStatementCommandOutput
|
|
112
117
|
| GetStatementResultCommandOutput
|
|
118
|
+
| GetStatementResultV2CommandOutput
|
|
113
119
|
| ListDatabasesCommandOutput
|
|
114
120
|
| ListSchemasCommandOutput
|
|
115
121
|
| ListStatementsCommandOutput
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import {
|
|
4
|
+
GetStatementResultV2Request,
|
|
5
|
+
GetStatementResultV2Response,
|
|
6
|
+
} from "../models/models_0";
|
|
7
|
+
import {
|
|
8
|
+
RedshiftDataClientResolvedConfig,
|
|
9
|
+
ServiceInputTypes,
|
|
10
|
+
ServiceOutputTypes,
|
|
11
|
+
} from "../RedshiftDataClient";
|
|
12
|
+
export { __MetadataBearer };
|
|
13
|
+
export { $Command };
|
|
14
|
+
export interface GetStatementResultV2CommandInput
|
|
15
|
+
extends GetStatementResultV2Request {}
|
|
16
|
+
export interface GetStatementResultV2CommandOutput
|
|
17
|
+
extends GetStatementResultV2Response,
|
|
18
|
+
__MetadataBearer {}
|
|
19
|
+
declare const GetStatementResultV2Command_base: {
|
|
20
|
+
new (
|
|
21
|
+
input: GetStatementResultV2CommandInput
|
|
22
|
+
): import("@smithy/smithy-client").CommandImpl<
|
|
23
|
+
GetStatementResultV2CommandInput,
|
|
24
|
+
GetStatementResultV2CommandOutput,
|
|
25
|
+
RedshiftDataClientResolvedConfig,
|
|
26
|
+
ServiceInputTypes,
|
|
27
|
+
ServiceOutputTypes
|
|
28
|
+
>;
|
|
29
|
+
new (
|
|
30
|
+
__0_0: GetStatementResultV2CommandInput
|
|
31
|
+
): import("@smithy/smithy-client").CommandImpl<
|
|
32
|
+
GetStatementResultV2CommandInput,
|
|
33
|
+
GetStatementResultV2CommandOutput,
|
|
34
|
+
RedshiftDataClientResolvedConfig,
|
|
35
|
+
ServiceInputTypes,
|
|
36
|
+
ServiceOutputTypes
|
|
37
|
+
>;
|
|
38
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
39
|
+
};
|
|
40
|
+
export declare class GetStatementResultV2Command extends GetStatementResultV2Command_base {
|
|
41
|
+
protected static __types: {
|
|
42
|
+
api: {
|
|
43
|
+
input: GetStatementResultV2Request;
|
|
44
|
+
output: GetStatementResultV2Response;
|
|
45
|
+
};
|
|
46
|
+
sdk: {
|
|
47
|
+
input: GetStatementResultV2CommandInput;
|
|
48
|
+
output: GetStatementResultV2CommandOutput;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
}
|
|
@@ -4,6 +4,7 @@ export * from "./DescribeStatementCommand";
|
|
|
4
4
|
export * from "./DescribeTableCommand";
|
|
5
5
|
export * from "./ExecuteStatementCommand";
|
|
6
6
|
export * from "./GetStatementResultCommand";
|
|
7
|
+
export * from "./GetStatementResultV2Command";
|
|
7
8
|
export * from "./ListDatabasesCommand";
|
|
8
9
|
export * from "./ListSchemasCommand";
|
|
9
10
|
export * from "./ListStatementsCommand";
|
|
@@ -31,6 +31,12 @@ export declare class BatchExecuteStatementException extends __BaseException {
|
|
|
31
31
|
opts: __ExceptionOptionType<BatchExecuteStatementException, __BaseException>
|
|
32
32
|
);
|
|
33
33
|
}
|
|
34
|
+
export declare const ResultFormatString: {
|
|
35
|
+
readonly CSV: "CSV";
|
|
36
|
+
readonly JSON: "JSON";
|
|
37
|
+
};
|
|
38
|
+
export type ResultFormatString =
|
|
39
|
+
(typeof ResultFormatString)[keyof typeof ResultFormatString];
|
|
34
40
|
export interface BatchExecuteStatementInput {
|
|
35
41
|
Sqls: string[] | undefined;
|
|
36
42
|
ClusterIdentifier?: string;
|
|
@@ -43,6 +49,7 @@ export interface BatchExecuteStatementInput {
|
|
|
43
49
|
ClientToken?: string;
|
|
44
50
|
SessionKeepAliveSeconds?: number;
|
|
45
51
|
SessionId?: string;
|
|
52
|
+
ResultFormat?: ResultFormatString;
|
|
46
53
|
}
|
|
47
54
|
export interface BatchExecuteStatementOutput {
|
|
48
55
|
Id?: string;
|
|
@@ -170,6 +177,7 @@ export interface DescribeStatementResponse {
|
|
|
170
177
|
SubStatements?: SubStatementData[];
|
|
171
178
|
WorkgroupName?: string;
|
|
172
179
|
SessionId?: string;
|
|
180
|
+
ResultFormat?: ResultFormatString;
|
|
173
181
|
}
|
|
174
182
|
export interface DescribeTableRequest {
|
|
175
183
|
ClusterIdentifier?: string;
|
|
@@ -218,6 +226,7 @@ export interface ExecuteStatementInput {
|
|
|
218
226
|
ClientToken?: string;
|
|
219
227
|
SessionKeepAliveSeconds?: number;
|
|
220
228
|
SessionId?: string;
|
|
229
|
+
ResultFormat?: ResultFormatString;
|
|
221
230
|
}
|
|
222
231
|
export interface ExecuteStatementOutput {
|
|
223
232
|
Id?: string;
|
|
@@ -313,6 +322,24 @@ export declare namespace Field {
|
|
|
313
322
|
}
|
|
314
323
|
const visit: <T>(value: Field, visitor: Visitor<T>) => T;
|
|
315
324
|
}
|
|
325
|
+
export type QueryRecords =
|
|
326
|
+
| QueryRecords.CSVRecordsMember
|
|
327
|
+
| QueryRecords.$UnknownMember;
|
|
328
|
+
export declare namespace QueryRecords {
|
|
329
|
+
interface CSVRecordsMember {
|
|
330
|
+
CSVRecords: string;
|
|
331
|
+
$unknown?: never;
|
|
332
|
+
}
|
|
333
|
+
interface $UnknownMember {
|
|
334
|
+
CSVRecords?: never;
|
|
335
|
+
$unknown: [string, any];
|
|
336
|
+
}
|
|
337
|
+
interface Visitor<T> {
|
|
338
|
+
CSVRecords: (value: string) => T;
|
|
339
|
+
_: (name: string, value: any) => T;
|
|
340
|
+
}
|
|
341
|
+
const visit: <T>(value: QueryRecords, visitor: Visitor<T>) => T;
|
|
342
|
+
}
|
|
316
343
|
export interface GetStatementResultRequest {
|
|
317
344
|
Id: string | undefined;
|
|
318
345
|
NextToken?: string;
|
|
@@ -323,6 +350,17 @@ export interface GetStatementResultResponse {
|
|
|
323
350
|
TotalNumRows?: number;
|
|
324
351
|
NextToken?: string;
|
|
325
352
|
}
|
|
353
|
+
export interface GetStatementResultV2Request {
|
|
354
|
+
Id: string | undefined;
|
|
355
|
+
NextToken?: string;
|
|
356
|
+
}
|
|
357
|
+
export interface GetStatementResultV2Response {
|
|
358
|
+
Records: QueryRecords[] | undefined;
|
|
359
|
+
ColumnMetadata?: ColumnMetadata[];
|
|
360
|
+
TotalNumRows?: number;
|
|
361
|
+
ResultFormat?: ResultFormatString;
|
|
362
|
+
NextToken?: string;
|
|
363
|
+
}
|
|
326
364
|
export interface ListDatabasesRequest {
|
|
327
365
|
ClusterIdentifier?: string;
|
|
328
366
|
Database: string | undefined;
|
|
@@ -370,6 +408,7 @@ export interface StatementData {
|
|
|
370
408
|
QueryParameters?: SqlParameter[];
|
|
371
409
|
IsBatchStatement?: boolean;
|
|
372
410
|
SessionId?: string;
|
|
411
|
+
ResultFormat?: ResultFormatString;
|
|
373
412
|
}
|
|
374
413
|
export interface ListStatementsResponse {
|
|
375
414
|
Statements: StatementData[] | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Paginator } from "@smithy/types";
|
|
2
|
+
import {
|
|
3
|
+
GetStatementResultV2CommandInput,
|
|
4
|
+
GetStatementResultV2CommandOutput,
|
|
5
|
+
} from "../commands/GetStatementResultV2Command";
|
|
6
|
+
import { RedshiftDataPaginationConfiguration } from "./Interfaces";
|
|
7
|
+
export declare const paginateGetStatementResultV2: (
|
|
8
|
+
config: RedshiftDataPaginationConfiguration,
|
|
9
|
+
input: GetStatementResultV2CommandInput,
|
|
10
|
+
...rest: any[]
|
|
11
|
+
) => Paginator<GetStatementResultV2CommandOutput>;
|
|
@@ -27,6 +27,10 @@ import {
|
|
|
27
27
|
GetStatementResultCommandInput,
|
|
28
28
|
GetStatementResultCommandOutput,
|
|
29
29
|
} from "../commands/GetStatementResultCommand";
|
|
30
|
+
import {
|
|
31
|
+
GetStatementResultV2CommandInput,
|
|
32
|
+
GetStatementResultV2CommandOutput,
|
|
33
|
+
} from "../commands/GetStatementResultV2Command";
|
|
30
34
|
import {
|
|
31
35
|
ListDatabasesCommandInput,
|
|
32
36
|
ListDatabasesCommandOutput,
|
|
@@ -67,6 +71,10 @@ export declare const se_GetStatementResultCommand: (
|
|
|
67
71
|
input: GetStatementResultCommandInput,
|
|
68
72
|
context: __SerdeContext
|
|
69
73
|
) => Promise<__HttpRequest>;
|
|
74
|
+
export declare const se_GetStatementResultV2Command: (
|
|
75
|
+
input: GetStatementResultV2CommandInput,
|
|
76
|
+
context: __SerdeContext
|
|
77
|
+
) => Promise<__HttpRequest>;
|
|
70
78
|
export declare const se_ListDatabasesCommand: (
|
|
71
79
|
input: ListDatabasesCommandInput,
|
|
72
80
|
context: __SerdeContext
|
|
@@ -107,6 +115,10 @@ export declare const de_GetStatementResultCommand: (
|
|
|
107
115
|
output: __HttpResponse,
|
|
108
116
|
context: __SerdeContext
|
|
109
117
|
) => Promise<GetStatementResultCommandOutput>;
|
|
118
|
+
export declare const de_GetStatementResultV2Command: (
|
|
119
|
+
output: __HttpResponse,
|
|
120
|
+
context: __SerdeContext
|
|
121
|
+
) => Promise<GetStatementResultV2CommandOutput>;
|
|
110
122
|
export declare const de_ListDatabasesCommand: (
|
|
111
123
|
output: __HttpResponse,
|
|
112
124
|
context: __SerdeContext
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-redshift-data",
|
|
3
3
|
"description": "AWS SDK for JavaScript Redshift Data Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.682.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-redshift-data",
|
|
@@ -20,19 +20,19 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/client-sso-oidc": "3.
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
25
|
-
"@aws-sdk/core": "3.
|
|
26
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
27
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
28
|
-
"@aws-sdk/middleware-logger": "3.
|
|
29
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
30
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
31
|
-
"@aws-sdk/region-config-resolver": "3.
|
|
32
|
-
"@aws-sdk/types": "3.
|
|
33
|
-
"@aws-sdk/util-endpoints": "3.
|
|
34
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
23
|
+
"@aws-sdk/client-sso-oidc": "3.682.0",
|
|
24
|
+
"@aws-sdk/client-sts": "3.682.0",
|
|
25
|
+
"@aws-sdk/core": "3.679.0",
|
|
26
|
+
"@aws-sdk/credential-provider-node": "3.682.0",
|
|
27
|
+
"@aws-sdk/middleware-host-header": "3.679.0",
|
|
28
|
+
"@aws-sdk/middleware-logger": "3.679.0",
|
|
29
|
+
"@aws-sdk/middleware-recursion-detection": "3.679.0",
|
|
30
|
+
"@aws-sdk/middleware-user-agent": "3.682.0",
|
|
31
|
+
"@aws-sdk/region-config-resolver": "3.679.0",
|
|
32
|
+
"@aws-sdk/types": "3.679.0",
|
|
33
|
+
"@aws-sdk/util-endpoints": "3.679.0",
|
|
34
|
+
"@aws-sdk/util-user-agent-browser": "3.679.0",
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "3.682.0",
|
|
36
36
|
"@smithy/config-resolver": "^3.0.9",
|
|
37
37
|
"@smithy/core": "^2.4.8",
|
|
38
38
|
"@smithy/fetch-http-handler": "^3.2.9",
|