@aws-sdk/client-cloudcontrol 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-cloudcontrol
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-cloudcontrol
@@ -103,7 +103,7 @@ exports.deserializeAws_json1_0CancelResourceRequestCommand = deserializeAws_json
103
103
  const deserializeAws_json1_0CancelResourceRequestCommandError = async (output, context) => {
104
104
  const parsedOutput = {
105
105
  ...output,
106
- body: await parseBody(output.body, context),
106
+ body: await parseErrorBody(output.body, context),
107
107
  };
108
108
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
109
109
  switch (errorCode) {
@@ -140,7 +140,7 @@ exports.deserializeAws_json1_0CreateResourceCommand = deserializeAws_json1_0Crea
140
140
  const deserializeAws_json1_0CreateResourceCommandError = async (output, context) => {
141
141
  const parsedOutput = {
142
142
  ...output,
143
- body: await parseBody(output.body, context),
143
+ body: await parseErrorBody(output.body, context),
144
144
  };
145
145
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
146
146
  switch (errorCode) {
@@ -228,7 +228,7 @@ exports.deserializeAws_json1_0DeleteResourceCommand = deserializeAws_json1_0Dele
228
228
  const deserializeAws_json1_0DeleteResourceCommandError = 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) {
@@ -316,7 +316,7 @@ exports.deserializeAws_json1_0GetResourceCommand = deserializeAws_json1_0GetReso
316
316
  const deserializeAws_json1_0GetResourceCommandError = async (output, context) => {
317
317
  const parsedOutput = {
318
318
  ...output,
319
- body: await parseBody(output.body, context),
319
+ body: await parseErrorBody(output.body, context),
320
320
  };
321
321
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
322
322
  switch (errorCode) {
@@ -398,7 +398,7 @@ exports.deserializeAws_json1_0GetResourceRequestStatusCommand = deserializeAws_j
398
398
  const deserializeAws_json1_0GetResourceRequestStatusCommandError = async (output, context) => {
399
399
  const parsedOutput = {
400
400
  ...output,
401
- body: await parseBody(output.body, context),
401
+ body: await parseErrorBody(output.body, context),
402
402
  };
403
403
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
404
404
  switch (errorCode) {
@@ -432,7 +432,7 @@ exports.deserializeAws_json1_0ListResourceRequestsCommand = deserializeAws_json1
432
432
  const deserializeAws_json1_0ListResourceRequestsCommandError = async (output, context) => {
433
433
  const parsedOutput = {
434
434
  ...output,
435
- body: await parseBody(output.body, context),
435
+ body: await parseErrorBody(output.body, context),
436
436
  };
437
437
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
438
438
  const parsedBody = parsedOutput.body;
@@ -460,7 +460,7 @@ exports.deserializeAws_json1_0ListResourcesCommand = deserializeAws_json1_0ListR
460
460
  const deserializeAws_json1_0ListResourcesCommandError = async (output, context) => {
461
461
  const parsedOutput = {
462
462
  ...output,
463
- body: await parseBody(output.body, context),
463
+ body: await parseErrorBody(output.body, context),
464
464
  };
465
465
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
466
466
  switch (errorCode) {
@@ -542,7 +542,7 @@ exports.deserializeAws_json1_0UpdateResourceCommand = deserializeAws_json1_0Upda
542
542
  const deserializeAws_json1_0UpdateResourceCommandError = async (output, context) => {
543
543
  const parsedOutput = {
544
544
  ...output,
545
- body: await parseBody(output.body, context),
545
+ body: await parseErrorBody(output.body, context),
546
546
  };
547
547
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
548
548
  switch (errorCode) {
@@ -1129,6 +1129,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1129
1129
  }
1130
1130
  return {};
1131
1131
  });
1132
+ const parseErrorBody = async (errorBody, context) => {
1133
+ var _a;
1134
+ const value = await parseBody(errorBody, context);
1135
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1136
+ return value;
1137
+ };
1132
1138
  const loadRestJsonErrorCode = (output, data) => {
1133
1139
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1134
1140
  const sanitizeErrorCode = (rawValue) => {
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CloudControlClient } from "./CloudControlClient";
3
2
  import { CancelResourceRequestCommand, } from "./commands/CancelResourceRequestCommand";
4
3
  import { CreateResourceCommand, } from "./commands/CreateResourceCommand";
@@ -8,123 +7,117 @@ import { GetResourceRequestStatusCommand, } from "./commands/GetResourceRequestS
8
7
  import { ListResourceRequestsCommand, } from "./commands/ListResourceRequestsCommand";
9
8
  import { ListResourcesCommand, } from "./commands/ListResourcesCommand";
10
9
  import { UpdateResourceCommand, } from "./commands/UpdateResourceCommand";
11
- var CloudControl = (function (_super) {
12
- __extends(CloudControl, _super);
13
- function CloudControl() {
14
- return _super !== null && _super.apply(this, arguments) || this;
15
- }
16
- CloudControl.prototype.cancelResourceRequest = function (args, optionsOrCb, cb) {
17
- var command = new CancelResourceRequestCommand(args);
10
+ export class CloudControl extends CloudControlClient {
11
+ cancelResourceRequest(args, optionsOrCb, cb) {
12
+ const command = new CancelResourceRequestCommand(args);
18
13
  if (typeof optionsOrCb === "function") {
19
14
  this.send(command, optionsOrCb);
20
15
  }
21
16
  else if (typeof cb === "function") {
22
17
  if (typeof optionsOrCb !== "object")
23
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
18
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
24
19
  this.send(command, optionsOrCb || {}, cb);
25
20
  }
26
21
  else {
27
22
  return this.send(command, optionsOrCb);
28
23
  }
29
- };
30
- CloudControl.prototype.createResource = function (args, optionsOrCb, cb) {
31
- var command = new CreateResourceCommand(args);
24
+ }
25
+ createResource(args, optionsOrCb, cb) {
26
+ const command = new CreateResourceCommand(args);
32
27
  if (typeof optionsOrCb === "function") {
33
28
  this.send(command, optionsOrCb);
34
29
  }
35
30
  else if (typeof cb === "function") {
36
31
  if (typeof optionsOrCb !== "object")
37
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
32
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
38
33
  this.send(command, optionsOrCb || {}, cb);
39
34
  }
40
35
  else {
41
36
  return this.send(command, optionsOrCb);
42
37
  }
43
- };
44
- CloudControl.prototype.deleteResource = function (args, optionsOrCb, cb) {
45
- var command = new DeleteResourceCommand(args);
38
+ }
39
+ deleteResource(args, optionsOrCb, cb) {
40
+ const command = new DeleteResourceCommand(args);
46
41
  if (typeof optionsOrCb === "function") {
47
42
  this.send(command, optionsOrCb);
48
43
  }
49
44
  else if (typeof cb === "function") {
50
45
  if (typeof optionsOrCb !== "object")
51
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
46
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
52
47
  this.send(command, optionsOrCb || {}, cb);
53
48
  }
54
49
  else {
55
50
  return this.send(command, optionsOrCb);
56
51
  }
57
- };
58
- CloudControl.prototype.getResource = function (args, optionsOrCb, cb) {
59
- var command = new GetResourceCommand(args);
52
+ }
53
+ getResource(args, optionsOrCb, cb) {
54
+ const command = new GetResourceCommand(args);
60
55
  if (typeof optionsOrCb === "function") {
61
56
  this.send(command, optionsOrCb);
62
57
  }
63
58
  else if (typeof cb === "function") {
64
59
  if (typeof optionsOrCb !== "object")
65
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
60
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
66
61
  this.send(command, optionsOrCb || {}, cb);
67
62
  }
68
63
  else {
69
64
  return this.send(command, optionsOrCb);
70
65
  }
71
- };
72
- CloudControl.prototype.getResourceRequestStatus = function (args, optionsOrCb, cb) {
73
- var command = new GetResourceRequestStatusCommand(args);
66
+ }
67
+ getResourceRequestStatus(args, optionsOrCb, cb) {
68
+ const command = new GetResourceRequestStatusCommand(args);
74
69
  if (typeof optionsOrCb === "function") {
75
70
  this.send(command, optionsOrCb);
76
71
  }
77
72
  else if (typeof cb === "function") {
78
73
  if (typeof optionsOrCb !== "object")
79
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
74
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
80
75
  this.send(command, optionsOrCb || {}, cb);
81
76
  }
82
77
  else {
83
78
  return this.send(command, optionsOrCb);
84
79
  }
85
- };
86
- CloudControl.prototype.listResourceRequests = function (args, optionsOrCb, cb) {
87
- var command = new ListResourceRequestsCommand(args);
80
+ }
81
+ listResourceRequests(args, optionsOrCb, cb) {
82
+ const command = new ListResourceRequestsCommand(args);
88
83
  if (typeof optionsOrCb === "function") {
89
84
  this.send(command, optionsOrCb);
90
85
  }
91
86
  else if (typeof cb === "function") {
92
87
  if (typeof optionsOrCb !== "object")
93
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
88
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
94
89
  this.send(command, optionsOrCb || {}, cb);
95
90
  }
96
91
  else {
97
92
  return this.send(command, optionsOrCb);
98
93
  }
99
- };
100
- CloudControl.prototype.listResources = function (args, optionsOrCb, cb) {
101
- var command = new ListResourcesCommand(args);
94
+ }
95
+ listResources(args, optionsOrCb, cb) {
96
+ const command = new ListResourcesCommand(args);
102
97
  if (typeof optionsOrCb === "function") {
103
98
  this.send(command, optionsOrCb);
104
99
  }
105
100
  else if (typeof cb === "function") {
106
101
  if (typeof optionsOrCb !== "object")
107
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
102
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
108
103
  this.send(command, optionsOrCb || {}, cb);
109
104
  }
110
105
  else {
111
106
  return this.send(command, optionsOrCb);
112
107
  }
113
- };
114
- CloudControl.prototype.updateResource = function (args, optionsOrCb, cb) {
115
- var command = new UpdateResourceCommand(args);
108
+ }
109
+ updateResource(args, optionsOrCb, cb) {
110
+ const command = new UpdateResourceCommand(args);
116
111
  if (typeof optionsOrCb === "function") {
117
112
  this.send(command, optionsOrCb);
118
113
  }
119
114
  else if (typeof cb === "function") {
120
115
  if (typeof optionsOrCb !== "object")
121
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
116
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
122
117
  this.send(command, optionsOrCb || {}, cb);
123
118
  }
124
119
  else {
125
120
  return this.send(command, optionsOrCb);
126
121
  }
127
- };
128
- return CloudControl;
129
- }(CloudControlClient));
130
- export { CloudControl };
122
+ }
123
+ }
@@ -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 CloudControlClient = (function (_super) {
13
- __extends(CloudControlClient, _super);
14
- function CloudControlClient(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 CloudControlClient 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
- CloudControlClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return CloudControlClient;
38
- }(__Client));
39
- export { CloudControlClient };
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 { CancelResourceRequestInputFilterSensitiveLog, CancelResourceRequestOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_0CancelResourceRequestCommand, serializeAws_json1_0CancelResourceRequestCommand, } from "../protocols/Aws_json1_0";
6
- var CancelResourceRequestCommand = (function (_super) {
7
- __extends(CancelResourceRequestCommand, _super);
8
- function CancelResourceRequestCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CancelResourceRequestCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CancelResourceRequestCommand.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 = "CloudControlClient";
18
- var commandName = "CancelResourceRequestCommand";
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 = "CloudControlClient";
15
+ const commandName = "CancelResourceRequestCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CancelResourceRequestInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CancelResourceRequestOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CancelResourceRequestCommand.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_json1_0CancelResourceRequestCommand(input, context);
33
- };
34
- CancelResourceRequestCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_0CancelResourceRequestCommand(output, context);
36
- };
37
- return CancelResourceRequestCommand;
38
- }($Command));
39
- export { CancelResourceRequestCommand };
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 { CreateResourceInputFilterSensitiveLog, CreateResourceOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_0CreateResourceCommand, serializeAws_json1_0CreateResourceCommand, } from "../protocols/Aws_json1_0";
6
- var CreateResourceCommand = (function (_super) {
7
- __extends(CreateResourceCommand, _super);
8
- function CreateResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateResourceCommand.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 = "CloudControlClient";
18
- var commandName = "CreateResourceCommand";
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 = "CloudControlClient";
15
+ const commandName = "CreateResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateResourceInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateResourceOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateResourceCommand.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_json1_0CreateResourceCommand(input, context);
33
- };
34
- CreateResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_0CreateResourceCommand(output, context);
36
- };
37
- return CreateResourceCommand;
38
- }($Command));
39
- export { CreateResourceCommand };
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 { DeleteResourceInputFilterSensitiveLog, DeleteResourceOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_0DeleteResourceCommand, serializeAws_json1_0DeleteResourceCommand, } from "../protocols/Aws_json1_0";
6
- var DeleteResourceCommand = (function (_super) {
7
- __extends(DeleteResourceCommand, _super);
8
- function DeleteResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class DeleteResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- DeleteResourceCommand.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 = "CloudControlClient";
18
- var commandName = "DeleteResourceCommand";
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 = "CloudControlClient";
15
+ const commandName = "DeleteResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: DeleteResourceInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: DeleteResourceOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- DeleteResourceCommand.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_json1_0DeleteResourceCommand(input, context);
33
- };
34
- DeleteResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_0DeleteResourceCommand(output, context);
36
- };
37
- return DeleteResourceCommand;
38
- }($Command));
39
- export { DeleteResourceCommand };
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 { GetResourceInputFilterSensitiveLog, GetResourceOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_0GetResourceCommand, serializeAws_json1_0GetResourceCommand, } from "../protocols/Aws_json1_0";
6
- var GetResourceCommand = (function (_super) {
7
- __extends(GetResourceCommand, _super);
8
- function GetResourceCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetResourceCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetResourceCommand.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 = "CloudControlClient";
18
- var commandName = "GetResourceCommand";
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 = "CloudControlClient";
15
+ const commandName = "GetResourceCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetResourceInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetResourceOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetResourceCommand.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_json1_0GetResourceCommand(input, context);
33
- };
34
- GetResourceCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_0GetResourceCommand(output, context);
36
- };
37
- return GetResourceCommand;
38
- }($Command));
39
- export { GetResourceCommand };
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 { GetResourceRequestStatusInputFilterSensitiveLog, GetResourceRequestStatusOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_json1_0GetResourceRequestStatusCommand, serializeAws_json1_0GetResourceRequestStatusCommand, } from "../protocols/Aws_json1_0";
6
- var GetResourceRequestStatusCommand = (function (_super) {
7
- __extends(GetResourceRequestStatusCommand, _super);
8
- function GetResourceRequestStatusCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class GetResourceRequestStatusCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- GetResourceRequestStatusCommand.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 = "CloudControlClient";
18
- var commandName = "GetResourceRequestStatusCommand";
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 = "CloudControlClient";
15
+ const commandName = "GetResourceRequestStatusCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: GetResourceRequestStatusInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: GetResourceRequestStatusOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- GetResourceRequestStatusCommand.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_json1_0GetResourceRequestStatusCommand(input, context);
33
- };
34
- GetResourceRequestStatusCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_json1_0GetResourceRequestStatusCommand(output, context);
36
- };
37
- return GetResourceRequestStatusCommand;
38
- }($Command));
39
- export { GetResourceRequestStatusCommand };
31
+ }
32
+ }