@aws-sdk/client-rds-data 3.76.0 → 3.77.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/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.77.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.76.0...v3.77.0) (2022-04-25)
7
+
8
+
9
+ ### Features
10
+
11
+ * **client-rds-data:** Support to receive SQL query results in the form of a simplified JSON string. This enables developers using the new JSON string format to more easily convert it to an object using popular JSON string parsing libraries. ([7b173c3](https://github.com/aws/aws-sdk-js-v3/commit/7b173c3414e96ffb0f155b7deeb8c70295cc0f45))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.76.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.75.0...v3.76.0) (2022-04-22)
7
18
 
8
19
  **Note:** Version bump only for package @aws-sdk/client-rds-data
package/README.md CHANGED
@@ -12,8 +12,9 @@ AWS SDK for JavaScript RDSData Client for Node.js, Browser and React Native.
12
12
  <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora
13
13
  Serverless DB cluster. To run these statements, you work with the Data Service
14
14
  API.</p>
15
- <p>For more information about the Data Service API, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API for Aurora
16
- Serverless</a> in the <i>Amazon Aurora User Guide</i>.</p>
15
+ <p>For more information about the Data Service API, see
16
+ <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
17
+ in the <i>Amazon Aurora User Guide</i>.</p>
17
18
 
18
19
  ## Installing
19
20
 
@@ -1,7 +1,20 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExecuteSqlResponse = exports.SqlStatementResult = exports.ResultFrame = exports.ExecuteStatementResponse = exports._Record = exports.BatchExecuteStatementResponse = exports.BatchExecuteStatementRequest = exports.StructValue = exports.ExecuteStatementRequest = exports.Value = exports.UpdateResult = exports.SqlParameter = exports.Field = exports.ArrayValue = exports.RollbackTransactionResponse = exports.RollbackTransactionRequest = exports.ResultSetOptions = exports.ResultSetMetadata = exports.ExecuteSqlRequest = exports.DecimalReturnType = exports.NotFoundException = exports.CommitTransactionResponse = exports.CommitTransactionRequest = exports.ColumnMetadata = exports.BeginTransactionResponse = exports.BeginTransactionRequest = exports.StatementTimeoutException = exports.ServiceUnavailableError = exports.InternalServerErrorException = exports.ForbiddenException = exports.TypeHint = exports.BadRequestException = void 0;
3
+ exports.ExecuteSqlResponse = exports.SqlStatementResult = exports.ResultFrame = exports.ExecuteStatementResponse = exports._Record = exports.BatchExecuteStatementResponse = exports.BatchExecuteStatementRequest = exports.StructValue = exports.ExecuteStatementRequest = exports.Value = exports.UpdateResult = exports.SqlParameter = exports.Field = exports.ArrayValue = exports.RollbackTransactionResponse = exports.RollbackTransactionRequest = exports.ResultSetOptions = exports.LongReturnType = exports.RecordsFormatType = exports.ResultSetMetadata = exports.ExecuteSqlRequest = exports.DecimalReturnType = exports.NotFoundException = exports.CommitTransactionResponse = exports.CommitTransactionRequest = exports.ColumnMetadata = exports.BeginTransactionResponse = exports.BeginTransactionRequest = exports.StatementTimeoutException = exports.ServiceUnavailableError = exports.InternalServerErrorException = exports.ForbiddenException = exports.TypeHint = exports.BadRequestException = exports.AccessDeniedException = void 0;
4
4
  const RDSDataServiceException_1 = require("./RDSDataServiceException");
5
+ class AccessDeniedException extends RDSDataServiceException_1.RDSDataServiceException {
6
+ constructor(opts) {
7
+ super({
8
+ name: "AccessDeniedException",
9
+ $fault: "client",
10
+ ...opts,
11
+ });
12
+ this.name = "AccessDeniedException";
13
+ this.$fault = "client";
14
+ Object.setPrototypeOf(this, AccessDeniedException.prototype);
15
+ }
16
+ }
17
+ exports.AccessDeniedException = AccessDeniedException;
5
18
  class BadRequestException extends RDSDataServiceException_1.RDSDataServiceException {
6
19
  constructor(opts) {
7
20
  super({
@@ -137,6 +150,16 @@ var ResultSetMetadata;
137
150
  ...obj,
138
151
  });
139
152
  })(ResultSetMetadata = exports.ResultSetMetadata || (exports.ResultSetMetadata = {}));
153
+ var RecordsFormatType;
154
+ (function (RecordsFormatType) {
155
+ RecordsFormatType["JSON"] = "JSON";
156
+ RecordsFormatType["NONE"] = "NONE";
157
+ })(RecordsFormatType = exports.RecordsFormatType || (exports.RecordsFormatType = {}));
158
+ var LongReturnType;
159
+ (function (LongReturnType) {
160
+ LongReturnType["LONG"] = "LONG";
161
+ LongReturnType["STRING"] = "STRING";
162
+ })(LongReturnType = exports.LongReturnType || (exports.LongReturnType = {}));
140
163
  var ResultSetOptions;
141
164
  (function (ResultSetOptions) {
142
165
  ResultSetOptions.filterSensitiveLog = (obj) => ({
@@ -120,6 +120,8 @@ const serializeAws_restJson1ExecuteStatementCommand = async (input, context) =>
120
120
  ...(input.continueAfterTimeout !== undefined &&
121
121
  input.continueAfterTimeout !== null && { continueAfterTimeout: input.continueAfterTimeout }),
122
122
  ...(input.database !== undefined && input.database !== null && { database: input.database }),
123
+ ...(input.formatRecordsAs !== undefined &&
124
+ input.formatRecordsAs !== null && { formatRecordsAs: input.formatRecordsAs }),
123
125
  ...(input.includeResultMetadata !== undefined &&
124
126
  input.includeResultMetadata !== null && { includeResultMetadata: input.includeResultMetadata }),
125
127
  ...(input.parameters !== undefined &&
@@ -192,6 +194,9 @@ const deserializeAws_restJson1BatchExecuteStatementCommandError = async (output,
192
194
  let errorCode = "UnknownError";
193
195
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
194
196
  switch (errorCode) {
197
+ case "AccessDeniedException":
198
+ case "com.amazonaws.rdsdata#AccessDeniedException":
199
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
195
200
  case "BadRequestException":
196
201
  case "com.amazonaws.rdsdata#BadRequestException":
197
202
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -241,6 +246,9 @@ const deserializeAws_restJson1BeginTransactionCommandError = async (output, cont
241
246
  let errorCode = "UnknownError";
242
247
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
243
248
  switch (errorCode) {
249
+ case "AccessDeniedException":
250
+ case "com.amazonaws.rdsdata#AccessDeniedException":
251
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
244
252
  case "BadRequestException":
245
253
  case "com.amazonaws.rdsdata#BadRequestException":
246
254
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -290,6 +298,9 @@ const deserializeAws_restJson1CommitTransactionCommandError = async (output, con
290
298
  let errorCode = "UnknownError";
291
299
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
292
300
  switch (errorCode) {
301
+ case "AccessDeniedException":
302
+ case "com.amazonaws.rdsdata#AccessDeniedException":
303
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
293
304
  case "BadRequestException":
294
305
  case "com.amazonaws.rdsdata#BadRequestException":
295
306
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -342,6 +353,9 @@ const deserializeAws_restJson1ExecuteSqlCommandError = async (output, context) =
342
353
  let errorCode = "UnknownError";
343
354
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
344
355
  switch (errorCode) {
356
+ case "AccessDeniedException":
357
+ case "com.amazonaws.rdsdata#AccessDeniedException":
358
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
345
359
  case "BadRequestException":
346
360
  case "com.amazonaws.rdsdata#BadRequestException":
347
361
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -371,6 +385,7 @@ const deserializeAws_restJson1ExecuteStatementCommand = async (output, context)
371
385
  const contents = {
372
386
  $metadata: deserializeMetadata(output),
373
387
  columnMetadata: undefined,
388
+ formattedRecords: undefined,
374
389
  generatedFields: undefined,
375
390
  numberOfRecordsUpdated: undefined,
376
391
  records: undefined,
@@ -379,6 +394,9 @@ const deserializeAws_restJson1ExecuteStatementCommand = async (output, context)
379
394
  if (data.columnMetadata !== undefined && data.columnMetadata !== null) {
380
395
  contents.columnMetadata = deserializeAws_restJson1Metadata(data.columnMetadata, context);
381
396
  }
397
+ if (data.formattedRecords !== undefined && data.formattedRecords !== null) {
398
+ contents.formattedRecords = (0, smithy_client_1.expectString)(data.formattedRecords);
399
+ }
382
400
  if (data.generatedFields !== undefined && data.generatedFields !== null) {
383
401
  contents.generatedFields = deserializeAws_restJson1FieldList(data.generatedFields, context);
384
402
  }
@@ -400,6 +418,9 @@ const deserializeAws_restJson1ExecuteStatementCommandError = async (output, cont
400
418
  let errorCode = "UnknownError";
401
419
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
402
420
  switch (errorCode) {
421
+ case "AccessDeniedException":
422
+ case "com.amazonaws.rdsdata#AccessDeniedException":
423
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
403
424
  case "BadRequestException":
404
425
  case "com.amazonaws.rdsdata#BadRequestException":
405
426
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -449,6 +470,9 @@ const deserializeAws_restJson1RollbackTransactionCommandError = async (output, c
449
470
  let errorCode = "UnknownError";
450
471
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
451
472
  switch (errorCode) {
473
+ case "AccessDeniedException":
474
+ case "com.amazonaws.rdsdata#AccessDeniedException":
475
+ throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
452
476
  case "BadRequestException":
453
477
  case "com.amazonaws.rdsdata#BadRequestException":
454
478
  throw await deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context);
@@ -477,6 +501,18 @@ const deserializeAws_restJson1RollbackTransactionCommandError = async (output, c
477
501
  throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
478
502
  }
479
503
  };
504
+ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
505
+ const contents = {};
506
+ const data = parsedOutput.body;
507
+ if (data.message !== undefined && data.message !== null) {
508
+ contents.message = (0, smithy_client_1.expectString)(data.message);
509
+ }
510
+ const exception = new models_0_1.AccessDeniedException({
511
+ $metadata: deserializeMetadata(parsedOutput),
512
+ ...contents,
513
+ });
514
+ return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
515
+ };
480
516
  const deserializeAws_restJson1BadRequestExceptionResponse = async (parsedOutput, context) => {
481
517
  const contents = {};
482
518
  const data = parsedOutput.body;
@@ -612,6 +648,8 @@ const serializeAws_restJson1ResultSetOptions = (input, context) => {
612
648
  return {
613
649
  ...(input.decimalReturnType !== undefined &&
614
650
  input.decimalReturnType !== null && { decimalReturnType: input.decimalReturnType }),
651
+ ...(input.longReturnType !== undefined &&
652
+ input.longReturnType !== null && { longReturnType: input.longReturnType }),
615
653
  };
616
654
  };
617
655
  const serializeAws_restJson1SqlParameter = (input, context) => {
@@ -1,5 +1,17 @@
1
1
  import { __assign, __extends } from "tslib";
2
2
  import { RDSDataServiceException as __BaseException } from "./RDSDataServiceException";
3
+ var AccessDeniedException = (function (_super) {
4
+ __extends(AccessDeniedException, _super);
5
+ function AccessDeniedException(opts) {
6
+ var _this = _super.call(this, __assign({ name: "AccessDeniedException", $fault: "client" }, opts)) || this;
7
+ _this.name = "AccessDeniedException";
8
+ _this.$fault = "client";
9
+ Object.setPrototypeOf(_this, AccessDeniedException.prototype);
10
+ return _this;
11
+ }
12
+ return AccessDeniedException;
13
+ }(__BaseException));
14
+ export { AccessDeniedException };
3
15
  var BadRequestException = (function (_super) {
4
16
  __extends(BadRequestException, _super);
5
17
  function BadRequestException(opts) {
@@ -115,6 +127,16 @@ export var ResultSetMetadata;
115
127
  (function (ResultSetMetadata) {
116
128
  ResultSetMetadata.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
117
129
  })(ResultSetMetadata || (ResultSetMetadata = {}));
130
+ export var RecordsFormatType;
131
+ (function (RecordsFormatType) {
132
+ RecordsFormatType["JSON"] = "JSON";
133
+ RecordsFormatType["NONE"] = "NONE";
134
+ })(RecordsFormatType || (RecordsFormatType = {}));
135
+ export var LongReturnType;
136
+ (function (LongReturnType) {
137
+ LongReturnType["LONG"] = "LONG";
138
+ LongReturnType["STRING"] = "STRING";
139
+ })(LongReturnType || (LongReturnType = {}));
118
140
  export var ResultSetOptions;
119
141
  (function (ResultSetOptions) {
120
142
  ResultSetOptions.filterSensitiveLog = function (obj) { return (__assign({}, obj)); };
@@ -1,7 +1,7 @@
1
1
  import { __assign, __awaiter, __generator } from "tslib";
2
2
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
3
3
  import { decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectObject as __expectObject, expectString as __expectString, expectUnion as __expectUnion, limitedParseDouble as __limitedParseDouble, limitedParseFloat32 as __limitedParseFloat32, serializeFloat as __serializeFloat, } from "@aws-sdk/smithy-client";
4
- import { ArrayValue, BadRequestException, Field, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableError, StatementTimeoutException, } from "../models/models_0";
4
+ import { AccessDeniedException, ArrayValue, BadRequestException, Field, ForbiddenException, InternalServerErrorException, NotFoundException, ServiceUnavailableError, StatementTimeoutException, } from "../models/models_0";
5
5
  import { RDSDataServiceException as __BaseException } from "../models/RDSDataServiceException";
6
6
  export var serializeAws_restJson1BatchExecuteStatementCommand = function (input, context) { return __awaiter(void 0, void 0, void 0, function () {
7
7
  var _a, hostname, _b, protocol, port, basePath, headers, resolvedPath, body;
@@ -115,8 +115,9 @@ export var serializeAws_restJson1ExecuteStatementCommand = function (input, cont
115
115
  "content-type": "application/json",
116
116
  };
117
117
  resolvedPath = "".concat((basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || "") + "/Execute";
118
- body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.continueAfterTimeout !== undefined &&
119
- input.continueAfterTimeout !== null && { continueAfterTimeout: input.continueAfterTimeout })), (input.database !== undefined && input.database !== null && { database: input.database })), (input.includeResultMetadata !== undefined &&
118
+ body = JSON.stringify(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign(__assign({}, (input.continueAfterTimeout !== undefined &&
119
+ input.continueAfterTimeout !== null && { continueAfterTimeout: input.continueAfterTimeout })), (input.database !== undefined && input.database !== null && { database: input.database })), (input.formatRecordsAs !== undefined &&
120
+ input.formatRecordsAs !== null && { formatRecordsAs: input.formatRecordsAs })), (input.includeResultMetadata !== undefined &&
120
121
  input.includeResultMetadata !== null && { includeResultMetadata: input.includeResultMetadata })), (input.parameters !== undefined &&
121
122
  input.parameters !== null && { parameters: serializeAws_restJson1SqlParametersList(input.parameters, context) })), (input.resourceArn !== undefined && input.resourceArn !== null && { resourceArn: input.resourceArn })), (input.resultSetOptions !== undefined &&
122
123
  input.resultSetOptions !== null && {
@@ -197,29 +198,33 @@ var deserializeAws_restJson1BatchExecuteStatementCommandError = function (output
197
198
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
198
199
  _b = errorCode;
199
200
  switch (_b) {
200
- case "BadRequestException": return [3, 2];
201
- case "com.amazonaws.rdsdata#BadRequestException": return [3, 2];
202
- case "ForbiddenException": return [3, 4];
203
- case "com.amazonaws.rdsdata#ForbiddenException": return [3, 4];
204
- case "InternalServerErrorException": return [3, 6];
205
- case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 6];
206
- case "ServiceUnavailableError": return [3, 8];
207
- case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 8];
208
- case "StatementTimeoutException": return [3, 10];
209
- case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 10];
201
+ case "AccessDeniedException": return [3, 2];
202
+ case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
203
+ case "BadRequestException": return [3, 4];
204
+ case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
205
+ case "ForbiddenException": return [3, 6];
206
+ case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
207
+ case "InternalServerErrorException": return [3, 8];
208
+ case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
209
+ case "ServiceUnavailableError": return [3, 10];
210
+ case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
211
+ case "StatementTimeoutException": return [3, 12];
212
+ case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
210
213
  }
211
- return [3, 12];
212
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
214
+ return [3, 14];
215
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
213
216
  case 3: throw _d.sent();
214
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
217
+ case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
215
218
  case 5: throw _d.sent();
216
- case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
219
+ case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
217
220
  case 7: throw _d.sent();
218
- case 8: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
221
+ case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
219
222
  case 9: throw _d.sent();
220
- case 10: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
223
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
221
224
  case 11: throw _d.sent();
222
- case 12:
225
+ case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
226
+ case 13: throw _d.sent();
227
+ case 14:
223
228
  parsedBody = parsedOutput.body;
224
229
  response = new __BaseException({
225
230
  name: parsedBody.code || parsedBody.Code || errorCode,
@@ -269,29 +274,33 @@ var deserializeAws_restJson1BeginTransactionCommandError = function (output, con
269
274
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
270
275
  _b = errorCode;
271
276
  switch (_b) {
272
- case "BadRequestException": return [3, 2];
273
- case "com.amazonaws.rdsdata#BadRequestException": return [3, 2];
274
- case "ForbiddenException": return [3, 4];
275
- case "com.amazonaws.rdsdata#ForbiddenException": return [3, 4];
276
- case "InternalServerErrorException": return [3, 6];
277
- case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 6];
278
- case "ServiceUnavailableError": return [3, 8];
279
- case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 8];
280
- case "StatementTimeoutException": return [3, 10];
281
- case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 10];
277
+ case "AccessDeniedException": return [3, 2];
278
+ case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
279
+ case "BadRequestException": return [3, 4];
280
+ case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
281
+ case "ForbiddenException": return [3, 6];
282
+ case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
283
+ case "InternalServerErrorException": return [3, 8];
284
+ case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
285
+ case "ServiceUnavailableError": return [3, 10];
286
+ case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
287
+ case "StatementTimeoutException": return [3, 12];
288
+ case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
282
289
  }
283
- return [3, 12];
284
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
290
+ return [3, 14];
291
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
285
292
  case 3: throw _d.sent();
286
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
293
+ case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
287
294
  case 5: throw _d.sent();
288
- case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
295
+ case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
289
296
  case 7: throw _d.sent();
290
- case 8: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
297
+ case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
291
298
  case 9: throw _d.sent();
292
- case 10: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
299
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
293
300
  case 11: throw _d.sent();
294
- case 12:
301
+ case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
302
+ case 13: throw _d.sent();
303
+ case 14:
295
304
  parsedBody = parsedOutput.body;
296
305
  response = new __BaseException({
297
306
  name: parsedBody.code || parsedBody.Code || errorCode,
@@ -341,33 +350,37 @@ var deserializeAws_restJson1CommitTransactionCommandError = function (output, co
341
350
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
342
351
  _b = errorCode;
343
352
  switch (_b) {
344
- case "BadRequestException": return [3, 2];
345
- case "com.amazonaws.rdsdata#BadRequestException": return [3, 2];
346
- case "ForbiddenException": return [3, 4];
347
- case "com.amazonaws.rdsdata#ForbiddenException": return [3, 4];
348
- case "InternalServerErrorException": return [3, 6];
349
- case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 6];
350
- case "NotFoundException": return [3, 8];
351
- case "com.amazonaws.rdsdata#NotFoundException": return [3, 8];
352
- case "ServiceUnavailableError": return [3, 10];
353
- case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
354
- case "StatementTimeoutException": return [3, 12];
355
- case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
353
+ case "AccessDeniedException": return [3, 2];
354
+ case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
355
+ case "BadRequestException": return [3, 4];
356
+ case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
357
+ case "ForbiddenException": return [3, 6];
358
+ case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
359
+ case "InternalServerErrorException": return [3, 8];
360
+ case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
361
+ case "NotFoundException": return [3, 10];
362
+ case "com.amazonaws.rdsdata#NotFoundException": return [3, 10];
363
+ case "ServiceUnavailableError": return [3, 12];
364
+ case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 12];
365
+ case "StatementTimeoutException": return [3, 14];
366
+ case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 14];
356
367
  }
357
- return [3, 14];
358
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
368
+ return [3, 16];
369
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
359
370
  case 3: throw _d.sent();
360
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
371
+ case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
361
372
  case 5: throw _d.sent();
362
- case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
373
+ case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
363
374
  case 7: throw _d.sent();
364
- case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
375
+ case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
365
376
  case 9: throw _d.sent();
366
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
377
+ case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
367
378
  case 11: throw _d.sent();
368
- case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
379
+ case 12: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
369
380
  case 13: throw _d.sent();
370
- case 14:
381
+ case 14: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
382
+ case 15: throw _d.sent();
383
+ case 16:
371
384
  parsedBody = parsedOutput.body;
372
385
  response = new __BaseException({
373
386
  name: parsedBody.code || parsedBody.Code || errorCode,
@@ -417,25 +430,29 @@ var deserializeAws_restJson1ExecuteSqlCommandError = function (output, context)
417
430
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
418
431
  _b = errorCode;
419
432
  switch (_b) {
420
- case "BadRequestException": return [3, 2];
421
- case "com.amazonaws.rdsdata#BadRequestException": return [3, 2];
422
- case "ForbiddenException": return [3, 4];
423
- case "com.amazonaws.rdsdata#ForbiddenException": return [3, 4];
424
- case "InternalServerErrorException": return [3, 6];
425
- case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 6];
426
- case "ServiceUnavailableError": return [3, 8];
427
- case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 8];
433
+ case "AccessDeniedException": return [3, 2];
434
+ case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
435
+ case "BadRequestException": return [3, 4];
436
+ case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
437
+ case "ForbiddenException": return [3, 6];
438
+ case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
439
+ case "InternalServerErrorException": return [3, 8];
440
+ case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
441
+ case "ServiceUnavailableError": return [3, 10];
442
+ case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
428
443
  }
429
- return [3, 10];
430
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
444
+ return [3, 12];
445
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
431
446
  case 3: throw _d.sent();
432
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
447
+ case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
433
448
  case 5: throw _d.sent();
434
- case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
449
+ case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
435
450
  case 7: throw _d.sent();
436
- case 8: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
451
+ case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
437
452
  case 9: throw _d.sent();
438
- case 10:
453
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
454
+ case 11: throw _d.sent();
455
+ case 12:
439
456
  parsedBody = parsedOutput.body;
440
457
  response = new __BaseException({
441
458
  name: parsedBody.code || parsedBody.Code || errorCode,
@@ -457,6 +474,7 @@ export var deserializeAws_restJson1ExecuteStatementCommand = function (output, c
457
474
  contents = {
458
475
  $metadata: deserializeMetadata(output),
459
476
  columnMetadata: undefined,
477
+ formattedRecords: undefined,
460
478
  generatedFields: undefined,
461
479
  numberOfRecordsUpdated: undefined,
462
480
  records: undefined,
@@ -469,6 +487,9 @@ export var deserializeAws_restJson1ExecuteStatementCommand = function (output, c
469
487
  if (data.columnMetadata !== undefined && data.columnMetadata !== null) {
470
488
  contents.columnMetadata = deserializeAws_restJson1Metadata(data.columnMetadata, context);
471
489
  }
490
+ if (data.formattedRecords !== undefined && data.formattedRecords !== null) {
491
+ contents.formattedRecords = __expectString(data.formattedRecords);
492
+ }
472
493
  if (data.generatedFields !== undefined && data.generatedFields !== null) {
473
494
  contents.generatedFields = deserializeAws_restJson1FieldList(data.generatedFields, context);
474
495
  }
@@ -497,29 +518,33 @@ var deserializeAws_restJson1ExecuteStatementCommandError = function (output, con
497
518
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
498
519
  _b = errorCode;
499
520
  switch (_b) {
500
- case "BadRequestException": return [3, 2];
501
- case "com.amazonaws.rdsdata#BadRequestException": return [3, 2];
502
- case "ForbiddenException": return [3, 4];
503
- case "com.amazonaws.rdsdata#ForbiddenException": return [3, 4];
504
- case "InternalServerErrorException": return [3, 6];
505
- case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 6];
506
- case "ServiceUnavailableError": return [3, 8];
507
- case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 8];
508
- case "StatementTimeoutException": return [3, 10];
509
- case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 10];
521
+ case "AccessDeniedException": return [3, 2];
522
+ case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
523
+ case "BadRequestException": return [3, 4];
524
+ case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
525
+ case "ForbiddenException": return [3, 6];
526
+ case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
527
+ case "InternalServerErrorException": return [3, 8];
528
+ case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
529
+ case "ServiceUnavailableError": return [3, 10];
530
+ case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
531
+ case "StatementTimeoutException": return [3, 12];
532
+ case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
510
533
  }
511
- return [3, 12];
512
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
534
+ return [3, 14];
535
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
513
536
  case 3: throw _d.sent();
514
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
537
+ case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
515
538
  case 5: throw _d.sent();
516
- case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
539
+ case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
517
540
  case 7: throw _d.sent();
518
- case 8: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
541
+ case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
519
542
  case 9: throw _d.sent();
520
- case 10: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
543
+ case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
521
544
  case 11: throw _d.sent();
522
- case 12:
545
+ case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
546
+ case 13: throw _d.sent();
547
+ case 14:
523
548
  parsedBody = parsedOutput.body;
524
549
  response = new __BaseException({
525
550
  name: parsedBody.code || parsedBody.Code || errorCode,
@@ -569,33 +594,37 @@ var deserializeAws_restJson1RollbackTransactionCommandError = function (output,
569
594
  errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
570
595
  _b = errorCode;
571
596
  switch (_b) {
572
- case "BadRequestException": return [3, 2];
573
- case "com.amazonaws.rdsdata#BadRequestException": return [3, 2];
574
- case "ForbiddenException": return [3, 4];
575
- case "com.amazonaws.rdsdata#ForbiddenException": return [3, 4];
576
- case "InternalServerErrorException": return [3, 6];
577
- case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 6];
578
- case "NotFoundException": return [3, 8];
579
- case "com.amazonaws.rdsdata#NotFoundException": return [3, 8];
580
- case "ServiceUnavailableError": return [3, 10];
581
- case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 10];
582
- case "StatementTimeoutException": return [3, 12];
583
- case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 12];
597
+ case "AccessDeniedException": return [3, 2];
598
+ case "com.amazonaws.rdsdata#AccessDeniedException": return [3, 2];
599
+ case "BadRequestException": return [3, 4];
600
+ case "com.amazonaws.rdsdata#BadRequestException": return [3, 4];
601
+ case "ForbiddenException": return [3, 6];
602
+ case "com.amazonaws.rdsdata#ForbiddenException": return [3, 6];
603
+ case "InternalServerErrorException": return [3, 8];
604
+ case "com.amazonaws.rdsdata#InternalServerErrorException": return [3, 8];
605
+ case "NotFoundException": return [3, 10];
606
+ case "com.amazonaws.rdsdata#NotFoundException": return [3, 10];
607
+ case "ServiceUnavailableError": return [3, 12];
608
+ case "com.amazonaws.rdsdata#ServiceUnavailableError": return [3, 12];
609
+ case "StatementTimeoutException": return [3, 14];
610
+ case "com.amazonaws.rdsdata#StatementTimeoutException": return [3, 14];
584
611
  }
585
- return [3, 14];
586
- case 2: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
612
+ return [3, 16];
613
+ case 2: return [4, deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context)];
587
614
  case 3: throw _d.sent();
588
- case 4: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
615
+ case 4: return [4, deserializeAws_restJson1BadRequestExceptionResponse(parsedOutput, context)];
589
616
  case 5: throw _d.sent();
590
- case 6: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
617
+ case 6: return [4, deserializeAws_restJson1ForbiddenExceptionResponse(parsedOutput, context)];
591
618
  case 7: throw _d.sent();
592
- case 8: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
619
+ case 8: return [4, deserializeAws_restJson1InternalServerErrorExceptionResponse(parsedOutput, context)];
593
620
  case 9: throw _d.sent();
594
- case 10: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
621
+ case 10: return [4, deserializeAws_restJson1NotFoundExceptionResponse(parsedOutput, context)];
595
622
  case 11: throw _d.sent();
596
- case 12: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
623
+ case 12: return [4, deserializeAws_restJson1ServiceUnavailableErrorResponse(parsedOutput, context)];
597
624
  case 13: throw _d.sent();
598
- case 14:
625
+ case 14: return [4, deserializeAws_restJson1StatementTimeoutExceptionResponse(parsedOutput, context)];
626
+ case 15: throw _d.sent();
627
+ case 16:
599
628
  parsedBody = parsedOutput.body;
600
629
  response = new __BaseException({
601
630
  name: parsedBody.code || parsedBody.Code || errorCode,
@@ -606,6 +635,18 @@ var deserializeAws_restJson1RollbackTransactionCommandError = function (output,
606
635
  }
607
636
  });
608
637
  }); };
638
+ var deserializeAws_restJson1AccessDeniedExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
639
+ var contents, data, exception;
640
+ return __generator(this, function (_a) {
641
+ contents = {};
642
+ data = parsedOutput.body;
643
+ if (data.message !== undefined && data.message !== null) {
644
+ contents.message = __expectString(data.message);
645
+ }
646
+ exception = new AccessDeniedException(__assign({ $metadata: deserializeMetadata(parsedOutput) }, contents));
647
+ return [2, __decorateServiceException(exception, parsedOutput.body)];
648
+ });
649
+ }); };
609
650
  var deserializeAws_restJson1BadRequestExceptionResponse = function (parsedOutput, context) { return __awaiter(void 0, void 0, void 0, function () {
610
651
  var contents, data, exception;
611
652
  return __generator(this, function (_a) {
@@ -738,8 +779,9 @@ var serializeAws_restJson1LongArray = function (input, context) {
738
779
  });
739
780
  };
740
781
  var serializeAws_restJson1ResultSetOptions = function (input, context) {
741
- return __assign({}, (input.decimalReturnType !== undefined &&
742
- input.decimalReturnType !== null && { decimalReturnType: input.decimalReturnType }));
782
+ return __assign(__assign({}, (input.decimalReturnType !== undefined &&
783
+ input.decimalReturnType !== null && { decimalReturnType: input.decimalReturnType })), (input.longReturnType !== undefined &&
784
+ input.longReturnType !== null && { longReturnType: input.longReturnType }));
743
785
  };
744
786
  var serializeAws_restJson1SqlParameter = function (input, context) {
745
787
  return __assign(__assign(__assign({}, (input.name !== undefined && input.name !== null && { name: input.name })), (input.typeHint !== undefined && input.typeHint !== null && { typeHint: input.typeHint })), (input.value !== undefined &&
@@ -11,8 +11,9 @@ import { RDSDataClient } from "./RDSDataClient";
11
11
  * <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora
12
12
  * Serverless DB cluster. To run these statements, you work with the Data Service
13
13
  * API.</p>
14
- * <p>For more information about the Data Service API, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API for Aurora
15
- * Serverless</a> in the <i>Amazon Aurora User Guide</i>.</p>
14
+ * <p>For more information about the Data Service API, see
15
+ * <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
16
+ * in the <i>Amazon Aurora User Guide</i>.</p>
16
17
  */
17
18
  export declare class RDSData extends RDSDataClient {
18
19
  /**
@@ -72,7 +73,7 @@ export declare class RDSData extends RDSDataClient {
72
73
  * <code>transactionID</code> parameter, changes that result from the call are
73
74
  * committed automatically.</p>
74
75
  * </important>
75
- * <p>The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.</p>
76
+ * <p>If the binary response data from the database is more than 1 MB, the call is terminated.</p>
76
77
  */
77
78
  executeStatement(args: ExecuteStatementCommandInput, options?: __HttpHandlerOptions): Promise<ExecuteStatementCommandOutput>;
78
79
  executeStatement(args: ExecuteStatementCommandInput, cb: (err: any, data?: ExecuteStatementCommandOutput) => void): void;
@@ -136,8 +136,9 @@ export interface RDSDataClientResolvedConfig extends RDSDataClientResolvedConfig
136
136
  * <p>Amazon RDS provides an HTTP endpoint to run SQL statements on an Amazon Aurora
137
137
  * Serverless DB cluster. To run these statements, you work with the Data Service
138
138
  * API.</p>
139
- * <p>For more information about the Data Service API, see <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API for Aurora
140
- * Serverless</a> in the <i>Amazon Aurora User Guide</i>.</p>
139
+ * <p>For more information about the Data Service API, see
140
+ * <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
141
+ * in the <i>Amazon Aurora User Guide</i>.</p>
141
142
  */
142
143
  export declare class RDSDataClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, RDSDataClientResolvedConfig> {
143
144
  /**
@@ -13,7 +13,7 @@ export interface ExecuteStatementCommandOutput extends ExecuteStatementResponse,
13
13
  * <code>transactionID</code> parameter, changes that result from the call are
14
14
  * committed automatically.</p>
15
15
  * </important>
16
- * <p>The response size limit is 1 MB. If the call returns more than 1 MB of response data, the call is terminated.</p>
16
+ * <p>If the binary response data from the database is more than 1 MB, the call is terminated.</p>
17
17
  * @example
18
18
  * Use a bare-bones client and the command you need to make an API call.
19
19
  * ```javascript
@@ -1,5 +1,16 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { RDSDataServiceException as __BaseException } from "./RDSDataServiceException";
3
+ /**
4
+ * <p>You do not have sufficient access to perform this action.</p>
5
+ */
6
+ export declare class AccessDeniedException extends __BaseException {
7
+ readonly name: "AccessDeniedException";
8
+ readonly $fault: "client";
9
+ /**
10
+ * @internal
11
+ */
12
+ constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
13
+ }
3
14
  /**
4
15
  * <p>There is an error in the call or in a SQL statement.</p>
5
16
  */
@@ -286,6 +297,14 @@ export declare namespace ResultSetMetadata {
286
297
  */
287
298
  const filterSensitiveLog: (obj: ResultSetMetadata) => any;
288
299
  }
300
+ export declare enum RecordsFormatType {
301
+ JSON = "JSON",
302
+ NONE = "NONE"
303
+ }
304
+ export declare enum LongReturnType {
305
+ LONG = "LONG",
306
+ STRING = "STRING"
307
+ }
289
308
  /**
290
309
  * <p>Options that control how the result set is returned.</p>
291
310
  */
@@ -302,6 +321,14 @@ export interface ResultSetOptions {
302
321
  * </important>
303
322
  */
304
323
  decimalReturnType?: DecimalReturnType | string;
324
+ /**
325
+ * <p>A value that indicates how a field of <code>LONG</code> type is represented.
326
+ * Allowed values are <code>LONG</code> and <code>STRING</code>. The default
327
+ * is <code>LONG</code>. Specify <code>STRING</code> if the length or
328
+ * precision of numeric values might cause truncation or rounding errors.
329
+ * </p>
330
+ */
331
+ longReturnType?: LongReturnType | string;
305
332
  }
306
333
  export declare namespace ResultSetOptions {
307
334
  /**
@@ -366,7 +393,7 @@ export declare namespace ArrayValue {
366
393
  $unknown?: never;
367
394
  }
368
395
  /**
369
- * <p>An array of floating point numbers.</p>
396
+ * <p>An array of integers.</p>
370
397
  */
371
398
  interface LongValuesMember {
372
399
  booleanValues?: never;
@@ -377,7 +404,7 @@ export declare namespace ArrayValue {
377
404
  $unknown?: never;
378
405
  }
379
406
  /**
380
- * <p>An array of integers.</p>
407
+ * <p>An array of floating-point numbers.</p>
381
408
  */
382
409
  interface DoubleValuesMember {
383
410
  booleanValues?: never;
@@ -629,7 +656,8 @@ export declare namespace UpdateResult {
629
656
  * <p>Contains the value of a column.</p>
630
657
  *
631
658
  * <important>
632
- * <p>This data type is deprecated.</p>
659
+ * <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation.
660
+ * Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p>
633
661
  * </important>
634
662
  */
635
663
  export declare type Value = Value.ArrayValuesMember | Value.BigIntValueMember | Value.BitValueMember | Value.BlobValueMember | Value.DoubleValueMember | Value.IntValueMember | Value.IsNullMember | Value.RealValueMember | Value.StringValueMember | Value.StructValueMember | Value.$UnknownMember;
@@ -887,6 +915,16 @@ export interface ExecuteStatementRequest {
887
915
  * <p>Options that control how the result set is returned.</p>
888
916
  */
889
917
  resultSetOptions?: ResultSetOptions;
918
+ /**
919
+ * <p>A value that indicates whether to format the result set as a single JSON string.
920
+ * This parameter only applies to <code>SELECT</code> statements and is ignored for
921
+ * other types of statements. Allowed values are <code>NONE</code> and <code>JSON</code>.
922
+ * The default value is <code>NONE</code>. The result is returned in the <code>formattedRecords</code> field.</p>
923
+ * <p>For usage information about the JSON format for result sets, see
924
+ * <a href="https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/data-api.html">Using the Data API</a>
925
+ * in the <i>Amazon Aurora User Guide</i>.</p>
926
+ */
927
+ formatRecordsAs?: RecordsFormatType | string;
890
928
  }
891
929
  export declare namespace ExecuteStatementRequest {
892
930
  /**
@@ -896,6 +934,10 @@ export declare namespace ExecuteStatementRequest {
896
934
  }
897
935
  /**
898
936
  * <p>A structure value returned by a call.</p>
937
+ * <important>
938
+ * <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation.
939
+ * Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p>
940
+ * </important>
899
941
  */
900
942
  export interface StructValue {
901
943
  /**
@@ -984,6 +1026,10 @@ export declare namespace BatchExecuteStatementResponse {
984
1026
  }
985
1027
  /**
986
1028
  * <p>A record returned by a call.</p>
1029
+ * <important>
1030
+ * <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation.
1031
+ * Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p>
1032
+ * </important>
987
1033
  */
988
1034
  export interface _Record {
989
1035
  /**
@@ -1003,11 +1049,13 @@ export declare namespace _Record {
1003
1049
  */
1004
1050
  export interface ExecuteStatementResponse {
1005
1051
  /**
1006
- * <p>The records returned by the SQL statement.</p>
1052
+ * <p>The records returned by the SQL statement. This field is blank if the
1053
+ * <code>formatRecordsAs</code> parameter is set to <code>JSON</code>.</p>
1007
1054
  */
1008
1055
  records?: Field[][];
1009
1056
  /**
1010
- * <p>Metadata for the columns included in the results.</p>
1057
+ * <p>Metadata for the columns included in the results. This field is blank if the
1058
+ * <code>formatRecordsAs</code> parameter is set to <code>JSON</code>.</p>
1011
1059
  */
1012
1060
  columnMetadata?: ColumnMetadata[];
1013
1061
  /**
@@ -1015,7 +1063,7 @@ export interface ExecuteStatementResponse {
1015
1063
  */
1016
1064
  numberOfRecordsUpdated?: number;
1017
1065
  /**
1018
- * <p>Values for fields generated during the request.</p>
1066
+ * <p>Values for fields generated during a DML request.</p>
1019
1067
  *
1020
1068
  * <note>
1021
1069
  * <p>The <code>generatedFields</code> data isn't supported by Aurora PostgreSQL.
@@ -1025,6 +1073,14 @@ export interface ExecuteStatementResponse {
1025
1073
  * </note>
1026
1074
  */
1027
1075
  generatedFields?: Field[];
1076
+ /**
1077
+ * <p>A string value that represents the result set of a <code>SELECT</code> statement
1078
+ * in JSON format. This value is only present when the <code>formatRecordsAs</code>
1079
+ * parameter is set to <code>JSON</code>.</p>
1080
+ * <p>The size limit for this field is currently 10 MB. If the JSON-formatted string representing the
1081
+ * result set requires more than 10 MB, the call returns an error.</p>
1082
+ */
1083
+ formattedRecords?: string;
1028
1084
  }
1029
1085
  export declare namespace ExecuteStatementResponse {
1030
1086
  /**
@@ -1034,6 +1090,10 @@ export declare namespace ExecuteStatementResponse {
1034
1090
  }
1035
1091
  /**
1036
1092
  * <p>The result set returned by a SQL statement.</p>
1093
+ * <important>
1094
+ * <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation.
1095
+ * Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p>
1096
+ * </important>
1037
1097
  */
1038
1098
  export interface ResultFrame {
1039
1099
  /**
@@ -1055,7 +1115,8 @@ export declare namespace ResultFrame {
1055
1115
  * <p>The result of a SQL statement.</p>
1056
1116
  *
1057
1117
  * <important>
1058
- * <p>This data type is deprecated.</p>
1118
+ * <p>This data structure is only used with the deprecated <code>ExecuteSql</code> operation.
1119
+ * Use the <code>BatchExecuteStatement</code> or <code>ExecuteStatement</code> operation instead.</p>
1059
1120
  * </important>
1060
1121
  */
1061
1122
  export interface SqlStatementResult {
@@ -1,6 +1,13 @@
1
1
  import { ExceptionOptionType as __ExceptionOptionType } from "@aws-sdk/smithy-client";
2
2
  import { RDSDataServiceException as __BaseException } from "./RDSDataServiceException";
3
3
 
4
+ export declare class AccessDeniedException extends __BaseException {
5
+ readonly name: "AccessDeniedException";
6
+ readonly $fault: "client";
7
+
8
+ constructor(opts: __ExceptionOptionType<AccessDeniedException, __BaseException>);
9
+ }
10
+
4
11
  export declare class BadRequestException extends __BaseException {
5
12
  readonly name: "BadRequestException";
6
13
  readonly $fault: "client";
@@ -165,10 +172,20 @@ export declare namespace ResultSetMetadata {
165
172
 
166
173
  const filterSensitiveLog: (obj: ResultSetMetadata) => any;
167
174
  }
175
+ export declare enum RecordsFormatType {
176
+ JSON = "JSON",
177
+ NONE = "NONE"
178
+ }
179
+ export declare enum LongReturnType {
180
+ LONG = "LONG",
181
+ STRING = "STRING"
182
+ }
168
183
 
169
184
  export interface ResultSetOptions {
170
185
 
171
186
  decimalReturnType?: DecimalReturnType | string;
187
+
188
+ longReturnType?: LongReturnType | string;
172
189
  }
173
190
  export declare namespace ResultSetOptions {
174
191
 
@@ -594,6 +611,8 @@ export interface ExecuteStatementRequest {
594
611
  continueAfterTimeout?: boolean;
595
612
 
596
613
  resultSetOptions?: ResultSetOptions;
614
+
615
+ formatRecordsAs?: RecordsFormatType | string;
597
616
  }
598
617
  export declare namespace ExecuteStatementRequest {
599
618
 
@@ -657,6 +676,8 @@ export interface ExecuteStatementResponse {
657
676
  numberOfRecordsUpdated?: number;
658
677
 
659
678
  generatedFields?: Field[];
679
+
680
+ formattedRecords?: string;
660
681
  }
661
682
  export declare namespace ExecuteStatementResponse {
662
683
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-rds-data",
3
3
  "description": "AWS SDK for JavaScript Rds Data Client for Node.js, Browser and React Native",
4
- "version": "3.76.0",
4
+ "version": "3.77.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",