@aws-sdk/client-redshift-data 3.310.0 → 3.312.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.
|
@@ -7,100 +7,70 @@ const uuid_1 = require("uuid");
|
|
|
7
7
|
const models_0_1 = require("../models/models_0");
|
|
8
8
|
const RedshiftDataServiceException_1 = require("../models/RedshiftDataServiceException");
|
|
9
9
|
const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
10
|
-
const headers =
|
|
11
|
-
"content-type": "application/x-amz-json-1.1",
|
|
12
|
-
"x-amz-target": "RedshiftData.BatchExecuteStatement",
|
|
13
|
-
};
|
|
10
|
+
const headers = sharedHeaders("BatchExecuteStatement");
|
|
14
11
|
let body;
|
|
15
12
|
body = JSON.stringify(se_BatchExecuteStatementInput(input, context));
|
|
16
13
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
17
14
|
};
|
|
18
15
|
exports.se_BatchExecuteStatementCommand = se_BatchExecuteStatementCommand;
|
|
19
16
|
const se_CancelStatementCommand = async (input, context) => {
|
|
20
|
-
const headers =
|
|
21
|
-
"content-type": "application/x-amz-json-1.1",
|
|
22
|
-
"x-amz-target": "RedshiftData.CancelStatement",
|
|
23
|
-
};
|
|
17
|
+
const headers = sharedHeaders("CancelStatement");
|
|
24
18
|
let body;
|
|
25
19
|
body = JSON.stringify(se_CancelStatementRequest(input, context));
|
|
26
20
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
27
21
|
};
|
|
28
22
|
exports.se_CancelStatementCommand = se_CancelStatementCommand;
|
|
29
23
|
const se_DescribeStatementCommand = async (input, context) => {
|
|
30
|
-
const headers =
|
|
31
|
-
"content-type": "application/x-amz-json-1.1",
|
|
32
|
-
"x-amz-target": "RedshiftData.DescribeStatement",
|
|
33
|
-
};
|
|
24
|
+
const headers = sharedHeaders("DescribeStatement");
|
|
34
25
|
let body;
|
|
35
26
|
body = JSON.stringify(se_DescribeStatementRequest(input, context));
|
|
36
27
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
37
28
|
};
|
|
38
29
|
exports.se_DescribeStatementCommand = se_DescribeStatementCommand;
|
|
39
30
|
const se_DescribeTableCommand = async (input, context) => {
|
|
40
|
-
const headers =
|
|
41
|
-
"content-type": "application/x-amz-json-1.1",
|
|
42
|
-
"x-amz-target": "RedshiftData.DescribeTable",
|
|
43
|
-
};
|
|
31
|
+
const headers = sharedHeaders("DescribeTable");
|
|
44
32
|
let body;
|
|
45
33
|
body = JSON.stringify(se_DescribeTableRequest(input, context));
|
|
46
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
47
35
|
};
|
|
48
36
|
exports.se_DescribeTableCommand = se_DescribeTableCommand;
|
|
49
37
|
const se_ExecuteStatementCommand = async (input, context) => {
|
|
50
|
-
const headers =
|
|
51
|
-
"content-type": "application/x-amz-json-1.1",
|
|
52
|
-
"x-amz-target": "RedshiftData.ExecuteStatement",
|
|
53
|
-
};
|
|
38
|
+
const headers = sharedHeaders("ExecuteStatement");
|
|
54
39
|
let body;
|
|
55
40
|
body = JSON.stringify(se_ExecuteStatementInput(input, context));
|
|
56
41
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
57
42
|
};
|
|
58
43
|
exports.se_ExecuteStatementCommand = se_ExecuteStatementCommand;
|
|
59
44
|
const se_GetStatementResultCommand = async (input, context) => {
|
|
60
|
-
const headers =
|
|
61
|
-
"content-type": "application/x-amz-json-1.1",
|
|
62
|
-
"x-amz-target": "RedshiftData.GetStatementResult",
|
|
63
|
-
};
|
|
45
|
+
const headers = sharedHeaders("GetStatementResult");
|
|
64
46
|
let body;
|
|
65
47
|
body = JSON.stringify(se_GetStatementResultRequest(input, context));
|
|
66
48
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
67
49
|
};
|
|
68
50
|
exports.se_GetStatementResultCommand = se_GetStatementResultCommand;
|
|
69
51
|
const se_ListDatabasesCommand = async (input, context) => {
|
|
70
|
-
const headers =
|
|
71
|
-
"content-type": "application/x-amz-json-1.1",
|
|
72
|
-
"x-amz-target": "RedshiftData.ListDatabases",
|
|
73
|
-
};
|
|
52
|
+
const headers = sharedHeaders("ListDatabases");
|
|
74
53
|
let body;
|
|
75
54
|
body = JSON.stringify(se_ListDatabasesRequest(input, context));
|
|
76
55
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
56
|
};
|
|
78
57
|
exports.se_ListDatabasesCommand = se_ListDatabasesCommand;
|
|
79
58
|
const se_ListSchemasCommand = async (input, context) => {
|
|
80
|
-
const headers =
|
|
81
|
-
"content-type": "application/x-amz-json-1.1",
|
|
82
|
-
"x-amz-target": "RedshiftData.ListSchemas",
|
|
83
|
-
};
|
|
59
|
+
const headers = sharedHeaders("ListSchemas");
|
|
84
60
|
let body;
|
|
85
61
|
body = JSON.stringify(se_ListSchemasRequest(input, context));
|
|
86
62
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
87
63
|
};
|
|
88
64
|
exports.se_ListSchemasCommand = se_ListSchemasCommand;
|
|
89
65
|
const se_ListStatementsCommand = async (input, context) => {
|
|
90
|
-
const headers =
|
|
91
|
-
"content-type": "application/x-amz-json-1.1",
|
|
92
|
-
"x-amz-target": "RedshiftData.ListStatements",
|
|
93
|
-
};
|
|
66
|
+
const headers = sharedHeaders("ListStatements");
|
|
94
67
|
let body;
|
|
95
68
|
body = JSON.stringify(se_ListStatementsRequest(input, context));
|
|
96
69
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
97
70
|
};
|
|
98
71
|
exports.se_ListStatementsCommand = se_ListStatementsCommand;
|
|
99
72
|
const se_ListTablesCommand = async (input, context) => {
|
|
100
|
-
const headers =
|
|
101
|
-
"content-type": "application/x-amz-json-1.1",
|
|
102
|
-
"x-amz-target": "RedshiftData.ListTables",
|
|
103
|
-
};
|
|
73
|
+
const headers = sharedHeaders("ListTables");
|
|
104
74
|
let body;
|
|
105
75
|
body = JSON.stringify(se_ListTablesRequest(input, context));
|
|
106
76
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -1054,6 +1024,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1054
1024
|
}
|
|
1055
1025
|
return new protocol_http_1.HttpRequest(contents);
|
|
1056
1026
|
};
|
|
1027
|
+
function sharedHeaders(operation) {
|
|
1028
|
+
return {
|
|
1029
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1030
|
+
"x-amz-target": `RedshiftData.${operation}`,
|
|
1031
|
+
};
|
|
1032
|
+
}
|
|
1057
1033
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1058
1034
|
if (encoded.length) {
|
|
1059
1035
|
return JSON.parse(encoded);
|
|
@@ -4,91 +4,61 @@ import { v4 as generateIdempotencyToken } from "uuid";
|
|
|
4
4
|
import { ActiveStatementsExceededException, BatchExecuteStatementException, DatabaseConnectionException, ExecuteStatementException, InternalServerException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
5
5
|
import { RedshiftDataServiceException as __BaseException } from "../models/RedshiftDataServiceException";
|
|
6
6
|
export const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
7
|
-
const headers =
|
|
8
|
-
"content-type": "application/x-amz-json-1.1",
|
|
9
|
-
"x-amz-target": "RedshiftData.BatchExecuteStatement",
|
|
10
|
-
};
|
|
7
|
+
const headers = sharedHeaders("BatchExecuteStatement");
|
|
11
8
|
let body;
|
|
12
9
|
body = JSON.stringify(se_BatchExecuteStatementInput(input, context));
|
|
13
10
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
14
11
|
};
|
|
15
12
|
export const se_CancelStatementCommand = async (input, context) => {
|
|
16
|
-
const headers =
|
|
17
|
-
"content-type": "application/x-amz-json-1.1",
|
|
18
|
-
"x-amz-target": "RedshiftData.CancelStatement",
|
|
19
|
-
};
|
|
13
|
+
const headers = sharedHeaders("CancelStatement");
|
|
20
14
|
let body;
|
|
21
15
|
body = JSON.stringify(se_CancelStatementRequest(input, context));
|
|
22
16
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
23
17
|
};
|
|
24
18
|
export const se_DescribeStatementCommand = async (input, context) => {
|
|
25
|
-
const headers =
|
|
26
|
-
"content-type": "application/x-amz-json-1.1",
|
|
27
|
-
"x-amz-target": "RedshiftData.DescribeStatement",
|
|
28
|
-
};
|
|
19
|
+
const headers = sharedHeaders("DescribeStatement");
|
|
29
20
|
let body;
|
|
30
21
|
body = JSON.stringify(se_DescribeStatementRequest(input, context));
|
|
31
22
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
32
23
|
};
|
|
33
24
|
export const se_DescribeTableCommand = async (input, context) => {
|
|
34
|
-
const headers =
|
|
35
|
-
"content-type": "application/x-amz-json-1.1",
|
|
36
|
-
"x-amz-target": "RedshiftData.DescribeTable",
|
|
37
|
-
};
|
|
25
|
+
const headers = sharedHeaders("DescribeTable");
|
|
38
26
|
let body;
|
|
39
27
|
body = JSON.stringify(se_DescribeTableRequest(input, context));
|
|
40
28
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
41
29
|
};
|
|
42
30
|
export const se_ExecuteStatementCommand = async (input, context) => {
|
|
43
|
-
const headers =
|
|
44
|
-
"content-type": "application/x-amz-json-1.1",
|
|
45
|
-
"x-amz-target": "RedshiftData.ExecuteStatement",
|
|
46
|
-
};
|
|
31
|
+
const headers = sharedHeaders("ExecuteStatement");
|
|
47
32
|
let body;
|
|
48
33
|
body = JSON.stringify(se_ExecuteStatementInput(input, context));
|
|
49
34
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
50
35
|
};
|
|
51
36
|
export const se_GetStatementResultCommand = async (input, context) => {
|
|
52
|
-
const headers =
|
|
53
|
-
"content-type": "application/x-amz-json-1.1",
|
|
54
|
-
"x-amz-target": "RedshiftData.GetStatementResult",
|
|
55
|
-
};
|
|
37
|
+
const headers = sharedHeaders("GetStatementResult");
|
|
56
38
|
let body;
|
|
57
39
|
body = JSON.stringify(se_GetStatementResultRequest(input, context));
|
|
58
40
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
59
41
|
};
|
|
60
42
|
export const se_ListDatabasesCommand = async (input, context) => {
|
|
61
|
-
const headers =
|
|
62
|
-
"content-type": "application/x-amz-json-1.1",
|
|
63
|
-
"x-amz-target": "RedshiftData.ListDatabases",
|
|
64
|
-
};
|
|
43
|
+
const headers = sharedHeaders("ListDatabases");
|
|
65
44
|
let body;
|
|
66
45
|
body = JSON.stringify(se_ListDatabasesRequest(input, context));
|
|
67
46
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
68
47
|
};
|
|
69
48
|
export const se_ListSchemasCommand = async (input, context) => {
|
|
70
|
-
const headers =
|
|
71
|
-
"content-type": "application/x-amz-json-1.1",
|
|
72
|
-
"x-amz-target": "RedshiftData.ListSchemas",
|
|
73
|
-
};
|
|
49
|
+
const headers = sharedHeaders("ListSchemas");
|
|
74
50
|
let body;
|
|
75
51
|
body = JSON.stringify(se_ListSchemasRequest(input, context));
|
|
76
52
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
77
53
|
};
|
|
78
54
|
export const se_ListStatementsCommand = async (input, context) => {
|
|
79
|
-
const headers =
|
|
80
|
-
"content-type": "application/x-amz-json-1.1",
|
|
81
|
-
"x-amz-target": "RedshiftData.ListStatements",
|
|
82
|
-
};
|
|
55
|
+
const headers = sharedHeaders("ListStatements");
|
|
83
56
|
let body;
|
|
84
57
|
body = JSON.stringify(se_ListStatementsRequest(input, context));
|
|
85
58
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
86
59
|
};
|
|
87
60
|
export const se_ListTablesCommand = async (input, context) => {
|
|
88
|
-
const headers =
|
|
89
|
-
"content-type": "application/x-amz-json-1.1",
|
|
90
|
-
"x-amz-target": "RedshiftData.ListTables",
|
|
91
|
-
};
|
|
61
|
+
const headers = sharedHeaders("ListTables");
|
|
92
62
|
let body;
|
|
93
63
|
body = JSON.stringify(se_ListTablesRequest(input, context));
|
|
94
64
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
@@ -1031,6 +1001,12 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
1031
1001
|
}
|
|
1032
1002
|
return new __HttpRequest(contents);
|
|
1033
1003
|
};
|
|
1004
|
+
function sharedHeaders(operation) {
|
|
1005
|
+
return {
|
|
1006
|
+
"content-type": "application/x-amz-json-1.1",
|
|
1007
|
+
"x-amz-target": `RedshiftData.${operation}`,
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1034
1010
|
const parseBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
|
|
1035
1011
|
if (encoded.length) {
|
|
1036
1012
|
return JSON.parse(encoded);
|
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.312.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
24
|
-
"@aws-sdk/client-sts": "3.
|
|
24
|
+
"@aws-sdk/client-sts": "3.312.0",
|
|
25
25
|
"@aws-sdk/config-resolver": "3.310.0",
|
|
26
26
|
"@aws-sdk/credential-provider-node": "3.310.0",
|
|
27
27
|
"@aws-sdk/fetch-http-handler": "3.310.0",
|