@aws-sdk/client-redshift-data 3.927.0 → 3.929.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/dist-cjs/index.js +517 -655
- package/dist-cjs/runtimeConfig.shared.js +7 -0
- package/dist-es/RedshiftDataClient.js +2 -0
- package/dist-es/commands/BatchExecuteStatementCommand.js +3 -9
- package/dist-es/commands/CancelStatementCommand.js +3 -9
- package/dist-es/commands/DescribeStatementCommand.js +3 -9
- package/dist-es/commands/DescribeTableCommand.js +3 -9
- package/dist-es/commands/ExecuteStatementCommand.js +3 -9
- package/dist-es/commands/GetStatementResultCommand.js +3 -9
- package/dist-es/commands/GetStatementResultV2Command.js +3 -9
- package/dist-es/commands/ListDatabasesCommand.js +3 -9
- package/dist-es/commands/ListSchemasCommand.js +3 -9
- package/dist-es/commands/ListStatementsCommand.js +3 -9
- package/dist-es/commands/ListTablesCommand.js +3 -9
- package/dist-es/runtimeConfig.shared.js +7 -0
- package/dist-es/schemas/schemas_0.js +471 -0
- package/dist-types/RedshiftDataClient.d.ts +10 -1
- package/dist-types/runtimeConfig.browser.d.ts +1 -0
- package/dist-types/runtimeConfig.d.ts +1 -0
- package/dist-types/runtimeConfig.native.d.ts +1 -0
- package/dist-types/runtimeConfig.shared.d.ts +1 -0
- package/dist-types/schemas/schemas_0.d.ts +65 -0
- package/dist-types/ts3.4/RedshiftDataClient.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +4 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +4 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +70 -0
- package/package.json +5 -6
- package/dist-es/protocols/Aws_json1_1.js +0 -555
- package/dist-types/protocols/Aws_json1_1.d.ts +0 -101
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +0 -137
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import {
|
|
2
|
+
StaticErrorSchema,
|
|
3
|
+
StaticListSchema,
|
|
4
|
+
StaticOperationSchema,
|
|
5
|
+
StaticStructureSchema,
|
|
6
|
+
} from "@smithy/types";
|
|
7
|
+
export declare var ActiveSessionsExceededException: StaticErrorSchema;
|
|
8
|
+
export declare var ActiveStatementsExceededException: StaticErrorSchema;
|
|
9
|
+
export declare var BatchExecuteStatementException: StaticErrorSchema;
|
|
10
|
+
export declare var BatchExecuteStatementInput: StaticStructureSchema;
|
|
11
|
+
export declare var BatchExecuteStatementOutput: StaticStructureSchema;
|
|
12
|
+
export declare var CancelStatementRequest: StaticStructureSchema;
|
|
13
|
+
export declare var CancelStatementResponse: StaticStructureSchema;
|
|
14
|
+
export declare var ColumnMetadata: StaticStructureSchema;
|
|
15
|
+
export declare var DatabaseConnectionException: StaticErrorSchema;
|
|
16
|
+
export declare var DescribeStatementRequest: StaticStructureSchema;
|
|
17
|
+
export declare var DescribeStatementResponse: StaticStructureSchema;
|
|
18
|
+
export declare var DescribeTableRequest: StaticStructureSchema;
|
|
19
|
+
export declare var DescribeTableResponse: StaticStructureSchema;
|
|
20
|
+
export declare var ExecuteStatementException: StaticErrorSchema;
|
|
21
|
+
export declare var ExecuteStatementInput: StaticStructureSchema;
|
|
22
|
+
export declare var ExecuteStatementOutput: StaticStructureSchema;
|
|
23
|
+
export declare var GetStatementResultRequest: StaticStructureSchema;
|
|
24
|
+
export declare var GetStatementResultResponse: StaticStructureSchema;
|
|
25
|
+
export declare var GetStatementResultV2Request: StaticStructureSchema;
|
|
26
|
+
export declare var GetStatementResultV2Response: StaticStructureSchema;
|
|
27
|
+
export declare var InternalServerException: StaticErrorSchema;
|
|
28
|
+
export declare var ListDatabasesRequest: StaticStructureSchema;
|
|
29
|
+
export declare var ListDatabasesResponse: StaticStructureSchema;
|
|
30
|
+
export declare var ListSchemasRequest: StaticStructureSchema;
|
|
31
|
+
export declare var ListSchemasResponse: StaticStructureSchema;
|
|
32
|
+
export declare var ListStatementsRequest: StaticStructureSchema;
|
|
33
|
+
export declare var ListStatementsResponse: StaticStructureSchema;
|
|
34
|
+
export declare var ListTablesRequest: StaticStructureSchema;
|
|
35
|
+
export declare var ListTablesResponse: StaticStructureSchema;
|
|
36
|
+
export declare var QueryTimeoutException: StaticErrorSchema;
|
|
37
|
+
export declare var ResourceNotFoundException: StaticErrorSchema;
|
|
38
|
+
export declare var SqlParameter: StaticStructureSchema;
|
|
39
|
+
export declare var StatementData: StaticStructureSchema;
|
|
40
|
+
export declare var SubStatementData: StaticStructureSchema;
|
|
41
|
+
export declare var TableMember: StaticStructureSchema;
|
|
42
|
+
export declare var ValidationException: StaticErrorSchema;
|
|
43
|
+
export declare var RedshiftDataServiceException: StaticErrorSchema;
|
|
44
|
+
export declare var ColumnList: StaticListSchema;
|
|
45
|
+
export declare var ColumnMetadataList: StaticListSchema;
|
|
46
|
+
export declare var DatabaseList: number;
|
|
47
|
+
export declare var DbGroupList: number;
|
|
48
|
+
export declare var FieldList: StaticListSchema;
|
|
49
|
+
export declare var FormattedSqlRecords: StaticListSchema;
|
|
50
|
+
export declare var SchemaList: number;
|
|
51
|
+
export declare var SqlList: number;
|
|
52
|
+
export declare var SqlParametersList: StaticListSchema;
|
|
53
|
+
export declare var SqlRecords: StaticListSchema;
|
|
54
|
+
export declare var StatementList: StaticListSchema;
|
|
55
|
+
export declare var StatementStringList: number;
|
|
56
|
+
export declare var SubStatementList: StaticListSchema;
|
|
57
|
+
export declare var TableList: StaticListSchema;
|
|
58
|
+
export declare var Field: StaticStructureSchema;
|
|
59
|
+
export declare var QueryRecords: StaticStructureSchema;
|
|
60
|
+
export declare var BatchExecuteStatement: StaticOperationSchema;
|
|
61
|
+
export declare var CancelStatement: StaticOperationSchema;
|
|
62
|
+
export declare var DescribeStatement: StaticOperationSchema;
|
|
63
|
+
export declare var DescribeTable: StaticOperationSchema;
|
|
64
|
+
export declare var ExecuteStatement: StaticOperationSchema;
|
|
65
|
+
export declare var GetStatementResult: StaticOperationSchema;
|
|
66
|
+
export declare var GetStatementResultV2: StaticOperationSchema;
|
|
67
|
+
export declare var ListDatabases: StaticOperationSchema;
|
|
68
|
+
export declare var ListSchemas: StaticOperationSchema;
|
|
69
|
+
export declare var ListStatements: StaticOperationSchema;
|
|
70
|
+
export declare var ListTables: StaticOperationSchema;
|
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.929.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,17 +20,17 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
23
|
-
"@aws-sdk/core": "3.
|
|
24
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
23
|
+
"@aws-sdk/core": "3.928.0",
|
|
24
|
+
"@aws-sdk/credential-provider-node": "3.929.0",
|
|
25
25
|
"@aws-sdk/middleware-host-header": "3.922.0",
|
|
26
26
|
"@aws-sdk/middleware-logger": "3.922.0",
|
|
27
27
|
"@aws-sdk/middleware-recursion-detection": "3.922.0",
|
|
28
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
28
|
+
"@aws-sdk/middleware-user-agent": "3.928.0",
|
|
29
29
|
"@aws-sdk/region-config-resolver": "3.925.0",
|
|
30
30
|
"@aws-sdk/types": "3.922.0",
|
|
31
31
|
"@aws-sdk/util-endpoints": "3.922.0",
|
|
32
32
|
"@aws-sdk/util-user-agent-browser": "3.922.0",
|
|
33
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
33
|
+
"@aws-sdk/util-user-agent-node": "3.928.0",
|
|
34
34
|
"@smithy/config-resolver": "^4.4.2",
|
|
35
35
|
"@smithy/core": "^3.17.2",
|
|
36
36
|
"@smithy/fetch-http-handler": "^5.3.5",
|
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
"@smithy/util-middleware": "^4.2.4",
|
|
57
57
|
"@smithy/util-retry": "^4.2.4",
|
|
58
58
|
"@smithy/util-utf8": "^4.2.0",
|
|
59
|
-
"@smithy/uuid": "^1.1.0",
|
|
60
59
|
"tslib": "^2.6.2"
|
|
61
60
|
},
|
|
62
61
|
"devDependencies": {
|
|
@@ -1,555 +0,0 @@
|
|
|
1
|
-
import { awsExpectUnion as __expectUnion, loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody, } from "@aws-sdk/core";
|
|
2
|
-
import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
|
|
3
|
-
import { _json, collectBody, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseDouble as __limitedParseDouble, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@smithy/smithy-client";
|
|
4
|
-
import { v4 as generateIdempotencyToken } from "@smithy/uuid";
|
|
5
|
-
import { ActiveSessionsExceededException, ActiveStatementsExceededException, BatchExecuteStatementException, DatabaseConnectionException, ExecuteStatementException, InternalServerException, QueryTimeoutException, ResourceNotFoundException, ValidationException, } from "../models/models_0";
|
|
6
|
-
import { RedshiftDataServiceException as __BaseException } from "../models/RedshiftDataServiceException";
|
|
7
|
-
export const se_BatchExecuteStatementCommand = async (input, context) => {
|
|
8
|
-
const headers = sharedHeaders("BatchExecuteStatement");
|
|
9
|
-
let body;
|
|
10
|
-
body = JSON.stringify(se_BatchExecuteStatementInput(input, context));
|
|
11
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
12
|
-
};
|
|
13
|
-
export const se_CancelStatementCommand = async (input, context) => {
|
|
14
|
-
const headers = sharedHeaders("CancelStatement");
|
|
15
|
-
let body;
|
|
16
|
-
body = JSON.stringify(_json(input));
|
|
17
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
18
|
-
};
|
|
19
|
-
export const se_DescribeStatementCommand = async (input, context) => {
|
|
20
|
-
const headers = sharedHeaders("DescribeStatement");
|
|
21
|
-
let body;
|
|
22
|
-
body = JSON.stringify(_json(input));
|
|
23
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
24
|
-
};
|
|
25
|
-
export const se_DescribeTableCommand = async (input, context) => {
|
|
26
|
-
const headers = sharedHeaders("DescribeTable");
|
|
27
|
-
let body;
|
|
28
|
-
body = JSON.stringify(_json(input));
|
|
29
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
30
|
-
};
|
|
31
|
-
export const se_ExecuteStatementCommand = async (input, context) => {
|
|
32
|
-
const headers = sharedHeaders("ExecuteStatement");
|
|
33
|
-
let body;
|
|
34
|
-
body = JSON.stringify(se_ExecuteStatementInput(input, context));
|
|
35
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
-
};
|
|
37
|
-
export const se_GetStatementResultCommand = async (input, context) => {
|
|
38
|
-
const headers = sharedHeaders("GetStatementResult");
|
|
39
|
-
let body;
|
|
40
|
-
body = JSON.stringify(_json(input));
|
|
41
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
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
|
-
};
|
|
49
|
-
export const se_ListDatabasesCommand = async (input, context) => {
|
|
50
|
-
const headers = sharedHeaders("ListDatabases");
|
|
51
|
-
let body;
|
|
52
|
-
body = JSON.stringify(_json(input));
|
|
53
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
54
|
-
};
|
|
55
|
-
export const se_ListSchemasCommand = async (input, context) => {
|
|
56
|
-
const headers = sharedHeaders("ListSchemas");
|
|
57
|
-
let body;
|
|
58
|
-
body = JSON.stringify(_json(input));
|
|
59
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
60
|
-
};
|
|
61
|
-
export const se_ListStatementsCommand = async (input, context) => {
|
|
62
|
-
const headers = sharedHeaders("ListStatements");
|
|
63
|
-
let body;
|
|
64
|
-
body = JSON.stringify(_json(input));
|
|
65
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
|
-
};
|
|
67
|
-
export const se_ListTablesCommand = async (input, context) => {
|
|
68
|
-
const headers = sharedHeaders("ListTables");
|
|
69
|
-
let body;
|
|
70
|
-
body = JSON.stringify(_json(input));
|
|
71
|
-
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
72
|
-
};
|
|
73
|
-
export const de_BatchExecuteStatementCommand = async (output, context) => {
|
|
74
|
-
if (output.statusCode >= 300) {
|
|
75
|
-
return de_CommandError(output, context);
|
|
76
|
-
}
|
|
77
|
-
const data = await parseBody(output.body, context);
|
|
78
|
-
let contents = {};
|
|
79
|
-
contents = de_BatchExecuteStatementOutput(data, context);
|
|
80
|
-
const response = {
|
|
81
|
-
$metadata: deserializeMetadata(output),
|
|
82
|
-
...contents,
|
|
83
|
-
};
|
|
84
|
-
return response;
|
|
85
|
-
};
|
|
86
|
-
export const de_CancelStatementCommand = async (output, context) => {
|
|
87
|
-
if (output.statusCode >= 300) {
|
|
88
|
-
return de_CommandError(output, context);
|
|
89
|
-
}
|
|
90
|
-
const data = await parseBody(output.body, context);
|
|
91
|
-
let contents = {};
|
|
92
|
-
contents = _json(data);
|
|
93
|
-
const response = {
|
|
94
|
-
$metadata: deserializeMetadata(output),
|
|
95
|
-
...contents,
|
|
96
|
-
};
|
|
97
|
-
return response;
|
|
98
|
-
};
|
|
99
|
-
export const de_DescribeStatementCommand = async (output, context) => {
|
|
100
|
-
if (output.statusCode >= 300) {
|
|
101
|
-
return de_CommandError(output, context);
|
|
102
|
-
}
|
|
103
|
-
const data = await parseBody(output.body, context);
|
|
104
|
-
let contents = {};
|
|
105
|
-
contents = de_DescribeStatementResponse(data, context);
|
|
106
|
-
const response = {
|
|
107
|
-
$metadata: deserializeMetadata(output),
|
|
108
|
-
...contents,
|
|
109
|
-
};
|
|
110
|
-
return response;
|
|
111
|
-
};
|
|
112
|
-
export const de_DescribeTableCommand = async (output, context) => {
|
|
113
|
-
if (output.statusCode >= 300) {
|
|
114
|
-
return de_CommandError(output, context);
|
|
115
|
-
}
|
|
116
|
-
const data = await parseBody(output.body, context);
|
|
117
|
-
let contents = {};
|
|
118
|
-
contents = _json(data);
|
|
119
|
-
const response = {
|
|
120
|
-
$metadata: deserializeMetadata(output),
|
|
121
|
-
...contents,
|
|
122
|
-
};
|
|
123
|
-
return response;
|
|
124
|
-
};
|
|
125
|
-
export const de_ExecuteStatementCommand = async (output, context) => {
|
|
126
|
-
if (output.statusCode >= 300) {
|
|
127
|
-
return de_CommandError(output, context);
|
|
128
|
-
}
|
|
129
|
-
const data = await parseBody(output.body, context);
|
|
130
|
-
let contents = {};
|
|
131
|
-
contents = de_ExecuteStatementOutput(data, context);
|
|
132
|
-
const response = {
|
|
133
|
-
$metadata: deserializeMetadata(output),
|
|
134
|
-
...contents,
|
|
135
|
-
};
|
|
136
|
-
return response;
|
|
137
|
-
};
|
|
138
|
-
export const de_GetStatementResultCommand = async (output, context) => {
|
|
139
|
-
if (output.statusCode >= 300) {
|
|
140
|
-
return de_CommandError(output, context);
|
|
141
|
-
}
|
|
142
|
-
const data = await parseBody(output.body, context);
|
|
143
|
-
let contents = {};
|
|
144
|
-
contents = de_GetStatementResultResponse(data, context);
|
|
145
|
-
const response = {
|
|
146
|
-
$metadata: deserializeMetadata(output),
|
|
147
|
-
...contents,
|
|
148
|
-
};
|
|
149
|
-
return response;
|
|
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
|
-
};
|
|
164
|
-
export const de_ListDatabasesCommand = async (output, context) => {
|
|
165
|
-
if (output.statusCode >= 300) {
|
|
166
|
-
return de_CommandError(output, context);
|
|
167
|
-
}
|
|
168
|
-
const data = await parseBody(output.body, context);
|
|
169
|
-
let contents = {};
|
|
170
|
-
contents = _json(data);
|
|
171
|
-
const response = {
|
|
172
|
-
$metadata: deserializeMetadata(output),
|
|
173
|
-
...contents,
|
|
174
|
-
};
|
|
175
|
-
return response;
|
|
176
|
-
};
|
|
177
|
-
export const de_ListSchemasCommand = async (output, context) => {
|
|
178
|
-
if (output.statusCode >= 300) {
|
|
179
|
-
return de_CommandError(output, context);
|
|
180
|
-
}
|
|
181
|
-
const data = await parseBody(output.body, context);
|
|
182
|
-
let contents = {};
|
|
183
|
-
contents = _json(data);
|
|
184
|
-
const response = {
|
|
185
|
-
$metadata: deserializeMetadata(output),
|
|
186
|
-
...contents,
|
|
187
|
-
};
|
|
188
|
-
return response;
|
|
189
|
-
};
|
|
190
|
-
export const de_ListStatementsCommand = async (output, context) => {
|
|
191
|
-
if (output.statusCode >= 300) {
|
|
192
|
-
return de_CommandError(output, context);
|
|
193
|
-
}
|
|
194
|
-
const data = await parseBody(output.body, context);
|
|
195
|
-
let contents = {};
|
|
196
|
-
contents = de_ListStatementsResponse(data, context);
|
|
197
|
-
const response = {
|
|
198
|
-
$metadata: deserializeMetadata(output),
|
|
199
|
-
...contents,
|
|
200
|
-
};
|
|
201
|
-
return response;
|
|
202
|
-
};
|
|
203
|
-
export const de_ListTablesCommand = async (output, context) => {
|
|
204
|
-
if (output.statusCode >= 300) {
|
|
205
|
-
return de_CommandError(output, context);
|
|
206
|
-
}
|
|
207
|
-
const data = await parseBody(output.body, context);
|
|
208
|
-
let contents = {};
|
|
209
|
-
contents = _json(data);
|
|
210
|
-
const response = {
|
|
211
|
-
$metadata: deserializeMetadata(output),
|
|
212
|
-
...contents,
|
|
213
|
-
};
|
|
214
|
-
return response;
|
|
215
|
-
};
|
|
216
|
-
const de_CommandError = async (output, context) => {
|
|
217
|
-
const parsedOutput = {
|
|
218
|
-
...output,
|
|
219
|
-
body: await parseErrorBody(output.body, context),
|
|
220
|
-
};
|
|
221
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
222
|
-
switch (errorCode) {
|
|
223
|
-
case "ActiveSessionsExceededException":
|
|
224
|
-
case "com.amazonaws.redshiftdata#ActiveSessionsExceededException":
|
|
225
|
-
throw await de_ActiveSessionsExceededExceptionRes(parsedOutput, context);
|
|
226
|
-
case "ActiveStatementsExceededException":
|
|
227
|
-
case "com.amazonaws.redshiftdata#ActiveStatementsExceededException":
|
|
228
|
-
throw await de_ActiveStatementsExceededExceptionRes(parsedOutput, context);
|
|
229
|
-
case "BatchExecuteStatementException":
|
|
230
|
-
case "com.amazonaws.redshiftdata#BatchExecuteStatementException":
|
|
231
|
-
throw await de_BatchExecuteStatementExceptionRes(parsedOutput, context);
|
|
232
|
-
case "InternalServerException":
|
|
233
|
-
case "com.amazonaws.redshiftdata#InternalServerException":
|
|
234
|
-
throw await de_InternalServerExceptionRes(parsedOutput, context);
|
|
235
|
-
case "ValidationException":
|
|
236
|
-
case "com.amazonaws.redshiftdata#ValidationException":
|
|
237
|
-
throw await de_ValidationExceptionRes(parsedOutput, context);
|
|
238
|
-
case "DatabaseConnectionException":
|
|
239
|
-
case "com.amazonaws.redshiftdata#DatabaseConnectionException":
|
|
240
|
-
throw await de_DatabaseConnectionExceptionRes(parsedOutput, context);
|
|
241
|
-
case "ResourceNotFoundException":
|
|
242
|
-
case "com.amazonaws.redshiftdata#ResourceNotFoundException":
|
|
243
|
-
throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
|
|
244
|
-
case "QueryTimeoutException":
|
|
245
|
-
case "com.amazonaws.redshiftdata#QueryTimeoutException":
|
|
246
|
-
throw await de_QueryTimeoutExceptionRes(parsedOutput, context);
|
|
247
|
-
case "ExecuteStatementException":
|
|
248
|
-
case "com.amazonaws.redshiftdata#ExecuteStatementException":
|
|
249
|
-
throw await de_ExecuteStatementExceptionRes(parsedOutput, context);
|
|
250
|
-
default:
|
|
251
|
-
const parsedBody = parsedOutput.body;
|
|
252
|
-
return throwDefaultError({
|
|
253
|
-
output,
|
|
254
|
-
parsedBody,
|
|
255
|
-
errorCode,
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
const de_ActiveSessionsExceededExceptionRes = async (parsedOutput, context) => {
|
|
260
|
-
const body = parsedOutput.body;
|
|
261
|
-
const deserialized = _json(body);
|
|
262
|
-
const exception = new ActiveSessionsExceededException({
|
|
263
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
264
|
-
...deserialized,
|
|
265
|
-
});
|
|
266
|
-
return __decorateServiceException(exception, body);
|
|
267
|
-
};
|
|
268
|
-
const de_ActiveStatementsExceededExceptionRes = async (parsedOutput, context) => {
|
|
269
|
-
const body = parsedOutput.body;
|
|
270
|
-
const deserialized = _json(body);
|
|
271
|
-
const exception = new ActiveStatementsExceededException({
|
|
272
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
273
|
-
...deserialized,
|
|
274
|
-
});
|
|
275
|
-
return __decorateServiceException(exception, body);
|
|
276
|
-
};
|
|
277
|
-
const de_BatchExecuteStatementExceptionRes = async (parsedOutput, context) => {
|
|
278
|
-
const body = parsedOutput.body;
|
|
279
|
-
const deserialized = _json(body);
|
|
280
|
-
const exception = new BatchExecuteStatementException({
|
|
281
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
282
|
-
...deserialized,
|
|
283
|
-
});
|
|
284
|
-
return __decorateServiceException(exception, body);
|
|
285
|
-
};
|
|
286
|
-
const de_DatabaseConnectionExceptionRes = async (parsedOutput, context) => {
|
|
287
|
-
const body = parsedOutput.body;
|
|
288
|
-
const deserialized = _json(body);
|
|
289
|
-
const exception = new DatabaseConnectionException({
|
|
290
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
291
|
-
...deserialized,
|
|
292
|
-
});
|
|
293
|
-
return __decorateServiceException(exception, body);
|
|
294
|
-
};
|
|
295
|
-
const de_ExecuteStatementExceptionRes = async (parsedOutput, context) => {
|
|
296
|
-
const body = parsedOutput.body;
|
|
297
|
-
const deserialized = _json(body);
|
|
298
|
-
const exception = new ExecuteStatementException({
|
|
299
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
300
|
-
...deserialized,
|
|
301
|
-
});
|
|
302
|
-
return __decorateServiceException(exception, body);
|
|
303
|
-
};
|
|
304
|
-
const de_InternalServerExceptionRes = async (parsedOutput, context) => {
|
|
305
|
-
const body = parsedOutput.body;
|
|
306
|
-
const deserialized = _json(body);
|
|
307
|
-
const exception = new InternalServerException({
|
|
308
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
309
|
-
...deserialized,
|
|
310
|
-
});
|
|
311
|
-
return __decorateServiceException(exception, body);
|
|
312
|
-
};
|
|
313
|
-
const de_QueryTimeoutExceptionRes = async (parsedOutput, context) => {
|
|
314
|
-
const body = parsedOutput.body;
|
|
315
|
-
const deserialized = _json(body);
|
|
316
|
-
const exception = new QueryTimeoutException({
|
|
317
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
318
|
-
...deserialized,
|
|
319
|
-
});
|
|
320
|
-
return __decorateServiceException(exception, body);
|
|
321
|
-
};
|
|
322
|
-
const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
|
|
323
|
-
const body = parsedOutput.body;
|
|
324
|
-
const deserialized = _json(body);
|
|
325
|
-
const exception = new ResourceNotFoundException({
|
|
326
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
327
|
-
...deserialized,
|
|
328
|
-
});
|
|
329
|
-
return __decorateServiceException(exception, body);
|
|
330
|
-
};
|
|
331
|
-
const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
332
|
-
const body = parsedOutput.body;
|
|
333
|
-
const deserialized = _json(body);
|
|
334
|
-
const exception = new ValidationException({
|
|
335
|
-
$metadata: deserializeMetadata(parsedOutput),
|
|
336
|
-
...deserialized,
|
|
337
|
-
});
|
|
338
|
-
return __decorateServiceException(exception, body);
|
|
339
|
-
};
|
|
340
|
-
const se_BatchExecuteStatementInput = (input, context) => {
|
|
341
|
-
return take(input, {
|
|
342
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
343
|
-
ClusterIdentifier: [],
|
|
344
|
-
Database: [],
|
|
345
|
-
DbUser: [],
|
|
346
|
-
ResultFormat: [],
|
|
347
|
-
SecretArn: [],
|
|
348
|
-
SessionId: [],
|
|
349
|
-
SessionKeepAliveSeconds: [],
|
|
350
|
-
Sqls: _json,
|
|
351
|
-
StatementName: [],
|
|
352
|
-
WithEvent: [],
|
|
353
|
-
WorkgroupName: [],
|
|
354
|
-
});
|
|
355
|
-
};
|
|
356
|
-
const se_ExecuteStatementInput = (input, context) => {
|
|
357
|
-
return take(input, {
|
|
358
|
-
ClientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
359
|
-
ClusterIdentifier: [],
|
|
360
|
-
Database: [],
|
|
361
|
-
DbUser: [],
|
|
362
|
-
Parameters: _json,
|
|
363
|
-
ResultFormat: [],
|
|
364
|
-
SecretArn: [],
|
|
365
|
-
SessionId: [],
|
|
366
|
-
SessionKeepAliveSeconds: [],
|
|
367
|
-
Sql: [],
|
|
368
|
-
StatementName: [],
|
|
369
|
-
WithEvent: [],
|
|
370
|
-
WorkgroupName: [],
|
|
371
|
-
});
|
|
372
|
-
};
|
|
373
|
-
const de_BatchExecuteStatementOutput = (output, context) => {
|
|
374
|
-
return take(output, {
|
|
375
|
-
ClusterIdentifier: __expectString,
|
|
376
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
377
|
-
Database: __expectString,
|
|
378
|
-
DbGroups: _json,
|
|
379
|
-
DbUser: __expectString,
|
|
380
|
-
Id: __expectString,
|
|
381
|
-
SecretArn: __expectString,
|
|
382
|
-
SessionId: __expectString,
|
|
383
|
-
WorkgroupName: __expectString,
|
|
384
|
-
});
|
|
385
|
-
};
|
|
386
|
-
const de_DescribeStatementResponse = (output, context) => {
|
|
387
|
-
return take(output, {
|
|
388
|
-
ClusterIdentifier: __expectString,
|
|
389
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
390
|
-
Database: __expectString,
|
|
391
|
-
DbUser: __expectString,
|
|
392
|
-
Duration: __expectLong,
|
|
393
|
-
Error: __expectString,
|
|
394
|
-
HasResultSet: __expectBoolean,
|
|
395
|
-
Id: __expectString,
|
|
396
|
-
QueryParameters: _json,
|
|
397
|
-
QueryString: __expectString,
|
|
398
|
-
RedshiftPid: __expectLong,
|
|
399
|
-
RedshiftQueryId: __expectLong,
|
|
400
|
-
ResultFormat: __expectString,
|
|
401
|
-
ResultRows: __expectLong,
|
|
402
|
-
ResultSize: __expectLong,
|
|
403
|
-
SecretArn: __expectString,
|
|
404
|
-
SessionId: __expectString,
|
|
405
|
-
Status: __expectString,
|
|
406
|
-
SubStatements: (_) => de_SubStatementList(_, context),
|
|
407
|
-
UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
408
|
-
WorkgroupName: __expectString,
|
|
409
|
-
});
|
|
410
|
-
};
|
|
411
|
-
const de_ExecuteStatementOutput = (output, context) => {
|
|
412
|
-
return take(output, {
|
|
413
|
-
ClusterIdentifier: __expectString,
|
|
414
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
415
|
-
Database: __expectString,
|
|
416
|
-
DbGroups: _json,
|
|
417
|
-
DbUser: __expectString,
|
|
418
|
-
Id: __expectString,
|
|
419
|
-
SecretArn: __expectString,
|
|
420
|
-
SessionId: __expectString,
|
|
421
|
-
WorkgroupName: __expectString,
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
const de_Field = (output, context) => {
|
|
425
|
-
if (output.blobValue != null) {
|
|
426
|
-
return {
|
|
427
|
-
blobValue: context.base64Decoder(output.blobValue),
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
if (__expectBoolean(output.booleanValue) !== undefined) {
|
|
431
|
-
return { booleanValue: __expectBoolean(output.booleanValue) };
|
|
432
|
-
}
|
|
433
|
-
if (__limitedParseDouble(output.doubleValue) !== undefined) {
|
|
434
|
-
return { doubleValue: __limitedParseDouble(output.doubleValue) };
|
|
435
|
-
}
|
|
436
|
-
if (__expectBoolean(output.isNull) !== undefined) {
|
|
437
|
-
return { isNull: __expectBoolean(output.isNull) };
|
|
438
|
-
}
|
|
439
|
-
if (__expectLong(output.longValue) !== undefined) {
|
|
440
|
-
return { longValue: __expectLong(output.longValue) };
|
|
441
|
-
}
|
|
442
|
-
if (__expectString(output.stringValue) !== undefined) {
|
|
443
|
-
return { stringValue: __expectString(output.stringValue) };
|
|
444
|
-
}
|
|
445
|
-
return { $unknown: Object.entries(output)[0] };
|
|
446
|
-
};
|
|
447
|
-
const de_FieldList = (output, context) => {
|
|
448
|
-
const retVal = (output || [])
|
|
449
|
-
.filter((e) => e != null)
|
|
450
|
-
.map((entry) => {
|
|
451
|
-
return de_Field(__expectUnion(entry), context);
|
|
452
|
-
});
|
|
453
|
-
return retVal;
|
|
454
|
-
};
|
|
455
|
-
const de_GetStatementResultResponse = (output, context) => {
|
|
456
|
-
return take(output, {
|
|
457
|
-
ColumnMetadata: _json,
|
|
458
|
-
NextToken: __expectString,
|
|
459
|
-
Records: (_) => de_SqlRecords(_, context),
|
|
460
|
-
TotalNumRows: __expectLong,
|
|
461
|
-
});
|
|
462
|
-
};
|
|
463
|
-
const de_ListStatementsResponse = (output, context) => {
|
|
464
|
-
return take(output, {
|
|
465
|
-
NextToken: __expectString,
|
|
466
|
-
Statements: (_) => de_StatementList(_, context),
|
|
467
|
-
});
|
|
468
|
-
};
|
|
469
|
-
const de_SqlRecords = (output, context) => {
|
|
470
|
-
const retVal = (output || [])
|
|
471
|
-
.filter((e) => e != null)
|
|
472
|
-
.map((entry) => {
|
|
473
|
-
return de_FieldList(entry, context);
|
|
474
|
-
});
|
|
475
|
-
return retVal;
|
|
476
|
-
};
|
|
477
|
-
const de_StatementData = (output, context) => {
|
|
478
|
-
return take(output, {
|
|
479
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
480
|
-
Id: __expectString,
|
|
481
|
-
IsBatchStatement: __expectBoolean,
|
|
482
|
-
QueryParameters: _json,
|
|
483
|
-
QueryString: __expectString,
|
|
484
|
-
QueryStrings: _json,
|
|
485
|
-
ResultFormat: __expectString,
|
|
486
|
-
SecretArn: __expectString,
|
|
487
|
-
SessionId: __expectString,
|
|
488
|
-
StatementName: __expectString,
|
|
489
|
-
Status: __expectString,
|
|
490
|
-
UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
491
|
-
});
|
|
492
|
-
};
|
|
493
|
-
const de_StatementList = (output, context) => {
|
|
494
|
-
const retVal = (output || [])
|
|
495
|
-
.filter((e) => e != null)
|
|
496
|
-
.map((entry) => {
|
|
497
|
-
return de_StatementData(entry, context);
|
|
498
|
-
});
|
|
499
|
-
return retVal;
|
|
500
|
-
};
|
|
501
|
-
const de_SubStatementData = (output, context) => {
|
|
502
|
-
return take(output, {
|
|
503
|
-
CreatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
504
|
-
Duration: __expectLong,
|
|
505
|
-
Error: __expectString,
|
|
506
|
-
HasResultSet: __expectBoolean,
|
|
507
|
-
Id: __expectString,
|
|
508
|
-
QueryString: __expectString,
|
|
509
|
-
RedshiftQueryId: __expectLong,
|
|
510
|
-
ResultRows: __expectLong,
|
|
511
|
-
ResultSize: __expectLong,
|
|
512
|
-
Status: __expectString,
|
|
513
|
-
UpdatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
|
|
514
|
-
});
|
|
515
|
-
};
|
|
516
|
-
const de_SubStatementList = (output, context) => {
|
|
517
|
-
const retVal = (output || [])
|
|
518
|
-
.filter((e) => e != null)
|
|
519
|
-
.map((entry) => {
|
|
520
|
-
return de_SubStatementData(entry, context);
|
|
521
|
-
});
|
|
522
|
-
return retVal;
|
|
523
|
-
};
|
|
524
|
-
const deserializeMetadata = (output) => ({
|
|
525
|
-
httpStatusCode: output.statusCode,
|
|
526
|
-
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
527
|
-
extendedRequestId: output.headers["x-amz-id-2"],
|
|
528
|
-
cfId: output.headers["x-amz-cf-id"],
|
|
529
|
-
});
|
|
530
|
-
const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
|
|
531
|
-
const throwDefaultError = withBaseException(__BaseException);
|
|
532
|
-
const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
|
|
533
|
-
const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
|
|
534
|
-
const contents = {
|
|
535
|
-
protocol,
|
|
536
|
-
hostname,
|
|
537
|
-
port,
|
|
538
|
-
method: "POST",
|
|
539
|
-
path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
|
|
540
|
-
headers,
|
|
541
|
-
};
|
|
542
|
-
if (resolvedHostname !== undefined) {
|
|
543
|
-
contents.hostname = resolvedHostname;
|
|
544
|
-
}
|
|
545
|
-
if (body !== undefined) {
|
|
546
|
-
contents.body = body;
|
|
547
|
-
}
|
|
548
|
-
return new __HttpRequest(contents);
|
|
549
|
-
};
|
|
550
|
-
function sharedHeaders(operation) {
|
|
551
|
-
return {
|
|
552
|
-
"content-type": "application/x-amz-json-1.1",
|
|
553
|
-
"x-amz-target": `RedshiftData.${operation}`,
|
|
554
|
-
};
|
|
555
|
-
}
|