@aws-sdk/client-ebs 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-ebs
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-ebs
@@ -177,7 +177,7 @@ exports.deserializeAws_restJson1CompleteSnapshotCommand = deserializeAws_restJso
177
177
  const deserializeAws_restJson1CompleteSnapshotCommandError = async (output, context) => {
178
178
  const parsedOutput = {
179
179
  ...output,
180
- body: await parseBody(output.body, context),
180
+ body: await parseErrorBody(output.body, context),
181
181
  };
182
182
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
183
183
  switch (errorCode) {
@@ -230,7 +230,7 @@ exports.deserializeAws_restJson1GetSnapshotBlockCommand = deserializeAws_restJso
230
230
  const deserializeAws_restJson1GetSnapshotBlockCommandError = async (output, context) => {
231
231
  const parsedOutput = {
232
232
  ...output,
233
- body: await parseBody(output.body, context),
233
+ body: await parseErrorBody(output.body, context),
234
234
  };
235
235
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
236
236
  switch (errorCode) {
@@ -291,7 +291,7 @@ exports.deserializeAws_restJson1ListChangedBlocksCommand = deserializeAws_restJs
291
291
  const deserializeAws_restJson1ListChangedBlocksCommandError = async (output, context) => {
292
292
  const parsedOutput = {
293
293
  ...output,
294
- body: await parseBody(output.body, context),
294
+ body: await parseErrorBody(output.body, context),
295
295
  };
296
296
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
297
297
  switch (errorCode) {
@@ -352,7 +352,7 @@ exports.deserializeAws_restJson1ListSnapshotBlocksCommand = deserializeAws_restJ
352
352
  const deserializeAws_restJson1ListSnapshotBlocksCommandError = async (output, context) => {
353
353
  const parsedOutput = {
354
354
  ...output,
355
- body: await parseBody(output.body, context),
355
+ body: await parseErrorBody(output.body, context),
356
356
  };
357
357
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
358
358
  switch (errorCode) {
@@ -400,7 +400,7 @@ exports.deserializeAws_restJson1PutSnapshotBlockCommand = deserializeAws_restJso
400
400
  const deserializeAws_restJson1PutSnapshotBlockCommandError = async (output, context) => {
401
401
  const parsedOutput = {
402
402
  ...output,
403
- body: await parseBody(output.body, context),
403
+ body: await parseErrorBody(output.body, context),
404
404
  };
405
405
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
406
406
  switch (errorCode) {
@@ -476,7 +476,7 @@ exports.deserializeAws_restJson1StartSnapshotCommand = deserializeAws_restJson1S
476
476
  const deserializeAws_restJson1StartSnapshotCommandError = async (output, context) => {
477
477
  const parsedOutput = {
478
478
  ...output,
479
- body: await parseBody(output.body, context),
479
+ body: await parseErrorBody(output.body, context),
480
480
  };
481
481
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
482
482
  switch (errorCode) {
@@ -718,6 +718,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
718
718
  }
719
719
  return {};
720
720
  });
721
+ const parseErrorBody = async (errorBody, context) => {
722
+ var _a;
723
+ const value = await parseBody(errorBody, context);
724
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
725
+ return value;
726
+ };
721
727
  const loadRestJsonErrorCode = (output, data) => {
722
728
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
723
729
  const sanitizeErrorCode = (rawValue) => {
package/dist-es/EBS.js CHANGED
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CompleteSnapshotCommand, } from "./commands/CompleteSnapshotCommand";
3
2
  import { GetSnapshotBlockCommand, } from "./commands/GetSnapshotBlockCommand";
4
3
  import { ListChangedBlocksCommand, } from "./commands/ListChangedBlocksCommand";
@@ -6,95 +5,89 @@ import { ListSnapshotBlocksCommand, } from "./commands/ListSnapshotBlocksCommand
6
5
  import { PutSnapshotBlockCommand, } from "./commands/PutSnapshotBlockCommand";
7
6
  import { StartSnapshotCommand, } from "./commands/StartSnapshotCommand";
8
7
  import { EBSClient } from "./EBSClient";
9
- var EBS = (function (_super) {
10
- __extends(EBS, _super);
11
- function EBS() {
12
- return _super !== null && _super.apply(this, arguments) || this;
13
- }
14
- EBS.prototype.completeSnapshot = function (args, optionsOrCb, cb) {
15
- var command = new CompleteSnapshotCommand(args);
8
+ export class EBS extends EBSClient {
9
+ completeSnapshot(args, optionsOrCb, cb) {
10
+ const command = new CompleteSnapshotCommand(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
- EBS.prototype.getSnapshotBlock = function (args, optionsOrCb, cb) {
29
- var command = new GetSnapshotBlockCommand(args);
22
+ }
23
+ getSnapshotBlock(args, optionsOrCb, cb) {
24
+ const command = new GetSnapshotBlockCommand(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
- EBS.prototype.listChangedBlocks = function (args, optionsOrCb, cb) {
43
- var command = new ListChangedBlocksCommand(args);
36
+ }
37
+ listChangedBlocks(args, optionsOrCb, cb) {
38
+ const command = new ListChangedBlocksCommand(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
- EBS.prototype.listSnapshotBlocks = function (args, optionsOrCb, cb) {
57
- var command = new ListSnapshotBlocksCommand(args);
50
+ }
51
+ listSnapshotBlocks(args, optionsOrCb, cb) {
52
+ const command = new ListSnapshotBlocksCommand(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
- EBS.prototype.putSnapshotBlock = function (args, optionsOrCb, cb) {
71
- var command = new PutSnapshotBlockCommand(args);
64
+ }
65
+ putSnapshotBlock(args, optionsOrCb, cb) {
66
+ const command = new PutSnapshotBlockCommand(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
- EBS.prototype.startSnapshot = function (args, optionsOrCb, cb) {
85
- var command = new StartSnapshotCommand(args);
78
+ }
79
+ startSnapshot(args, optionsOrCb, cb) {
80
+ const command = new StartSnapshotCommand(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 EBS;
99
- }(EBSClient));
100
- export { EBS };
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 EBSClient = (function (_super) {
13
- __extends(EBSClient, _super);
14
- function EBSClient(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 EBSClient 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
- EBSClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return EBSClient;
38
- }(__Client));
39
- export { EBSClient };
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 { CompleteSnapshotRequestFilterSensitiveLog, CompleteSnapshotResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CompleteSnapshotCommand, serializeAws_restJson1CompleteSnapshotCommand, } from "../protocols/Aws_restJson1";
6
- var CompleteSnapshotCommand = (function (_super) {
7
- __extends(CompleteSnapshotCommand, _super);
8
- function CompleteSnapshotCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CompleteSnapshotCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CompleteSnapshotCommand.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 = "EBSClient";
18
- var commandName = "CompleteSnapshotCommand";
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 = "EBSClient";
15
+ const commandName = "CompleteSnapshotCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CompleteSnapshotRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CompleteSnapshotResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CompleteSnapshotCommand.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_restJson1CompleteSnapshotCommand(input, context);
33
- };
34
- CompleteSnapshotCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CompleteSnapshotCommand(output, context);
36
- };
37
- return CompleteSnapshotCommand;
38
- }($Command));
39
- export { CompleteSnapshotCommand };
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 { GetSnapshotBlockRequestFilterSensitiveLog, GetSnapshotBlockResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1GetSnapshotBlockCommand, serializeAws_restJson1GetSnapshotBlockCommand, } from "../protocols/Aws_restJson1";
6
- var GetSnapshotBlockCommand = (function (_super) {
7
- __extends(GetSnapshotBlockCommand, _super);
8
- function GetSnapshotBlockCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetSnapshotBlockCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetSnapshotBlockCommand.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 = "EBSClient";
18
- var commandName = "GetSnapshotBlockCommand";
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 = "EBSClient";
15
+ const commandName = "GetSnapshotBlockCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetSnapshotBlockRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetSnapshotBlockResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetSnapshotBlockCommand.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_restJson1GetSnapshotBlockCommand(input, context);
33
- };
34
- GetSnapshotBlockCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1GetSnapshotBlockCommand(output, context);
36
- };
37
- return GetSnapshotBlockCommand;
38
- }($Command));
39
- export { GetSnapshotBlockCommand };
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 { ListChangedBlocksRequestFilterSensitiveLog, ListChangedBlocksResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ListChangedBlocksCommand, serializeAws_restJson1ListChangedBlocksCommand, } from "../protocols/Aws_restJson1";
6
- var ListChangedBlocksCommand = (function (_super) {
7
- __extends(ListChangedBlocksCommand, _super);
8
- function ListChangedBlocksCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListChangedBlocksCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListChangedBlocksCommand.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 = "EBSClient";
18
- var commandName = "ListChangedBlocksCommand";
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 = "EBSClient";
15
+ const commandName = "ListChangedBlocksCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListChangedBlocksRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListChangedBlocksResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListChangedBlocksCommand.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_restJson1ListChangedBlocksCommand(input, context);
33
- };
34
- ListChangedBlocksCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ListChangedBlocksCommand(output, context);
36
- };
37
- return ListChangedBlocksCommand;
38
- }($Command));
39
- export { ListChangedBlocksCommand };
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 { ListSnapshotBlocksRequestFilterSensitiveLog, ListSnapshotBlocksResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1ListSnapshotBlocksCommand, serializeAws_restJson1ListSnapshotBlocksCommand, } from "../protocols/Aws_restJson1";
6
- var ListSnapshotBlocksCommand = (function (_super) {
7
- __extends(ListSnapshotBlocksCommand, _super);
8
- function ListSnapshotBlocksCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class ListSnapshotBlocksCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- ListSnapshotBlocksCommand.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 = "EBSClient";
18
- var commandName = "ListSnapshotBlocksCommand";
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 = "EBSClient";
15
+ const commandName = "ListSnapshotBlocksCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: ListSnapshotBlocksRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: ListSnapshotBlocksResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- ListSnapshotBlocksCommand.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_restJson1ListSnapshotBlocksCommand(input, context);
33
- };
34
- ListSnapshotBlocksCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1ListSnapshotBlocksCommand(output, context);
36
- };
37
- return ListSnapshotBlocksCommand;
38
- }($Command));
39
- export { ListSnapshotBlocksCommand };
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 { PutSnapshotBlockRequestFilterSensitiveLog, PutSnapshotBlockResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1PutSnapshotBlockCommand, serializeAws_restJson1PutSnapshotBlockCommand, } from "../protocols/Aws_restJson1";
6
- var PutSnapshotBlockCommand = (function (_super) {
7
- __extends(PutSnapshotBlockCommand, _super);
8
- function PutSnapshotBlockCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class PutSnapshotBlockCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- PutSnapshotBlockCommand.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 = "EBSClient";
18
- var commandName = "PutSnapshotBlockCommand";
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 = "EBSClient";
15
+ const commandName = "PutSnapshotBlockCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: PutSnapshotBlockRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: PutSnapshotBlockResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- PutSnapshotBlockCommand.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_restJson1PutSnapshotBlockCommand(input, context);
33
- };
34
- PutSnapshotBlockCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1PutSnapshotBlockCommand(output, context);
36
- };
37
- return PutSnapshotBlockCommand;
38
- }($Command));
39
- export { PutSnapshotBlockCommand };
31
+ }
32
+ }