@aws-sdk/client-mwaa 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-mwaa
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-mwaa
@@ -371,7 +371,7 @@ exports.deserializeAws_restJson1CreateCliTokenCommand = deserializeAws_restJson1
371
371
  const deserializeAws_restJson1CreateCliTokenCommandError = async (output, context) => {
372
372
  const parsedOutput = {
373
373
  ...output,
374
- body: await parseBody(output.body, context),
374
+ body: await parseErrorBody(output.body, context),
375
375
  };
376
376
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
377
377
  switch (errorCode) {
@@ -405,7 +405,7 @@ exports.deserializeAws_restJson1CreateEnvironmentCommand = deserializeAws_restJs
405
405
  const deserializeAws_restJson1CreateEnvironmentCommandError = async (output, context) => {
406
406
  const parsedOutput = {
407
407
  ...output,
408
- body: await parseBody(output.body, context),
408
+ body: await parseErrorBody(output.body, context),
409
409
  };
410
410
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
411
411
  switch (errorCode) {
@@ -445,7 +445,7 @@ exports.deserializeAws_restJson1CreateWebLoginTokenCommand = deserializeAws_rest
445
445
  const deserializeAws_restJson1CreateWebLoginTokenCommandError = async (output, context) => {
446
446
  const parsedOutput = {
447
447
  ...output,
448
- body: await parseBody(output.body, context),
448
+ body: await parseErrorBody(output.body, context),
449
449
  };
450
450
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
451
451
  switch (errorCode) {
@@ -485,7 +485,7 @@ exports.deserializeAws_restJson1DeleteEnvironmentCommand = deserializeAws_restJs
485
485
  const deserializeAws_restJson1DeleteEnvironmentCommandError = async (output, context) => {
486
486
  const parsedOutput = {
487
487
  ...output,
488
- body: await parseBody(output.body, context),
488
+ body: await parseErrorBody(output.body, context),
489
489
  };
490
490
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
491
491
  switch (errorCode) {
@@ -525,7 +525,7 @@ exports.deserializeAws_restJson1GetEnvironmentCommand = deserializeAws_restJson1
525
525
  const deserializeAws_restJson1GetEnvironmentCommandError = async (output, context) => {
526
526
  const parsedOutput = {
527
527
  ...output,
528
- body: await parseBody(output.body, context),
528
+ body: await parseErrorBody(output.body, context),
529
529
  };
530
530
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
531
531
  switch (errorCode) {
@@ -568,7 +568,7 @@ exports.deserializeAws_restJson1ListEnvironmentsCommand = deserializeAws_restJso
568
568
  const deserializeAws_restJson1ListEnvironmentsCommandError = async (output, context) => {
569
569
  const parsedOutput = {
570
570
  ...output,
571
- body: await parseBody(output.body, context),
571
+ body: await parseErrorBody(output.body, context),
572
572
  };
573
573
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
574
574
  switch (errorCode) {
@@ -605,7 +605,7 @@ exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_rest
605
605
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
606
606
  const parsedOutput = {
607
607
  ...output,
608
- body: await parseBody(output.body, context),
608
+ body: await parseErrorBody(output.body, context),
609
609
  };
610
610
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
611
611
  switch (errorCode) {
@@ -642,7 +642,7 @@ exports.deserializeAws_restJson1PublishMetricsCommand = deserializeAws_restJson1
642
642
  const deserializeAws_restJson1PublishMetricsCommandError = async (output, context) => {
643
643
  const parsedOutput = {
644
644
  ...output,
645
- body: await parseBody(output.body, context),
645
+ body: await parseErrorBody(output.body, context),
646
646
  };
647
647
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
648
648
  switch (errorCode) {
@@ -676,7 +676,7 @@ exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1Tag
676
676
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
677
677
  const parsedOutput = {
678
678
  ...output,
679
- body: await parseBody(output.body, context),
679
+ body: await parseErrorBody(output.body, context),
680
680
  };
681
681
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
682
682
  switch (errorCode) {
@@ -713,7 +713,7 @@ exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1U
713
713
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
714
714
  const parsedOutput = {
715
715
  ...output,
716
- body: await parseBody(output.body, context),
716
+ body: await parseErrorBody(output.body, context),
717
717
  };
718
718
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
719
719
  switch (errorCode) {
@@ -753,7 +753,7 @@ exports.deserializeAws_restJson1UpdateEnvironmentCommand = deserializeAws_restJs
753
753
  const deserializeAws_restJson1UpdateEnvironmentCommandError = async (output, context) => {
754
754
  const parsedOutput = {
755
755
  ...output,
756
- body: await parseBody(output.body, context),
756
+ body: await parseErrorBody(output.body, context),
757
757
  };
758
758
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
759
759
  switch (errorCode) {
@@ -1107,6 +1107,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
1107
1107
  }
1108
1108
  return {};
1109
1109
  });
1110
+ const parseErrorBody = async (errorBody, context) => {
1111
+ var _a;
1112
+ const value = await parseBody(errorBody, context);
1113
+ value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
1114
+ return value;
1115
+ };
1110
1116
  const loadRestJsonErrorCode = (output, data) => {
1111
1117
  const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
1112
1118
  const sanitizeErrorCode = (rawValue) => {
package/dist-es/MWAA.js CHANGED
@@ -1,4 +1,3 @@
1
- import { __extends } from "tslib";
2
1
  import { CreateCliTokenCommand, } from "./commands/CreateCliTokenCommand";
3
2
  import { CreateEnvironmentCommand, } from "./commands/CreateEnvironmentCommand";
4
3
  import { CreateWebLoginTokenCommand, } from "./commands/CreateWebLoginTokenCommand";
@@ -11,165 +10,159 @@ import { TagResourceCommand } from "./commands/TagResourceCommand";
11
10
  import { UntagResourceCommand, } from "./commands/UntagResourceCommand";
12
11
  import { UpdateEnvironmentCommand, } from "./commands/UpdateEnvironmentCommand";
13
12
  import { MWAAClient } from "./MWAAClient";
14
- var MWAA = (function (_super) {
15
- __extends(MWAA, _super);
16
- function MWAA() {
17
- return _super !== null && _super.apply(this, arguments) || this;
18
- }
19
- MWAA.prototype.createCliToken = function (args, optionsOrCb, cb) {
20
- var command = new CreateCliTokenCommand(args);
13
+ export class MWAA extends MWAAClient {
14
+ createCliToken(args, optionsOrCb, cb) {
15
+ const command = new CreateCliTokenCommand(args);
21
16
  if (typeof optionsOrCb === "function") {
22
17
  this.send(command, optionsOrCb);
23
18
  }
24
19
  else if (typeof cb === "function") {
25
20
  if (typeof optionsOrCb !== "object")
26
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
21
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
27
22
  this.send(command, optionsOrCb || {}, cb);
28
23
  }
29
24
  else {
30
25
  return this.send(command, optionsOrCb);
31
26
  }
32
- };
33
- MWAA.prototype.createEnvironment = function (args, optionsOrCb, cb) {
34
- var command = new CreateEnvironmentCommand(args);
27
+ }
28
+ createEnvironment(args, optionsOrCb, cb) {
29
+ const command = new CreateEnvironmentCommand(args);
35
30
  if (typeof optionsOrCb === "function") {
36
31
  this.send(command, optionsOrCb);
37
32
  }
38
33
  else if (typeof cb === "function") {
39
34
  if (typeof optionsOrCb !== "object")
40
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
35
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
41
36
  this.send(command, optionsOrCb || {}, cb);
42
37
  }
43
38
  else {
44
39
  return this.send(command, optionsOrCb);
45
40
  }
46
- };
47
- MWAA.prototype.createWebLoginToken = function (args, optionsOrCb, cb) {
48
- var command = new CreateWebLoginTokenCommand(args);
41
+ }
42
+ createWebLoginToken(args, optionsOrCb, cb) {
43
+ const command = new CreateWebLoginTokenCommand(args);
49
44
  if (typeof optionsOrCb === "function") {
50
45
  this.send(command, optionsOrCb);
51
46
  }
52
47
  else if (typeof cb === "function") {
53
48
  if (typeof optionsOrCb !== "object")
54
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
49
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
55
50
  this.send(command, optionsOrCb || {}, cb);
56
51
  }
57
52
  else {
58
53
  return this.send(command, optionsOrCb);
59
54
  }
60
- };
61
- MWAA.prototype.deleteEnvironment = function (args, optionsOrCb, cb) {
62
- var command = new DeleteEnvironmentCommand(args);
55
+ }
56
+ deleteEnvironment(args, optionsOrCb, cb) {
57
+ const command = new DeleteEnvironmentCommand(args);
63
58
  if (typeof optionsOrCb === "function") {
64
59
  this.send(command, optionsOrCb);
65
60
  }
66
61
  else if (typeof cb === "function") {
67
62
  if (typeof optionsOrCb !== "object")
68
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
63
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
69
64
  this.send(command, optionsOrCb || {}, cb);
70
65
  }
71
66
  else {
72
67
  return this.send(command, optionsOrCb);
73
68
  }
74
- };
75
- MWAA.prototype.getEnvironment = function (args, optionsOrCb, cb) {
76
- var command = new GetEnvironmentCommand(args);
69
+ }
70
+ getEnvironment(args, optionsOrCb, cb) {
71
+ const command = new GetEnvironmentCommand(args);
77
72
  if (typeof optionsOrCb === "function") {
78
73
  this.send(command, optionsOrCb);
79
74
  }
80
75
  else if (typeof cb === "function") {
81
76
  if (typeof optionsOrCb !== "object")
82
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
77
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
83
78
  this.send(command, optionsOrCb || {}, cb);
84
79
  }
85
80
  else {
86
81
  return this.send(command, optionsOrCb);
87
82
  }
88
- };
89
- MWAA.prototype.listEnvironments = function (args, optionsOrCb, cb) {
90
- var command = new ListEnvironmentsCommand(args);
83
+ }
84
+ listEnvironments(args, optionsOrCb, cb) {
85
+ const command = new ListEnvironmentsCommand(args);
91
86
  if (typeof optionsOrCb === "function") {
92
87
  this.send(command, optionsOrCb);
93
88
  }
94
89
  else if (typeof cb === "function") {
95
90
  if (typeof optionsOrCb !== "object")
96
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
91
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
97
92
  this.send(command, optionsOrCb || {}, cb);
98
93
  }
99
94
  else {
100
95
  return this.send(command, optionsOrCb);
101
96
  }
102
- };
103
- MWAA.prototype.listTagsForResource = function (args, optionsOrCb, cb) {
104
- var command = new ListTagsForResourceCommand(args);
97
+ }
98
+ listTagsForResource(args, optionsOrCb, cb) {
99
+ const command = new ListTagsForResourceCommand(args);
105
100
  if (typeof optionsOrCb === "function") {
106
101
  this.send(command, optionsOrCb);
107
102
  }
108
103
  else if (typeof cb === "function") {
109
104
  if (typeof optionsOrCb !== "object")
110
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
105
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
111
106
  this.send(command, optionsOrCb || {}, cb);
112
107
  }
113
108
  else {
114
109
  return this.send(command, optionsOrCb);
115
110
  }
116
- };
117
- MWAA.prototype.publishMetrics = function (args, optionsOrCb, cb) {
118
- var command = new PublishMetricsCommand(args);
111
+ }
112
+ publishMetrics(args, optionsOrCb, cb) {
113
+ const command = new PublishMetricsCommand(args);
119
114
  if (typeof optionsOrCb === "function") {
120
115
  this.send(command, optionsOrCb);
121
116
  }
122
117
  else if (typeof cb === "function") {
123
118
  if (typeof optionsOrCb !== "object")
124
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
119
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
125
120
  this.send(command, optionsOrCb || {}, cb);
126
121
  }
127
122
  else {
128
123
  return this.send(command, optionsOrCb);
129
124
  }
130
- };
131
- MWAA.prototype.tagResource = function (args, optionsOrCb, cb) {
132
- var command = new TagResourceCommand(args);
125
+ }
126
+ tagResource(args, optionsOrCb, cb) {
127
+ const command = new TagResourceCommand(args);
133
128
  if (typeof optionsOrCb === "function") {
134
129
  this.send(command, optionsOrCb);
135
130
  }
136
131
  else if (typeof cb === "function") {
137
132
  if (typeof optionsOrCb !== "object")
138
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
133
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
139
134
  this.send(command, optionsOrCb || {}, cb);
140
135
  }
141
136
  else {
142
137
  return this.send(command, optionsOrCb);
143
138
  }
144
- };
145
- MWAA.prototype.untagResource = function (args, optionsOrCb, cb) {
146
- var command = new UntagResourceCommand(args);
139
+ }
140
+ untagResource(args, optionsOrCb, cb) {
141
+ const command = new UntagResourceCommand(args);
147
142
  if (typeof optionsOrCb === "function") {
148
143
  this.send(command, optionsOrCb);
149
144
  }
150
145
  else if (typeof cb === "function") {
151
146
  if (typeof optionsOrCb !== "object")
152
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
147
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
153
148
  this.send(command, optionsOrCb || {}, cb);
154
149
  }
155
150
  else {
156
151
  return this.send(command, optionsOrCb);
157
152
  }
158
- };
159
- MWAA.prototype.updateEnvironment = function (args, optionsOrCb, cb) {
160
- var command = new UpdateEnvironmentCommand(args);
153
+ }
154
+ updateEnvironment(args, optionsOrCb, cb) {
155
+ const command = new UpdateEnvironmentCommand(args);
161
156
  if (typeof optionsOrCb === "function") {
162
157
  this.send(command, optionsOrCb);
163
158
  }
164
159
  else if (typeof cb === "function") {
165
160
  if (typeof optionsOrCb !== "object")
166
- throw new Error("Expect http options but get ".concat(typeof optionsOrCb));
161
+ throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
167
162
  this.send(command, optionsOrCb || {}, cb);
168
163
  }
169
164
  else {
170
165
  return this.send(command, optionsOrCb);
171
166
  }
172
- };
173
- return MWAA;
174
- }(MWAAClient));
175
- export { MWAA };
167
+ }
168
+ }
@@ -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 MWAAClient = (function (_super) {
13
- __extends(MWAAClient, _super);
14
- function MWAAClient(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 MWAAClient 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
- MWAAClient.prototype.destroy = function () {
35
- _super.prototype.destroy.call(this);
36
- };
37
- return MWAAClient;
38
- }(__Client));
39
- export { MWAAClient };
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 { CreateCliTokenRequestFilterSensitiveLog, CreateCliTokenResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateCliTokenCommand, serializeAws_restJson1CreateCliTokenCommand, } from "../protocols/Aws_restJson1";
6
- var CreateCliTokenCommand = (function (_super) {
7
- __extends(CreateCliTokenCommand, _super);
8
- function CreateCliTokenCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateCliTokenCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateCliTokenCommand.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 = "MWAAClient";
18
- var commandName = "CreateCliTokenCommand";
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 = "MWAAClient";
15
+ const commandName = "CreateCliTokenCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateCliTokenRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateCliTokenResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateCliTokenCommand.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_restJson1CreateCliTokenCommand(input, context);
33
- };
34
- CreateCliTokenCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateCliTokenCommand(output, context);
36
- };
37
- return CreateCliTokenCommand;
38
- }($Command));
39
- export { CreateCliTokenCommand };
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 { CreateEnvironmentInputFilterSensitiveLog, CreateEnvironmentOutputFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateEnvironmentCommand, serializeAws_restJson1CreateEnvironmentCommand, } from "../protocols/Aws_restJson1";
6
- var CreateEnvironmentCommand = (function (_super) {
7
- __extends(CreateEnvironmentCommand, _super);
8
- function CreateEnvironmentCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateEnvironmentCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateEnvironmentCommand.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 = "MWAAClient";
18
- var commandName = "CreateEnvironmentCommand";
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 = "MWAAClient";
15
+ const commandName = "CreateEnvironmentCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateEnvironmentInputFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateEnvironmentOutputFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateEnvironmentCommand.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_restJson1CreateEnvironmentCommand(input, context);
33
- };
34
- CreateEnvironmentCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateEnvironmentCommand(output, context);
36
- };
37
- return CreateEnvironmentCommand;
38
- }($Command));
39
- export { CreateEnvironmentCommand };
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 { CreateWebLoginTokenRequestFilterSensitiveLog, CreateWebLoginTokenResponseFilterSensitiveLog, } from "../models/models_0";
5
4
  import { deserializeAws_restJson1CreateWebLoginTokenCommand, serializeAws_restJson1CreateWebLoginTokenCommand, } from "../protocols/Aws_restJson1";
6
- var CreateWebLoginTokenCommand = (function (_super) {
7
- __extends(CreateWebLoginTokenCommand, _super);
8
- function CreateWebLoginTokenCommand(input) {
9
- var _this = _super.call(this) || this;
10
- _this.input = input;
11
- return _this;
5
+ export class CreateWebLoginTokenCommand extends $Command {
6
+ constructor(input) {
7
+ super();
8
+ this.input = input;
12
9
  }
13
- CreateWebLoginTokenCommand.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 = "MWAAClient";
18
- var commandName = "CreateWebLoginTokenCommand";
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 = "MWAAClient";
15
+ const commandName = "CreateWebLoginTokenCommand";
16
+ const handlerExecutionContext = {
17
+ logger,
18
+ clientName,
19
+ commandName,
23
20
  inputFilterSensitiveLog: CreateWebLoginTokenRequestFilterSensitiveLog,
24
21
  outputFilterSensitiveLog: CreateWebLoginTokenResponseFilterSensitiveLog,
25
22
  };
26
- var requestHandler = configuration.requestHandler;
27
- return stack.resolve(function (request) {
28
- return requestHandler.handle(request.request, options || {});
29
- }, handlerExecutionContext);
30
- };
31
- CreateWebLoginTokenCommand.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_restJson1CreateWebLoginTokenCommand(input, context);
33
- };
34
- CreateWebLoginTokenCommand.prototype.deserialize = function (output, context) {
28
+ }
29
+ deserialize(output, context) {
35
30
  return deserializeAws_restJson1CreateWebLoginTokenCommand(output, context);
36
- };
37
- return CreateWebLoginTokenCommand;
38
- }($Command));
39
- export { CreateWebLoginTokenCommand };
31
+ }
32
+ }