@aws-sdk/client-rds-data 3.180.0 → 3.183.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,26 @@
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.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/client-rds-data
9
+
10
+
11
+
12
+
13
+
14
+ # [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
20
+ * **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
21
+
22
+
23
+
24
+
25
+
6
26
  # [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
7
27
 
8
28
  **Note:** Version bump only for package @aws-sdk/client-rds-data
@@ -179,7 +179,7 @@ exports.deserializeAws_restJson1BatchExecuteStatementCommand = deserializeAws_re
179
179
  const deserializeAws_restJson1BatchExecuteStatementCommandError = async (output, context) => {
180
180
  const parsedOutput = {
181
181
  ...output,
182
- body: await parseBody(output.body, context),
182
+ body: await parseErrorBody(output.body, context),
183
183
  };
184
184
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
185
185
  switch (errorCode) {
@@ -228,7 +228,7 @@ exports.deserializeAws_restJson1BeginTransactionCommand = deserializeAws_restJso
228
228
  const deserializeAws_restJson1BeginTransactionCommandError = async (output, context) => {
229
229
  const parsedOutput = {
230
230
  ...output,
231
- body: await parseBody(output.body, context),
231
+ body: await parseErrorBody(output.body, context),
232
232
  };
233
233
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
234
234
  switch (errorCode) {
@@ -277,7 +277,7 @@ exports.deserializeAws_restJson1CommitTransactionCommand = deserializeAws_restJs
277
277
  const deserializeAws_restJson1CommitTransactionCommandError = async (output, context) => {
278
278
  const parsedOutput = {
279
279
  ...output,
280
- body: await parseBody(output.body, context),
280
+ body: await parseErrorBody(output.body, context),
281
281
  };
282
282
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
283
283
  switch (errorCode) {
@@ -329,7 +329,7 @@ exports.deserializeAws_restJson1ExecuteSqlCommand = deserializeAws_restJson1Exec
329
329
  const deserializeAws_restJson1ExecuteSqlCommandError = async (output, context) => {
330
330
  const parsedOutput = {
331
331
  ...output,
332
- body: await parseBody(output.body, context),
332
+ body: await parseErrorBody(output.body, context),
333
333
  };
334
334
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
335
335
  switch (errorCode) {
@@ -387,7 +387,7 @@ exports.deserializeAws_restJson1ExecuteStatementCommand = deserializeAws_restJso
387
387
  const deserializeAws_restJson1ExecuteStatementCommandError = async (output, context) => {
388
388
  const parsedOutput = {
389
389
  ...output,
390
- body: await parseBody(output.body, context),
390
+ body: await parseErrorBody(output.body, context),
391
391
  };
392
392
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
393
393
  switch (errorCode) {
@@ -436,7 +436,7 @@ exports.deserializeAws_restJson1RollbackTransactionCommand = deserializeAws_rest
436
436
  const deserializeAws_restJson1RollbackTransactionCommandError = async (output, context) => {
437
437
  const parsedOutput = {
438
438
  ...output,
439
- body: await parseBody(output.body, context),
439
+ body: await parseErrorBody(output.body, context),
440
440
  };
441
441
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
442
442
  switch (errorCode) {
@@ -955,6 +955,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
955
955
  }
956
956
  return {};
957
957
  });
958
+ const parseErrorBody = async (errorBody, context) => {
959
+ var _a;
960
+ const value = await parseBody(errorBody, context);
961
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
962
+ return value;
963
+ };
958
964
  const loadRestJsonErrorCode = (output, data) => {
959
965
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
960
966
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { BatchExecuteStatementCommand, } from "./commands/BatchExecuteStatementCommand";
3
2
  import { BeginTransactionCommand, } from "./commands/BeginTransactionCommand";
4
3
  import { CommitTransactionCommand, } from "./commands/CommitTransactionCommand";
@@ -6,95 +5,89 @@ import { ExecuteSqlCommand } from "./commands/ExecuteSqlCommand";
6
5
  import { ExecuteStatementCommand, } from "./commands/ExecuteStatementCommand";
7
6
  import { RollbackTransactionCommand, } from "./commands/RollbackTransactionCommand";
8
7
  import { RDSDataClient } from "./RDSDataClient";
9
- var RDSData = (function (_super) {
10
- __extends(RDSData, _super);
11
- function RDSData() {
12
- return _super !== null && _super.apply(this, arguments) || this;
13
- }
14
- RDSData.prototype.batchExecuteStatement = function (args, optionsOrCb, cb) {
15
- var command = new BatchExecuteStatementCommand(args);
8
+ export class RDSData extends RDSDataClient {
9
+ batchExecuteStatement(args, optionsOrCb, cb) {
10
+ const command = new BatchExecuteStatementCommand(args);
16
11
  if (typeof optionsOrCb === "function") {
17
12
  this.send(command, optionsOrCb);
18
13
  }
19
14
  else if (typeof cb === "function") {
20
15
  if (typeof optionsOrCb !== "object")
21
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
16
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
22
17
  this.send(command, optionsOrCb || {}, cb);
23
18
  }
24
19
  else {
25
20
  return this.send(command, optionsOrCb);
26
21
  }
27
- };
28
- RDSData.prototype.beginTransaction = function (args, optionsOrCb, cb) {
29
- var command = new BeginTransactionCommand(args);
22
+ }
23
+ beginTransaction(args, optionsOrCb, cb) {
24
+ const command = new BeginTransactionCommand(args);
30
25
  if (typeof optionsOrCb === "function") {
31
26
  this.send(command, optionsOrCb);
32
27
  }
33
28
  else if (typeof cb === "function") {
34
29
  if (typeof optionsOrCb !== "object")
35
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
30
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
36
31
  this.send(command, optionsOrCb || {}, cb);
37
32
  }
38
33
  else {
39
34
  return this.send(command, optionsOrCb);
40
35
  }
41
- };
42
- RDSData.prototype.commitTransaction = function (args, optionsOrCb, cb) {
43
- var command = new CommitTransactionCommand(args);
36
+ }
37
+ commitTransaction(args, optionsOrCb, cb) {
38
+ const command = new CommitTransactionCommand(args);
44
39
  if (typeof optionsOrCb === "function") {
45
40
  this.send(command, optionsOrCb);
46
41
  }
47
42
  else if (typeof cb === "function") {
48
43
  if (typeof optionsOrCb !== "object")
49
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
44
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
50
45
  this.send(command, optionsOrCb || {}, cb);
51
46
  }
52
47
  else {
53
48
  return this.send(command, optionsOrCb);
54
49
  }
55
- };
56
- RDSData.prototype.executeSql = function (args, optionsOrCb, cb) {
57
- var command = new ExecuteSqlCommand(args);
50
+ }
51
+ executeSql(args, optionsOrCb, cb) {
52
+ const command = new ExecuteSqlCommand(args);
58
53
  if (typeof optionsOrCb === "function") {
59
54
  this.send(command, optionsOrCb);
60
55
  }
61
56
  else if (typeof cb === "function") {
62
57
  if (typeof optionsOrCb !== "object")
63
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
58
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
64
59
  this.send(command, optionsOrCb || {}, cb);
65
60
  }
66
61
  else {
67
62
  return this.send(command, optionsOrCb);
68
63
  }
69
- };
70
- RDSData.prototype.executeStatement = function (args, optionsOrCb, cb) {
71
- var command = new ExecuteStatementCommand(args);
64
+ }
65
+ executeStatement(args, optionsOrCb, cb) {
66
+ const command = new ExecuteStatementCommand(args);
72
67
  if (typeof optionsOrCb === "function") {
73
68
  this.send(command, optionsOrCb);
74
69
  }
75
70
  else if (typeof cb === "function") {
76
71
  if (typeof optionsOrCb !== "object")
77
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
72
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
78
73
  this.send(command, optionsOrCb || {}, cb);
79
74
  }
80
75
  else {
81
76
  return this.send(command, optionsOrCb);
82
77
  }
83
- };
84
- RDSData.prototype.rollbackTransaction = function (args, optionsOrCb, cb) {
85
- var command = new RollbackTransactionCommand(args);
78
+ }
79
+ rollbackTransaction(args, optionsOrCb, cb) {
80
+ const command = new RollbackTransactionCommand(args);
86
81
  if (typeof optionsOrCb === "function") {
87
82
  this.send(command, optionsOrCb);
88
83
  }
89
84
  else if (typeof cb === "function") {
90
85
  if (typeof optionsOrCb !== "object")
91
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
86
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
92
87
  this.send(command, optionsOrCb || {}, cb);
93
88
  }
94
89
  else {
95
90
  return this.send(command, optionsOrCb);
96
91
  }
97
- };
98
- return RDSData;
99
- }(RDSDataClient));
100
- export { RDSData };
92
+ }
93
+ }
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
3
2
  import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
4
3
  import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
9
8
  import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
10
9
  import { Client as __Client, } from "@aws-sdk/smithy-client";
11
10
  import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
12
- var RDSDataClient = (function (_super) {
13
- __extends(RDSDataClient, _super);
14
- function RDSDataClient(configuration) {
15
- var _this = this;
16
- var _config_0 = __getRuntimeConfig(configuration);
17
- var _config_1 = resolveRegionConfig(_config_0);
18
- var _config_2 = resolveEndpointsConfig(_config_1);
19
- var _config_3 = resolveRetryConfig(_config_2);
20
- var _config_4 = resolveHostHeaderConfig(_config_3);
21
- var _config_5 = resolveAwsAuthConfig(_config_4);
22
- var _config_6 = resolveUserAgentConfig(_config_5);
23
- _this = _super.call(this, _config_6) || this;
24
- _this.config = _config_6;
25
- _this.middlewareStack.use(getRetryPlugin(_this.config));
26
- _this.middlewareStack.use(getContentLengthPlugin(_this.config));
27
- _this.middlewareStack.use(getHostHeaderPlugin(_this.config));
28
- _this.middlewareStack.use(getLoggerPlugin(_this.config));
29
- _this.middlewareStack.use(getRecursionDetectionPlugin(_this.config));
30
- _this.middlewareStack.use(getAwsAuthPlugin(_this.config));
31
- _this.middlewareStack.use(getUserAgentPlugin(_this.config));
32
- return _this;
11
+ export class RDSDataClient extends __Client {
12
+ constructor(configuration) {
13
+ const _config_0 = __getRuntimeConfig(configuration);
14
+ const _config_1 = resolveRegionConfig(_config_0);
15
+ const _config_2 = resolveEndpointsConfig(_config_1);
16
+ const _config_3 = resolveRetryConfig(_config_2);
17
+ const _config_4 = resolveHostHeaderConfig(_config_3);
18
+ const _config_5 = resolveAwsAuthConfig(_config_4);
19
+ const _config_6 = resolveUserAgentConfig(_config_5);
20
+ super(_config_6);
21
+ this.config = _config_6;
22
+ this.middlewareStack.use(getRetryPlugin(this.config));
23
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
24
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
25
+ this.middlewareStack.use(getLoggerPlugin(this.config));
26
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
27
+ this.middlewareStack.use(getAwsAuthPlugin(this.config));
28
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
33
29
  }
34
- RDSDataClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return RDSDataClient;
38
- }(__Client));
39
- export { RDSDataClient };
30
+ destroy() {
31
+ super.destroy();
32
+ }
33
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { BatchExecuteStatementRequestFilterSensitiveLog, BatchExecuteStatementResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1BatchExecuteStatementCommand, serializeAws_restJson1BatchExecuteStatementCommand, } from "../protocols/Aws_restJson1";
6
- var BatchExecuteStatementCommand = (function (_super) {
7
- __extends(BatchExecuteStatementCommand, _super);
8
- function BatchExecuteStatementCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class BatchExecuteStatementCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- BatchExecuteStatementCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RDSDataClient";
18
- var commandName = "BatchExecuteStatementCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RDSDataClient";
15
+ const commandName = "BatchExecuteStatementCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: BatchExecuteStatementRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: BatchExecuteStatementResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- BatchExecuteStatementCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1BatchExecuteStatementCommand(input, context);
33
- };
34
- BatchExecuteStatementCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1BatchExecuteStatementCommand(output, context);
36
- };
37
- return BatchExecuteStatementCommand;
38
- }($Command));
39
- export { BatchExecuteStatementCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { BeginTransactionRequestFilterSensitiveLog, BeginTransactionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1BeginTransactionCommand, serializeAws_restJson1BeginTransactionCommand, } from "../protocols/Aws_restJson1";
6
- var BeginTransactionCommand = (function (_super) {
7
- __extends(BeginTransactionCommand, _super);
8
- function BeginTransactionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class BeginTransactionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- BeginTransactionCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RDSDataClient";
18
- var commandName = "BeginTransactionCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RDSDataClient";
15
+ const commandName = "BeginTransactionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: BeginTransactionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: BeginTransactionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- BeginTransactionCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1BeginTransactionCommand(input, context);
33
- };
34
- BeginTransactionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1BeginTransactionCommand(output, context);
36
- };
37
- return BeginTransactionCommand;
38
- }($Command));
39
- export { BeginTransactionCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { CommitTransactionRequestFilterSensitiveLog, CommitTransactionResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CommitTransactionCommand, serializeAws_restJson1CommitTransactionCommand, } from "../protocols/Aws_restJson1";
6
- var CommitTransactionCommand = (function (_super) {
7
- __extends(CommitTransactionCommand, _super);
8
- function CommitTransactionCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CommitTransactionCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CommitTransactionCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RDSDataClient";
18
- var commandName = "CommitTransactionCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RDSDataClient";
15
+ const commandName = "CommitTransactionCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CommitTransactionRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CommitTransactionResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CommitTransactionCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1CommitTransactionCommand(input, context);
33
- };
34
- CommitTransactionCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CommitTransactionCommand(output, context);
36
- };
37
- return CommitTransactionCommand;
38
- }($Command));
39
- export { CommitTransactionCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { ExecuteSqlRequestFilterSensitiveLog, ExecuteSqlResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ExecuteSqlCommand, serializeAws_restJson1ExecuteSqlCommand, } from "../protocols/Aws_restJson1";
6
- var ExecuteSqlCommand = (function (_super) {
7
- __extends(ExecuteSqlCommand, _super);
8
- function ExecuteSqlCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ExecuteSqlCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ExecuteSqlCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RDSDataClient";
18
- var commandName = "ExecuteSqlCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RDSDataClient";
15
+ const commandName = "ExecuteSqlCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ExecuteSqlRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ExecuteSqlResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ExecuteSqlCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1ExecuteSqlCommand(input, context);
33
- };
34
- ExecuteSqlCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ExecuteSqlCommand(output, context);
36
- };
37
- return ExecuteSqlCommand;
38
- }($Command));
39
- export { ExecuteSqlCommand };
31
+ }
32
+ }
@@ -1,39 +1,32 @@
1
- import { __extends } from "tslib";
2
1
  import { getSerdePlugin } from "@aws-sdk/middleware-serde";
3
2
  import { Command as $Command } from "@aws-sdk/smithy-client";
4
3
  import { ExecuteStatementRequestFilterSensitiveLog, ExecuteStatementResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ExecuteStatementCommand, serializeAws_restJson1ExecuteStatementCommand, } from "../protocols/Aws_restJson1";
6
- var ExecuteStatementCommand = (function (_super) {
7
- __extends(ExecuteStatementCommand, _super);
8
- function ExecuteStatementCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ExecuteStatementCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ExecuteStatementCommand.prototype.resolveMiddleware = function (clientStack, configuration, options) {
10
+ resolveMiddleware(clientStack, configuration, options) {
14
11
  this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
15
- var stack = clientStack.concat(this.middlewareStack);
16
- var logger = configuration.logger;
17
- var clientName = "RDSDataClient";
18
- var commandName = "ExecuteStatementCommand";
19
- var handlerExecutionContext = {
20
- logger: logger,
21
- clientName: clientName,
22
- commandName: commandName,
12
+ const stack = clientStack.concat(this.middlewareStack);
13
+ const { logger } = configuration;
14
+ const clientName = "RDSDataClient";
15
+ const commandName = "ExecuteStatementCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ExecuteStatementRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ExecuteStatementResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ExecuteStatementCommand.prototype.serialize = function (input, context) {
23
+ const { requestHandler } = configuration;
24
+ return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
25
+ }
26
+ serialize(input, context) {
32
27
  return serializeAws_restJson1ExecuteStatementCommand(input, context);
33
- };
34
- ExecuteStatementCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ExecuteStatementCommand(output, context);
36
- };
37
- return ExecuteStatementCommand;
38
- }($Command));
39
- export { ExecuteStatementCommand };
31
+ }
32
+ }